{"openapi":"3.0.0","paths":{"/":{"get":{"operationId":"AppController_getHello","parameters":[],"responses":{"200":{"description":""}},"summary":"Service landing page","tags":["Service"]}},"/encounters":{"post":{"description":"Idempotency-Key is optional. Missing key still creates. Replay of the same key returns the stored encounter (200).","operationId":"EncounterController_create","parameters":[{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"S2S replay key. Same key returns the same encounter.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEncounterDto"}}}},"responses":{"200":{"description":"Stored encounter replayed for this Idempotency-Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterResponseDto"}}}},"201":{"description":"Encounter created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterResponseDto"}}}},"400":{"description":"Invalid input data"}},"summary":"Create a new encounter","tags":["Encounters"]},"get":{"operationId":"EncounterController_findAll","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"default":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"default":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"List of encounters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseDto"}}}}},"summary":"Get all encounters with pagination","tags":["Encounters"]}},"/encounters/{id}/file":{"get":{"operationId":"EncounterController_findFile","parameters":[{"name":"id","required":true,"in":"path","description":"Encounter ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"x-identity-id","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Encounter file found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterFileResponseDto"}}}},"404":{"description":"Encounter not found"}},"summary":"Get the composed medical file for an encounter","tags":["Encounters"]}},"/encounters/{id}":{"get":{"operationId":"EncounterController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Encounter ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"x-identity-id","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Encounter found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterResponseDto"}}}},"404":{"description":"Encounter not found"}},"summary":"Get encounter by ID","tags":["Encounters"]},"put":{"operationId":"EncounterController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Encounter ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEncounterDto"}}}},"responses":{"200":{"description":"Encounter updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EncounterResponseDto"}}}},"404":{"description":"Encounter not found"}},"summary":"Update encounter","tags":["Encounters"]}},"/prescriptions":{"post":{"operationId":"PrescriptionController_create","parameters":[{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePrescriptionDto"}}}},"responses":{"201":{"description":"Prescription created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrescriptionResponseDto"}}}},"400":{"description":"Invalid input data"}},"summary":"Create a new prescription","tags":["Prescriptions"]},"get":{"operationId":"PrescriptionController_findAll","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"default":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"default":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"List of prescriptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseDto"}}}}},"summary":"Get all prescriptions with pagination","tags":["Prescriptions"]}},"/prescriptions/{id}":{"get":{"operationId":"PrescriptionController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Prescription ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Prescription found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrescriptionResponseDto"}}}},"404":{"description":"Prescription not found"}},"summary":"Get prescription by ID","tags":["Prescriptions"]},"put":{"operationId":"PrescriptionController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Prescription ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePrescriptionDto"}}}},"responses":{"200":{"description":"Prescription updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrescriptionResponseDto"}}}},"404":{"description":"Prescription not found"}},"summary":"Update prescription","tags":["Prescriptions"]}},"/care-plans":{"post":{"operationId":"CarePlanController_create","parameters":[{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCarePlanDto"}}}},"responses":{"201":{"description":"Care plan created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarePlanResponseDto"}}}},"400":{"description":"Invalid input data"}},"summary":"Create a new care plan","tags":["CarePlans"]},"get":{"operationId":"CarePlanController_findAll","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"default":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"default":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"List of care plans","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseDto"}}}}},"summary":"Get all care plans with pagination","tags":["CarePlans"]}},"/care-plans/{id}":{"get":{"operationId":"CarePlanController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Care plan ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Care plan found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarePlanResponseDto"}}}},"404":{"description":"Care plan not found"}},"summary":"Get care plan by ID","tags":["CarePlans"]},"put":{"operationId":"CarePlanController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Care plan ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCarePlanDto"}}}},"responses":{"200":{"description":"Care plan updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarePlanResponseDto"}}}},"404":{"description":"Care plan not found"}},"summary":"Update care plan","tags":["CarePlans"]}},"/diagnoses":{"post":{"operationId":"DiagnosisController_create","parameters":[{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDiagnosisDto"}}}},"responses":{"201":{"description":"Diagnosis created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiagnosisResponseDto"}}}}},"summary":"Create a new diagnosis","tags":["Diagnoses"]},"get":{"operationId":"DiagnosisController_findAll","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"default":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"default":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get all diagnoses with pagination","tags":["Diagnoses"]}},"/diagnoses/{id}":{"get":{"operationId":"DiagnosisController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Diagnosis ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get diagnosis by ID","tags":["Diagnoses"]},"put":{"operationId":"DiagnosisController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Diagnosis ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDiagnosisDto"}}}},"responses":{"200":{"description":""}},"summary":"Update diagnosis","tags":["Diagnoses"]}},"/clinical-notes":{"post":{"operationId":"ClinicalNoteController_create","parameters":[{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClinicalNoteDto"}}}},"responses":{"201":{"description":"Clinical note created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicalNoteResponseDto"}}}}},"summary":"Create a new clinical note","tags":["ClinicalNotes"]},"get":{"operationId":"ClinicalNoteController_findAll","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"default":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"default":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get all clinical notes with pagination","tags":["ClinicalNotes"]}},"/clinical-notes/{id}":{"get":{"operationId":"ClinicalNoteController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Clinical note ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get clinical note by ID","tags":["ClinicalNotes"]},"put":{"operationId":"ClinicalNoteController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Clinical note ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClinicalNoteDto"}}}},"responses":{"200":{"description":""}},"summary":"Update clinical note","tags":["ClinicalNotes"]}},"/skin-series":{"post":{"operationId":"SkinSeriesController_create","parameters":[{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSkinSeriesDto"}}}},"responses":{"201":{"description":"Skin series created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkinSeriesResponseDto"}}}}},"summary":"Create a new skin series","tags":["SkinSeries"]},"get":{"operationId":"SkinSeriesController_findAll","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"default":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"default":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get all skin series with pagination","tags":["SkinSeries"]}},"/skin-series/{id}":{"get":{"operationId":"SkinSeriesController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Skin series ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get skin series by ID","tags":["SkinSeries"]},"put":{"operationId":"SkinSeriesController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Skin series ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSkinSeriesDto"}}}},"responses":{"200":{"description":""}},"summary":"Update skin series","tags":["SkinSeries"]}},"/follow-ups":{"post":{"operationId":"FollowUpController_create","parameters":[{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFollowUpDto"}}}},"responses":{"201":{"description":"Follow-up created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowUpResponseDto"}}}}},"summary":"Create a new follow-up","tags":["FollowUps"]},"get":{"operationId":"FollowUpController_findAll","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"default":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"default":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get all follow-ups with pagination","tags":["FollowUps"]}},"/follow-ups/{id}":{"get":{"operationId":"FollowUpController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"Follow-up ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get follow-up by ID","tags":["FollowUps"]},"put":{"operationId":"FollowUpController_update","parameters":[{"name":"id","required":true,"in":"path","description":"Follow-up ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFollowUpDto"}}}},"responses":{"200":{"description":""}},"summary":"Update follow-up","tags":["FollowUps"]}},"/command-inboxes":{"post":{"operationId":"CommandInboxController_create","parameters":[{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommandInboxDto"}}}},"responses":{"201":{"description":"CommandInbox created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandInboxResponseDto"}}}},"400":{"description":"Invalid input data"}},"summary":"Create a new commandInbox","tags":["CommandInboxes"]},"get":{"operationId":"CommandInboxController_findAll","parameters":[{"name":"page","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"minimum":1,"maximum":100,"default":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Field to sort by","schema":{"default":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"default":"DESC","type":"string","enum":["ASC","DESC"]}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"List of commandInboxes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseDto"}}}}},"summary":"Get all commandInboxes with pagination","tags":["CommandInboxes"]}},"/command-inboxes/{id}":{"get":{"operationId":"CommandInboxController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"CommandInbox ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"CommandInbox found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandInboxResponseDto"}}}},"404":{"description":"CommandInbox not found"}},"summary":"Get commandInbox by ID","tags":["CommandInboxes"]},"put":{"operationId":"CommandInboxController_update","parameters":[{"name":"id","required":true,"in":"path","description":"CommandInbox ID","schema":{"format":"uuid","type":"string"}},{"name":"x-internal-api-key","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommandInboxDto"}}}},"responses":{"200":{"description":"CommandInbox updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandInboxResponseDto"}}}},"404":{"description":"CommandInbox not found"}},"summary":"Update commandInbox","tags":["CommandInboxes"]}},"/health":{"get":{"operationId":"HealthController_check","parameters":[],"responses":{"200":{"description":"The Health Check is successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}},"503":{"description":"The Health Check is not successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"},"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}}},"summary":"Basic health check","tags":["Health"]}},"/health/ready":{"get":{"operationId":"HealthController_readiness","parameters":[],"responses":{"200":{"description":"The Health Check is successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}},"503":{"description":"The Health Check is not successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"},"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}}},"summary":"Readiness check - is the service ready to receive traffic?","tags":["Health"]}},"/health/live":{"get":{"operationId":"HealthController_liveness","parameters":[],"responses":{"200":{"description":"The Health Check is successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}},"503":{"description":"The Health Check is not successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"},"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}}},"summary":"Liveness check - is the service alive?","tags":["Health"]}}},"info":{"title":"Clinical API","description":"Encounter file: prescriptions, plans, diagnoses, notes, skin series, and follow-ups. Owns: Encounters, Prescriptions, CarePlans, Diagnoses, ClinicalNotes, SkinSeries, FollowUps.","version":"1.0","contact":{}},"tags":[],"servers":[{"url":"https://clinical.stormbyva.com"}],"components":{"securitySchemes":{"x-internal-api-key":{"type":"apiKey","in":"header","name":"x-internal-api-key","description":"Service-to-service key"}},"schemas":{"CreateEncounterDto":{"type":"object","properties":{"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"}},"required":["patientIdentityId","practitionerId","state"]},"EncounterResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","format":"uuid"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp"}},"required":["id","patientIdentityId","practitionerId","state","isActive","createdAt","updatedAt"]},"PaginationMeta":{"type":"object","properties":{"total":{"type":"number","description":"Total number of items"},"page":{"type":"number","description":"Current page number"},"limit":{"type":"number","description":"Number of items per page"},"totalPages":{"type":"number","description":"Total number of pages"},"hasNextPage":{"type":"boolean","description":"Whether there is a next page"},"hasPreviousPage":{"type":"boolean","description":"Whether there is a previous page"}},"required":["total","page","limit","totalPages","hasNextPage","hasPreviousPage"]},"PaginatedResponseDto":{"type":"object","properties":{"items":{"description":"Array of items","type":"array","items":{"type":"array"}},"meta":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationMeta"}]}},"required":["items","meta"]},"PrescriptionResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","format":"uuid"},"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp"}},"required":["id","encounterId","patientIdentityId","practitionerId","state","isActive","createdAt","updatedAt"]},"CarePlanResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","format":"uuid"},"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp"}},"required":["id","encounterId","patientIdentityId","practitionerId","state","isActive","createdAt","updatedAt"]},"DiagnosisResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","format":"uuid"},"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp"}},"required":["id","encounterId","patientIdentityId","practitionerId","state","isActive","createdAt","updatedAt"]},"ClinicalNoteResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","format":"uuid"},"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp"}},"required":["id","encounterId","patientIdentityId","practitionerId","state","isActive","createdAt","updatedAt"]},"SkinSeriesResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","format":"uuid"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp"}},"required":["id","patientIdentityId","practitionerId","state","isActive","createdAt","updatedAt"]},"FollowUpResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","format":"uuid"},"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp"}},"required":["id","encounterId","patientIdentityId","practitionerId","state","isActive","createdAt","updatedAt"]},"EncounterFileResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","format":"uuid"},"encounter":{"description":"Encounter at the root of this file","allOf":[{"$ref":"#/components/schemas/EncounterResponseDto"}]},"prescriptions":{"description":"Prescriptions on this encounter","type":"array","items":{"$ref":"#/components/schemas/PrescriptionResponseDto"}},"carePlans":{"description":"Care plans on this encounter","type":"array","items":{"$ref":"#/components/schemas/CarePlanResponseDto"}},"diagnoses":{"description":"Diagnoses on this encounter","type":"array","items":{"$ref":"#/components/schemas/DiagnosisResponseDto"}},"clinicalNotes":{"description":"Clinical notes on this encounter","type":"array","items":{"$ref":"#/components/schemas/ClinicalNoteResponseDto"}},"skinSeries":{"description":"Skin series for this patient","type":"array","items":{"$ref":"#/components/schemas/SkinSeriesResponseDto"}},"followUps":{"description":"Follow-ups on this encounter","type":"array","items":{"$ref":"#/components/schemas/FollowUpResponseDto"}},"isActive":{"type":"boolean","description":"Whether the record is active"},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp"}},"required":["id","encounter","prescriptions","carePlans","diagnoses","clinicalNotes","skinSeries","followUps","isActive","createdAt","updatedAt"]},"UpdateEncounterDto":{"type":"object","properties":{"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"}}},"CreatePrescriptionDto":{"type":"object","properties":{"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"}},"required":["encounterId","patientIdentityId","practitionerId","state"]},"UpdatePrescriptionDto":{"type":"object","properties":{"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"}}},"CreateCarePlanDto":{"type":"object","properties":{"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"}},"required":["encounterId","patientIdentityId","practitionerId","state"]},"UpdateCarePlanDto":{"type":"object","properties":{"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"}}},"CreateDiagnosisDto":{"type":"object","properties":{"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"}},"required":["encounterId","patientIdentityId","practitionerId","state"]},"UpdateDiagnosisDto":{"type":"object","properties":{"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"}}},"CreateClinicalNoteDto":{"type":"object","properties":{"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"}},"required":["encounterId","patientIdentityId","practitionerId","state"]},"UpdateClinicalNoteDto":{"type":"object","properties":{"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"}}},"CreateSkinSeriesDto":{"type":"object","properties":{"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"}},"required":["patientIdentityId","practitionerId","state"]},"UpdateSkinSeriesDto":{"type":"object","properties":{"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"}}},"CreateFollowUpDto":{"type":"object","properties":{"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"}},"required":["encounterId","patientIdentityId","practitionerId","state"]},"UpdateFollowUpDto":{"type":"object","properties":{"encounterId":{"type":"string","description":"The encounter id of the entity","example":"10"},"patientIdentityId":{"type":"string","description":"The patient identity id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"practitionerId":{"type":"string","description":"The practitioner id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"state":{"type":"string","description":"The state of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"}}},"CreateCommandInboxDto":{"type":"object","properties":{"idempotencyKey":{"type":"string","description":"The idempotency key of the entity","example":"Sample text"},"scope":{"type":"string","description":"The scope of the entity","example":"Sample text"},"requestHash":{"type":"string","description":"The request hash of the entity","example":"Sample text"},"responseStatus":{"type":"number","description":"The response status of the entity","example":"42"},"responseBody":{"type":"object","description":"The response body of the entity"},"resourceId":{"type":"string","description":"The resource id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"expiresAt":{"format":"date-time","type":"string","description":"The expires at of the entity"}},"required":["idempotencyKey","scope","expiresAt"]},"CommandInboxResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier","format":"uuid"},"idempotencyKey":{"type":"string","description":"The idempotency key of the entity","example":"Sample text"},"scope":{"type":"string","description":"The scope of the entity","example":"Sample text"},"requestHash":{"type":"string","description":"The request hash of the entity","example":"Sample text"},"responseStatus":{"type":"number","description":"The response status of the entity","example":"42"},"responseBody":{"type":"object","description":"The response body of the entity"},"resourceId":{"type":"string","description":"The resource id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"expiresAt":{"format":"date-time","type":"string","description":"The expires at of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"},"createdAt":{"format":"date-time","type":"string","description":"Creation timestamp"},"updatedAt":{"format":"date-time","type":"string","description":"Last update timestamp"}},"required":["id","idempotencyKey","scope","requestHash","responseStatus","responseBody","resourceId","expiresAt","isActive","createdAt","updatedAt"]},"UpdateCommandInboxDto":{"type":"object","properties":{"idempotencyKey":{"type":"string","description":"The idempotency key of the entity","example":"Sample text"},"scope":{"type":"string","description":"The scope of the entity","example":"Sample text"},"requestHash":{"type":"string","description":"The request hash of the entity","example":"Sample text"},"responseStatus":{"type":"number","description":"The response status of the entity","example":"42"},"responseBody":{"type":"object","description":"The response body of the entity"},"resourceId":{"type":"string","description":"The resource id of the entity","example":"550e8400-e29b-41d4-a716-446655440000"},"expiresAt":{"format":"date-time","type":"string","description":"The expires at of the entity"},"isActive":{"type":"boolean","description":"Whether the record is active"}}}}}}