{"openapi":"3.1.0","info":{"title":"Anpheros Platform","description":"\nHealth-data platform for developers, clinics and AI agents.\n\n* **FHIR R4** at `/fhir/R4` — the strict interface (search, history, transactions, Provenance).\n* **REST v1** at `/v1` — the simplified interface for app developers, same data, same ids.\n* **Admin** at `/admin` — organizations, projects, applications and API keys (Firebase user token).\n* **OAuth 2.1 / SMART** at `/oauth/*` — patient consent with PKCE; `/me/*` — the patient's own connections.\n\nAuthenticate with an API key (`Authorization: Bearer sk_test_…` / `sk_live_…`) or an OAuth access token (`at_…`).\nEvery response carries `Anpheros-Request-Id`; POSTs accept `Idempotency-Key`.\n","version":"0.3.0"},"paths":{"/oauth/authorize":{"get":{"tags":["OAuth"],"summary":"Consent page (authorization code + PKCE)","operationId":"authorize_oauth_authorize_get","parameters":[{"name":"response_type","in":"query","required":true,"schema":{"type":"string","title":"Response Type"}},{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","title":"Redirect Uri"}},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":4096,"title":"State"}},{"name":"code_challenge","in":"query","required":true,"schema":{"type":"string","minLength":43,"maxLength":128,"title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"type":"string","default":"S256","title":"Code Challenge Method"}},{"name":"purpose","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose"}},{"name":"patient","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}},{"name":"resource","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}}}},"/oauth/token":{"post":{"tags":["OAuth"],"summary":"Token endpoint","operationId":"token_oauth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_token_oauth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/revoke":{"post":{"tags":["OAuth"],"summary":"Revoke an access or refresh token","operationId":"revoke_oauth_revoke_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_revoke_oauth_revoke_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fhir/R4/metadata":{"get":{"tags":["FHIR R4"],"summary":"CapabilityStatement","operationId":"metadata_fhir_R4_metadata_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/fhir/R4/CodeSystem/$lookup":{"get":{"tags":["FHIR R4"],"summary":"CodeSystem/$lookup (Anpheros symptom concepts)","operationId":"codesystem_lookup_fhir_R4_CodeSystem__lookup_get","parameters":[{"name":"system","in":"query","required":true,"schema":{"type":"string","title":"System"}},{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"displayLanguage","in":"query","required":false,"schema":{"type":"string","maxLength":10,"default":"en","title":"Displaylanguage"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/ValueSet/$expand":{"get":{"tags":["FHIR R4"],"summary":"ValueSet/$expand by url","operationId":"valueset_expand_by_url_fhir_R4_ValueSet__expand_get","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","title":"Url"}},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Filter"}},{"name":"displayLanguage","in":"query","required":false,"schema":{"type":"string","maxLength":10,"default":"en","title":"Displaylanguage"}},{"name":"count","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Count"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/CodeSystem":{"get":{"tags":["FHIR R4"],"summary":"CodeSystem search (read-only terminology)","operationId":"search_fhir_R4_CodeSystem_get","parameters":[{"name":"url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/CodeSystem/{rid}":{"get":{"tags":["FHIR R4"],"summary":"CodeSystem read (read-only terminology)","operationId":"read_fhir_R4_CodeSystem__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/ValueSet":{"get":{"tags":["FHIR R4"],"summary":"ValueSet search (read-only terminology)","operationId":"search_fhir_R4_ValueSet_get","parameters":[{"name":"url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/ValueSet/{rid}":{"get":{"tags":["FHIR R4"],"summary":"ValueSet read (read-only terminology)","operationId":"read_fhir_R4_ValueSet__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/ConceptMap":{"get":{"tags":["FHIR R4"],"summary":"ConceptMap search (read-only terminology)","operationId":"search_fhir_R4_ConceptMap_get","parameters":[{"name":"url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/ConceptMap/{rid}":{"get":{"tags":["FHIR R4"],"summary":"ConceptMap read (read-only terminology)","operationId":"read_fhir_R4_ConceptMap__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4":{"post":{"tags":["FHIR R4"],"summary":"Bundle transaction / batch","operationId":"transaction_fhir_R4_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"X-Anpheros-Author-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Author-Type"}},{"name":"X-Anpheros-Source-System","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Source-System"}},{"name":"X-Anpheros-Origin-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Origin-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/Patient/{rid}/$everything":{"get":{"tags":["FHIR R4"],"summary":"Patient/$everything","operationId":"everything_fhir_R4_Patient__rid___everything_get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/Patient/{rid}/$summary":{"get":{"tags":["FHIR R4"],"summary":"Patient/$summary (IPS document Bundle)","operationId":"summary_fhir_R4_Patient__rid___summary_get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/{resource_type}/$validate":{"post":{"tags":["FHIR R4"],"summary":"$validate (structure + optional profile)","operationId":"validate_resource_fhir_R4__resource_type___validate_post","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"profile","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/{resource_type}":{"get":{"tags":["FHIR R4"],"summary":"Search","operationId":"search_fhir_R4__resource_type__get","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"post":{"tags":["FHIR R4"],"summary":"Create","operationId":"create_fhir_R4__resource_type__post","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"X-Anpheros-Author-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Author-Type"}},{"name":"X-Anpheros-Source-System","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Source-System"}},{"name":"X-Anpheros-Origin-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Origin-Id"}},{"name":"X-Anpheros-Author-Ref","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Author-Ref"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/{resource_type}/{rid}":{"get":{"tags":["FHIR R4"],"summary":"Read","operationId":"read_fhir_R4__resource_type___rid__get","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"put":{"tags":["FHIR R4"],"summary":"Update","operationId":"update_fhir_R4__resource_type___rid__put","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"If-Match"}},{"name":"X-Anpheros-Author-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Author-Type"}},{"name":"X-Anpheros-Source-System","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Source-System"}},{"name":"X-Anpheros-Origin-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Origin-Id"}},{"name":"X-Anpheros-Author-Ref","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Author-Ref"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"delete":{"tags":["FHIR R4"],"summary":"Delete","description":"`?_purge=true` (doar Patient, doar proiectul care l-a creat): după ștergerea obișnuită, care anunță\nabonații, dosarul se șterge fizic, cu istoric și documente. Folosit la ștergerea unui cont Anpheros.","operationId":"delete_fhir_R4__resource_type___rid__delete","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"_purge","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":" Purge"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/{resource_type}/{rid}/_history":{"get":{"tags":["FHIR R4"],"summary":"History","operationId":"history_fhir_R4__resource_type___rid___history_get","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/fhir/R4/{resource_type}/{rid}/_history/{vid}":{"get":{"tags":["FHIR R4"],"summary":"Version read","operationId":"vread_fhir_R4__resource_type___rid___history__vid__get","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string","title":"Rid"}},{"name":"vid","in":"path","required":true,"schema":{"type":"string","title":"Vid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients":{"get":{"tags":["REST v1"],"summary":"List patients visible to this project","operationId":"list_patients_v1_patients_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"post":{"tags":["REST v1"],"summary":"Create a patient owned by this project","operationId":"create_patient_v1_patients_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"X-Anpheros-Author-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Author-Type"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}":{"get":{"tags":["REST v1"],"summary":"Read a patient","operationId":"read_patient_v1_patients__patient_id__get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOut"}}}},"404":{"description":"Not found for this caller."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"put":{"tags":["REST v1"],"summary":"Update a patient's demographics","operationId":"update_patient_v1_patients__patient_id__put","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"X-Anpheros-Author-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Author-Type"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/observations":{"get":{"tags":["REST v1"],"summary":"List observations","operationId":"list_observations_v1_patients__patient_id__observations_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["vital-signs","laboratory","symptom","activity","survey","exam","imaging","social-history"]},"description":"Observation category"},{"name":"code","in":"query","required":false,"schema":{"type":"string"},"description":"Observation code, e.g. a LOINC code (`4548-4`) or `system|code`"},{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"Earliest effective date (YYYY-MM-DD), inclusive"},{"name":"to","in":"query","required":false,"schema":{"type":"string"},"description":"Latest effective date (YYYY-MM-DD), inclusive"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObservationPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"post":{"tags":["REST v1"],"summary":"Create observation","operationId":"create_observations_v1_patients__patient_id__observations_post","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"X-Anpheros-Author-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Author-Type"}},{"name":"X-Anpheros-Source-System","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Source-System"}},{"name":"X-Anpheros-Origin-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Origin-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObservationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/observations/{item_id}":{"get":{"tags":["REST v1"],"summary":"Read observation","operationId":"read_observations_v1_observations__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObservationOut"}}}},"404":{"description":"Not found for this caller."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"delete":{"tags":["REST v1"],"summary":"Delete observation","operationId":"delete_observations_v1_observations__item_id__delete","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"204":{"description":"Deleted."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/conditions":{"get":{"tags":["REST v1"],"summary":"List conditions","operationId":"list_conditions_v1_patients__patient_id__conditions_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}},{"name":"clinical_status","in":"query","required":false,"schema":{"type":"string","enum":["active","recurrence","relapse","inactive","remission","resolved"]},"description":"Clinical status"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"post":{"tags":["REST v1"],"summary":"Create condition","operationId":"create_conditions_v1_patients__patient_id__conditions_post","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"X-Anpheros-Author-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Author-Type"}},{"name":"X-Anpheros-Source-System","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Source-System"}},{"name":"X-Anpheros-Origin-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Origin-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/conditions/{item_id}":{"get":{"tags":["REST v1"],"summary":"Read condition","operationId":"read_conditions_v1_conditions__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionOut"}}}},"404":{"description":"Not found for this caller."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"delete":{"tags":["REST v1"],"summary":"Delete condition","operationId":"delete_conditions_v1_conditions__item_id__delete","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"204":{"description":"Deleted."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/medications":{"get":{"tags":["REST v1"],"summary":"List medications","operationId":"list_medications_v1_patients__patient_id__medications_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","completed","stopped","on-hold","intended","unknown"]},"description":"Medication status"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"post":{"tags":["REST v1"],"summary":"Create medication","operationId":"create_medications_v1_patients__patient_id__medications_post","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"X-Anpheros-Author-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Author-Type"}},{"name":"X-Anpheros-Source-System","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Source-System"}},{"name":"X-Anpheros-Origin-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Origin-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/medications/{item_id}":{"get":{"tags":["REST v1"],"summary":"Read medication","operationId":"read_medications_v1_medications__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationOut"}}}},"404":{"description":"Not found for this caller."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"delete":{"tags":["REST v1"],"summary":"Delete medication","operationId":"delete_medications_v1_medications__item_id__delete","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"204":{"description":"Deleted."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/documents":{"get":{"tags":["REST v1"],"summary":"List documents","operationId":"list_documents_v1_patients__patient_id__documents_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"enum":["lab_report","discharge_summary","prescription","imaging_report","referral","other"],"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"post":{"tags":["REST v1"],"summary":"Create a document and get an upload target","operationId":"create_document_v1_patients__patient_id__documents_post","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"X-Anpheros-Author-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Author-Type"}},{"name":"X-Anpheros-Source-System","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Source-System"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/documents/{doc_id}":{"get":{"tags":["REST v1"],"summary":"Read a document's metadata","operationId":"read_document_v1_documents__doc_id__get","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/documents/{doc_id}/content":{"put":{"tags":["REST v1"],"summary":"Upload the document's bytes through the platform","operationId":"upload_content_v1_documents__doc_id__content_put","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentOut"}}}},"409":{"description":"Already final."},"413":{"description":"Over the document size limit."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"get":{"tags":["REST v1"],"summary":"Download the original document","operationId":"download_content_v1_documents__doc_id__content_get","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"The original bytes.","content":{"application/json":{"schema":{}},"application/octet-stream":{}}},"307":{"description":"Redirect to a signed download URL (15 minutes)."},"410":{"description":"File deleted."},"503":{"description":"Document storage unavailable; retry."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/documents/{doc_id}/finalize":{"post":{"tags":["REST v1"],"summary":"Finalize after a direct-to-storage upload","operationId":"finalize_document_v1_documents__doc_id__finalize_post","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/grants":{"get":{"tags":["REST v1"],"summary":"What this application may do for the patient, until when","operationId":"patient_grants_v1_patients__patient_id__grants_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/context":{"post":{"tags":["REST v1"],"summary":"Build an AI-ready, provenance-labelled context for a patient","operationId":"context_v1_context_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextOut"}}}},"403":{"description":"The consent behind this token does not allow reading observations, conditions, medications and allergies."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/patterns":{"get":{"tags":["REST v1"],"summary":"Health patterns in a patient's record (beta)","description":"Trends, deviations from the person's usual level and symptom recurrence, each with its period, supporting\nresources, method version and limitations. Derived by fixed statistical rules: not diagnoses, not causes.","operationId":"patterns_v1_patients__patient_id__patterns_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day of the window (UTC, ISO date); default today","title":"End"},"description":"Last day of the window (UTC, ISO date); default today"},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":730,"minimum":30,"description":"Days in the analysis window, ending on `end`","default":180,"title":"Window Days"},"description":"Days in the analysis window, ending on `end`"},{"name":"types","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated: trend, baseline_deviation, recurrence","title":"Types"},"description":"Comma-separated: trend, baseline_deviation, recurrence"},{"name":"min_strength","in":"query","required":false,"schema":{"enum":["not_tested","weak","moderate","strong"],"type":"string","default":"not_tested","title":"Min Strength"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatternRun"}}}},"403":{"description":"Production credentials, or not allowed by consent"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/patterns/{finding_id}":{"get":{"tags":["REST v1"],"summary":"One health-pattern finding (beta)","description":"Recomputed for the same window; when the record changed, the finding gets a new id and this one answers 404.","operationId":"pattern_v1_patients__patient_id__patterns__finding_id__get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"finding_id","in":"path","required":true,"schema":{"type":"string","title":"Finding Id"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day of the window (UTC, ISO date); default today","title":"End"},"description":"Last day of the window (UTC, ISO date); default today"},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":730,"minimum":30,"description":"Days in the analysis window, ending on `end`","default":180,"title":"Window Days"},"description":"Days in the analysis window, ending on `end`"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatternFinding"}}}},"404":{"description":"Not in the current data for this window"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/patterns/{finding_id}/evidence":{"get":{"tags":["REST v1"],"summary":"All supporting resources of a finding (beta)","operationId":"pattern_evidence_v1_patients__patient_id__patterns__finding_id__evidence_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"finding_id","in":"path","required":true,"schema":{"type":"string","title":"Finding Id"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day of the window (UTC, ISO date); default today","title":"End"},"description":"Last day of the window (UTC, ISO date); default today"},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":730,"minimum":30,"description":"Days in the analysis window, ending on `end`","default":180,"title":"Window Days"},"description":"Days in the analysis window, ending on `end`"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatternEvidencePage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/series":{"get":{"tags":["REST v1"],"summary":"One measurement over time, one value per day (beta)","description":"Daily medians (UTC days) of one measurement with data quality: coverage, gaps, sources, source changes.\nValues written by AI, entered-in-error results and month-only dates are left out and counted.","operationId":"series_v1_patients__patient_id__series_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"code","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Code"}},{"name":"unit","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Unit"}},{"name":"component_of","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Component Of"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/patterns/compare":{"post":{"tags":["REST v1"],"summary":"Compare one measurement between two periods (beta)","description":"Daily medians of the second period against the first (Mann–Whitney, or a seeded permutation test with repeated\nvalues). One test only: q = p. The periods must not overlap and each may span at most 730 days.","operationId":"pattern_compare_v1_patients__patient_id__patterns_compare_post","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatternCompareOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/terminology/symptoms":{"get":{"tags":["REST v1"],"summary":"List or search symptom concepts","description":"Names, ICD-10 and ICD-11 codes, body system, labels in 20 languages, match terms and source-quoted warning signs;\nno causes or associations. Every response carries the release and `clinical_review: false` until a clinician reviews it.","operationId":"symptom_concepts_v1_terminology_symptoms_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"description":"Text, concept id or ICD-10 code","title":"Q"},"description":"Text, concept id or ICD-10 code"},{"name":"icd10","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"description":"Only the concept mapped to this ICD-10 code","title":"Icd10"},"description":"Only the concept mapped to this ICD-10 code"},{"name":"icd11","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"description":"Only concepts mapped to this ICD-11 MMS code","title":"Icd11"},"description":"Only concepts mapped to this ICD-11 MMS code"},{"name":"body_system","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"Only concepts of this body system (e.g. nervous, digestive)","title":"Body System"},"description":"Only concepts of this body system (e.g. nervous, digestive)"},{"name":"kind","in":"query","required":false,"schema":{"enum":["symptom","finding","all"],"type":"string","default":"symptom","title":"Kind"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":10,"description":"Language of `display`: the preferred label, else the lay label in that language, else English","default":"en","title":"Lang"},"description":"Language of `display`: the preferred label, else the lay label in that language, else English"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymptomConceptPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/terminology/symptoms/{concept_id}":{"get":{"tags":["REST v1"],"summary":"Look up one symptom concept","operationId":"symptom_concept_v1_terminology_symptoms__concept_id__get","parameters":[{"name":"concept_id","in":"path","required":true,"schema":{"type":"string","title":"Concept Id"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":10,"default":"en","title":"Lang"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymptomConceptOut"}}}},"404":{"description":"Unknown concept id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/search":{"get":{"tags":["REST v1","Anpheros Search"],"summary":"Search symptoms, conditions and treatments","description":"Public, no API key needed (60 searches a minute and 2,000 a day per IP without a key). Full-text search with synonyms over the public catalog. Ordered by how the text matched (exact name, start of\na name, every word, part of a word), then alphabetically: no popularity, score or recommendation. General\ninformation only: Anpheros does not diagnose and does not recommend treatment.","operationId":"health_search_v1_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"description":"Name in any of 20 languages, synonym, brand name, ICD-10 / ICD-11 code, RxNorm RXCUI or Anpheros id","title":"Q"},"description":"Name in any of 20 languages, synonym, brand name, ICD-10 / ICD-11 code, RxNorm RXCUI or Anpheros id"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"enum":["symptom","condition","treatment"],"type":"string"},{"type":"null"}],"description":"Only this type (catalog `data` only)","title":"Type"},"description":"Only this type (catalog `data` only)"},{"name":"types","in":"query","required":false,"schema":{"type":"string","maxLength":120,"description":"Groups to return, comma-separated: symptom, condition, treatment, page, article (Europe PMC), trial (ClinicalTrials.gov), document (EMA, FDA)","default":"symptom,condition,treatment,page,article,trial,document","title":"Types"},"description":"Groups to return, comma-separated: symptom, condition, treatment, page, article (Europe PMC), trial (ClinicalTrials.gov), document (EMA, FDA)"},{"name":"lang","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":10,"description":"Language of `display`; English when that language has no published name yet","default":"en","title":"Lang"},"description":"Language of `display`; English when that language has no published name yet"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/search/popular":{"get":{"tags":["REST v1","Anpheros Search"],"summary":"Popular and trending searches last week (anonymous, at least 20 people per term)","description":"Public, no API key needed. The catalog terms that the most different people looked up on Anpheros Search in the\nlast full week (Monday–Sunday, UTC), and the ones that rose the most compared with the week before. Anonymous\naggregates only: a term appears only when at least 20 different people looked it up, counts are ranges, sensitive\ntopics (mental health, pregnancy, HIV, sexually transmitted infections…) never appear, and no search text, IP or\naccount is kept.","operationId":"search_popular_v1_search_popular_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":10,"description":"Language of `display`; English when that language has no published name yet","default":"en","title":"Lang"},"description":"Language of `display`; English when that language has no published name yet"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":10,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/search/{concept_id}":{"get":{"tags":["REST v1","Anpheros Search"],"summary":"Look up one catalog entry (symptom, condition or treatment)","description":"Public, no API key needed (same limits as /v1/search). The same entry as /v1/terminology/{symptoms|conditions|treatments}/{id}, in the catalog shape for every type: codes,\nnames, the MedlinePlus summary, links that appear in a cited source, quoted indications and the required attribution.","operationId":"health_term_v1_search__concept_id__get","parameters":[{"name":"concept_id","in":"path","required":true,"schema":{"type":"string","title":"Concept Id"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":10,"description":"Language of `display`; English when that language has no published name yet","default":"en","title":"Lang"},"description":"Language of `display`; English when that language has no published name yet"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthTermOut"}}}},"404":{"description":"Unknown id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/terminology/conditions":{"get":{"tags":["REST v1","Anpheros Search"],"summary":"List or search conditions","description":"WHO ICD-10 and ICD-11 codes and titles, names in 20 languages, the MedlinePlus summary (public domain), the\nsymptoms the sources link to it and the treatments with an official indication for it, alphabetically.","operationId":"condition_terms_v1_terminology_conditions_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"description":"Name, synonym, ICD-10 / ICD-11 code or id","title":"Q"},"description":"Name, synonym, ICD-10 / ICD-11 code or id"},{"name":"lang","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":10,"description":"Language of `display`; English when that language has no published name yet","default":"en","title":"Lang"},"description":"Language of `display`; English when that language has no published name yet"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthTermPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/terminology/conditions/{concept_id}":{"get":{"tags":["REST v1","Anpheros Search"],"summary":"Look up one condition","operationId":"condition_term_v1_terminology_conditions__concept_id__get","parameters":[{"name":"concept_id","in":"path","required":true,"schema":{"type":"string","title":"Concept Id"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":10,"description":"Language of `display`; English when that language has no published name yet","default":"en","title":"Lang"},"description":"Language of `display`; English when that language has no published name yet"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthTermOut"}}}},"404":{"description":"Unknown condition id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/terminology/treatments":{"get":{"tags":["REST v1","Anpheros Search"],"summary":"List or search treatments (active substances)","description":"The active substance (INN) with its RxNorm and EMA identifiers, and its indications quoted unchanged from EMA\n(EPAR) and FDA labels, with source and date. Not a recommendation: what a medicine is approved for, not whether\nit is right for anyone.","operationId":"treatment_terms_v1_terminology_treatments_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"description":"Substance (INN), brand name, RxNorm RXCUI or id","title":"Q"},"description":"Substance (INN), brand name, RxNorm RXCUI or id"},{"name":"lang","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":10,"description":"Language of `display`; English when that language has no published name yet","default":"en","title":"Lang"},"description":"Language of `display`; English when that language has no published name yet"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthTermPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/terminology/treatments/{concept_id}":{"get":{"tags":["REST v1","Anpheros Search"],"summary":"Look up one treatment","operationId":"treatment_term_v1_terminology_treatments__concept_id__get","parameters":[{"name":"concept_id","in":"path","required":true,"schema":{"type":"string","title":"Concept Id"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":10,"description":"Language of `display`; English when that language has no published name yet","default":"en","title":"Lang"},"description":"Language of `display`; English when that language has no published name yet"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthTermOut"}}}},"404":{"description":"Unknown treatment id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/terminology/{system}":{"get":{"tags":["REST v1"],"summary":"Search the bundled LOINC subset (ATC lookup temporarily unavailable)","operationId":"terminology_search_v1_terminology__system__get","parameters":[{"name":"system","in":"path","required":true,"schema":{"enum":["loinc","atc"],"type":"string","title":"System"}},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminologyPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/terminology/{system}/{code}":{"get":{"tags":["REST v1"],"summary":"Look up one code","operationId":"terminology_lookup_v1_terminology__system___code__get","parameters":[{"name":"system","in":"path","required":true,"schema":{"enum":["loinc","atc"],"type":"string","title":"System"}},{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminologyCode"}}}},"404":{"description":"Not in the bundled subset (the code may still be used)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/neuro-summary":{"get":{"tags":["REST v1"],"summary":"Neurology view: head imaging, episodes, head symptoms, treatment, before/after the last MRI (beta)","description":"Vederea neurologului (Neuro E7, 17 oct 2026): ce vede pacientul în meniul Neuro, din resursele deja\noglindite, sub aceleași reguli de consimțământ ca o căutare directă; intră în jurnalul de acces.","operationId":"neuro_summary_v1_patients__patient_id__neuro_summary_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"today","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Local day (YYYY-MM-DD)","title":"Today"},"description":"Local day (YYYY-MM-DD)"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Counts and references with provenance; nothing interpretive.","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/timeline":{"get":{"tags":["REST v1"],"summary":"Chronological view across resource types","operationId":"timeline_v1_patients__patient_id__timeline_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"types","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Types"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimelinePage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/provenance/{resource_type}/{resource_id}":{"get":{"tags":["REST v1"],"summary":"Who wrote a resource, and when","operationId":"provenance_v1_patients__patient_id__provenance__resource_type___resource_id__get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","title":"Resource Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvenanceList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/patients/{patient_id}/labs/import":{"post":{"tags":["REST v1"],"summary":"Import a lab report (CSV, HL7 v2 ORU^R01 or JSON) as laboratory Observations","description":"Un buletin întreg într-o singură cerere: fiecare rând devine un Observation de\nlaborator (LOINC unde îl recunoaștem, altfel codul laboratorului + textul de pe buletin),\ncu interval de referință și interpretare. Rândurile deja importate (același buletin,\nmarker, dată și valoare) sunt sărite, deci retrimiterea e sigură.","operationId":"import_labs_v1_patients__patient_id__labs_import_post","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default date (ISO) for rows without one","title":"Date"},"description":"Default date (ISO) for rows without one"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"X-Anpheros-Source-System","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Source-System"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabsImportOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/admin/organizations":{"post":{"tags":["Admin"],"summary":"Create an organization (you become owner)","operationId":"create_organization_admin_organizations_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]},"get":{"tags":["Admin"],"summary":"Organizations you belong to","operationId":"list_organizations_admin_organizations_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationOut"},"title":"Response List Organizations Admin Organizations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/organizations/{org_id}":{"get":{"tags":["Admin"],"summary":"Read Organization","operationId":"read_organization_admin_organizations__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/organizations/{org_id}/sso":{"put":{"tags":["Admin"],"summary":"Platform admin: link an organisation to its SAML/OIDC provider for team single sign-on","operationId":"set_sso_admin_organizations__org_id__sso_put","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/sso/discover":{"get":{"tags":["Admin"],"summary":"Which single sign-on provider a work email uses (no auth)","description":"Consola întreabă după domeniul adresei; răspunsul spune doar providerul, nu organizația.","operationId":"sso_discover_admin_sso_discover_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","maxLength":320,"title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/organizations/{org_id}/verify":{"post":{"tags":["Admin"],"summary":"Platform admin: mark verified / DPA signed","operationId":"verify_organization_admin_organizations__org_id__verify_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/organizations/{org_id}/projects":{"post":{"tags":["Admin"],"summary":"Create a project (a sandbox project comes with its own 30 synthetic patients)","operationId":"create_project_admin_organizations__org_id__projects_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]},"get":{"tags":["Admin"],"summary":"List Projects","operationId":"list_projects_admin_organizations__org_id__projects_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectOut"},"title":"Response List Projects Admin Organizations  Org Id  Projects Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/projects/{project_id}":{"get":{"tags":["Admin"],"summary":"Read Project","operationId":"read_project_admin_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]},"delete":{"tags":["Admin"],"summary":"Delete a project (keys stop working immediately)","operationId":"delete_project_admin_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/projects/{project_id}/keys":{"post":{"tags":["Admin"],"summary":"Create an API key (shown once)","operationId":"create_key_admin_projects__project_id__keys_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]},"get":{"tags":["Admin"],"summary":"List Keys","operationId":"list_keys_admin_projects__project_id__keys_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KeyOut"},"title":"Response List Keys Admin Projects  Project Id  Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/keys/{key_id}":{"delete":{"tags":["Admin"],"summary":"Revoke a key","operationId":"revoke_key_admin_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/projects/{project_id}/applications":{"post":{"tags":["Admin"],"summary":"Register an OAuth application","operationId":"create_application_admin_projects__project_id__applications_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]},"get":{"tags":["Admin"],"summary":"List Applications","operationId":"list_applications_admin_projects__project_id__applications_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationOut"},"title":"Response List Applications Admin Projects  Project Id  Applications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/applications/{application_id}/branding":{"put":{"tags":["Admin"],"summary":"Set the logo and accent colour shown on this application's consent page","operationId":"set_branding_admin_applications__application_id__branding_put","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","title":"Application Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/applications/{application_id}/trust":{"post":{"tags":["Admin"],"summary":"Platform admin: mark a first-party client as trusted","operationId":"trust_application_admin_applications__application_id__trust_post","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","title":"Application Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/applications/{application_id}":{"delete":{"tags":["Admin"],"summary":"Disable an application (its tokens stop working)","operationId":"disable_application_admin_applications__application_id__delete","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","title":"Application Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/projects/{project_id}/logs":{"get":{"tags":["Admin"],"summary":"Request log for a project (last 7 days)","operationId":"project_logs_admin_projects__project_id__logs_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"since_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Since Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/projects/{project_id}/usage":{"get":{"tags":["Admin"],"summary":"Usage counters for a project","operationId":"project_usage_admin_projects__project_id__usage_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/config":{"get":{"tags":["Admin"],"summary":"Public configuration for the developer dashboard (no auth)","operationId":"dashboard_config_admin_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/projects/{project_id}/webhooks":{"get":{"tags":["Admin"],"summary":"Webhook endpoints of a project","operationId":"admin_list_webhooks_admin_projects__project_id__webhooks_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]},"post":{"tags":["Admin"],"summary":"Register a webhook endpoint (secret shown once)","operationId":"admin_create_webhook_admin_projects__project_id__webhooks_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/webhooks/{endpoint_id}":{"patch":{"tags":["Admin"],"summary":"Change a webhook endpoint","operationId":"admin_update_webhook_admin_webhooks__endpoint_id__patch","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]},"delete":{"tags":["Admin"],"summary":"Remove a webhook endpoint","operationId":"admin_delete_webhook_admin_webhooks__endpoint_id__delete","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/webhooks/{endpoint_id}/rotate":{"post":{"tags":["Admin"],"summary":"New signing secret (shown once)","operationId":"admin_rotate_webhook_admin_webhooks__endpoint_id__rotate_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/webhooks/{endpoint_id}/ping":{"post":{"tags":["Admin"],"summary":"Send a test event","operationId":"admin_ping_webhook_admin_webhooks__endpoint_id__ping_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/webhooks/{endpoint_id}/deliveries":{"get":{"tags":["Admin"],"summary":"Delivery log","operationId":"admin_webhook_deliveries_admin_webhooks__endpoint_id__deliveries_get","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["pending","delivered","failed","exhausted"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/webhooks/{endpoint_id}/deliveries/{delivery_id}/redeliver":{"post":{"tags":["Admin"],"summary":"Send a delivery again now","operationId":"admin_redeliver_admin_webhooks__endpoint_id__deliveries__delivery_id__redeliver_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","title":"Delivery Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/projects/{project_id}/patients":{"get":{"tags":["Admin"],"summary":"Patients of a sandbox project: its own and its synthetic copy","description":"Doar pentru proiecte sandbox: pacienții creați de proiect (întâi) și copia lui de pacienți\nsintetici, cu id-ul pairwise pe care îl vede proiectul. Pentru producție lista e goală:\ndashboard-ul nu afișează persoane reale.","operationId":"admin_sandbox_patients_admin_projects__project_id__patients_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":600,"minimum":1,"default":100,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/projects/{project_id}/sandbox":{"get":{"tags":["Admin"],"summary":"Sandbox: the project's synthetic patients and its limits","operationId":"sandbox_status_admin_projects__project_id__sandbox_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/projects/{project_id}/sandbox/reset":{"post":{"tags":["Admin"],"summary":"Sandbox: recreate the synthetic patients as they were at the start (new ids; the project's own patients stay)","description":"Șterge copia sintetică a proiectului, cu tot ce a scris proiectul pe ea (observații,\ndocumente, consimțăminte), și o face din nou, cu șase luni de istoric până azi. Dacă\nproiectul nu avea încă o copie (proiect creat înainte de 28 sep 2026), o face acum.","operationId":"sandbox_reset_admin_projects__project_id__sandbox_reset_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/sandbox/quickstart":{"post":{"tags":["Admin"],"summary":"Sandbox in one step: an organisation (if you have none), a sandbox project with its synthetic patients, an API key (shown once)","operationId":"sandbox_quickstart_admin_sandbox_quickstart_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QuickstartIn"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/projects/{project_id}/consents":{"get":{"tags":["Admin"],"summary":"People who granted this project's applications access to their record","operationId":"project_consents_admin_projects__project_id__consents_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/admin/projects/{project_id}/patients/{patient_id}/record":{"get":{"tags":["Admin"],"summary":"A consented patient's record, as the consent allows (portal view)","description":"Pentru clinicile fără integrare: dosarul persoanei care a dat acces proiectului, construit\nde motorul de context sub scope-urile grant-ului activ (nimic în afara consimțământului).\nAccesul se scrie în jurnal cu grant-ul, deci pacientul îl vede în „Conexiuni”.","operationId":"project_patient_record_admin_projects__project_id__patients__patient_id__record_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}},{"name":"format","in":"query","required":false,"schema":{"enum":["structured","text"],"type":"string","default":"text","title":"Format"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/patients":{"get":{"tags":["Patient (me)"],"summary":"My records (and my dependents')","operationId":"my_patients_me_patients_get","parameters":[{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/patients/{patient_id}/grants":{"get":{"tags":["Patient (me)"],"summary":"Who has access to this record","operationId":"my_grants_me_patients__patient_id__grants_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/patients/{patient_id}/grants/{grant_id}/revoke":{"post":{"tags":["Patient (me)"],"summary":"Revoke an app's access","operationId":"my_revoke_me_patients__patient_id__grants__grant_id__revoke_post","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RevokeIn"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/patients/{patient_id}/grants/{grant_id}/access-log":{"get":{"tags":["Patient (me)"],"summary":"What this app read or wrote","operationId":"my_access_log_me_patients__patient_id__grants__grant_id__access_log_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"format","in":"query","required":false,"schema":{"enum":["json","fhir"],"type":"string","default":"json","title":"Format"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/patients/{patient_id}/shl":{"post":{"tags":["Patient (me)"],"summary":"Create a SMART Health Link (QR) to my summary","operationId":"create_link_me_patients__patient_id__shl_post","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShlIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]},"get":{"tags":["Patient (me)"],"summary":"My SMART Health Links, with how often each was opened","operationId":"list_links_me_patients__patient_id__shl_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/patients/{patient_id}/shl/{link_id}/revoke":{"post":{"tags":["Patient (me)"],"summary":"Switch a SMART Health Link off","operationId":"revoke_link_me_patients__patient_id__shl__link_id__revoke_post","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/patients/{patient_id}/preferences/results":{"get":{"tags":["Patient (me)"],"summary":"When results from clinics appear: right away or after the doctor saw them","operationId":"get_pref_me_patients__patient_id__preferences_results_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]},"put":{"tags":["Patient (me)"],"summary":"Choose when results from clinics appear","operationId":"put_pref_me_patients__patient_id__preferences_results_put","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleasePrefIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/patients/{patient_id}/results/held":{"get":{"tags":["Patient (me)"],"summary":"Results waiting for the doctor: who sent them and until when (no content)","operationId":"held_list_me_patients__patient_id__results_held_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/patients/{patient_id}/results/held/{resource_id}/release":{"post":{"tags":["Patient (me)"],"summary":"Show a waiting result now („Show it now”)","operationId":"release_now_me_patients__patient_id__results_held__resource_id__release_post","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","title":"Resource Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/oauth/bc-authorize":{"post":{"tags":["Access requests"],"summary":"Ask a person for access to their record (CIBA, poll mode)","description":"Recepția clinicii scrie emailul persoanei; persoana aprobă în aplicația ei. Doar clienți confidențiali.","operationId":"bc_authorize_oauth_bc_authorize_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_bc_authorize_oauth_bc_authorize_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}}}},"/me/access-requests":{"get":{"tags":["Patient (me)"],"summary":"Clinics and apps asking for access to my record","operationId":"list_requests_me_access_requests_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["pending","all"],"type":"string","default":"pending","title":"Status"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/access-requests/{request_id}/approve":{"post":{"tags":["Patient (me)"],"summary":"Allow the clinic that asked","operationId":"approve_me_access_requests__request_id__approve_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DecisionIn"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/access-requests/{request_id}/deny":{"post":{"tags":["Patient (me)"],"summary":"Refuse the clinic that asked","operationId":"deny_me_access_requests__request_id__deny_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/patients/{patient_id}/proposals":{"get":{"tags":["Patient (me)"],"summary":"What AI agents want to write in my record","operationId":"list_proposals_me_patients__patient_id__proposals_get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"status","in":"query","required":false,"schema":{"enum":["pending","accepted","rejected","all"],"type":"string","default":"pending","title":"Status"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/patients/{patient_id}/proposals/{proposal_id}/accept":{"post":{"tags":["Patient (me)"],"summary":"Accept what an AI agent proposed","operationId":"accept_proposal_me_patients__patient_id__proposals__proposal_id__accept_post","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","title":"Proposal Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/me/patients/{patient_id}/proposals/{proposal_id}/reject":{"post":{"tags":["Patient (me)"],"summary":"Reject what an AI agent proposed","operationId":"reject_proposal_me_patients__patient_id__proposals__proposal_id__reject_post","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","title":"Patient Id"}},{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","title":"Proposal Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["sandbox","production"],"type":"string","default":"production","title":"Environment"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}},"security":[{"firebase":[]}]}},"/shl/{link_id}":{"post":{"tags":["SMART Health Links"],"summary":"SMART Health Link manifest (the content, encrypted with the link's key)","operationId":"manifest_shl__link_id__post","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManifestIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}}}},"/shl/{link_id}/file/{token}":{"get":{"tags":["SMART Health Links"],"summary":"One document of a SMART Health Link (JWE, short-lived URL from the manifest)","operationId":"link_file_shl__link_id__file__token__get","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}},{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."}}}},"/v1/webhooks":{"post":{"tags":["Webhooks"],"summary":"Register a webhook endpoint (the secret is shown once)","operationId":"create_endpoint_v1_webhooks_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"get":{"tags":["Webhooks"],"summary":"List webhook endpoints","operationId":"list_endpoints_v1_webhooks_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/webhooks/event-types":{"get":{"tags":["Webhooks"],"summary":"Event types you can subscribe to","operationId":"event_types_v1_webhooks_event_types_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/webhooks/{endpoint_id}":{"get":{"tags":["Webhooks"],"summary":"One endpoint","operationId":"get_endpoint_v1_webhooks__endpoint_id__get","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"patch":{"tags":["Webhooks"],"summary":"Change url, events, description or active","operationId":"update_endpoint_v1_webhooks__endpoint_id__patch","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]},"delete":{"tags":["Webhooks"],"summary":"Remove an endpoint (pending deliveries are dropped)","operationId":"delete_endpoint_v1_webhooks__endpoint_id__delete","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/webhooks/{endpoint_id}/rotate":{"post":{"tags":["Webhooks"],"summary":"New signing secret (shown once); the old one stops working immediately","operationId":"rotate_secret_v1_webhooks__endpoint_id__rotate_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/webhooks/{endpoint_id}/ping":{"post":{"tags":["Webhooks"],"summary":"Send a test event to this endpoint","operationId":"ping_v1_webhooks__endpoint_id__ping_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/webhooks/{endpoint_id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"Delivery log of an endpoint, newest first","operationId":"deliveries_v1_webhooks__endpoint_id__deliveries_get","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["pending","delivered","failed","exhausted"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/webhooks/{endpoint_id}/deliveries/redeliver-exhausted":{"post":{"tags":["Webhooks"],"summary":"Dead-letter: send every exhausted delivery again now","operationId":"redeliver_exhausted_v1_webhooks__endpoint_id__deliveries_redeliver_exhausted_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}},"/v1/webhooks/{endpoint_id}/deliveries/{delivery_id}/redeliver":{"post":{"tags":["Webhooks"],"summary":"Send a delivery again now","operationId":"redeliver_v1_webhooks__endpoint_id__deliveries__delivery_id__redeliver_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","title":"Delivery Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Api-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-Anpheros-Acting-As","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-Acting-As"}},{"name":"X-Anpheros-On-Behalf-Of","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anpheros-On-Behalf-Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing, invalid, expired or revoked credential (`WWW-Authenticate: Bearer`)."},"403":{"description":"The credential's scope or the patient's consent does not allow this."},"429":{"description":"Rate limit exceeded; wait `Retry-After` seconds."}},"security":[{"bearer":[]},{"apiKey":[]},{"oauth2":["patient/*.rs","patient/Observation.rs","patient/Observation.rs?category=laboratory","patient/Condition.rs","patient/MedicationStatement.rs","patient/DocumentReference.rs","patient/AllergyIntolerance.rs","offline_access","openid","fhirUser","anpheros/patterns"]}]}}},"components":{"schemas":{"ApplicationIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":2,"title":"Name"},"kind":{"type":"string","enum":["app","agent","connector"],"title":"Kind","default":"app"},"client_type":{"type":"string","enum":["confidential","public"],"title":"Client Type","default":"public"},"redirect_uris":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Redirect Uris"},"purpose":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Purpose"},"privacy_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Privacy Url"}},"type":"object","required":["name","redirect_uris"],"title":"ApplicationIn"},"ApplicationOut":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"name":{"type":"string","title":"Name"},"kind":{"type":"string","title":"Kind"},"client_type":{"type":"string","title":"Client Type"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"redirect_uris":{"items":{"type":"string"},"type":"array","title":"Redirect Uris"},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose"},"privacy_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Privacy Url"},"status":{"type":"string","title":"Status"},"trusted":{"type":"boolean","title":"Trusted","default":false},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"brand_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Color"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","project_id","name","kind","client_type","client_id","redirect_uris","purpose","privacy_url","status","created_at"],"title":"ApplicationOut"},"Body_bc_authorize_oauth_bc_authorize_post":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"login_hint":{"type":"string","maxLength":320,"title":"Login Hint"},"scope":{"type":"string","maxLength":1024,"title":"Scope"},"binding_message":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Binding Message"},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose","default":"treatment"},"requested_expiry":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requested Expiry"}},"type":"object","required":["login_hint","scope"],"title":"Body_bc_authorize_oauth_bc_authorize_post"},"Body_revoke_oauth_revoke_post":{"properties":{"token":{"type":"string","title":"Token"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["token","client_id"],"title":"Body_revoke_oauth_revoke_post"},"Body_token_oauth_token_post":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"code_verifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"subject_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Token"},"patient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient"},"auth_req_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Req Id"}},"type":"object","required":["grant_type"],"title":"Body_token_oauth_token_post"},"BrandingIn":{"properties":{"logo":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}],"title":"Logo"},"brand_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Brand Color"}},"type":"object","title":"BrandingIn","description":"Sigla (data URI PNG/JPEG/WebP, cel mult 64 KB) și culoarea de accent (#RRGGBB, contrast ≥ 4,5:1 cu\ntextul alb). Un câmp lipsă rămâne cum era; null sau șir gol îl șterge."},"Component":{"properties":{"code":{"type":"string","title":"Code"},"system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System","default":"http://loinc.org"},"display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display"},"value":{"type":"number","title":"Value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},"type":"object","required":["code","value"],"title":"Component"},"ConditionOut":{"properties":{"id":{"type":"string","title":"Id"},"patient":{"type":"string","title":"Patient"},"code":{"type":"string","title":"Code"},"system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System"},"display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display"},"clinical_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clinical Status"},"onset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onset"},"abatement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abatement"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"fhir":{"type":"string","title":"Fhir"}},"type":"object","required":["id","patient","code","system","display","clinical_status","onset","abatement","note","updated_at","fhir"],"title":"ConditionOut"},"ConditionPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ConditionOut"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data","total"],"title":"ConditionPage"},"ContextOut":{"properties":{"manifest_id":{"type":"string","title":"Manifest Id"},"patient":{"type":"string","title":"Patient"},"budget_tokens":{"type":"integer","title":"Budget Tokens"},"tokens_used":{"type":"integer","title":"Tokens Used"},"needs":{"additionalProperties":true,"type":"object","title":"Needs"},"sections":{"items":{"$ref":"#/components/schemas/ContextSection"},"type":"array","title":"Sections"},"omitted":{"items":{"type":"string"},"type":"array","title":"Omitted"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"provenance_note":{"type":"string","title":"Provenance Note"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"}},"type":"object","required":["manifest_id","patient","budget_tokens","tokens_used","needs","sections","omitted","warnings","provenance_note"],"title":"ContextOut","description":"Răspunsul `POST /v1/context`: secțiuni etichetate cu proveniență, într-un buget de tokeni."},"ContextSection":{"properties":{"kind":{"type":"string","title":"Kind"},"tokens":{"type":"integer","title":"Tokens"},"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"sources":{"additionalProperties":{"type":"integer"},"type":"object","title":"Sources","default":{}}},"type":"object","required":["kind","tokens","items"],"title":"ContextSection"},"DecisionIn":{"properties":{"days":{"type":"integer","title":"Days","default":90}},"type":"object","title":"DecisionIn"},"DocumentOut":{"properties":{"id":{"type":"string","title":"Id"},"patient":{"type":"string","title":"Patient"},"kind":{"type":"string","title":"Kind"},"identifiers":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Identifiers","default":[]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size"},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha256"},"status":{"type":"string","title":"Status"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"upload":{"anyOf":[{"$ref":"#/components/schemas/UploadInfo"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"fhir":{"type":"string","title":"Fhir"}},"type":"object","required":["id","patient","kind","title","description","date","content_type","size","sha256","status","updated_at","fhir"],"title":"DocumentOut"},"DocumentPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DocumentOut"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data","total"],"title":"DocumentPage"},"EndpointIn":{"properties":{"url":{"type":"string","maxLength":2000,"title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"}},"type":"object","required":["url"],"title":"EndpointIn"},"EndpointPatch":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Events"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"EndpointPatch"},"GrantView":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"scopes_text":{"items":{"type":"string"},"type":"array","title":"Scopes Text","default":[]},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose"},"granted_at":{"type":"string","title":"Granted At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked At"},"granted_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Granted By"},"consent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consent"},"application":{"additionalProperties":true,"type":"object","title":"Application","default":{}}},"additionalProperties":true,"type":"object","required":["id","status","scopes","granted_at"],"title":"GrantView"},"GrantsOut":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GrantView"},"type":"array","title":"Data"},"mode":{"type":"string","enum":["consent","project"],"title":"Mode"}},"type":"object","required":["data","mode"],"title":"GrantsOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthTermCode":{"properties":{"system":{"type":"string","title":"System","description":"ICD-10, ICD-11 MMS, RxNorm or EMA product number"},"code":{"type":"string","title":"Code"},"display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display"},"equivalence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equivalence","description":"For ICD codes: equivalent | broader | wider | narrower | inexact"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri","description":"ICD-11: the WHO entity URI in the MMS 2025-01 linearization"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"ICD-11: the entity in the WHO ICD-11 browser"}},"type":"object","required":["system","code"],"title":"HealthTermCode"},"HealthTermDescription":{"properties":{"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic","description":"Title of the MedlinePlus health topic the text comes from"},"text":{"type":"string","title":"Text","description":"Verbatim summary of the MedlinePlus health topic (public domain), English or Spanish"},"lang":{"type":"string","title":"Lang"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"review":{"type":"string","title":"Review"},"retrieved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retrieved At"},"source":{"$ref":"#/components/schemas/HealthTermSource"}},"type":"object","required":["text","lang","review","source"],"title":"HealthTermDescription"},"HealthTermIndication":{"properties":{"region":{"type":"string","title":"Region","description":"EU (EMA) | US (FDA): where the indication is approved"},"product":{"type":"string","title":"Product"},"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id","description":"EMA product number or FDA SPL set id"},"lang":{"type":"string","title":"Lang"},"text":{"type":"string","title":"Text","description":"Quoted unchanged from the official product information"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"document_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Date"},"review":{"type":"string","title":"Review"},"source":{"$ref":"#/components/schemas/HealthTermSource"},"attribution":{"type":"string","title":"Attribution"},"note":{"type":"string","title":"Note"}},"type":"object","required":["region","product","lang","text","review","source","attribution","note"],"title":"HealthTermIndication"},"HealthTermLabel":{"properties":{"lang":{"type":"string","title":"Lang"},"use":{"type":"string","title":"Use","description":"preferred (official title) | lay (everyday name)"},"text":{"type":"string","title":"Text"},"review":{"type":"string","title":"Review","description":"source (verbatim from the cited source) | in_use | ai_reviewed (Anpheros translation reviewed with AI assistance)"}},"type":"object","required":["lang","use","text","review"],"title":"HealthTermLabel"},"HealthTermLink":{"properties":{"relation":{"type":"string","title":"Relation","description":"may_be_associated_with (symptom ↔ condition) | indicated_for (treatment → condition) | indicated_treatment (condition → treatment). The link appears in the cited source; never a diagnosis or a recommendation"},"target":{"$ref":"#/components/schemas/HealthTermRef"},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence"},"review":{"type":"string","title":"Review"},"source":{"$ref":"#/components/schemas/HealthTermSource"},"note":{"type":"string","title":"Note"}},"type":"object","required":["relation","target","review","source","note"],"title":"HealthTermLink"},"HealthTermOut":{"properties":{"concept_id":{"type":"string","title":"Concept Id","description":"Stable Anpheros identifier, never reused: SYM-…, CON-…, TRT-…"},"type":{"type":"string","title":"Type","description":"symptom | condition | treatment"},"system":{"type":"string","title":"System"},"status":{"type":"string","title":"Status"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"Stable address part on anpheros.com/search/<type>/<slug>: never changes after it is published"},"page_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Url","description":"https://anpheros.com/search/<type>/<slug>"},"display":{"type":"string","title":"Display"},"display_lang":{"type":"string","title":"Display Lang"},"codes":{"items":{"$ref":"#/components/schemas/HealthTermCode"},"type":"array","title":"Codes"},"labels":{"items":{"$ref":"#/components/schemas/HealthTermLabel"},"type":"array","title":"Labels"},"synonyms":{"items":{"$ref":"#/components/schemas/HealthTermSynonym"},"type":"array","title":"Synonyms"},"definition":{"anyOf":[{"$ref":"#/components/schemas/HealthTermDescription"},{"type":"null"}]},"links":{"items":{"$ref":"#/components/schemas/HealthTermLink"},"type":"array","title":"Links","description":"Alphabetical, without score or ranking"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind","description":"Symptoms only: symptom | finding"},"warning_signs":{"anyOf":[{"items":{"$ref":"#/components/schemas/SymptomWarningSign"},"type":"array"},{"type":"null"}],"title":"Warning Signs"},"substance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Substance","description":"Treatments only: the active substance (INN)"},"indications":{"anyOf":[{"items":{"$ref":"#/components/schemas/HealthTermIndication"},"type":"array"},{"type":"null"}],"title":"Indications","description":"Treatments only: EU then US, alphabetical by product"},"attribution":{"items":{"type":"string"},"type":"array","title":"Attribution","description":"Attribution required by each source used in this entry"},"disclaimer":{"type":"string","title":"Disclaimer"},"review":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Review","description":"{method: ai_dual_model, clinician_reviewed: false (always), label, checked_at}"},"clinical_review":{"type":"boolean","title":"Clinical Review"},"release":{"type":"string","title":"Release"}},"type":"object","required":["concept_id","type","system","status","display","display_lang","codes","labels","synonyms","attribution","disclaimer","clinical_review","release"],"title":"HealthTermOut"},"HealthTermPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/HealthTermOut"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"release":{"type":"string","title":"Release"},"attribution":{"items":{"type":"string"},"type":"array","title":"Attribution"}},"type":"object","required":["data","total","release","attribution"],"title":"HealthTermPage"},"HealthTermRef":{"properties":{"concept_id":{"type":"string","title":"Concept Id"},"type":{"type":"string","title":"Type"},"display":{"type":"string","title":"Display"},"display_lang":{"type":"string","title":"Display Lang"}},"type":"object","required":["concept_id","type","display","display_lang"],"title":"HealthTermRef"},"HealthTermSource":{"properties":{"publisher":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publisher"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"retrieved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retrieved At"},"licence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licence"},"attribution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribution"},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"}},"type":"object","title":"HealthTermSource"},"HealthTermSynonym":{"properties":{"lang":{"type":"string","title":"Lang"},"text":{"type":"string","title":"Text"}},"type":"object","required":["lang","text"],"title":"HealthTermSynonym"},"Identifier":{"properties":{"system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System"},"value":{"type":"string","title":"Value"}},"type":"object","required":["value"],"title":"Identifier"},"KeyIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"scopes":{"items":{"type":"string","enum":["read","write"]},"type":"array","title":"Scopes","default":["read","write"]}},"type":"object","required":["name"],"title":"KeyIn"},"KeyOut":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"last4":{"type":"string","title":"Last4"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"rate_limit_per_minute":{"type":"integer","title":"Rate Limit Per Minute"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked At"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"}},"type":"object","required":["id","project_id","name","prefix","last4","scopes","rate_limit_per_minute","created_at","last_used_at","revoked_at"],"title":"KeyOut"},"LabsImportOut":{"properties":{"created":{"type":"integer","title":"Created"},"skipped":{"type":"integer","title":"Skipped"},"unmapped":{"items":{},"type":"array","title":"Unmapped"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"observations":{"items":{},"type":"array","title":"Observations"}},"type":"object","required":["created","skipped","unmapped","warnings","observations"],"title":"LabsImportOut"},"ManifestIn":{"properties":{"recipient":{"type":"string","maxLength":200,"minLength":1,"title":"Recipient"},"passcode":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Passcode"},"embeddedLengthMax":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Embeddedlengthmax"}},"type":"object","required":["recipient"],"title":"ManifestIn"},"MedicationOut":{"properties":{"id":{"type":"string","title":"Id"},"patient":{"type":"string","title":"Patient"},"display":{"type":"string","title":"Display"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"dosage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dosage"},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"fhir":{"type":"string","title":"Fhir"}},"type":"object","required":["id","patient","display","code","system","status","dosage","start","end","note","updated_at","fhir"],"title":"MedicationOut"},"MedicationPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MedicationOut"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data","total"],"title":"MedicationPage"},"ObservationOut":{"properties":{"id":{"type":"string","title":"Id"},"patient":{"type":"string","title":"Patient"},"code":{"type":"string","title":"Code"},"system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System"},"display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"effective_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effective At"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"value_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Text"},"components":{"items":{"$ref":"#/components/schemas/Component"},"type":"array","title":"Components"},"reference_range":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRange"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"derived_from":{"items":{"type":"string"},"type":"array","title":"Derived From"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"fhir":{"type":"string","title":"Fhir"}},"type":"object","required":["id","patient","code","system","display","category","effective_at","value","unit","value_text","components","reference_range","note","derived_from","status","updated_at","fhir"],"title":"ObservationOut"},"ObservationPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ObservationOut"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data","total"],"title":"ObservationPage"},"OrganizationIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":2,"title":"Name"},"kind":{"type":"string","enum":["developer","clinic","lab","vendor"],"title":"Kind","default":"developer"},"country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country"}},"type":"object","required":["name"],"title":"OrganizationIn"},"OrganizationOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"kind":{"type":"string","title":"Kind"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"region":{"type":"string","title":"Region"},"verified":{"type":"boolean","title":"Verified"},"dpa_signed":{"type":"boolean","title":"Dpa Signed"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"sso_provider_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sso Provider Id"},"sso_domains":{"items":{"type":"string"},"type":"array","title":"Sso Domains","default":[]},"sso_required":{"type":"boolean","title":"Sso Required","default":false},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","name","kind","country","region","verified","dpa_signed","created_at"],"title":"OrganizationOut"},"PatientOut":{"properties":{"id":{"type":"string","title":"Id"},"given":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Given"},"family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family"},"birth_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Birth Date"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"identifiers":{"items":{"$ref":"#/components/schemas/Identifier"},"type":"array","title":"Identifiers"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"fhir":{"type":"string","title":"Fhir"}},"type":"object","required":["id","given","family","birth_date","gender","identifiers","updated_at","fhir"],"title":"PatientOut"},"PatientPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PatientOut"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data","total"],"title":"PatientPage"},"PatternCompareOut":{"properties":{"finding":{"anyOf":[{"$ref":"#/components/schemas/PatternFinding"},{"type":"null"}]},"not_computed":{"anyOf":[{"$ref":"#/components/schemas/PatternNotComputed"},{"type":"null"}]},"omitted":{"items":{"type":"string"},"type":"array","title":"Omitted","default":[]},"interpretation_guidance":{"type":"string","title":"Interpretation Guidance"}},"type":"object","required":["interpretation_guidance"],"title":"PatternCompareOut"},"PatternEvidencePage":{"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data","total"],"title":"PatternEvidencePage"},"PatternFinding":{"properties":{"id":{"type":"string","title":"Id"},"patient":{"type":"string","title":"Patient"},"type":{"type":"string","enum":["trend","baseline_deviation","recurrence","association","convergence"],"title":"Type"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"epistemic_status":{"type":"string","enum":["descriptive_observation","statistical_association","validated_prediction"],"title":"Epistemic Status"},"strength":{"type":"string","enum":["strong","moderate","weak","not_tested"],"title":"Strength"},"statistically_supported":{"type":"boolean","title":"Statistically Supported"},"summary_code":{"type":"string","title":"Summary Code"},"summary_text":{"type":"string","title":"Summary Text"},"variables":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Variables"},"window":{"additionalProperties":true,"type":"object","title":"Window"},"comparison_window":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Comparison Window"},"result":{"additionalProperties":true,"type":"object","title":"Result"},"statistics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Statistics"},"threshold":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Threshold"},"evidence":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Evidence"},"evidence_total":{"type":"integer","title":"Evidence Total"},"limitations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Limitations"},"method":{"additionalProperties":true,"type":"object","title":"Method"},"engine_version":{"type":"string","title":"Engine Version"},"input_fingerprint":{"type":"string","title":"Input Fingerprint"},"config_fingerprint":{"type":"string","title":"Config Fingerprint"},"safety":{"additionalProperties":true,"type":"object","title":"Safety"},"review":{"additionalProperties":true,"type":"object","title":"Review"}},"additionalProperties":true,"type":"object","required":["id","patient","type","epistemic_status","strength","statistically_supported","summary_code","summary_text","variables","window","result","evidence","evidence_total","limitations","method","engine_version","input_fingerprint","config_fingerprint","safety","review"],"title":"PatternFinding","description":"O constatare: ce arată dosarul pe o perioadă, cu datele suport, metoda și limitările ei.\nNu e diagnostic; o asociere nu e o cauză; doar `statistically_supported = true` are susținere statistică."},"PatternNotComputed":{"properties":{"type":{"type":"string","title":"Type"},"variables":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Variables"},"window":{"additionalProperties":true,"type":"object","title":"Window"},"reason":{"type":"string","title":"Reason"},"detail":{"type":"string","title":"Detail","default":""}},"type":"object","required":["type","variables","window","reason"],"title":"PatternNotComputed","description":"Ce nu s-a putut calcula și de ce (date insuficiente, fără variație…): nu e o constatare."},"PatternRun":{"properties":{"patient":{"type":"string","title":"Patient"},"window":{"additionalProperties":{"type":"string"},"type":"object","title":"Window"},"engine_version":{"type":"string","title":"Engine Version"},"time_basis":{"additionalProperties":true,"type":"object","title":"Time Basis"},"tests_in_run":{"type":"integer","title":"Tests In Run"},"family_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family Fingerprint"},"findings":{"items":{"$ref":"#/components/schemas/PatternFinding"},"type":"array","title":"Findings"},"not_computed":{"items":{"$ref":"#/components/schemas/PatternNotComputed"},"type":"array","title":"Not Computed"},"omitted":{"items":{"type":"string"},"type":"array","title":"Omitted"},"interpretation_guidance":{"type":"string","title":"Interpretation Guidance"}},"type":"object","required":["patient","window","engine_version","time_basis","tests_in_run","findings","not_computed","omitted","interpretation_guidance"],"title":"PatternRun"},"ProjectIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":2,"title":"Name"},"environment":{"type":"string","enum":["sandbox","production"],"title":"Environment","default":"sandbox"}},"type":"object","required":["name"],"title":"ProjectIn"},"ProjectOut":{"properties":{"id":{"type":"string","title":"Id"},"org_id":{"type":"string","title":"Org Id"},"name":{"type":"string","title":"Name"},"environment":{"type":"string","title":"Environment"},"region":{"type":"string","title":"Region"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","org_id","name","environment","region","created_at"],"title":"ProjectOut"},"ProvenanceList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ProvenanceOut"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["data","total"],"title":"ProvenanceList"},"ProvenanceOut":{"properties":{"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activity"},"recorded":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recorded"},"author_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Type"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"origin_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Id"},"fhir":{"type":"string","title":"Fhir"}},"type":"object","required":["version","activity","recorded","author_type","author","source_system","origin_id","fhir"],"title":"ProvenanceOut"},"QuickstartIn":{"properties":{"organization_name":{"anyOf":[{"type":"string","maxLength":200,"minLength":2},{"type":"null"}],"title":"Organization Name"},"project_name":{"anyOf":[{"type":"string","maxLength":200,"minLength":2},{"type":"null"}],"title":"Project Name"}},"type":"object","title":"QuickstartIn"},"ReferenceRange":{"properties":{"low":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Low"},"high":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"High"}},"type":"object","title":"ReferenceRange"},"ReleasePrefIn":{"properties":{"release":{"type":"string","enum":["immediate","after_review"],"title":"Release"},"max_hold_days":{"type":"integer","maximum":14.0,"minimum":1.0,"title":"Max Hold Days","default":7}},"type":"object","required":["release"],"title":"ReleasePrefIn"},"RevokeIn":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"RevokeIn"},"SearchHit":{"properties":{"concept_id":{"type":"string","title":"Concept Id"},"type":{"type":"string","title":"Type"},"system":{"type":"string","title":"System"},"status":{"type":"string","title":"Status"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"Stable address part on anpheros.com/search/<type>/<slug>"},"page_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Url"},"display":{"type":"string","title":"Display"},"display_lang":{"type":"string","title":"Display Lang"},"matched":{"type":"string","title":"Matched","description":"The name, synonym or code that matched, lower case without diacritics"},"codes":{"items":{"$ref":"#/components/schemas/HealthTermCode"},"type":"array","title":"Codes"},"definition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definition"}},"type":"object","required":["concept_id","type","system","status","display","display_lang","matched","codes"],"title":"SearchHit"},"SearchPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SearchHit"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"release":{"type":"string","title":"Release"},"attribution":{"items":{"type":"string"},"type":"array","title":"Attribution"},"disclaimer":{"type":"string","title":"Disclaimer"}},"type":"object","required":["data","total","release","attribution","disclaimer"],"title":"SearchPage"},"SeriesOut":{"properties":{"patient":{"type":"string","title":"Patient"},"window":{"additionalProperties":{"type":"string"},"type":"object","title":"Window"},"time_basis":{"additionalProperties":true,"type":"object","title":"Time Basis"},"series":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Series"},"omitted":{"items":{"type":"string"},"type":"array","title":"Omitted"}},"type":"object","required":["patient","window","time_basis","series","omitted"],"title":"SeriesOut"},"ShlIn":{"properties":{"content":{"type":"string","enum":["ips","emergency","custom"],"title":"Content","default":"emergency"},"include":{"anyOf":[{"$ref":"#/components/schemas/ShlInclude"},{"type":"null"}]},"label":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Label"},"lang":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Lang"},"passcode":{"anyOf":[{"type":"string","maxLength":64,"minLength":4},{"type":"null"}],"title":"Passcode"},"expires_in_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Expires In Days"}},"type":"object","title":"ShlIn"},"ShlInclude":{"properties":{"sections":{"items":{"type":"string","enum":["allergies","medications","problems","immunizations","results","vitals"]},"type":"array","maxItems":6,"title":"Sections"},"results_since":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Results Since"},"observations":{"items":{"type":"string"},"type":"array","maxItems":200,"title":"Observations"},"documents":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Documents"},"imaging":{"type":"boolean","title":"Imaging","default":false}},"type":"object","title":"ShlInclude"},"SsoIn":{"properties":{"provider_id":{"anyOf":[{"type":"string","pattern":"^(saml|oidc)\\.[a-z0-9][a-z0-9-]{0,40}$"},{"type":"null"}],"title":"Provider Id"},"domains":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Domains"},"required":{"type":"boolean","title":"Required","default":false}},"type":"object","title":"SsoIn","description":"Providerul trebuie să existe deja în Identity Platform (SAML sau OIDC, configurat cu metadatele IdP-ului\nclientului); aici doar îl legăm de organizație."},"SymptomAssociation":{"properties":{"relation":{"type":"string","title":"Relation","description":"Always may_be_associated_with: never a diagnosis"},"condition":{"$ref":"#/components/schemas/SymptomAssociationCondition"},"frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Frequency"},"source":{"$ref":"#/components/schemas/SymptomSource"},"review":{"type":"string","title":"Review","description":"Always clinician: associations are served only after a clinician's review","default":"clinician"},"reviewed_at":{"type":"string","title":"Reviewed At"},"note":{"type":"string","title":"Note"}},"type":"object","required":["relation","condition","source","reviewed_at","note"],"title":"SymptomAssociation"},"SymptomAssociationCondition":{"properties":{"system":{"type":"string","title":"System"},"code":{"type":"string","title":"Code"},"display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display"}},"type":"object","required":["system","code"],"title":"SymptomAssociationCondition"},"SymptomBodySystem":{"properties":{"code":{"type":"string","title":"Code","description":"nervous, digestive, respiratory… — one per ICD-11 chapter 21 block"},"display":{"type":"string","title":"Display","description":"WHO title of the ICD-11 block"},"icd11_block":{"type":"string","title":"Icd11 Block"}},"type":"object","required":["code","display","icd11_block"],"title":"SymptomBodySystem"},"SymptomConceptOut":{"properties":{"concept_id":{"type":"string","title":"Concept Id","description":"Stable Anpheros identifier, never reused (SYM-0001…)"},"system":{"type":"string","title":"System"},"kind":{"type":"string","title":"Kind","description":"symptom | finding"},"status":{"type":"string","title":"Status","description":"active | deprecated"},"display":{"type":"string","title":"Display"},"display_lang":{"type":"string","title":"Display Lang","description":"Language of `display`; English when the requested language has no published label yet"},"icd10":{"$ref":"#/components/schemas/SymptomIcd10"},"icd11":{"anyOf":[{"$ref":"#/components/schemas/SymptomIcd11"},{"type":"null"}]},"body_system":{"anyOf":[{"$ref":"#/components/schemas/SymptomBodySystem"},{"type":"null"}]},"labels":{"items":{"$ref":"#/components/schemas/SymptomLabel"},"type":"array","title":"Labels"},"match_terms":{"items":{"$ref":"#/components/schemas/SymptomMatchTerm"},"type":"array","title":"Match Terms"},"warning_signs":{"items":{"$ref":"#/components/schemas/SymptomWarningSign"},"type":"array","title":"Warning Signs","description":"Verbatim from an official public-domain source (review=source_verified) or clinician-reviewed, each with its source"},"associations":{"items":{"$ref":"#/components/schemas/SymptomAssociation"},"type":"array","title":"Associations","description":"Only clinician-reviewed items, each with its source"},"clinical_review":{"type":"boolean","title":"Clinical Review","description":"False until a qualified clinician has reviewed this release"},"release":{"type":"string","title":"Release"}},"type":"object","required":["concept_id","system","kind","status","display","display_lang","icd10","labels","match_terms","clinical_review","release"],"title":"SymptomConceptOut"},"SymptomConceptPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SymptomConceptOut"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"release":{"type":"string","title":"Release"}},"type":"object","required":["data","total","release"],"title":"SymptomConceptPage"},"SymptomIcd10":{"properties":{"system":{"type":"string","title":"System"},"code":{"type":"string","title":"Code"},"display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display","description":"WHO ICD-10 Version 2019 title of the code"},"equivalence":{"type":"string","title":"Equivalence","description":"equivalent | broader (the ICD-10 code covers more than the concept)"}},"type":"object","required":["system","code","equivalence"],"title":"SymptomIcd10"},"SymptomIcd11":{"properties":{"system":{"type":"string","title":"System"},"code":{"type":"string","title":"Code"},"display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display","description":"WHO ICD-11 MMS title of the code"},"equivalence":{"type":"string","title":"Equivalence","description":"equivalent | wider | narrower | inexact (seen from the ICD-11 code)"}},"type":"object","required":["system","code","equivalence"],"title":"SymptomIcd11"},"SymptomLabel":{"properties":{"lang":{"type":"string","title":"Lang"},"use":{"type":"string","title":"Use","description":"preferred | lay"},"text":{"type":"string","title":"Text"},"review":{"type":"string","title":"Review","description":"source (official WHO title) | in_use (used by Anpheros Daily, not clinically reviewed) | ai_reviewed (machine translation reviewed with AI assistance against the WHO titles)"}},"type":"object","required":["lang","use","text","review"],"title":"SymptomLabel"},"SymptomMatchTerm":{"properties":{"lang":{"type":"string","title":"Lang"},"text":{"type":"string","title":"Text","description":"Lower-case term without diacritics, as matched in free text"}},"type":"object","required":["lang","text"],"title":"SymptomMatchTerm"},"SymptomSource":{"properties":{"publisher":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publisher"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"retrieved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retrieved At"},"licence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licence"},"attribution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribution"}},"type":"object","title":"SymptomSource"},"SymptomWarningSign":{"properties":{"sign":{"type":"string","title":"Sign"},"urgency":{"type":"string","title":"Urgency","description":"emergency | same_day | routine"},"lang":{"type":"string","title":"Lang"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"The source's own heading for the list the sign comes from, verbatim"},"quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote","description":"The source's advice for these signs, verbatim"},"applies_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applies To","description":"The group the source names (adults, infants and children…); empty = everyone"},"source":{"$ref":"#/components/schemas/SymptomSource"},"review":{"type":"string","title":"Review","description":"source_quoted (quoted word for word from the cited source; not reviewed by a clinician) | clinician","default":"clinician"},"reviewed_at":{"type":"string","title":"Reviewed At"},"note":{"type":"string","title":"Note"}},"type":"object","required":["sign","urgency","lang","source","reviewed_at","note"],"title":"SymptomWarningSign"},"TerminologyCode":{"properties":{"system":{"type":"string","title":"System"},"code":{"type":"string","title":"Code"},"display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display","description":"The official English name (for ATC: the WHO name, unchanged)"},"display_ro":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Ro","description":"Romanian name: an Anpheros label, not part of the official code system"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"attribution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribution","description":"For ATC: the WHO Collaborating Centre attribution, on every response"}},"type":"object","required":["system","code"],"title":"TerminologyCode"},"TerminologyPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TerminologyCode"},"type":"array","title":"Data"},"attribution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribution"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["data","total"],"title":"TerminologyPage"},"TimelineItem":{"properties":{"type":{"type":"string","enum":["observation","condition","medication","document","encounter","appointment","immunization","episode"],"title":"Type"},"id":{"type":"string","title":"Id"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"fhir":{"type":"string","title":"Fhir"}},"type":"object","required":["type","id","date","title","summary","fhir"],"title":"TimelineItem"},"TimelinePage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TimelineItem"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data","total"],"title":"TimelinePage"},"TrustIn":{"properties":{"trusted":{"type":"boolean","title":"Trusted","default":true}},"type":"object","title":"TrustIn"},"UploadInfo":{"properties":{"url":{"type":"string","title":"Url"},"method":{"type":"string","title":"Method"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"}},"type":"object","required":["url","method","headers","expires_in_seconds"],"title":"UploadInfo"},"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"},"VerifyIn":{"properties":{"verified":{"type":"boolean","title":"Verified","default":true},"dpa_signed":{"type":"boolean","title":"Dpa Signed","default":true}},"type":"object","title":"VerifyIn"},"WebhookIn":{"properties":{"url":{"type":"string","maxLength":2000,"title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"}},"type":"object","required":["url"],"title":"WebhookIn"},"WebhookPatch":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Events"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"WebhookPatch"}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A project API key (`sk_test_…` sandbox, `sk_live_…` production) or an OAuth access token (`at_…`)."},"apiKey":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"The same project API key, as a header."},"oauth2":{"type":"oauth2","description":"SMART on FHIR v2 scopes; authorization code with PKCE for a person's record, client_credentials for a project.","flows":{"authorizationCode":{"authorizationUrl":"https://platform.anpheros.com/oauth/authorize","tokenUrl":"https://platform.anpheros.com/oauth/token","refreshUrl":"https://platform.anpheros.com/oauth/token","scopes":{"patient/*.rs":"Read the whole record","patient/Observation.rs":"Read measurements and lab results","patient/Observation.rs?category=laboratory":"Read lab results only","patient/Condition.rs":"Read conditions","patient/MedicationStatement.rs":"Read medications","patient/DocumentReference.rs":"Read documents","patient/AllergyIntolerance.rs":"Read allergies","offline_access":"Refresh token","openid":"OpenID Connect","fhirUser":"Identity of the person","anpheros/patterns":"Pattern analysis on production records (separate patient consent)"}},"clientCredentials":{"tokenUrl":"https://platform.anpheros.com/oauth/token","scopes":{}}}},"firebase":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Firebase ID token of a developer (dashboard, Admin) or of a patient (/me)."}}},"servers":[{"url":"https://platform.anpheros.com","description":"Sandbox and production share this address; the key decides the data plane."}]}