Version 1.1.1
API to manage patient clinical histories.
Method | Path | Description |
---|---|---|
GET | /histories | Get all clinical histories |
POST | /histories | Create a new clinical history |
DELETE | /histories/patient/{patientId} | Delete a clinical history by patient ID |
GET | /histories/patient/{patientId} | Get a clinical history by patient ID |
DELETE | /histories/{id} | Delete a clinical history by its ID |
GET | /histories/{id} | Get a clinical history by its ID |
POST | /histories/{id}/allergy | Add an allergy to a clinical history |
DELETE | /histories/{id}/allergy/{allergy} | Remove an allergy from a clinical history |
POST | /histories/{id}/analytic | Upload an analytic to a clinical history record |
DELETE | /histories/{id}/analytic/{analyticId} | Delete an analytic from a clinical history record |
POST | /histories/{id}/condition | Add a new current condition to a clinical history |
DELETE | /histories/{id}/condition/{currentConditionId} | Delete a current condition from a clinical history |
PUT | /histories/{id}/condition/{currentConditionId} | Update a current condition in a clinical history |
POST | /histories/{id}/image | Upload an image to a clinical history record |
DELETE | /histories/{id}/image/{imageId} | Delete an image from a clinical history record |
GET | /histories/{id}/report | Get a clinical history report by its ID |
POST | /histories/{id}/treatment | Add a new treatment to a clinical history |
DELETE | /histories/{id}/treatment/{treatmentId} | Delete a treatment from a clinical history |
PUT | /histories/{id}/treatment/{treatmentId} | Update a treatment in a clinical history |
Name | Path | Description |
---|---|---|
ClinicalHistory | #/components/schemas/ClinicalHistory | |
CreateClinicalHistory | #/components/schemas/CreateClinicalHistory | |
CurrentCondition | #/components/schemas/CurrentCondition | |
File | #/components/schemas/File | |
Treatment | #/components/schemas/Treatment | |
jwt | #/components/securitySchemes/jwt |
-
Summary
Get all clinical histories -
Security
jwt
- 200 Returns a list of all clinical histories
application/json
{
id?: string
patientId?: string
treatments: {
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}[]
currentConditions: {
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}[]
images: {
// Name of the file
name?: string
// Original name of the file
originalName?: string
// URL of the file
url?: string
// Date the file was uploaded
date?: string
}[]
analytics:#/components/schemas/File[]
createdAt?: string
updatedAt?: string
}[]
- 500 Error retrieving clinical histories
-
Summary
Create a new clinical history -
Security
jwt
- application/json
{
patientId: string
}
- 201 Clinical history created
application/json
{
id?: string
patientId?: string
treatments: {
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}[]
currentConditions: {
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}[]
images: {
// Name of the file
name?: string
// Original name of the file
originalName?: string
// URL of the file
url?: string
// Date the file was uploaded
date?: string
}[]
analytics:#/components/schemas/File[]
createdAt?: string
updatedAt?: string
}
-
400 Patient ID is required or validation error
-
500 Error creating clinical history
-
Summary
Delete a clinical history by patient ID -
Security
jwt
-
204 Clinical history for the patient deleted successfully
-
400 Patient ID is required
-
500 Error deleting clinical history for patient
-
Summary
Get a clinical history by patient ID -
Security
jwt
- 200 Returns the clinical history for the requested patient
application/json
{
id?: string
patientId?: string
treatments: {
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}[]
currentConditions: {
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}[]
images: {
// Name of the file
name?: string
// Original name of the file
originalName?: string
// URL of the file
url?: string
// Date the file was uploaded
date?: string
}[]
analytics:#/components/schemas/File[]
createdAt?: string
updatedAt?: string
}
-
400 Patient ID is required
-
403 Access denied
-
404 Clinical history not found
-
500 Error retrieving clinical history for patient
-
Summary
Delete a clinical history by its ID -
Security
jwt
-
204 Clinical history deleted successfully
-
400 Clinical history ID is required
-
500 Error deleting clinical history
-
Summary
Get a clinical history by its ID -
Security
jwt
- 200 Returns the requested clinical history
application/json
{
id?: string
patientId?: string
treatments: {
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}[]
currentConditions: {
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}[]
images: {
// Name of the file
name?: string
// Original name of the file
originalName?: string
// URL of the file
url?: string
// Date the file was uploaded
date?: string
}[]
analytics:#/components/schemas/File[]
createdAt?: string
updatedAt?: string
}
-
400 Clinical history ID is required
-
403 Access denied
-
404 Clinical history not found
-
500 Error retrieving clinical history
-
Summary
Add an allergy to a clinical history -
Description
Adds an allergy to the allergies set in a specific clinical history. -
Security
jwt
- application/json
{
// The name of the allergy to add.
allergy: string
}
- 200 Allergy successfully added to the clinical history.
application/json
{
_id?: string
allergies?: string[]
}
- 400 Missing clinical history ID or allergy in the request.
application/json
{
message?: string
}
- 404 Clinical history not found.
application/json
{
message?: string
}
- 500 Internal server error while adding the allergy.
application/json
{
message?: string
}
-
Summary
Remove an allergy from a clinical history -
Description
Removes an allergy from the allergies set in a specific clinical history. -
Security
jwt
- 200 Allergy successfully removed from the clinical history.
application/json
{
_id?: string
allergies?: string[]
}
- 400 Missing clinical history ID or allergy in the request.
application/json
{
message?: string
}
- 404 Clinical history not found.
application/json
{
message?: string
}
- 500 Internal server error while removing the allergy.
application/json
{
message?: string
}
-
Summary
Upload an analytic to a clinical history record -
Description
Allows uploading an analytic to an existing clinical history record. -
Security
jwt
- multipart/form-data
{
// The analytic file to upload.
file?: string
}
- 201 Analytic uploaded successfully
application/json
{
message?: string
// URL of the uploaded analytic.
analyticUrl?: string
}
- 400 Bad Request - Missing required headers or Clinical History ID.
application/json
{
message?: string
}
- 404 Clinical History record not found.
application/json
{
message?: string
}
- 500 Internal Server Error
application/json
{
message?: string
}
-
Summary
Delete an analytic from a clinical history record -
Description
Deletes a specific analytic associated with a clinical history record by its ID. Also removes the file from Azure Blob Storage. -
Security
jwt
- 200 Analytic deleted successfully
application/json
{
message?: string
}
- 400 Bad Request - Missing or invalid parameters.
application/json
{
message?: string
}
- 404 Not Found - Clinical history or analytic not found.
application/json
{
message?: string
}
- 500 Internal Server Error
application/json
{
message?: string
error?: string
}
-
Summary
Add a new current condition to a clinical history -
Security
jwt
- application/json
{
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}
- 200 Current condition added successfully
application/json
{
id?: string
patientId?: string
treatments: {
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}[]
currentConditions: {
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}[]
images: {
// Name of the file
name?: string
// Original name of the file
originalName?: string
// URL of the file
url?: string
// Date the file was uploaded
date?: string
}[]
analytics:#/components/schemas/File[]
createdAt?: string
updatedAt?: string
}
-
400 Clinical history ID is required or validation error
-
404 Clinical history not found
-
500 Error adding current condition
-
Summary
Delete a current condition from a clinical history -
Security
jwt
- 200 Current condition deleted successfully
application/json
{
id?: string
patientId?: string
treatments: {
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}[]
currentConditions: {
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}[]
images: {
// Name of the file
name?: string
// Original name of the file
originalName?: string
// URL of the file
url?: string
// Date the file was uploaded
date?: string
}[]
analytics:#/components/schemas/File[]
createdAt?: string
updatedAt?: string
}
-
400 Clinical history ID or Current condition ID is required
-
404 Clinical history or current condition not found
-
500 Error deleting current condition
-
Summary
Update a current condition in a clinical history -
Security
jwt
- application/json
{
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}
- 200 Current condition updated successfully
application/json
{
id?: string
patientId?: string
treatments: {
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}[]
currentConditions: {
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}[]
images: {
// Name of the file
name?: string
// Original name of the file
originalName?: string
// URL of the file
url?: string
// Date the file was uploaded
date?: string
}[]
analytics:#/components/schemas/File[]
createdAt?: string
updatedAt?: string
}
-
400 Clinical history ID or Current condition ID is required, or validation error
-
404 Clinical history or current condition not found
-
500 Error updating current condition
-
Summary
Upload an image to a clinical history record -
Description
Allows uploading an image to an existing clinical history record. -
Security
jwt
- multipart/form-data
{
// The image file to upload.
file?: string
}
- 201 Image uploaded successfully
application/json
{
message?: string
// URL of the uploaded image.
imageUrl?: string
}
- 400 Bad Request - Missing required headers or Clinical History ID.
application/json
{
message?: string
}
- 404 Clinical History record not found.
application/json
{
message?: string
}
- 500 Internal Server Error
application/json
{
message?: string
}
-
Summary
Delete an image from a clinical history record -
Description
Deletes a specific image associated with a clinical history record by its ID. Also removes the file from Azure Blob Storage. -
Security
jwt
- 200 Image deleted successfully
application/json
{
message?: string
}
- 400 Bad Request - Missing or invalid parameters.
application/json
{
message?: string
}
- 404 Not Found - Clinical history or image not found.
application/json
{
message?: string
}
- 500 Internal Server Error
application/json
{
message?: string
error?: string
}
-
Summary
Get a clinical history report by its ID -
Security
jwt
- 200 Returns the requested clinical history report
application/pdf
{
"type": "string",
"format": "binary"
}
-
400 Clinical history ID is required
-
403 Access denied
-
404 Clinical history not found
-
500 Error generating clinical history report
-
Summary
Add a new treatment to a clinical history -
Security
jwt
- application/json
{
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}
- 200 Treatment added successfully
application/json
{
id?: string
patientId?: string
treatments: {
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}[]
currentConditions: {
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}[]
images: {
// Name of the file
name?: string
// Original name of the file
originalName?: string
// URL of the file
url?: string
// Date the file was uploaded
date?: string
}[]
analytics:#/components/schemas/File[]
createdAt?: string
updatedAt?: string
}
-
400 Clinical history ID is required or validation error
-
404 Clinical history not found
-
500 Error adding treatment
-
Summary
Delete a treatment from a clinical history -
Security
jwt
- 200 Treatment deleted successfully
application/json
{
id?: string
patientId?: string
treatments: {
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}[]
currentConditions: {
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}[]
images: {
// Name of the file
name?: string
// Original name of the file
originalName?: string
// URL of the file
url?: string
// Date the file was uploaded
date?: string
}[]
analytics:#/components/schemas/File[]
createdAt?: string
updatedAt?: string
}
-
400 Clinical history ID or Treatment ID is required
-
404 Clinical history or treatment not found
-
500 Error deleting treatment
-
Summary
Update a treatment in a clinical history -
Security
jwt
- application/json
{
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}
- 200 Treatment updated successfully
application/json
{
id?: string
patientId?: string
treatments: {
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}[]
currentConditions: {
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}[]
images: {
// Name of the file
name?: string
// Original name of the file
originalName?: string
// URL of the file
url?: string
// Date the file was uploaded
date?: string
}[]
analytics:#/components/schemas/File[]
createdAt?: string
updatedAt?: string
}
-
400 Clinical history ID or Treatment ID is required, or validation error
-
404 Clinical history or treatment not found
-
500 Error updating treatment
{
id?: string
patientId?: string
treatments: {
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}[]
currentConditions: {
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}[]
images: {
// Name of the file
name?: string
// Original name of the file
originalName?: string
// URL of the file
url?: string
// Date the file was uploaded
date?: string
}[]
analytics:#/components/schemas/File[]
createdAt?: string
updatedAt?: string
}
{
patientId: string
}
{
// Name of the current condition
name: string
// Additional details about the current condition
details: string
// When the condition started
since?: string
// When the condition ended
until?: string
}
{
// Name of the file
name?: string
// Original name of the file
originalName?: string
// URL of the file
url?: string
// Date the file was uploaded
date?: string
}
{
// Name of the treatment
name: string
// Start date of the treatment
startDate?: string
// End date of the treatment
endDate: string
// Instructions for the treatment
instructions: string
}
{
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}