System Design
Patient Record Management System
This documentation outlines the entity relationship (ER) model for the Patient Record Management System within DermVision. The ER model defines the structure of the data and the relationships between various entities involved in managing patient records. Below is a detailed description of one of the key tables in the system: the Patient table.
Patient Entity
The Patient entity stores essential information about patients. This table is central to the Patient Record Management System, as it contains the primary data necessary for identifying and managing patient records.
Attributes
Attribute |
Description |
Data Type |
Constraints |
|---|---|---|---|
_id |
A unique identifier for each patient. |
Integer |
Primary Key, Auto-increment, Not Null |
name |
The full name of the patient. |
Not Null |
|
The email address of the patient |
Not Null |
||
phone |
The phone number of the patient |
Not Null |
|
nationality |
The nationality of the patient |
Not Null |
|
gender |
The gender of the patient |
Not Null |
|
dob |
The date of birth of the patient |
Unique, Not Null |
|
derma |
The id of the dermatologist that created the patient record |
Not Null |
|
created |
The date the record was created |
Not Null |
|
updated |
The date the record was updated |
Nullable |
Relationships
Relationship |
Type |
Description |
Related Entity |
Foreign Key |
|---|---|---|---|---|
Appointments |
One-to-Many |
A patient can have multiple appointments. |
Appointment |
PatientID in the Appointment table references PatientID in the Patient table. |
Diagnostics |
One-to-Many |
A patient can have multiple diagnostic records. |
Diagnostic |
PatientID in the Diagnostic table references PatientID in the Patient table. |
ClinicalNotes |
One-to-Many |
A patient can have multiple clinical notes. |
ClinicalNote |
PatientID in the ClinicalNote table references PatientID in the Patient table. |
Prescriptions |
One-to-Many |
A patient can have multiple prescriptions. |
Prescription |
PatientID in the Prescription table references PatientID in the Patient table. |
Derma |
Many-to-One |
A dermatolgist can have multiple patients |
Prescription |
PatientID in the Prescription table references PatientID in the Patient table. |
API
Get all patient record
Endpoint URL: /patient/
Method: GET
Description: Get all patient records
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/patient/', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Add new patient record
Endpoint URL: /patient/add
Method: POST
Description: Add new patient record
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Body:
{
"derma": 123,
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+966507133905"
"dob": "08-Nov-1980"
}
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/patient/add', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Get all patients belonging to a dermatologist
Endpoint URL: /patient/derma/:id
Method: GET
Description: Get all patients belonging to a dermatologist
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Parameters:
- id - dermatologist id
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/patient/derma/123456', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Update patient record
Endpoint URL: /patient/update
Method: POST
Description: Update patient record
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Body:
{
}
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/patient/add', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Diagnostics Record Management System
This documentation outlines the entity relationship (ER) model for the Diagnostic Record Management System within DermVision. The ER model defines the structure of the data and the relationships between various entities involved in managing diagnostic records. Below is a detailed description of one of the key tables in the system: the Diagnostic table.
Diagnostic Entity
The Diagnostic entity stores essential information about the diagnosis for each patient. This table is central to the Diagnostic Record Management System, as it contains the primary data necessary for identifying and managing patient records.
Attributes
Attribute |
Description |
Data Type |
Constraints |
|---|---|---|---|
_id |
A unique identifier for each patient. |
Integer |
Primary Key, Auto-increment, Not Null |
image |
Not Null |
||
patient |
Not Null |
||
age |
Not Null |
||
gender |
Not Null |
||
bleeding |
Not Null |
||
elevation |
Not Null |
||
changed |
Not Null |
||
hurt |
Not Null |
||
grew |
Not Null |
||
itchy |
Not Nullable |
||
region |
Not Nullable |
||
location |
Not Nullable |
||
tone |
Not Nullable |
||
symptoms |
Not Nullable |
||
cam |
Not Nullable |
||
prediction |
Not Nullable |
||
probabilities |
Not Nullable |
||
derma |
Not Nullable |
||
created |
Not Nullable |
||
modified |
Not Nullable |
Relationships
Relationship |
Type |
Description |
Related Entity |
Foreign Key |
|---|---|---|---|---|
Patients |
One-to-Many |
A patient can have multiple diagnostic records |
Patients |
PatientID in the Appointment table references _id in the Patient table. |
Derma |
One-to-Many |
A dermatologists can create multiple diagnostic records. |
Dermatologist |
DermatologistID in the Diagnostic table references _id in the Dermatologist table. |
API
Get all diagnostic records
Endpoint URL: /diagnostic
Method: GET
Description: Get all diagnostic records
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/diagnostic', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Perform a diagnosis
Endpoint URL: /diagnostic/diagnose
Method: POST
Description: Perform a diagnosis using image and clinical data
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Body:
{
}
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/diagnostic/diagnose', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Save diagnosis result
Endpoint URL: /diagnostic/save
Method: POST
Description: Save the result of diagnosis
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Body:
{
}
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/diagnostic/diagnose', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Fetch diagnostic records by dermatologist
Endpoint URL: /diagnostic/derma/:id
Method: GET
Description: Get diagnostic records by a dermatologist
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Parameters:
- id - dermatologist id
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/diagnostic/derma/1234', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Fetch diagnostic records for a patient
Endpoint URL: /diagnostic/patient/:id
Method: GET
Description: Get diagnostic records for a patient
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Parameters:
- id - patient id
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/diagnostic/patient/1234', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Clinical Notes Record Management System
This documentation outlines the entity relationship (ER) model for the Clinical Notes Record Management System within DermVision. The ER model defines the structure of the data and the relationships between various entities involved in managing clinical notes records. Below is a detailed description of one of the key tables in the system: the Clinical Notes table.
Clinical Note Entity
The ClinicalNote entity stores information about clinical notes recorded by healthcare providers. This table is essential for managing and tracking clinical notes related to patients.
Attributes
Attribute |
Description |
Data Type |
Constraints |
|---|---|---|---|
_id |
A unique identifier for each clinical note. |
Integer |
Primary Key, Auto-increment, Not Null |
title |
Not Null |
||
note |
Not Null |
||
derma |
Not Null |
||
patient |
Not Null |
||
created |
Not Null |
||
modified |
Not Null |
||
deleted |
Not Null |
Relationships
Relationship |
Type |
Description |
Related Entity |
Foreign Key |
|---|---|---|---|---|
Patients |
Many-to-One |
Multiple clinical notes can belong to one patient. |
Patient |
PatientID in the ClinicalNote table references PatientID in the Patient table. |
Derma |
Many-to-One |
Multiple clinical notes can belong to one patient. |
Patient |
PatientID in the ClinicalNote table references PatientID in the Patient table. |
API
Get all clinical notes
Endpoint URL: /notes
Method: GET
Description: Get all clinical notes
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/notes', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Create clinical note
Endpoint URL: /notes/add
Method: POST
Description: Add new clinical note
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Body:
{
}
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/notes/add', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: body
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Update clinical note
Endpoint URL: /notes/update
Method: POST
Description: update clinical note
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Body:
{
}
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/notes/update', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: body
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Fetch notes by dermatologist
Endpoint URL: /notes/derma/:id
Method: GET
Description: Get clinical records by a dermatologist
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Parameters:
- id - dermatologist id
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/diagnostic/derma/1234', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Fetch note records for a patient
Endpoint URL: /notes/patient/:id
Method: GET
Description: Get clinical notes records for a patient
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Parameters:
- id - patient id
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/notes/patient/1234', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Prescription Record Management System
This documentation outlines the entity relationship (ER) model for the Prescription Record Management System within DermVision. The ER model defines the structure of the data and the relationships between various entities involved in managing prescription records. Below is a detailed description of one of the key tables in the system: the Treatment table.
Treatment Entity
The Treatment entity stores essential information about patients. This table is central to the Prescription Record Management System, as it contains the primary data necessary for identifying and managing prescription records.
Attributes
Attribute |
Description |
Data Type |
Constraints |
|---|---|---|---|
_id |
A unique identifier for each patient. |
Integer |
Primary Key, Auto-increment, Not Null |
derma |
Not Null |
||
patient |
Not Null |
||
type |
Not Null |
||
mode |
Not Null |
||
title |
Not Null |
||
description |
Not Null |
||
dosage_quantity |
Not Null |
||
dosage_unit |
Not Null |
||
duration_number |
Not Null |
||
duration_period |
Not Null |
||
frequency_value |
Not Null |
||
frequency_period |
Not Null |
||
created |
DateTime |
Not Null |
|
modified |
DateTime |
Not Null |
Relationships
Relationship |
Type |
Description |
Related Entity |
Foreign Key |
|---|---|---|---|---|
Patients |
One-to-Many |
A patient can have multiple prescription records |
Patients |
PatientID in the Appointment table references _id in the Patient table. |
Derma |
One-to-Many |
A dermatologists can create multiple prescription records. |
Dermatologist |
DermatologistID in the Diagnostic table references _id in the Dermatologist table. |
API
Get all treatment records
Endpoint URL: /treatment
Method: GET
Description: Get all treatment records
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/treatment', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Create new treatment record
Endpoint URL: /treatment/add
Method: POST
Description: Add new treatment record
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Body:
{
}
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/treatment/add', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: body
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Update treatment record
Endpoint URL: /treatment/update
Method: POST
Description: Update treatment record
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Body:
{
}
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/treatment/update', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: body
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Fetch treatment records by dermatologist
Endpoint URL: /treatment/derma/:id
Method: GET
Description: Get treatment records by a dermatologist
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Parameters:
- id - dermatologist id
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/treatment/derma/1234', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Fetch treatment records for a patient
Endpoint URL: /treatment/patient/:id
Method: GET
Description: Get treatment records for a patient
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Parameters:
- id - patient id
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/treatment/patient/1234', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Appointment Records Management System
This documentation outlines the entity relationship (ER) model for the Appointment Record Management System within DermVision. The ER model defines the structure of the data and the relationships between various entities involved in managing appointment records. Below is a detailed description of one of the key tables in the system: the Appointment table.
Appointment Entity
The Appointment entity stores essential information about appointment records. This table is central to the Appointment Record Management System, as it contains the primary data necessary for identifying and managing patient records.
Attributes
Attribute |
Description |
Data Type |
Constraints |
|---|---|---|---|
_id |
A unique identifier for each patient. |
Integer |
Primary Key, Auto-increment, Not Null |
derma |
The id of the dermatologist that created the patient record |
Varchar(255) |
Not Null |
patient |
Not Null |
||
title |
Not Null |
||
notes |
Not Null |
||
date |
Not Null |
||
from |
Not Null |
||
to |
Not Null |
||
created |
The date the record was created |
DateTime |
Not Null |
modified |
The date the record was updated |
DateTime |
Not Null |
status |
Relationships
Relationship |
Type |
Description |
Related Entity |
Foreign Key |
|---|---|---|---|---|
Appointments |
One-to-Many |
A patient can have multiple appointments. |
Appointment |
PatientID in the Appointment table references PatientID in the Patient table. |
Diagnostics |
One-to-Many |
A patient can have multiple diagnostic records. |
Diagnostic |
PatientID in the Diagnostic table references PatientID in the Patient table. |
ClinicalNotes |
One-to-Many |
A patient can have multiple clinical notes. |
ClinicalNote |
PatientID in the ClinicalNote table references PatientID in the Patient table. |
Prescriptions |
One-to-Many |
A patient can have multiple prescriptions. |
Prescription |
PatientID in the Prescription table references PatientID in the Patient table. |
Derma |
Many-to-One |
A dermatolgist can have multiple patients |
Prescription |
PatientID in the Prescription table references PatientID in the Patient table. |
API
Get all appointment records
Endpoint URL: /appointment/
Method: GET
Description: Get all appointment records
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/apppointment/', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Add new appointment record
Endpoint URL: /appointment/add
Method: POST
Description: Add new patient record
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Body:
{
}
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/appointment/add', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Update appointment record
Endpoint URL: /appointment/add
Method: POST
Description: Update appointment record
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Body:
{
}
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/appointment/add', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Cancel an appointment record
Endpoint URL: /appointment/cancel/:id
Method: GET
Description: Cancel an appointment record
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/apppointment/cancel/1234', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Fetch appointment records for a dermatologist
Endpoint URL: /appointment/derma/:id
Method: GET
Description: Fetch appointment records for a dermatologist
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/apppointment/derma/1234', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Fetch appointment records for a patient
Endpoint URL: /appointment/patient/:id
Method: GET
Description: Fetch appointment records for a patient
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/apppointment/patient/1234', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Diagnostic Model Management System
This documentation outlines the entity relationship (ER) model for the Diagnostic Model Management System within DermVision. The ER model defines the structure of the data and the relationships between various entities involved in managing patient records. Below is a detailed description of one of the key tables in the system: the Library table.
Library Entity
The Library entity stores essential information about diagnostic model. This table is central to the Diagnostic Model Management System, as it contains the primary data necessary for identifying and managing model version.
Attributes
Attribute |
Description |
Data Type |
Constraints |
|---|---|---|---|
_id |
A unique identifier for each patient. |
Integer |
Primary Key, Auto-increment, Not Null |
model_name |
|||
model_type |
|||
model_filename |
|||
model_accuracy |
|||
model_auc |
|||
model_recall |
|||
default |
|||
created |
The date the record was created |
DateTime |
Not Null |
updated |
The date the record was updated |
DateTime |
Not Null |
Relationships
API
Get all model records
Endpoint URL: /library/
Method: GET
Description: Get all model records
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/library/', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Add model to library
Endpoint URL: /library/add
Method: POST
Description: Add model to library
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Body:
{
}
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/library/add', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Update model record
Endpoint URL: /library/update
Method: POST
Description: Update model record
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Body:
{
}
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/library/update', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}
Make model default
Endpoint URL: /library/default
Method: POST
Description: Make a model default for diagnosis tasks
Headers:
Authorization: Bearer {token}
Content-Type: application/json
Body:
{
}
Response: - 200 OK: A JSON object containing user data. - 404 Not Found: If the user does not exist. - 401 Unauthorized: If the authentication token is invalid or missing.
Example Request:
fetch('https://api.dermvision.com/library/default', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Example Response:
{
}