[ { "path": "/add-inventory", "method": "POST", "operationId": "createInventoryItem", "summary": "Add new inventory item", "description": "Creates a new inventory item in the system", "tags": [ "Inventory" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "inventoryType", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Medication", "items": null, "properties": null }, { "name": "item_name", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Aspirin 325mg", "items": null, "properties": null }, { "name": "price", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 10.99, "items": null, "properties": null }, { "name": "expirationDate", "type": "string", "format": "date", "required": false, "description": "", "enum": null, "example": "2023-12-31", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "properties": { "inventoryType": { "type": "string", "example": "Medication" }, "item_name": { "type": "string", "example": "Aspirin 325mg" }, "price": { "type": "number", "format": "float", "example": 10.99 }, "expirationDate": { "type": "string", "format": "date", "example": "2023-12-31" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "properties": { "data": { "$ref": "#/components/schemas/InventoryItem" }, "message": { "type": "string", "example": "Inventory added sucessfully!" } }, "type": "object" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "This action is unauthorized" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The given data was invalid." }, "errors": { "properties": { "item_name": { "type": "array", "items": { "type": "string", "example": "The item name field is required." } } }, "type": "object" } }, "type": "object" } } } } } }, { "path": "/add-phone-log/{patient_id}", "method": "POST", "operationId": "addPhoneLog", "summary": "Add a new phone log for a patient", "description": "Records a new phone call log entry for a specific patient", "tags": [ "Phone Logs" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "ID of the patient", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "provider", "type": "string", "format": null, "required": true, "description": "Name of the provider who made/received the call", "enum": null, "example": "Dr. Smith", "items": null, "properties": null }, { "name": "message", "type": "string", "format": null, "required": true, "description": "Details about the phone call", "enum": null, "example": "Discussed medication changes", "items": null, "properties": null }, { "name": "user_id", "type": "integer", "format": null, "required": true, "description": "ID of the user who logged the call", "enum": null, "example": 1, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "provider", "message", "user_id" ], "properties": { "provider": { "description": "Name of the provider who made/received the call", "type": "string", "example": "Dr. Smith" }, "message": { "description": "Details about the phone call", "type": "string", "example": "Discussed medication changes" }, "user_id": { "description": "ID of the user who logged the call", "type": "integer", "example": 1 } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Phone log added successfully", "content": { "application/json": { "schema": { "properties": { "provider": { "type": "string", "example": "Dr. Smith" }, "message": { "type": "string", "example": "Discussed medication changes" }, "user_id": { "type": "integer", "example": 1 } }, "type": "object" } } } }, "403": { "description": "Unauthorized access", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "This action is unauthorized." } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "An error occurred while adding phone log" } }, "type": "object" } } } } } }, { "path": "/affiliate/me", "method": "GET", "operationId": "getAffiliateDetailsByAccessToken", "summary": "Get affiliate details by access token", "description": "Retrieves authenticated affiliate's profile details using the access token", "tags": [ "Authentication" ], "security": [ { "accessToken": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Affiliate details retrieved successfully", "content": { "application/json": { "schema": { "properties": { "userAbilityRules": { "type": "array", "items": { "properties": { "action": { "type": "string", "example": "manage" }, "subject": { "type": "string", "example": "all" } }, "type": "object" } }, "userData": { "properties": { "id": { "type": "integer", "example": 1 }, "fullName": { "type": "string", "example": "Sam Johnson" }, "email": { "type": "string", "format": "email", "example": "sam.johnson@example.com" }, "first_name": { "type": "string", "example": "Sam" }, "last_name": { "type": "string", "example": "Johnson" }, "phone_no": { "type": "string", "example": "1234567890" }, "avatar": { "type": "string", "example": "/images/avatars/avatar-1.png" }, "role": { "type": "string", "example": "affiliate" } }, "type": "object" }, "message": { "type": "string", "example": "User LoggedIn" } }, "type": "object" } } } }, "400": { "description": "Invalid token format", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Invalid token format" } }, "type": "object" } } } }, "401": { "description": "Invalid access token", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Invalid access token" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "An error occurred while retrieving affiliate details." }, "exception": { "type": "string", "example": "Error message" } }, "type": "object" } } } } } }, { "path": "/api/add-email/{patient_id}", "method": "POST", "operationId": "addEmail", "summary": "Add a new email for a patient", "description": "Creates a new email record associated with a specific patient", "tags": [ "Emails" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "ID of the patient", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "practitioner", "type": "integer", "format": null, "required": false, "description": "User ID of the practitioner", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "messageText", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "This is the email body text", "items": null, "properties": null }, { "name": "to_email", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "patient@example.com", "items": null, "properties": null }, { "name": "from_email", "type": "string", "format": "email", "required": false, "description": "", "enum": null, "example": "doctor@healthguruhub.com", "items": null, "properties": null }, { "name": "emailTemplate", "type": "string", "format": null, "required": false, "description": "Template name used for the email", "enum": null, "example": "Appointment Reminder", "items": null, "properties": null }, { "name": "subject", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Your upcoming appointment", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "to_email", "subject", "messageText" ], "properties": { "practitioner": { "description": "User ID of the practitioner", "type": "integer", "example": 1 }, "messageText": { "type": "string", "example": "This is the email body text" }, "to_email": { "type": "string", "format": "email", "example": "patient@example.com" }, "from_email": { "type": "string", "format": "email", "example": "doctor@healthguruhub.com" }, "emailTemplate": { "description": "Template name used for the email", "type": "string", "example": "Appointment Reminder" }, "subject": { "type": "string", "example": "Your upcoming appointment" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Email added successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Email added." } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "422": { "description": "Validation error" } } }, { "path": "/api/add-location", "method": "POST", "operationId": "addLocation", "summary": "Add a new location", "description": "Creates a new facility location", "tags": [ "Locations" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Main Clinic", "items": null, "properties": null }, { "name": "npiNumber", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "1234567890", "items": null, "properties": null }, { "name": "phoneNumber", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "(123) 456-7890", "items": null, "properties": null }, { "name": "address", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "123 Main St", "items": null, "properties": null }, { "name": "city", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "New York", "items": null, "properties": null }, { "name": "state", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "NY", "items": null, "properties": null }, { "name": "zipcode", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "10001", "items": null, "properties": null }, { "name": "country", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "US", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "name", "npiNumber", "phoneNumber", "address", "city", "state", "zipcode", "country" ], "properties": { "name": { "type": "string", "example": "Main Clinic" }, "npiNumber": { "type": "string", "example": "1234567890" }, "phoneNumber": { "type": "string", "example": "(123) 456-7890" }, "address": { "type": "string", "example": "123 Main St" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "zipcode": { "type": "string", "example": "10001" }, "country": { "type": "string", "example": "US" } }, "type": "object" }, "examples": {} } } }, "responses": { "201": { "description": "Location created successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Location added successfully" }, "data": { "properties": { "name": { "type": "string", "example": "Main Clinic" }, "facility_npi": { "type": "string", "example": "1234567890" }, "phone": { "type": "string", "example": "1234567890" }, "street": { "type": "string", "example": "123 Main St" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "postal_code": { "type": "string", "example": "10001" }, "country_code": { "type": "string", "example": "US" }, "provider_id": { "type": "integer", "example": 42 } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "422": { "description": "Validation error" } } }, { "path": "/api/add-note-patient", "method": "POST", "operationId": "addNotePatient", "summary": "Add a note for patient", "description": "Creates a new note for the authenticated patient", "tags": [ "Notes" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "note", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Follow-up required in 2 weeks", "items": null, "properties": null }, { "name": "note_type", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "medical", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "note", "note_type" ], "properties": { "note": { "type": "string", "example": "Follow-up required in 2 weeks" }, "note_type": { "type": "string", "example": "medical" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Note created successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Note created" }, "data": { "properties": { "id": { "type": "integer" }, "note": { "type": "string" }, "note_type": { "type": "string" }, "patient_id": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "500": { "description": "Failed to create note" } } }, { "path": "/api/add-task/{patient_id}", "method": "POST", "operationId": "addTask", "summary": "Add a new task for a patient", "description": "Creates a new task associated with a specific patient", "tags": [ "Tasks" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "ID of the patient", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "task_title", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Complete blood work", "items": null, "properties": null }, { "name": "task_body", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Patient needs to complete blood work at local lab", "items": null, "properties": null }, { "name": "task_due_date", "type": "string", "format": "date-time", "required": true, "description": "", "enum": null, "example": "2025-07-10 10:00:00", "items": null, "properties": null }, { "name": "task_assigned_to", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 5, "items": null, "properties": null }, { "name": "task_watchers", "type": "array", "format": null, "required": false, "description": "", "enum": null, "example": [ 1, 2 ], "items": { "type": "integer" }, "properties": null }, { "name": "sendEmailtoPatientApplicationForTask", "type": "boolean", "format": null, "required": false, "description": "", "enum": null, "example": true, "items": null, "properties": null }, { "name": "task_priority", "type": "string", "format": null, "required": false, "description": "", "enum": [ "low", "normal", "high" ], "example": "normal", "items": null, "properties": null }, { "name": "task_status", "type": "string", "format": null, "required": false, "description": "", "enum": [ "pending", "in_progress", "completed" ], "example": "pending", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "task_title", "task_body", "task_due_date", "task_assigned_to" ], "properties": { "task_title": { "type": "string", "example": "Complete blood work" }, "task_body": { "type": "string", "example": "Patient needs to complete blood work at local lab" }, "task_due_date": { "type": "string", "format": "date-time", "example": "2025-07-10 10:00:00" }, "task_assigned_to": { "type": "integer", "example": 5 }, "task_watchers": { "type": "array", "items": { "type": "integer" }, "example": [ 1, 2 ] }, "sendEmailtoPatientApplicationForTask": { "type": "boolean", "example": true }, "task_priority": { "type": "string", "enum": [ "low", "normal", "high" ], "example": "normal" }, "task_status": { "type": "string", "enum": [ "pending", "in_progress", "completed" ], "example": "pending" } }, "type": "object" }, "examples": {} } } }, "responses": { "201": { "description": "Task created successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Task added successfully" }, "data": { "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "422": { "description": "Validation error" } } }, { "path": "/api/add-user", "method": "POST", "operationId": "addUser", "summary": "Add new user (legacy method)", "description": "Creates a new user (legacy method for compatibility)", "tags": [ "User Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "firstName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "John", "items": null, "properties": null }, { "name": "lastName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Doe", "items": null, "properties": null }, { "name": "username", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "johndoe", "items": null, "properties": null }, { "name": "emailAddress", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "john.doe@example.com", "items": null, "properties": null }, { "name": "textMessageNumber", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "123-456-7890", "items": null, "properties": null }, { "name": "dateOfBirth", "type": "string", "format": "date", "required": false, "description": "", "enum": null, "example": "1990-01-01", "items": null, "properties": null }, { "name": "gender", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "M", "items": null, "properties": null }, { "name": "city", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "New York", "items": null, "properties": null }, { "name": "state", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "NY", "items": null, "properties": null }, { "name": "zipcode", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "10001", "items": null, "properties": null }, { "name": "role_id", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "1", "items": null, "properties": null }, { "name": "newUserPassword", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "password123", "items": null, "properties": null }, { "name": "type", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "practitioner", "items": null, "properties": null }, { "name": "avatarImg", "type": "file", "format": null, "required": false, "description": "User profile image", "enum": null, "example": null, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "multipart/form-data": { "schema": { "required": [ "firstName", "lastName", "username", "emailAddress", "textMessageNumber", "role_id", "newUserPassword", "type" ], "properties": { "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "username": { "type": "string", "example": "johndoe" }, "emailAddress": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "textMessageNumber": { "type": "string", "example": "123-456-7890" }, "dateOfBirth": { "type": "string", "format": "date", "example": "1990-01-01" }, "gender": { "type": "string", "example": "M" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "zipcode": { "type": "string", "example": "10001" }, "role_id": { "type": "string", "example": "1" }, "newUserPassword": { "type": "string", "example": "password123" }, "type": { "type": "string", "example": "practitioner" }, "avatarImg": { "description": "User profile image", "type": "file" } }, "type": "object" }, "examples": {} } } }, "responses": { "201": { "description": "User added successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "User added successfully" }, "data": { "properties": { "fname": { "type": "string", "example": "John" }, "lname": { "type": "string", "example": "Doe" }, "username": { "type": "string", "example": "johndoe" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "phone": { "type": "string", "example": "123-456-7890" }, "dateOfBirth": { "type": "string", "format": "date", "example": "1990-01-01" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "zipcode": { "type": "string", "example": "10001" }, "gender": { "type": "string", "example": "M" }, "date_created": { "type": "string", "format": "date-time", "example": "2023-06-30T15:30:00Z" }, "last_updated": { "type": "string", "format": "date-time", "example": "2023-06-30T15:30:00Z" }, "company_id": { "type": "integer", "example": 1 }, "provider_id": { "type": "integer", "example": 1 }, "type": { "type": "string", "example": "practitioner" }, "profile_image_base64": { "type": "string", "example": "https://example.com/storage/John-Doe/image.jpg" }, "timezone": { "type": "string", "example": "UTC" }, "role_id": { "type": "string", "example": "1" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "500": { "description": "Error", "content": { "application/json": { "schema": { "properties": { "messages": { "type": "string", "example": "Error" }, "data": { "type": "string", "example": "Username Already Exists!" } }, "type": "object" } } } } } }, { "path": "/api/add-vital/{patientId}", "method": "POST", "operationId": "addVital", "summary": "Add vital signs for a patient", "description": "Record vital sign measurements for a specific patient", "tags": [ "Vitals" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "provider_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "blood_presssure", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "120", "items": null, "properties": null }, { "name": "diastolic", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "80", "items": null, "properties": null }, { "name": "weight_lbs", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 175.5, "items": null, "properties": null }, { "name": "height_ft", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 5, "items": null, "properties": null }, { "name": "height_in", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 10, "items": null, "properties": null }, { "name": "temperature", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 98.6, "items": null, "properties": null }, { "name": "pulse", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 72, "items": null, "properties": null }, { "name": "respiratory_rate", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 16, "items": null, "properties": null }, { "name": "saturation", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 98, "items": null, "properties": null }, { "name": "waist_in", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 32.5, "items": null, "properties": null }, { "name": "headCircumference_in", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 22.5, "items": null, "properties": null }, { "name": "note", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Patient appears healthy", "items": null, "properties": null }, { "name": "provider", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Dr. Smith", "items": null, "properties": null }, { "name": "weight_oz", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "bmi", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 24.5, "items": null, "properties": null }, { "name": "bloodSugar", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 95, "items": null, "properties": null }, { "name": "fasting", "type": "boolean", "format": null, "required": false, "description": "", "enum": null, "example": true, "items": null, "properties": null }, { "name": "neck_in", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 15.5, "items": null, "properties": null }, { "name": "shoulders_in", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 44, "items": null, "properties": null }, { "name": "chest_in", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 42, "items": null, "properties": null }, { "name": "hips_in", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 38, "items": null, "properties": null }, { "name": "lean_body_mass_lbs", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 145, "items": null, "properties": null }, { "name": "body_fat", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 18, "items": null, "properties": null }, { "name": "notes", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Additional observations", "items": null, "properties": null }, { "name": "subjective_notes", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Patient reports feeling well", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "provider_id" ], "properties": { "provider_id": { "type": "integer", "example": 1 }, "blood_presssure": { "type": "string", "example": "120" }, "diastolic": { "type": "string", "example": "80" }, "weight_lbs": { "type": "number", "format": "float", "example": 175.5 }, "height_ft": { "type": "integer", "example": 5 }, "height_in": { "type": "integer", "example": 10 }, "temperature": { "type": "number", "format": "float", "example": 98.6 }, "pulse": { "type": "integer", "example": 72 }, "respiratory_rate": { "type": "integer", "example": 16 }, "saturation": { "type": "integer", "example": 98 }, "waist_in": { "type": "number", "format": "float", "example": 32.5 }, "headCircumference_in": { "type": "number", "format": "float", "example": 22.5 }, "note": { "type": "string", "example": "Patient appears healthy" }, "provider": { "type": "string", "example": "Dr. Smith" }, "weight_oz": { "type": "number", "format": "float", "example": 0 }, "bmi": { "type": "number", "format": "float", "example": 24.5 }, "bloodSugar": { "type": "number", "format": "float", "example": 95 }, "fasting": { "type": "boolean", "example": true }, "neck_in": { "type": "number", "format": "float", "example": 15.5 }, "shoulders_in": { "type": "number", "format": "float", "example": 44 }, "chest_in": { "type": "number", "format": "float", "example": 42 }, "hips_in": { "type": "number", "format": "float", "example": 38 }, "lean_body_mass_lbs": { "type": "number", "format": "float", "example": 145 }, "body_fat": { "type": "number", "format": "float", "example": 18 }, "notes": { "type": "string", "example": "Additional observations" }, "subjective_notes": { "type": "string", "example": "Patient reports feeling well" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Vitals added successfully", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "Success" }, "patient": { "type": "string", "example": "Added Succesfully!" } }, "type": "object" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthenticated" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The given data was invalid." }, "errors": { "type": "object" } }, "type": "object" } } } } } }, { "path": "/api/appointment-detail/{appointment}", "method": "POST", "operationId": "appointmentDetail", "summary": "Get appointment details", "description": "Retrieves detailed information about a specific appointment", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "appointment", "type": "integer", "format": null, "required": true, "description": "Appointment ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Appointment details retrieved successfully", "content": { "application/json": { "schema": { "properties": { "patient": { "type": "object" }, "telemedPro": { "type": "object" }, "doctor_appointment": { "type": "object" }, "agent_appointment": { "type": "object" }, "video_url": { "type": "string" } }, "type": "object" } } } }, "404": { "description": "Appointment not found" }, "500": { "description": "Failed to retrieve appointment details" } } }, { "path": "/api/assistant/practitioners-list", "method": "GET", "operationId": "assistantPractitioner", "summary": "Get practitioners list via assistant", "description": "Retrieves a list of practitioners for the current provider through the assistant API", "tags": [ "Provider" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Practitioners list retrieved successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Practitioner list!" }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "uuid": { "type": "string" }, "email": { "type": "string" }, "phone": { "type": "string" }, "type": { "type": "string" }, "fname": { "type": "string" }, "lname": { "type": "string" } }, "type": "object" } } }, "type": "object" } } } }, "403": { "description": "Unauthorized" } } }, { "path": "/api/assistant/save-signature", "method": "POST", "operationId": "assistantStoreSignature", "summary": "Store signature", "description": "Stores a provider's signature via assistant API", "tags": [ "Provider" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "signature_data", "type": "string", "format": null, "required": true, "description": "Base64 encoded signature image", "enum": null, "example": null, "items": null, "properties": null }, { "name": "provider_id", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 1, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "signature_data" ], "properties": { "signature_data": { "description": "Base64 encoded signature image", "type": "string" }, "provider_id": { "type": "integer", "example": 1 } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Signature stored successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "message": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/assistant/store-form", "method": "POST", "operationId": "assistantFormDataStore", "summary": "Store form data", "description": "Creates a new form template", "tags": [ "Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "type", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "consent-forms", "items": null, "properties": null }, { "name": "data", "type": "object", "format": null, "required": true, "description": "Form structure and fields", "enum": null, "example": null, "items": null, "properties": null }, { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Patient Consent Form", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "type", "data", "name" ], "properties": { "type": { "type": "string", "example": "consent-forms" }, "data": { "description": "Form structure and fields", "type": "object" }, "name": { "type": "string", "example": "Patient Consent Form" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Form stored successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "form": { "type": "object" } }, "type": "object" } } } }, "400": { "description": "Invalid input" } } }, { "path": "/api/assistant/store-intake-form-data", "method": "POST", "operationId": "storeAssistantIntakeFormData", "summary": "Store intake form data", "description": "Stores data from a patient intake form", "tags": [ "Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "form_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "pid", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 123, "items": null, "properties": null }, { "name": "practitioner_id", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 456, "items": null, "properties": null }, { "name": "schema", "type": "string", "format": null, "required": true, "description": "JSON schema of the form", "enum": null, "example": null, "items": null, "properties": null }, { "name": "orginal_form_schema", "type": "string", "format": null, "required": true, "description": "Original form schema", "enum": null, "example": null, "items": null, "properties": null }, { "name": "signatureMetaData", "type": "string", "format": null, "required": false, "description": "Signature metadata", "enum": null, "example": null, "items": null, "properties": null }, { "name": "file_field_name", "type": "file", "format": null, "required": false, "description": "File upload fields (multiple can be included)", "enum": null, "example": null, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "multipart/form-data": { "schema": { "required": [ "form_id", "pid", "schema", "orginal_form_schema" ], "properties": { "form_id": { "type": "integer", "example": 1 }, "pid": { "type": "integer", "example": 123 }, "practitioner_id": { "type": "integer", "example": 456 }, "schema": { "description": "JSON schema of the form", "type": "string" }, "orginal_form_schema": { "description": "Original form schema", "type": "string" }, "signatureMetaData": { "description": "Signature metadata", "type": "string" }, "file_field_name": { "description": "File upload fields (multiple can be included)", "type": "file" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Form data updated successfully" }, "201": { "description": "Form data stored successfully" }, "400": { "description": "Invalid input" } } }, { "path": "/api/assistant/update-form/{id}", "method": "PUT", "operationId": "updateAssistantForm", "summary": "Update form", "description": "Updates an existing form template", "tags": [ "Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Form ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "type", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "consent-forms", "items": null, "properties": null }, { "name": "data", "type": "object", "format": null, "required": true, "description": "Form structure and fields", "enum": null, "example": null, "items": null, "properties": null }, { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Updated Patient Consent Form", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "type", "data", "name" ], "properties": { "type": { "type": "string", "example": "consent-forms" }, "data": { "description": "Form structure and fields", "type": "object" }, "name": { "type": "string", "example": "Updated Patient Consent Form" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Form updated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "form": { "type": "object" } }, "type": "object" } } } }, "404": { "description": "Form not found", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "404" }, "message": { "type": "string", "example": "Form not found" } }, "type": "object" } } } } } }, { "path": "/api/available-slots/{date}", "method": "POST", "operationId": "availableSlots", "summary": "Get available appointment slots", "description": "Retrieves available appointment slots for a specific date", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "date", "type": "string", "format": null, "required": true, "description": "Date (YYYY-MM-DD)", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Available slots retrieved successfully", "content": { "application/json": { "schema": { "properties": { "available_slots": { "type": "array", "items": { "type": "string", "example": "9:00 AM" } } }, "type": "object" } } } }, "500": { "description": "Failed to retrieve available slots" } } }, { "path": "/api/book-appointment", "method": "POST", "operationId": "bookAgentAppointment", "summary": "Book an appointment", "description": "Books a new appointment with a doctor", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "telemed_pros_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "doctor_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "appointment_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "appointment_time", "type": "string", "format": "date-time", "required": true, "description": "", "enum": null, "example": "2023-06-15 14:30:00", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "telemed_pros_id", "patient_id", "doctor_id", "appointment_id", "appointment_time" ], "properties": { "telemed_pros_id": { "type": "integer", "example": 1 }, "patient_id": { "type": "integer", "example": 1 }, "doctor_id": { "type": "integer", "example": 1 }, "appointment_id": { "type": "integer", "example": 1 }, "appointment_time": { "type": "string", "format": "date-time", "example": "2023-06-15 14:30:00" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Appointment booked successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Appointment booked successfully" }, "meeting_id": { "type": "string" }, "appointment_time": { "type": "string", "format": "date-time" } }, "type": "object" } } } }, "422": { "description": "Validation error" }, "500": { "description": "Failed to book appointment" } } }, { "path": "/api/change-password", "method": "POST", "operationId": "updatePasswordAuth", "summary": "Update patient password", "description": "Update the password for an authenticated patient", "tags": [ "Patient Authentication" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "current_password", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "currentpassword", "items": null, "properties": null }, { "name": "new_password", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "newpassword123", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "current_password", "new_password" ], "properties": { "current_password": { "type": "string", "example": "currentpassword" }, "new_password": { "type": "string", "example": "newpassword123" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Password updated successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Password updated successfully" } }, "type": "object" } } } }, "400": { "description": "Current password is incorrect", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Current password is incorrect" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } } }, { "path": "/api/check-email", "method": "POST", "operationId": "checkEmail", "summary": "Check email availability", "description": "Check if an email is already registered in the system", "tags": [ "Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "email", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "user@example.com", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "email" ], "properties": { "email": { "type": "string", "format": "email", "example": "user@example.com" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Email availability check result", "content": { "application/json": { "schema": { "properties": { "available": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Email is available" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Email is required" }, "errors": { "type": "object" } }, "type": "object" } } } } } }, { "path": "/api/check-user", "method": "POST", "operationId": "checkProvider", "summary": "Check if provider exists", "description": "Checks if a provider exists with the given email", "tags": [ "Provider" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "email", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "provider@example.com", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "email" ], "properties": { "email": { "type": "string", "format": "email", "example": "provider@example.com" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Check completed", "content": { "application/json": { "schema": { "properties": { "success": { "description": "True if provider exists, false otherwise", "type": "boolean" } }, "type": "object" } } } } } }, { "path": "/api/company/complete/setup/{status}", "method": "PUT", "operationId": "completeSetupAssistant", "summary": "Complete company setup", "description": "Marks the company setup process as complete or incomplete", "tags": [ "Assistant" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "status", "type": "string", "format": null, "required": true, "description": "Setup status (complete or incomplete)", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Setup status updated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "string" } }, "type": "object" } } } }, "400": { "description": "Invalid status", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/delete-form/{id}", "method": "DELETE", "operationId": "deleteForm", "summary": "Delete form", "description": "Deletes a form by its ID", "tags": [ "Forms Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Form ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Form deleted successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "success" }, "data": { "type": "integer", "example": 1 } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "Form not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Form not found" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Error deleting form" }, "error": { "type": "string", "example": "Error message" } }, "type": "object" } } } } } }, { "path": "/api/delete-intake-question/{form_id}", "method": "DELETE", "operationId": "deleteIntakeQuestionById", "summary": "Delete intake question", "description": "Deletes an intake question by its ID", "tags": [ "Intake Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "form_id", "type": "integer", "format": null, "required": true, "description": "Intake question ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Question deleted successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Question Deleted" } }, "type": "object" } } } }, "404": { "description": "Question not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Question not found!" } }, "type": "object" } } } } } }, { "path": "/api/document/download/{rowId}/{key}", "method": "GET", "operationId": "downloadDocument", "summary": "Download a patient document", "description": "Downloads a specific document from patient intake form data", "tags": [ "Documents" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "rowId", "type": "integer", "format": null, "required": true, "description": "ID of the intake form record", "in": "path", "enum": null, "example": null }, { "name": "key", "type": "string", "format": null, "required": true, "description": "Key identifier for the document in the form data", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Document file download", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "404": { "description": "Document not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Not Found" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Server Error" } }, "type": "object" } } } } } }, { "path": "/api/download/pdf/{id}/{type}", "method": "GET", "operationId": "downloadPdfFile", "summary": "Download or view PDF file", "description": "Downloads or renders a PDF file for a form", "tags": [ "Forms" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Form ID", "in": "path", "enum": null, "example": null }, { "name": "type", "type": "string", "format": null, "required": true, "description": "Action type (download or view)", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "File download or view", "content": { "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "Invalid input", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" } }, "type": "object" } } } }, "404": { "description": "File not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Pdf not found" } }, "type": "object" } } } } } }, { "path": "/api/emr/appointment/{appointment_id}/order", "method": "GET", "operationId": "getAppointmentOrder", "summary": "Get appointment order details", "description": "Retrieves order details associated with an appointment", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "appointment_id", "type": "integer", "format": null, "required": true, "description": "Appointment ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Order details retrieved successfully", "content": { "application/json": { "schema": { "properties": { "order_id": { "type": "integer", "example": 1 }, "patient_id": { "type": "integer", "example": 123 }, "provider_id": { "type": "integer", "example": 456 }, "shipping_address1": { "type": "string", "example": "123 Main St" }, "shipping_address2": { "type": "string", "example": "Apt 4B" }, "shipping_city": { "type": "string", "example": "New York" }, "shipping_state": { "type": "string", "example": "NY" }, "shipping_zipcode": { "type": "string", "example": "10001" }, "shipping_country": { "type": "string", "example": "USA" }, "shipping_amount": { "type": "string", "example": "5.99" }, "builder_id": { "type": "integer", "example": 789 }, "total_amount": { "type": "string", "example": "99.99" }, "discounted_amount": { "type": "string", "example": "89.99" }, "promo_code": { "type": "string", "example": "SAVE10" }, "items": { "type": "array", "items": { "properties": { "product_id": { "type": "integer", "example": 101 }, "product_name": { "type": "string", "example": "Medication A" }, "qty": { "type": "integer", "example": 2 }, "subscription": { "type": "string", "example": "true" }, "onetime": { "type": "string", "example": "false" }, "variation_id": { "type": "integer", "example": 201 }, "variation_name": { "type": "string", "example": "100mg" }, "price": { "type": "string", "example": "49.99" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Appointment or order not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Appointment not found" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Error retrieving order details" }, "error": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/emr/appointment/{appointment}/detail", "method": "GET", "operationId": "getAppointmentDetailUnique", "summary": "Get appointment details", "description": "Fetches detailed information about an appointment", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "appointment", "type": "integer", "format": null, "required": true, "description": "Appointment ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Appointment details", "content": { "application/json": { "schema": { "properties": { "appointment": { "description": "Appointment information", "type": "object" }, "telemedPro": { "description": "Telemed professional information", "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Appointment not found" }, "500": { "description": "Server error" } } }, { "path": "/api/emr/appointment/{appointment}/update-meeting-analysis", "method": "POST", "operationId": "updateMeetingAnalysis", "summary": "Update meeting analysis", "description": "Updates the analytics data for an appointment meeting", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "appointment", "type": "integer", "format": null, "required": true, "description": "Appointment ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "data", "type": "object", "format": null, "required": false, "description": "Meeting analytics data", "enum": null, "example": null, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Meeting analytics data", "type": "object" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Analytics updated successfully", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "success" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Appointment not found" }, "500": { "description": "Server error" } } }, { "path": "/api/emr/appointment/{id}/cancel", "method": "POST", "operationId": "cancelAppointment", "summary": "Cancel an appointment", "description": "Updates the status of an appointment to cancelled", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Appointment ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Appointment cancelled successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Appointment cancelled successfully" }, "data": { "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Appointment not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Appointment not found" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "An error occurred while cancelling the appointment" }, "error": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/emr/appointment/agent/{appointment}", "method": "GET", "operationId": "getAgentAppointment", "summary": "Get agent appointment details", "description": "Retrieves detailed information about an agent's appointment", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "appointment", "type": "integer", "format": null, "required": true, "description": "Appointment ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Agent appointment details", "content": { "application/json": { "schema": { "properties": { "first_name": { "type": "string", "example": "Jane" }, "last_name": { "type": "string", "example": "Smith" }, "agent_name": { "type": "string", "example": "John Doe" }, "id": { "type": "integer", "example": 1 }, "telemed_pros_id": { "type": "integer", "example": 456 }, "patient_id": { "type": "integer", "example": 123 }, "appointment_time": { "type": "string", "example": "14:30:00" }, "in_call": { "type": "boolean", "example": false }, "meeting_id": { "type": "string", "example": "meet-abc-123" }, "appointment_date": { "type": "string", "format": "date", "example": "2023-05-15" }, "patient_email": { "type": "string", "format": "email", "example": "patient@example.com" }, "patient_name": { "type": "string", "example": "Jane Smith" }, "timezone": { "type": "string", "example": "America/New_York" }, "created_at": { "type": "string", "format": "date-time", "example": "2023-05-10T10:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-05-10T10:00:00Z" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Appointment not found" }, "500": { "description": "Failed to retrieve appointments", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Failed to retrieve appointments" } }, "type": "object" } } } } } }, { "path": "/api/emr/appointment/doctor/patient/{patientId}", "method": "GET", "operationId": "getDoctorAppointmentsByPatientId", "summary": "Get doctor appointments by patient ID", "description": "Retrieves all doctor appointments for a specific patient", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "List of doctor appointments", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "first_name": { "type": "string", "example": "Jane" }, "last_name": { "type": "string", "example": "Smith" }, "id": { "type": "integer", "example": 1 }, "doctor_id": { "type": "integer", "example": 456 }, "patient_id": { "type": "integer", "example": 123 }, "appointment_date": { "type": "string", "format": "date", "example": "2023-05-15" }, "appointment_time": { "type": "string", "example": "14:30:00" }, "status": { "type": "string", "example": "confirmed" }, "created_at": { "type": "string", "format": "date-time", "example": "2023-05-10T10:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-05-10T10:00:00Z" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" }, "500": { "description": "Failed to retrieve appointments", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Failed to retrieve appointments" } }, "type": "object" } } } } } }, { "path": "/api/emr/appointment/list-by-date", "method": "GET", "operationId": "getAppointmentListByDateProvider", "summary": "Get appointments by date range", "description": "Retrieves a list of appointments within a specified date range", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [ { "name": "start_date", "type": "string", "format": null, "required": true, "description": "Start date (YYYY-MM-DD)", "in": "query", "enum": null, "example": null }, { "name": "end_date", "type": "string", "format": null, "required": true, "description": "End date (YYYY-MM-DD)", "in": "query", "enum": null, "example": null } ], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "List of appointments", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Appointment list" }, "appointments": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "practitioner": { "type": "string", "example": "John Doe" }, "practitioner_id": { "type": "integer", "example": 123 }, "patient": { "type": "string", "example": "Jane Smith" }, "patient_id": { "type": "integer", "example": 456 }, "title": { "type": "string", "example": "Follow-up Appointment" }, "start": { "type": "string", "format": "date-time", "example": "2023-05-15T14:30:00.000Z" }, "end": { "type": "string", "format": "date-time", "example": "2023-05-15T15:00:00.000Z" }, "date": { "type": "string", "format": "date", "example": "2023-05-15" }, "start_time": { "type": "string", "example": "02:30 pm" }, "end_time": { "type": "string", "example": "03:00 pm" }, "allDay": { "type": "boolean", "example": false }, "status": { "type": "string", "example": "booked" }, "service": { "type": "string", "example": "Consultation" }, "location": { "type": "string", "example": "Main Clinic" }, "room": { "type": "string", "example": "Room 3B" }, "appointment_type": { "type": "string", "example": "Follow-up" }, "payment_type": { "type": "string", "example": "Insurance" }, "notes": { "type": "string", "example": "Patient requested late afternoon appointment" }, "url": { "type": "string", "example": "" }, "extendedProps": { "properties": { "calendar": { "type": "string", "example": "Business" } }, "type": "object" } }, "type": "object" } }, "googel_events": { "type": "array", "items": { "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "500": { "description": "Server error" } } }, { "path": "/api/emr/appointment/patient/{patient_id}/list", "method": "GET", "operationId": "getPatientApptList", "summary": "Get patient appointment list", "description": "Retrieves a list of appointments for a specific patient", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "List of patient appointments", "content": { "application/json": { "schema": { "properties": { "draw": { "type": "integer", "example": 1 }, "recordsTotal": { "type": "integer", "example": 5 }, "recordsFiltered": { "type": "integer", "example": 5 }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "title": { "type": "string", "example": "Initial Consultation" }, "date": { "type": "string", "format": "date", "example": "2023-05-15" }, "start_time": { "type": "string", "example": "14:30:00" }, "start": { "type": "string", "format": "date-time", "example": "2023-05-15T14:30:00.000Z" }, "end_time": { "type": "string", "example": "15:00:00" }, "status": { "type": "string", "example": "booked" }, "timezone": { "type": "string", "example": "America/New_York" }, "notes": { "type": "string", "example": "Initial consultation for new patient" }, "fname": { "type": "string", "example": "Jane" }, "lname": { "type": "string", "example": "Smith" }, "practitioner": { "type": "string", "example": "Dr. John Doe" }, "practitioner_id": { "type": "integer", "example": 456 }, "facility_id": { "type": "integer", "example": 789 }, "room": { "type": "string", "example": "Room 3B" }, "patient": { "type": "string", "example": "Jane Smith" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "500": { "description": "Server error" } } }, { "path": "/api/emr/appointment/patient/carts-items", "method": "GET", "operationId": "getPatientAppointmentsWithCartsAndItems", "summary": "Get patient appointments with carts and items", "description": "Retrieves all appointments with associated carts and items for the authenticated patient", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "List of appointments with carts and items", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "Success" }, "appointments": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "telemed_pros_id": { "type": "integer", "example": 456 }, "patient_id": { "type": "integer", "example": 123 }, "appointment_time": { "type": "string", "example": "14:30:00" }, "in_call": { "type": "boolean", "example": false }, "meeting_id": { "type": "string", "example": "meet-abc-123" }, "agent_call_token": { "type": "string" }, "patient_call_token": { "type": "string" }, "video_token": { "type": "string" }, "appointment_date": { "type": "string", "format": "date", "example": "2023-05-15" }, "patient_email": { "type": "string", "format": "email", "example": "patient@example.com" }, "patient_name": { "type": "string", "example": "Jane Smith" }, "timezone": { "type": "string", "example": "America/New_York" }, "analytics": { "type": "string" }, "start_time": { "type": "string", "example": "14:30:00" }, "end_time": { "type": "string", "example": "15:00:00" }, "duration": { "type": "integer", "example": 30 }, "carts": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 101 }, "first_name": { "type": "string", "example": "Jane" }, "last_name": { "type": "string", "example": "Smith" }, "email": { "type": "string", "format": "email", "example": "jane.smith@example.com" }, "phone": { "type": "string", "example": "123-456-7890" }, "status": { "type": "string", "example": "active" }, "items": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 201 }, "status": { "type": "string", "example": "active" }, "labkit_delivery_status": { "type": "string", "example": "delivered" }, "plan": { "properties": { "title": { "type": "string", "example": "Health Plan Premium" }, "currency": { "type": "string", "example": "USD" }, "price": { "type": "number", "format": "float", "example": 99.99 } }, "type": "object" } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "500": { "description": "Server error" } } }, { "path": "/api/emr/appointment/queue/{patientId}", "method": "POST", "operationId": "addPatientToQueue", "summary": "Add patient to queue", "description": "Adds a patient to the appointment queue", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successfully added to queue", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Added to queue" }, "queue_number": { "type": "integer", "example": 3 } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "500": { "description": "Server error" } } }, { "path": "/api/emr/appointment/report/last-30-days", "method": "GET", "operationId": "last30DaysAppointmentsData", "summary": "Get appointment data for last 30 days", "description": "Retrieves appointment statistics and data for the specified date range", "tags": [ "Appointment Reports" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [ { "name": "start_date", "type": "string", "format": null, "required": true, "description": "Start date (YYYY-MM-DD)", "in": "query", "enum": null, "example": null }, { "name": "end_date", "type": "string", "format": null, "required": true, "description": "End date (YYYY-MM-DD)", "in": "query", "enum": null, "example": null }, { "name": "provider", "type": "string", "format": null, "required": false, "description": "Provider ID or 'all' for all providers", "in": "query", "enum": null, "example": null } ], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Appointment report data", "content": { "application/json": { "schema": { "properties": { "totalPatients": { "type": "integer", "example": 45 }, "totalAppointments": { "type": "integer", "example": 72 }, "appointments": { "type": "array", "items": { "properties": { "name": { "type": "string", "example": "Initial Consultation" }, "data": { "type": "array", "items": { "type": "integer" } } }, "type": "object" } }, "monthly": { "type": "array", "items": { "type": "string", "example": "May 15" } }, "monthlyData": { "type": "array", "items": { "type": "integer" } }, "startDate": { "type": "string", "format": "date", "example": "2023-05-01" }, "endDate": { "type": "string", "format": "date", "example": "2023-05-30" }, "provider": { "type": "string", "example": "all" }, "providerAppointments": { "type": "array", "items": { "type": "integer" } }, "providersName": { "type": "array", "items": { "type": "string", "example": "Dr. John Doe" } }, "appointmentTypes": { "type": "array", "items": { "type": "string", "example": "Follow-up" } }, "typeValue": { "type": "array", "items": { "type": "integer" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Start date cannot be later than end date" } }, "type": "object" } } } }, "500": { "description": "Server error" } } }, { "path": "/api/emr/appointment/transcribe/{patient_id}", "method": "GET", "operationId": "getAppointmentTranscribe", "summary": "Get appointment transcriptions", "description": "Retrieves transcription data for a patient's appointments", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Appointment transcriptions", "content": { "application/json": { "schema": { "properties": { "draw": { "type": "integer", "example": 1 }, "recordsTotal": { "type": "integer", "example": 10 }, "recordsFiltered": { "type": "integer", "example": 10 }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "pc_pid": { "type": "integer", "example": 123 }, "date": { "type": "string", "format": "date", "example": "2023-05-15" }, "patient": { "type": "string", "example": "Jane Smith" }, "practitioner": { "type": "string", "example": "Dr. John Doe" }, "transcription": { "properties": { "text": { "type": "string", "example": "Patient reports improved symptoms..." }, "status": { "type": "string", "example": "completed" }, "summary": { "type": "string", "example": "Follow-up for hypertension..." }, "notes": { "type": "array", "items": { "properties": { "subjective": { "type": "string" }, "objective": { "type": "string" }, "assessment": { "type": "string" }, "plan": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" } }, "type": "object" } } }, "type": "object" }, "recording_url": { "type": "string", "format": "uri" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "500": { "description": "Server error" } } }, { "path": "/api/end-call/{patient_id}/{appointment_id}", "method": "POST", "operationId": "endCall", "summary": "End a call", "description": "End an active video call", "tags": [ "Meetings" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null }, { "name": "appointment_id", "type": "integer", "format": null, "required": true, "description": "Appointment ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Call ended successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Call ended" }, "appointment_id": { "type": "integer" } }, "type": "object" } } } }, "404": { "description": "Appointment not found" }, "500": { "description": "Failed to end call" } } }, { "path": "/api/forgot-password", "method": "POST", "operationId": "forgotPassword", "summary": "Forgot password functionality", "description": "Send a password reset link to the patient's email", "tags": [ "Patient Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "email", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "patient@example.com", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "email" ], "properties": { "email": { "type": "string", "format": "email", "example": "patient@example.com" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Password reset link sent", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Password reset link sent to your email" } }, "type": "object" } } } }, "404": { "description": "Patient not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Patient not found" } }, "type": "object" } } } }, "422": { "description": "Validation error" } } }, { "path": "/api/form-pdf-save", "method": "POST", "operationId": "saveFormFile", "summary": "Save form file", "description": "Saves a PDF file for a form", "tags": [ "Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "form_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "pdf_data", "type": "string", "format": null, "required": true, "description": "Base64 encoded PDF data", "enum": null, "example": null, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "form_id", "pdf_data" ], "properties": { "form_id": { "type": "integer", "example": 1 }, "pdf_data": { "description": "Base64 encoded PDF data", "type": "string" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Form file saved successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "message": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/generate-patient-summary/{patientId}", "method": "GET", "operationId": "generatePatientSummary", "summary": "Generate AI summary for patient", "description": "Generates an AI-powered summary for a patient based on their data", "tags": [ "Patient Summary" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Summary generated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "summary": { "type": "string" }, "message": { "type": "string" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/generate-permanent-token/{userId}", "method": "GET", "operationId": "generatePermanentToken", "summary": "Generate a permanent API token for a user", "description": "Creates a permanent API token with full abilities for the specified user", "tags": [ "Token Management" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "userId", "type": "integer", "format": null, "required": true, "description": "User ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Token generated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "user": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "John Doe" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" } }, "type": "object" }, "token": { "type": "string", "example": "1|LNEBIslIcADi7yjPgHPxNZ0EfFdRrHG5g3KJw1Bd" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "User not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "User not found" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Failed to generate token" }, "error": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/get-all-forms", "method": "GET", "operationId": "getAllForms", "summary": "Get all forms", "description": "Retrieves a list of all available forms", "tags": [ "Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Forms list retrieved successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "forms": { "type": "array", "items": { "type": "object" } } }, "type": "object" } } } } } }, { "path": "/api/get-appointment-by-id", "method": "POST", "operationId": "getAppointmentByID", "summary": "Get appointment by ID", "description": "Retrieves details of a specific appointment", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "appointment_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 123, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "appointment_id" ], "properties": { "appointment_id": { "type": "integer", "example": 123 } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Appointment retrieved successfully", "content": { "application/json": { "schema": { "type": "object" } } } }, "404": { "description": "Appointment not found" } } }, { "path": "/api/get-appointment-list", "method": "POST", "operationId": "getAppointmentList", "summary": "Get appointments list", "description": "Retrieves a list of all appointments", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Appointments list retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "agent_name": { "type": "string" }, "appointment_time": { "type": "string", "format": "date-time" }, "status": { "type": "string" } }, "type": "object" } } } } }, "500": { "description": "Failed to retrieve appointments list" } } }, { "path": "/api/get-appointment-list-date", "method": "POST", "operationId": "getAppointmentListByDate", "summary": "Get appointment list by date", "description": "Retrieves a list of appointments filtered by date", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "date", "type": "string", "format": "date", "required": false, "description": "", "enum": null, "example": "2023-07-01", "items": null, "properties": null }, { "name": "practitioner_id", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 1, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "properties": { "date": { "type": "string", "format": "date", "example": "2023-07-01" }, "practitioner_id": { "type": "integer", "example": 1 } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Appointment list retrieved successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Appointment list" }, "appointments": { "type": "array", "items": { "type": "object" } }, "googel_events": { "type": "array", "items": { "type": "object" } } }, "type": "object" } } } } } }, { "path": "/api/get-doctors-appointment-list", "method": "POST", "operationId": "getDoctorAppointmentList", "summary": "Get doctor appointments list", "description": "Retrieves a list of all doctor appointments", "tags": [ "Appointments", "Doctors" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Doctor appointments list retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "appointment_time": { "type": "string", "format": "date-time" }, "doctor_id": { "type": "integer" }, "patient_id": { "type": "integer" }, "appointment_id": { "type": "integer" } }, "type": "object" } } } } }, "500": { "description": "Failed to retrieve doctor appointments list" } } }, { "path": "/api/get-doctors-appointment-list", "method": "POST", "operationId": "getDoctorAppointmentList", "summary": "Get doctor appointments list", "description": "Retrieves a list of all doctor appointments", "tags": [ "Appointments", "Doctors" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Doctor appointments list retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "appointment_time": { "type": "string", "format": "date-time" }, "doctor_id": { "type": "integer" }, "patient_id": { "type": "integer" }, "appointment_id": { "type": "integer" } }, "type": "object" } } } } }, "500": { "description": "Failed to retrieve doctor appointments list" } } }, { "path": "/api/get-doctors-list", "method": "POST", "operationId": "getDoctorList", "summary": "Get doctors list", "description": "Retrieves a list of all doctors", "tags": [ "Doctors" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Doctors list retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "designation": { "type": "string" } }, "type": "object" } } } } }, "500": { "description": "Failed to retrieve doctors list" } } }, { "path": "/api/get-document-by-id/{patientId}/{did}", "method": "GET", "operationId": "getDocumentsById", "summary": "Get a specific patient document by ID", "description": "Retrieve a specific document for a patient by document ID", "tags": [ "Documents" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null }, { "name": "did", "type": "integer", "format": null, "required": true, "description": "Document ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Document retrieved successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 1 }, "document_name": { "type": "string", "example": "medical_report.pdf" }, "document_type": { "type": "string", "example": "medical_record" }, "file_path": { "type": "string", "example": "documents/patient_1/medical_report.pdf" }, "uploaded_at": { "type": "string", "format": "date-time", "example": "2023-06-01T10:00:00" } }, "type": "object" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthenticated" } }, "type": "object" } } } }, "404": { "description": "Document not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Document not found" } }, "type": "object" } } } } } }, { "path": "/api/get-document-vue/{patient_id}", "method": "GET", "operationId": "getDocumentVue", "summary": "Get documents for Vue component", "description": "Initializes VueFinder for displaying patient documents", "tags": [ "Patient Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "VueFinder initialized (no direct JSON response)" } } }, { "path": "/api/get-document/{patientId}", "method": "GET", "operationId": "getDocuments", "summary": "Get patient documents", "description": "Retrieve documents for a specific patient", "tags": [ "Documents" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Documents retrieved successfully", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "document_name": { "type": "string", "example": "medical_report.pdf" }, "document_type": { "type": "string", "example": "medical_record" }, "file_path": { "type": "string", "example": "documents/patient_1/medical_report.pdf" }, "uploaded_at": { "type": "string", "format": "date-time", "example": "2023-06-01T10:00:00" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthenticated" } }, "type": "object" } } } }, "404": { "description": "No documents found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "No documents found for this patient" } }, "type": "object" } } } } } }, { "path": "/api/get-email-list/{patient_id}", "method": "GET", "operationId": "getEmailList", "summary": "Get email list for a patient", "description": "Retrieves all emails associated with a specific patient with pagination support via DataTables", "tags": [ "Emails" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "ID of the patient", "in": "path", "enum": null, "example": null } ], "query": [ { "name": "draw", "type": "integer", "format": null, "required": false, "description": "DataTables draw counter", "in": "query", "enum": null, "example": null }, { "name": "start", "type": "integer", "format": null, "required": false, "description": "DataTables start offset", "in": "query", "enum": null, "example": null }, { "name": "length", "type": "integer", "format": null, "required": false, "description": "DataTables page length", "in": "query", "enum": null, "example": null }, { "name": "search[value]", "type": "string", "format": null, "required": false, "description": "DataTables search value", "in": "query", "enum": null, "example": null }, { "name": "order[0][column]", "type": "integer", "format": null, "required": false, "description": "DataTables column index for ordering", "in": "query", "enum": null, "example": null }, { "name": "order[0][dir]", "type": "string", "format": null, "required": false, "description": "DataTables order direction (asc/desc)", "in": "query", "enum": null, "example": null } ], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "draw": { "type": "integer", "example": 1 }, "recordsTotal": { "type": "integer", "example": 10 }, "recordsFiltered": { "type": "integer", "example": 10 }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "subject_id": { "type": "integer", "example": 1 }, "practitioner_name": { "type": "string", "example": "John Doe" }, "created_at": { "type": "string", "format": "date-time", "example": "2025-07-01 14:30:00" }, "messageText": { "type": "string", "example": "This is the email body text" }, "to_email": { "type": "string", "format": "email", "example": "patient@example.com" }, "from_email": { "type": "string", "format": "email", "example": "doctor@healthguruhub.com" }, "emailTemplate": { "type": "string", "example": "Appointment Reminder" }, "subject": { "type": "string", "example": "Your upcoming appointment" }, "pid": { "type": "integer", "example": 42 }, "date": { "type": "string", "format": "date", "example": "2025-07-01" }, "DT_RowIndex": { "type": "integer", "example": 0 } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Failed to fetch emails: Error message" } }, "type": "object" } } } } } }, { "path": "/api/get-email/{id}", "method": "GET", "operationId": "getEmailById", "summary": "Get an email by ID", "description": "Retrieves a specific email record by its ID", "tags": [ "Emails" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "ID of the email to retrieve", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 1 }, "pid": { "type": "integer", "example": 42 }, "user_id": { "type": "integer", "example": 1 }, "messageText": { "type": "string", "example": "This is the email body text" }, "to_email": { "type": "string", "format": "email", "example": "patient@example.com" }, "from_email": { "type": "string", "format": "email", "example": "doctor@healthguruhub.com" }, "emailTemplate": { "type": "string", "example": "Appointment Reminder" }, "subject": { "type": "string", "example": "Your upcoming appointment" }, "created_at": { "type": "string", "format": "date-time", "example": "2025-07-01 14:30:00" }, "updated_at": { "type": "string", "format": "date-time", "example": "2025-07-01 14:30:00" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "Email not found" } } }, { "path": "/api/get-form-without-auth/{id}", "method": "GET", "operationId": "getFormByIdwithouthAuth", "summary": "Get form by ID without authentication", "description": "Retrieves a specific form by its ID without requiring authentication", "tags": [ "Forms Management" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Form ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Form retrieved successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "success" }, "data": { "properties": { "id": { "type": "integer", "example": 1 }, "type": { "type": "string", "example": "simple-forms" }, "name": { "type": "string", "example": "Patient Intake Form" }, "data": { "type": "object" }, "provider_id": { "type": "integer", "example": 1 }, "created_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" } }, "type": "object" } }, "type": "object" } } } }, "404": { "description": "Form not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Form not found" } }, "type": "object" } } } } } }, { "path": "/api/get-form/{id}", "method": "GET", "operationId": "getFormById", "summary": "Get form by ID", "description": "Retrieves a specific form by its ID", "tags": [ "Forms Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Form ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Form retrieved successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "success" }, "data": { "properties": { "id": { "type": "integer", "example": 1 }, "type": { "type": "string", "example": "simple-forms" }, "name": { "type": "string", "example": "Patient Intake Form" }, "data": { "type": "object" }, "provider_id": { "type": "integer", "example": 1 }, "created_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "Form not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Form not found" } }, "type": "object" } } } } } }, { "path": "/api/get-forms/{type}", "method": "GET", "operationId": "getForms", "summary": "Get forms by type", "description": "Retrieves all forms of a specific type for the authenticated provider", "tags": [ "Forms Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "type", "type": "string", "format": null, "required": true, "description": "Form type (simple-forms, consent-forms, charting-forms, etc.)", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Forms retrieved successfully", "content": { "application/json": { "schema": { "properties": { "draw": { "type": "integer", "example": 1 }, "recordsTotal": { "type": "integer", "example": 10 }, "recordsFiltered": { "type": "integer", "example": 10 }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "type": { "type": "string", "example": "simple-forms" }, "name": { "type": "string", "example": "Patient Intake Form" }, "data": { "type": "object" }, "provider_id": { "type": "integer", "example": 1 }, "created_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" } } }, { "path": "/api/get-intake-forms-data/{form_id}", "method": "GET", "operationId": "getQuestionFormIntakeById", "summary": "Get intake form data by ID", "description": "Retrieves the data of a specific intake form", "tags": [ "Intake Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "form_id", "type": "integer", "format": null, "required": true, "description": "Form ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Form data retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormsData" } } } } } }, { "path": "/api/get-intake-forms-list", "method": "GET", "operationId": "getIntakeFormList", "summary": "Get intake forms list", "description": "Retrieves a list of all intake question forms", "tags": [ "Intake Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "List retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Medical History Form" } }, "type": "object" } } } } } } }, { "path": "/api/get-location/{uuid}", "method": "GET", "operationId": "getLocationByUuid", "summary": "Get a location by UUID", "description": "Retrieves a specific location by its UUID (compatibility with PatientController)", "tags": [ "Locations" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "uuid", "type": "string", "format": null, "required": true, "description": "UUID of the location to retrieve", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Main Clinic" }, "facility_npi": { "type": "string", "example": "1234567890" }, "phone": { "type": "string", "example": "1234567890" }, "street": { "type": "string", "example": "123 Main St" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "postal_code": { "type": "string", "example": "10001" }, "country_code": { "type": "string", "example": "US" }, "provider_id": { "type": "integer", "example": 42 }, "uuid": { "type": "string", "format": "uuid", "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "Location not found" } } }, { "path": "/api/get-note-patient", "method": "GET", "operationId": "getNotePatient", "summary": "Get patient notes", "description": "Retrieves all notes for the authenticated patient", "tags": [ "Notes" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Notes retrieved successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Note created" }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "note": { "type": "string" }, "note_type": { "type": "string" }, "patient_id": { "type": "integer" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "500": { "description": "Failed to retrieve notes" } } }, { "path": "/api/get-patient-forms-list/{patientId}", "method": "GET", "operationId": "getPatientFormsList", "summary": "Get patient forms list", "description": "Retrieves a list of all forms submitted by a patient", "tags": [ "Forms" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Forms list retrieved successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "forms": { "type": "array", "items": { "type": "object" } } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/get-patient-forms-list/{pid}", "method": "GET", "operationId": "getPatientIntakeSimpleFormList", "summary": "Get patient intake simple forms list", "description": "Retrieves a list of simple intake forms for a specific patient", "tags": [ "Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "pid", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Forms list retrieved successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "forms": { "type": "array", "items": { "type": "object" } } }, "type": "object" } } } } } }, { "path": "/api/get-patient-forms/{pid}", "method": "GET", "operationId": "getPatientFormList", "summary": "Get all forms for a patient", "description": "Retrieves all forms submitted by a patient", "tags": [ "Patient Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "pid", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Forms retrieved successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/PatientIntakeForms" } } }, "type": "object" } } } } } }, { "path": "/api/get-patient-full-details/{patientId}", "method": "GET", "operationId": "getPatientFullDetails", "summary": "Get comprehensive patient details", "description": "Retrieves comprehensive patient details including forms, appointments, and medical history", "tags": [ "Patient Data" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Patient details retrieved successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "patient": { "type": "object" }, "appointments": { "type": "array", "items": { "type": "object" } }, "forms": { "type": "array", "items": { "type": "object" } }, "medicalHistory": { "type": "object" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/get-patient-info/{patientId}", "method": "POST", "operationId": "getInfo", "summary": "Get patient information", "description": "Retrieves patient's personal information", "tags": [ "Patients" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Patient information retrieved successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "email": { "type": "string" }, "phone": { "type": "string" }, "address": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "zip_code": { "type": "string" }, "country": { "type": "string" }, "dob": { "type": "string", "format": "date" }, "age": { "type": "integer" } }, "type": "object" } } } }, "400": { "description": "Failed to retrieve patient information" } } }, { "path": "/api/get-patient-intake-form-data/{form_id}/{pid}/{rowId}", "method": "GET", "operationId": "getIntakeFormData", "summary": "Get patient intake form data", "description": "Retrieves specific intake form data for a patient", "tags": [ "Patient Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "form_id", "type": "integer", "format": null, "required": true, "description": "Form ID", "in": "path", "enum": null, "example": null }, { "name": "pid", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null }, { "name": "rowId", "type": "integer", "format": null, "required": true, "description": "Row ID of the specific form submission", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Form data retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatientIntakeForms" } } } }, "404": { "description": "Form data not found" } } }, { "path": "/api/get-patient-intake-form-latest-data/{form_id}/{pid}", "method": "GET", "operationId": "getIntakeFormLatestData", "summary": "Get latest intake form data", "description": "Retrieves the latest intake form data for a patient, or pre-filled data if no submission exists", "tags": [ "Patient Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "form_id", "type": "integer", "format": null, "required": true, "description": "Form ID", "in": "path", "enum": null, "example": null }, { "name": "pid", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Form data retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatientIntakeForms" } } } }, "404": { "description": "Form not found or invalid type", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Form not found or invalid type" } }, "type": "object" } } } } } }, { "path": "/api/get-patient-intake-form-list/{type}/{pid}", "method": "GET", "operationId": "getPatientIntakeFormList", "summary": "Get patient intake forms by type", "description": "Retrieves a list of patient intake forms of a specific type", "tags": [ "Patient Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "type", "type": "string", "format": null, "required": true, "description": "Form type (simple-forms, consent-forms, charting-forms, etc.)", "in": "path", "enum": null, "example": null }, { "name": "pid", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Form list retrieved successfully", "content": { "application/json": { "schema": { "properties": { "draw": { "type": "integer", "example": 1 }, "recordsTotal": { "type": "integer", "example": 10 }, "recordsFiltered": { "type": "integer", "example": 10 }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "form_id": { "type": "integer", "example": 1 }, "pid": { "type": "integer", "example": 2 }, "provider_id": { "type": "integer", "example": 1 }, "data": { "type": "object" }, "schema": { "type": "object" }, "practitioner_id": { "type": "integer", "example": 3 }, "pdf_url": { "type": "string", "nullable": true }, "created_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" }, "name": { "type": "string", "example": "Patient Intake Form" } }, "type": "object" } } }, "type": "object" } } } } } }, { "path": "/api/get-patient-questionnaire-form-list/{pid}", "method": "GET", "operationId": "getPatientQuestionairForm", "summary": "Get patient questionnaire forms", "description": "Retrieves a list of questionnaire forms for a patient", "tags": [ "Patient Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "pid", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "List retrieved successfully" } } }, { "path": "/api/get-patient-submitted-intake-forms/{pid}", "method": "GET", "operationId": "getMergedFormData", "summary": "Get all submitted forms for a patient", "description": "Retrieves all intake and consent forms submitted by a patient", "tags": [ "Patient Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "pid", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Forms data retrieved successfully", "content": { "application/json": { "schema": { "properties": { "draw": { "type": "integer", "example": 1 }, "recordsTotal": { "type": "integer", "example": 10 }, "recordsFiltered": { "type": "integer", "example": 10 }, "data": { "type": "array", "items": { "properties": { "intake_form_id": { "type": "integer", "example": 1 }, "provider_id": { "type": "integer", "example": 1 }, "form_id": { "type": "integer", "example": 1 }, "pid": { "type": "integer", "example": 2 }, "data": { "type": "object" }, "created_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" }, "form_name": { "type": "string", "example": "Patient Intake Form" }, "signature": { "type": "string", "example": "" }, "name": { "type": "string", "example": "" }, "type": { "type": "string", "example": "Intake" } }, "type": "object" } } }, "type": "object" } } } } } }, { "path": "/api/get-patient-summary/{patientId}", "method": "GET", "operationId": "getPatientSummary", "summary": "Get patient summary", "description": "Retrieves the patient summary information", "tags": [ "Patient Summary" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Patient summary retrieved successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "summary": { "type": "string" }, "patient": { "type": "object" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/get-pdf-url/{id}", "method": "GET", "operationId": "getPdfUrl", "summary": "Get PDF URL", "description": "Retrieves the PDF URL for a form submission", "tags": [ "Patient Forms" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Form submission ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "PDF URL retrieved successfully", "content": { "application/json": { "schema": { "properties": { "pdf_url": { "type": "string", "example": "https://example.com/storage/forms/document-forms/1/consent-forms/form-123.pdf" } }, "type": "object" } } } } } }, { "path": "/api/get-prescription-list/{patient_id}", "method": "GET", "operationId": "getPrescriptionList", "summary": "Get patient prescription list", "description": "Retrieves a list of prescriptions for a specific patient", "tags": [ "Patient Data" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Prescription list retrieved successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "prescriptions": { "type": "array", "items": { "type": "object" } } }, "type": "object" } } } } } }, { "path": "/api/get-questioner-forms-data/{form_id}", "method": "GET", "operationId": "getQuestionFormQuestionerById", "summary": "Get questionnaire form data", "description": "Retrieves data for a specific questionnaire form", "tags": [ "Intake Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "form_id", "type": "integer", "format": null, "required": true, "description": "Form ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Data retrieved successfully" } } }, { "path": "/api/get-questioner-question/{id}", "method": "GET", "operationId": "getQuestionQuestionerById", "summary": "Get questionnaire question by ID", "description": "Retrieves a specific questionnaire question by its ID", "tags": [ "Intake Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Question ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Data retrieved successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Data retrieved successfully" }, "data": { "type": "object" } }, "type": "object" } } } } } }, { "path": "/api/get-signed-patient-data/{id}", "method": "GET", "operationId": "getSignedData", "summary": "Get signed patient form data", "description": "Retrieves patient form data using a signed URL", "tags": [ "Patient Forms" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Form submission ID", "in": "path", "enum": null, "example": null } ], "query": [ { "name": "signature", "type": "string", "format": null, "required": true, "description": "URL signature for validation", "in": "query", "enum": null, "example": null }, { "name": "expires", "type": "integer", "format": null, "required": true, "description": "URL expiration timestamp", "in": "query", "enum": null, "example": null } ], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Form data retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatientIntakeForms" } } } }, "500": { "description": "Link expired", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Link Expired!" } }, "type": "object" } } } } } }, { "path": "/api/get-stored-methods/{id}", "method": "GET", "operationId": "getStoredMethods", "summary": "Get stored payment methods", "description": "Retrieve stored payment methods for a patient", "tags": [ "Payments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Payment methods retrieved successfully", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "properties": { "id": { "type": "string", "example": "pm_1NQb3f2eZvKYlo2CRZhYZ9Nj" }, "brand": { "type": "string", "example": "visa" }, "last4": { "type": "string", "example": "4242" }, "exp_month": { "type": "integer", "example": 12 }, "exp_year": { "type": "integer", "example": 2025 } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthenticated" } }, "type": "object" } } } }, "404": { "description": "No payment methods found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "No payment methods found" } }, "type": "object" } } } } } }, { "path": "/api/get/document/{userId}/{rowId}/{key}", "method": "GET", "operationId": "createPublicLink", "summary": "Create a public link to access a document", "description": "Creates a public link to access a document from patient intake form data for a specific user", "tags": [ "Documents" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "userId", "type": "integer", "format": null, "required": true, "description": "User ID", "in": "path", "enum": null, "example": null }, { "name": "rowId", "type": "integer", "format": null, "required": true, "description": "ID of the intake form record", "in": "path", "enum": null, "example": null }, { "name": "key", "type": "string", "format": null, "required": true, "description": "Key identifier for the document in the form data", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Document file stream", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "404": { "description": "Document not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Not Found" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Server Error" } }, "type": "object" } } } } } }, { "path": "/api/lab-detail/{appointment}", "method": "GET", "operationId": "labDetail", "summary": "Get lab details for an appointment", "description": "Retrieves lab details associated with a specific appointment", "tags": [ "Labs", "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "appointment", "type": "integer", "format": null, "required": true, "description": "Appointment ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Lab details retrieved successfully", "content": { "application/json": { "schema": { "properties": { "lab_name": { "type": "string" }, "lab_address": { "type": "string" }, "lab_city": { "type": "string" }, "lab_state": { "type": "string" }, "lab_distance": { "type": "number", "format": "float" }, "lab_contact_no": { "type": "string" }, "lab_lang": { "type": "number", "format": "float" }, "lab_lat": { "type": "number", "format": "float" }, "slot_date": { "type": "string", "format": "date" }, "slot_time": { "type": "string" }, "booking_time": { "type": "string", "format": "date-time" } }, "type": "object" } } } }, "404": { "description": "Lab or appointment not found" } } }, { "path": "/api/lab-detail/{appointment}", "method": "GET", "operationId": "labDetail", "summary": "Get lab details for an appointment", "description": "Retrieves lab details associated with a specific appointment", "tags": [ "Labs", "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "appointment", "type": "integer", "format": null, "required": true, "description": "Appointment ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Lab details retrieved successfully", "content": { "application/json": { "schema": { "properties": { "lab_name": { "type": "string" }, "lab_address": { "type": "string" }, "lab_city": { "type": "string" }, "lab_state": { "type": "string" }, "lab_distance": { "type": "number", "format": "float" }, "lab_contact_no": { "type": "string" }, "lab_lang": { "type": "number", "format": "float" }, "lab_lat": { "type": "number", "format": "float" }, "slot_date": { "type": "string", "format": "date" }, "slot_time": { "type": "string" }, "booking_time": { "type": "string", "format": "date-time" } }, "type": "object" } } } }, "404": { "description": "Lab or appointment not found" } } }, { "path": "/api/labs/search", "method": "POST", "operationId": "searchLabsByAddress", "summary": "Search labs by address", "description": "Search for labs by address, city, state or zip code", "tags": [ "Labs" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "address", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "123 Main St", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "address" ], "properties": { "address": { "type": "string", "example": "123 Main St" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Labs retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "zip_code": { "type": "string" }, "lang": { "type": "number", "format": "float" }, "lat": { "type": "number", "format": "float" } }, "type": "object" } } } } }, "500": { "description": "Failed to search labs" } } }, { "path": "/api/location/{id}", "method": "GET", "operationId": "getLocationById", "summary": "Get a location by ID", "description": "Retrieves a specific location by its ID", "tags": [ "Locations" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "ID of the location to retrieve", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Main Clinic" }, "facility_npi": { "type": "string", "example": "1234567890" }, "phone": { "type": "string", "example": "1234567890" }, "street": { "type": "string", "example": "123 Main St" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "postal_code": { "type": "string", "example": "10001" }, "country_code": { "type": "string", "example": "US" }, "provider_id": { "type": "integer", "example": 42 }, "uuid": { "type": "string", "format": "uuid", "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "Location not found" } } }, { "path": "/api/locations", "method": "GET", "operationId": "getLocations", "summary": "Get all locations", "description": "Retrieves all facility locations for the current provider with pagination support via DataTables", "tags": [ "Locations" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [ { "name": "draw", "type": "integer", "format": null, "required": false, "description": "DataTables draw counter", "in": "query", "enum": null, "example": null }, { "name": "start", "type": "integer", "format": null, "required": false, "description": "DataTables start offset", "in": "query", "enum": null, "example": null }, { "name": "length", "type": "integer", "format": null, "required": false, "description": "DataTables page length", "in": "query", "enum": null, "example": null }, { "name": "search[value]", "type": "string", "format": null, "required": false, "description": "DataTables search value", "in": "query", "enum": null, "example": null }, { "name": "order[0][column]", "type": "integer", "format": null, "required": false, "description": "DataTables column index for ordering", "in": "query", "enum": null, "example": null }, { "name": "order[0][dir]", "type": "string", "format": null, "required": false, "description": "DataTables order direction (asc/desc)", "in": "query", "enum": null, "example": null } ], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "draw": { "type": "integer", "example": 1 }, "recordsTotal": { "type": "integer", "example": 10 }, "recordsFiltered": { "type": "integer", "example": 10 }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Main Clinic" }, "facility_npi": { "type": "string", "example": "1234567890" }, "phone": { "type": "string", "example": "1234567890" }, "street": { "type": "string", "example": "123 Main St" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "postal_code": { "type": "string", "example": "10001" }, "country_code": { "type": "string", "example": "US" }, "provider_id": { "type": "integer", "example": 42 }, "uuid": { "type": "string", "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" } } }, { "path": "/api/login", "method": "POST", "operationId": "adminPanelAuthenticate", "summary": "Authenticate admin panel users", "description": "Authenticate providers, practitioners, and admins for the admin panel", "tags": [ "Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "username", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "admin", "items": null, "properties": null }, { "name": "password", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "password123", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "username", "password" ], "properties": { "username": { "type": "string", "example": "admin" }, "password": { "type": "string", "example": "password123" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Successful authentication", "content": { "application/json": { "schema": { "properties": { "accessToken": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGc..." }, "refreshToken": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGc..." }, "tokenType": { "type": "string", "example": "Bearer" }, "company": { "type": "string", "example": "Health Guru Hub" } }, "type": "object" } } } }, "401": { "description": "Invalid credentials", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Invalid credentials" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The given data was invalid." }, "errors": { "properties": { "username": { "type": "array", "items": { "type": "string", "example": "The username field is required." } } }, "type": "object" } }, "type": "object" } } } } } }, { "path": "/api/login-patient", "method": "POST", "operationId": "loginPatient", "summary": "Patient login", "description": "Authenticate a patient with OpenEMR integration", "tags": [ "Patient Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "email", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "patient@example.com", "items": null, "properties": null }, { "name": "password", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "password123", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "email", "password" ], "properties": { "email": { "type": "string", "format": "email", "example": "patient@example.com" }, "password": { "type": "string", "example": "password123" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Successful authentication", "content": { "application/json": { "schema": { "properties": { "data": { "type": "object" }, "erm_access_token": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGc..." }, "token_type": { "type": "string", "example": "Bearer" } }, "type": "object" } } } }, "401": { "description": "Invalid credentials", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Invalid credentials" } }, "type": "object" } } } }, "422": { "description": "Validation error" } } }, { "path": "/api/medical-problem/{id}", "method": "GET", "operationId": "getMedicalProblemById", "summary": "Get a medical problem by ID", "description": "Retrieves the details of a specific medical problem by its ID", "tags": [ "Medical Problems" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "ID of the medical problem to retrieve", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "medical_prob_id": { "type": "integer", "example": 1 }, "title": { "type": "string", "example": "Hypertension" }, "date": { "type": "string", "format": "date", "example": "2025-06-01" }, "begdate": { "type": "string", "format": "date", "example": "2025-06-01" }, "enddate": { "type": "string", "format": "date", "example": "2025-09-01" }, "screening_detail": { "type": "string", "example": "Patient has stage 1 hypertension" }, "flag": { "type": "string", "example": "active" }, "type_of_item": { "type": "string", "example": "chronic" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "Medical problem not found" } } }, { "path": "/api/medical-problems-store/{pid}", "method": "POST", "operationId": "storeMedicalProblem", "summary": "Add a new medical problem for a patient", "description": "Creates a new medical problem record associated with a specific patient", "tags": [ "Medical Problems" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "pid", "type": "integer", "format": null, "required": true, "description": "ID of the patient", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Hypertension", "items": null, "properties": null }, { "name": "lastDate", "type": "string", "format": "date", "required": true, "description": "", "enum": null, "example": "2025-06-01", "items": null, "properties": null }, { "name": "nextDate", "type": "string", "format": "date", "required": true, "description": "", "enum": null, "example": "2025-09-01", "items": null, "properties": null }, { "name": "screeningDetails", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Patient has stage 1 hypertension", "items": null, "properties": null }, { "name": "flag", "type": "string", "format": null, "required": true, "description": "Status flag for the medical problem", "enum": null, "example": "active", "items": null, "properties": null }, { "name": "typeOfItem", "type": "string", "format": null, "required": true, "description": "Type of medical problem", "enum": null, "example": "chronic", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "name", "lastDate", "nextDate", "screeningDetails", "flag", "typeOfItem" ], "properties": { "name": { "type": "string", "example": "Hypertension" }, "lastDate": { "type": "string", "format": "date", "example": "2025-06-01" }, "nextDate": { "type": "string", "format": "date", "example": "2025-09-01" }, "screeningDetails": { "type": "string", "example": "Patient has stage 1 hypertension" }, "flag": { "description": "Status flag for the medical problem", "type": "string", "example": "active" }, "typeOfItem": { "description": "Type of medical problem", "type": "string", "example": "chronic" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Medical problem created successfully", "content": { "application/json": { "schema": { "properties": { "data": { "type": "object" }, "message": { "type": "string", "example": "Medical Problem Created Successfully!" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The given data was invalid." }, "errors": { "type": "object" } }, "type": "object" } } } } } }, { "path": "/api/medical-problems-update/{id}", "method": "PUT", "operationId": "updateMedicalProblemRecord", "summary": "Update an existing medical problem", "description": "Updates the details of an existing medical problem", "tags": [ "Medical Problems" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "ID of the medical problem to update", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Updated Hypertension", "items": null, "properties": null }, { "name": "lastDate", "type": "string", "format": "date", "required": true, "description": "", "enum": null, "example": "2025-06-15", "items": null, "properties": null }, { "name": "nextDate", "type": "string", "format": "date", "required": true, "description": "", "enum": null, "example": "2025-09-15", "items": null, "properties": null }, { "name": "screeningDetails", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Patient has controlled stage 1 hypertension", "items": null, "properties": null }, { "name": "flag", "type": "string", "format": null, "required": true, "description": "Status flag for the medical problem", "enum": null, "example": "active", "items": null, "properties": null }, { "name": "typeOfItem", "type": "string", "format": null, "required": true, "description": "Type of medical problem", "enum": null, "example": "chronic", "items": null, "properties": null }, { "name": "medical_problem_id", "type": "integer", "format": null, "required": true, "description": "ID of the medical problem", "enum": null, "example": 1, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "name", "lastDate", "nextDate", "screeningDetails", "flag", "typeOfItem", "medical_problem_id" ], "properties": { "name": { "type": "string", "example": "Updated Hypertension" }, "lastDate": { "type": "string", "format": "date", "example": "2025-06-15" }, "nextDate": { "type": "string", "format": "date", "example": "2025-09-15" }, "screeningDetails": { "type": "string", "example": "Patient has controlled stage 1 hypertension" }, "flag": { "description": "Status flag for the medical problem", "type": "string", "example": "active" }, "typeOfItem": { "description": "Type of medical problem", "type": "string", "example": "chronic" }, "medical_problem_id": { "description": "ID of the medical problem", "type": "integer", "example": 1 } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Medical problem updated successfully", "content": { "application/json": { "schema": { "properties": { "data": { "type": "integer", "example": 1 }, "message": { "type": "string", "example": "Medical Problem Updated Successfully!" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "Medical problem not found" }, "422": { "description": "Validation error" } } }, { "path": "/api/password-reset", "method": "POST", "operationId": "resetPassword", "summary": "Reset password functionality", "description": "Reset password using a token received via email", "tags": [ "Patient Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "token", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "reset-token", "items": null, "properties": null }, { "name": "email", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "patient@example.com", "items": null, "properties": null }, { "name": "password", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "newpassword123", "items": null, "properties": null }, { "name": "password_confirmation", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "newpassword123", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "token", "email", "password", "password_confirmation" ], "properties": { "token": { "type": "string", "example": "reset-token" }, "email": { "type": "string", "format": "email", "example": "patient@example.com" }, "password": { "type": "string", "example": "newpassword123" }, "password_confirmation": { "type": "string", "example": "newpassword123" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Password reset successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Password reset successfully" } }, "type": "object" } } } }, "422": { "description": "Validation error" } } }, { "path": "/api/patient-book-appointment", "method": "POST", "operationId": "bookAppointmentPatient", "summary": "Book a patient appointment", "description": "Books a new appointment for a patient", "tags": [ "Appointments" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "start_time", "type": "string", "format": "date-time", "required": true, "description": "", "enum": null, "example": "2023-06-01T10:00:00", "items": null, "properties": null }, { "name": "end_time", "type": "string", "format": "date-time", "required": true, "description": "", "enum": null, "example": "2023-06-01T11:00:00", "items": null, "properties": null }, { "name": "practitioner_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "notes", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Initial consultation", "items": null, "properties": null }, { "name": "order_id", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 123, "items": null, "properties": null }, { "name": "affiliate_email", "type": "string", "format": "email", "required": false, "description": "", "enum": null, "example": "affiliate@example.com", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "start_time", "end_time", "practitioner_id" ], "properties": { "start_time": { "type": "string", "format": "date-time", "example": "2023-06-01T10:00:00" }, "end_time": { "type": "string", "format": "date-time", "example": "2023-06-01T11:00:00" }, "practitioner_id": { "type": "integer", "example": 1 }, "notes": { "type": "string", "example": "Initial consultation" }, "order_id": { "type": "integer", "example": 123 }, "affiliate_email": { "type": "string", "format": "email", "example": "affiliate@example.com" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Appointment booked successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "appointmentId": { "type": "integer", "example": 123 }, "appointmentData": { "type": "object" } }, "type": "object" } } } }, "400": { "description": "Bad request or time slot already booked", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "The time slot is already booked." } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "end_time": { "type": "array", "items": { "type": "string", "example": "The end time field is required." } } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "An error occurred while booking." }, "exception": { "type": "string", "example": "Error message details" } }, "type": "object" } } } } } }, { "path": "/api/patient-data/{id}", "method": "GET", "operationId": "getAssistantPatientData", "summary": "Get patient data", "description": "Retrieves detailed information about a patient", "tags": [ "Patient Data" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Patient data retrieved successfully", "content": { "application/json": { "schema": { "properties": { "patient": { "type": "object" }, "patientExtra": { "type": "object" }, "insurance": { "type": "object" }, "address": { "type": "object" } }, "type": "object" } } } }, "404": { "description": "Patient not found" } } }, { "path": "/api/patient-login-api", "method": "POST", "operationId": "loginPatientWithoutAuthPatient", "summary": "Patient login without authentication", "description": "Authenticates a patient and returns access token", "tags": [ "Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "email", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "patient@example.com", "items": null, "properties": null }, { "name": "password", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "password123", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "email", "password" ], "properties": { "email": { "type": "string", "format": "email", "example": "patient@example.com" }, "password": { "type": "string", "example": "password123" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Login successful", "content": { "application/json": { "schema": { "properties": { "accessToken": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." }, "userAbilityRules": { "type": "array", "items": { "type": "object" } }, "userData": { "properties": { "forms": { "type": "array", "items": { "type": "object" } } }, "type": "object" }, "message": { "type": "string", "example": "User LoggedIn" } }, "type": "object" } } } }, "401": { "description": "Invalid credentials", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "email or password does not matches" } }, "type": "object" } } } }, "404": { "description": "User not found", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "User not registered." } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "An error occurred during login" }, "message": { "type": "string", "example": "Error message details" } }, "type": "object" } } } } } }, { "path": "/api/patient-order-create", "method": "POST", "operationId": "patientOrderCreate", "summary": "Create a patient order", "description": "Create a new order for a patient with products", "tags": [ "Orders" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "shipping_address1", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "123 Main St", "items": null, "properties": null }, { "name": "shipping_address2", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Apt 4B", "items": null, "properties": null }, { "name": "shipping_city", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "New York", "items": null, "properties": null }, { "name": "shipping_state", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "NY", "items": null, "properties": null }, { "name": "shipping_zipcode", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "10001", "items": null, "properties": null }, { "name": "shipping_country", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "USA", "items": null, "properties": null }, { "name": "shipping_amount", "type": "number", "format": "float", "required": true, "description": "", "enum": null, "example": 5.99, "items": null, "properties": null }, { "name": "total_amount", "type": "number", "format": "float", "required": true, "description": "", "enum": null, "example": 99.99, "items": null, "properties": null }, { "name": "practitioner_fee", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 50, "items": null, "properties": null }, { "name": "affiliate_email", "type": "string", "format": "email", "required": false, "description": "", "enum": null, "example": "affiliate@example.com", "items": null, "properties": null }, { "name": "provider_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "appointment_id", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 123, "items": null, "properties": null }, { "name": "pending_task", "type": "boolean", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "builder_id", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 456, "items": null, "properties": null }, { "name": "discount_amount", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 10, "items": null, "properties": null }, { "name": "coupon_code", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "SAVE10", "items": null, "properties": null }, { "name": "items", "type": "array", "format": null, "required": true, "description": "", "enum": null, "example": null, "items": { "properties": { "product_id": { "type": "integer", "example": 101 }, "variation_id": { "type": "integer", "example": 1 }, "qty": { "type": "integer", "example": 2 }, "subscription": { "type": "integer", "example": 0 }, "onetime": { "type": "integer", "example": 1 } }, "type": "object" }, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "patient_id", "shipping_address1", "shipping_city", "shipping_state", "shipping_zipcode", "shipping_country", "shipping_amount", "total_amount", "items", "provider_id" ], "properties": { "patient_id": { "type": "integer", "example": 1 }, "shipping_address1": { "type": "string", "example": "123 Main St" }, "shipping_address2": { "type": "string", "example": "Apt 4B" }, "shipping_city": { "type": "string", "example": "New York" }, "shipping_state": { "type": "string", "example": "NY" }, "shipping_zipcode": { "type": "string", "example": "10001" }, "shipping_country": { "type": "string", "example": "USA" }, "shipping_amount": { "type": "number", "format": "float", "example": 5.99 }, "total_amount": { "type": "number", "format": "float", "example": 99.99 }, "practitioner_fee": { "type": "number", "format": "float", "example": 50 }, "affiliate_email": { "type": "string", "format": "email", "example": "affiliate@example.com" }, "provider_id": { "type": "integer", "example": 1 }, "appointment_id": { "type": "integer", "example": 123 }, "pending_task": { "type": "boolean", "example": false }, "builder_id": { "type": "integer", "example": 456 }, "discount_amount": { "type": "number", "format": "float", "example": 10 }, "coupon_code": { "type": "string", "example": "SAVE10" }, "items": { "type": "array", "items": { "properties": { "product_id": { "type": "integer", "example": 101 }, "variation_id": { "type": "integer", "example": 1 }, "qty": { "type": "integer", "example": 2 }, "subscription": { "type": "integer", "example": 0 }, "onetime": { "type": "integer", "example": 1 } }, "type": "object" } } }, "type": "object" }, "examples": {} } } }, "responses": { "201": { "description": "Order created successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Order created successfully" }, "order": { "type": "object" } }, "type": "object" } } } }, "404": { "description": "Patient not found", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Patient not found" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "messages": { "type": "object" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Failed to process order" } }, "type": "object" } } } } } }, { "path": "/api/patient/available-slots/{date}", "method": "POST", "operationId": "availableSlotsForPatient", "summary": "Get available appointment slots for a specific date", "description": "Returns a list of available time slots for a given date.", "tags": [ "Appointment" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "date", "type": "string", "format": null, "required": true, "description": "Date in YYYY-MM-DD format", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string", "example": "09:00 AM" } } } } }, "400": { "description": "Invalid date format", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Invalid date format" } }, "type": "object" } } } } } }, { "path": "/api/patient/data", "method": "GET", "operationId": "getPatientData", "summary": "Get patient data", "description": "Get comprehensive data for the authenticated patient", "tags": [ "Patient Profile" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "data": { "properties": { "id": { "type": "integer", "example": 1 }, "first_name": { "type": "string", "example": "John" }, "last_name": { "type": "string", "example": "Doe" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "phone": { "type": "string", "example": "123-456-7890" }, "dob": { "type": "string", "format": "date", "example": "1985-05-15" }, "gender": { "type": "string", "example": "male" }, "address": { "type": "object" }, "medical_history": { "type": "array", "items": { "type": "object" } }, "created_at": { "type": "string", "format": "date-time", "example": "2023-01-01T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-01-01T12:00:00Z" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Patient not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Patient not found" } }, "type": "object" } } } } } }, { "path": "/api/patient/history/{patientId}", "method": "GET", "operationId": "patientHistory", "summary": "Get patient history", "description": "Retrieve patient medical history by patient ID", "tags": [ "Patient Medical" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "visit_date": { "type": "string", "format": "date", "example": "2023-01-15" }, "diagnosis": { "type": "string", "example": "Common cold" }, "treatment": { "type": "string", "example": "Rest and hydration" }, "notes": { "type": "string", "example": "Patient improving" }, "created_at": { "type": "string", "format": "date-time", "example": "2023-01-15T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-01-15T12:00:00Z" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Patient not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Patient not found" } }, "type": "object" } } } } } }, { "path": "/api/patient/login", "method": "POST", "operationId": "loginPatientWithoutAuthAuth", "summary": "Patient login without authentication middleware", "description": "Login a patient without going through the authentication middleware", "tags": [ "Patient Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "email", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "patient@example.com", "items": null, "properties": null }, { "name": "password", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "password123", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "email", "password" ], "properties": { "email": { "type": "string", "format": "email", "example": "patient@example.com" }, "password": { "type": "string", "example": "password123" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Successful authentication", "content": { "application/json": { "schema": { "properties": { "accessToken": { "type": "string", "example": "token" }, "userAbilityRules": { "type": "array", "items": { "properties": { "action": { "type": "string", "example": "manage" }, "subject": { "type": "string", "example": "all" } }, "type": "object" } }, "userData": { "properties": { "id": { "type": "integer", "example": 1 }, "fname": { "type": "string", "example": "John" }, "lname": { "type": "string", "example": "Doe" }, "phone": { "type": "string", "example": "123-456-7890" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "dob": { "type": "string", "format": "date", "example": "1990-01-01" }, "role": { "type": "string", "example": "patient" }, "forms": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "form_id": { "type": "string", "example": "intake-form" } }, "type": "object" } } }, "type": "object" }, "message": { "type": "string", "example": "User LoggedIn" } }, "type": "object" } } } }, "401": { "description": "Invalid credentials", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Invalid credentials." } }, "type": "object" } } } }, "404": { "description": "User not found", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "User not registered." } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "An error occurred during login." }, "exception": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/patient/medical-problem/{id}", "method": "GET", "operationId": "getPatientMedicalProblemById", "summary": "Get medical problem by ID", "description": "Retrieve a specific medical problem details by ID", "tags": [ "Patient Medical" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Medical problem ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "data": { "properties": { "id": { "type": "integer", "example": 1 }, "patient_id": { "type": "integer", "example": 123 }, "description": { "type": "string", "example": "Hypertension" }, "date_of_onset": { "type": "string", "format": "date", "example": "2023-01-15" }, "status": { "type": "string", "example": "active" }, "created_at": { "type": "string", "format": "date-time", "example": "2023-01-15T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-01-15T12:00:00Z" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Medical problem not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Medical problem not found" } }, "type": "object" } } } } } }, { "path": "/api/patient/medical-problem/{id}", "method": "PUT", "operationId": "updatePatientMedicalProblem", "summary": "Update medical problem", "description": "Update an existing medical problem record", "tags": [ "Patient Medical" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Medical problem ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "description", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Updated diagnosis", "items": null, "properties": null }, { "name": "date_of_onset", "type": "string", "format": "date", "required": false, "description": "", "enum": null, "example": "2023-02-15", "items": null, "properties": null }, { "name": "status", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "resolved", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "properties": { "description": { "type": "string", "example": "Updated diagnosis" }, "date_of_onset": { "type": "string", "format": "date", "example": "2023-02-15" }, "status": { "type": "string", "example": "resolved" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Medical problem updated successfully" }, "data": { "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Medical problem not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Medical problem not found" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Validation error" }, "errors": { "type": "object" } }, "type": "object" } } } } } }, { "path": "/api/patient/medical-problem/{pid}", "method": "POST", "operationId": "storePatientMedicalProblem", "summary": "Store medical problem", "description": "Create a new medical problem record for a patient", "tags": [ "Patient Medical" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "pid", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "description", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Migraine", "items": null, "properties": null }, { "name": "date_of_onset", "type": "string", "format": "date", "required": false, "description": "", "enum": null, "example": "2023-03-10", "items": null, "properties": null }, { "name": "status", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "active", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "properties": { "description": { "type": "string", "example": "Migraine" }, "date_of_onset": { "type": "string", "format": "date", "example": "2023-03-10" }, "status": { "type": "string", "example": "active" } }, "type": "object" }, "examples": {} } } }, "responses": { "201": { "description": "Successfully created", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Medical problem created successfully" }, "data": { "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Patient not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Patient not found" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Validation error" }, "errors": { "type": "object" } }, "type": "object" } } } } } }, { "path": "/api/patient/notifications", "method": "GET", "operationId": "getNotification", "summary": "Get patient notifications", "description": "Get list of notifications for the authenticated patient", "tags": [ "Patient Profile" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "title": { "type": "string", "example": "Appointment Reminder" }, "message": { "type": "string", "example": "You have an appointment tomorrow at 2:00 PM" }, "read": { "type": "boolean", "example": false }, "created_at": { "type": "string", "format": "date-time", "example": "2023-06-15T12:00:00Z" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" } } }, { "path": "/api/patient/prescription", "method": "GET", "operationId": "getPatientPrescriptions", "summary": "Get patient prescriptions", "description": "Get list of prescriptions for the authenticated patient", "tags": [ "Patient Medical" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "medication": { "type": "string", "example": "Amoxicillin" }, "dosage": { "type": "string", "example": "500mg" }, "frequency": { "type": "string", "example": "3 times daily" }, "start_date": { "type": "string", "format": "date", "example": "2023-04-15" }, "end_date": { "type": "string", "format": "date", "example": "2023-04-25" }, "doctor_name": { "type": "string", "example": "Dr. John Smith" }, "status": { "type": "string", "example": "active" }, "created_at": { "type": "string", "format": "date-time", "example": "2023-04-15T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-04-15T12:00:00Z" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "No prescriptions found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "No prescriptions found" } }, "type": "object" } } } } } }, { "path": "/api/patient/process-payment", "method": "POST", "operationId": "processPayment", "summary": "Process payment", "description": "Process a payment for the patient", "tags": [ "Patient Payment" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "amount", "type": "number", "format": "float", "required": true, "description": "", "enum": null, "example": 99.99, "items": null, "properties": null }, { "name": "payment_method", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "card", "items": null, "properties": null }, { "name": "currency", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "USD", "items": null, "properties": null }, { "name": "payment_method_id", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "pm_card_visa", "items": null, "properties": null }, { "name": "description", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Payment for consultation", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "amount", "payment_method", "currency" ], "properties": { "amount": { "type": "number", "format": "float", "example": 99.99 }, "payment_method": { "type": "string", "example": "card" }, "currency": { "type": "string", "example": "USD" }, "payment_method_id": { "type": "string", "example": "pm_card_visa" }, "description": { "type": "string", "example": "Payment for consultation" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Payment processed successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Payment processed successfully" }, "transaction_id": { "type": "string", "example": "txn_1KjH7b2eZvKYlo2C0A3b5XCL" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Validation error" }, "errors": { "type": "object" } }, "type": "object" } } } }, "500": { "description": "Payment processing failed", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Payment processing failed" }, "error": { "type": "string", "example": "Your card was declined" } }, "type": "object" } } } } } }, { "path": "/api/patient/profile-picture", "method": "POST", "operationId": "uploadProfilePicture", "summary": "Upload profile picture", "description": "Upload and update patient profile picture", "tags": [ "Patient Profile" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "profile_picture", "type": "string", "format": "binary", "required": false, "description": "Profile picture file (JPEG, PNG)", "enum": null, "example": null, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "multipart/form-data": { "schema": { "properties": { "profile_picture": { "description": "Profile picture file (JPEG, PNG)", "type": "string", "format": "binary" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Profile picture uploaded successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Profile picture uploaded successfully" }, "image_url": { "type": "string", "example": "https://example.com/storage/profiles/user123.jpg" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Invalid file format" }, "errors": { "type": "object" } }, "type": "object" } } } } } }, { "path": "/api/patient/refresh-token", "method": "POST", "operationId": "refreshPatientToken", "summary": "Refresh patient authentication token", "description": "Refreshes the authentication token for the currently authenticated patient", "tags": [ "Patient Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "refresh_token", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "refresh_token" ], "properties": { "refresh_token": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Token refreshed successfully", "content": { "application/json": { "schema": { "properties": { "accessToken": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." }, "refreshToken": { "type": "string", "example": "def50200641f31850c6381..." }, "tokenType": { "type": "string", "example": "Bearer" } }, "type": "object" } } } }, "401": { "description": "Invalid refresh token", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Invalid refresh token" } }, "type": "object" } } } } } }, { "path": "/api/patient/register-patient", "method": "POST", "operationId": "registerPatientForPatient", "summary": "Register a new patient", "description": "Creates a new patient account", "tags": [ "Patients" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "first_name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "John", "items": null, "properties": null }, { "name": "last_name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Doe", "items": null, "properties": null }, { "name": "email", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "john.doe@example.com", "items": null, "properties": null }, { "name": "phone_no", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "1234567890", "items": null, "properties": null }, { "name": "dob", "type": "string", "format": "date", "required": true, "description": "", "enum": null, "example": "1990-01-01", "items": null, "properties": null }, { "name": "gender", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Male", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "first_name", "last_name", "email", "phone_no", "dob", "gender" ], "properties": { "first_name": { "type": "string", "example": "John" }, "last_name": { "type": "string", "example": "Doe" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "phone_no": { "type": "string", "example": "1234567890" }, "dob": { "type": "string", "format": "date", "example": "1990-01-01" }, "gender": { "type": "string", "example": "Male" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Patient registered successfully", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "id": { "type": "integer", "example": 1 }, "first_name": { "type": "string", "example": "John" }, "last_name": { "type": "string", "example": "Doe" }, "email": { "type": "string", "example": "john.doe@example.com" } }, "type": "object" }, "message": { "type": "string", "example": "Patient has been registered!" } }, "type": "object" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthorized" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "An error occurred" } }, "type": "object" } } } } } }, { "path": "/api/patient/session-history", "method": "GET", "operationId": "sessionHistory", "summary": "Get patient session history", "description": "Get history of patient sessions and visits", "tags": [ "Patient Medical" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "session_date": { "type": "string", "format": "date-time", "example": "2023-05-15T14:30:00Z" }, "doctor_name": { "type": "string", "example": "Dr. Jane Doe" }, "duration": { "type": "integer", "example": 30 }, "notes": { "type": "string", "example": "Follow-up appointment" }, "status": { "type": "string", "example": "completed" }, "created_at": { "type": "string", "format": "date-time", "example": "2023-05-15T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-05-15T12:00:00Z" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "No session history found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "No session history found" } }, "type": "object" } } } } } }, { "path": "/api/patient/subscription/{subscription}/cancel", "method": "POST", "operationId": "cancelSubscription", "summary": "Cancel subscription", "description": "Cancel an existing patient subscription", "tags": [ "Patient Subscription" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "subscription", "type": "integer", "format": null, "required": true, "description": "Subscription ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "reason", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Too expensive", "items": null, "properties": null }, { "name": "feedback", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "I found a better option elsewhere", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "properties": { "reason": { "type": "string", "example": "Too expensive" }, "feedback": { "type": "string", "example": "I found a better option elsewhere" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Subscription cancelled successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Subscription cancelled successfully" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "Subscription not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Subscription not found" } }, "type": "object" } } } } } }, { "path": "/api/patient/subscriptions", "method": "GET", "operationId": "getSubscriptionList", "summary": "Get patient subscription list", "description": "Get list of subscriptions for the authenticated patient", "tags": [ "Patient Subscription" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "plan_name": { "type": "string", "example": "Premium Health Plan" }, "amount": { "type": "number", "format": "float", "example": 49.99 }, "frequency": { "type": "string", "example": "monthly" }, "start_date": { "type": "string", "format": "date", "example": "2023-01-15" }, "next_billing_date": { "type": "string", "format": "date", "example": "2023-02-15" }, "status": { "type": "string", "example": "active" }, "created_at": { "type": "string", "format": "date-time", "example": "2023-01-15T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-01-15T12:00:00Z" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" } } }, { "path": "/api/patients", "method": "GET", "operationId": "getPatientList", "summary": "Get a list of patients", "description": "Returns a list of patients with optional filtering by first name, last name, date of birth, or email", "tags": [ "Patients" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [ { "name": "firstName", "type": "string", "format": null, "required": false, "description": "Filter by patient's first name", "in": "query", "enum": null, "example": null }, { "name": "lastName", "type": "string", "format": null, "required": false, "description": "Filter by patient's last name", "in": "query", "enum": null, "example": null }, { "name": "dateOfBirth", "type": "string", "format": null, "required": false, "description": "Filter by patient's date of birth (YYYY-MM-DD)", "in": "query", "enum": null, "example": null }, { "name": "email", "type": "string", "format": null, "required": false, "description": "Filter by patient's email", "in": "query", "enum": null, "example": null } ], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "uuid": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440000" }, "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "fullName": { "type": "string", "example": "John Doe" }, "email": { "type": "string", "example": "john.doe@example.com" }, "dateOfBirth": { "type": "string", "format": "date", "example": "1990-01-01" } }, "type": "object" } } } } }, "401": { "description": "Unauthenticated" } } }, { "path": "/api/plans-product-sync", "method": "POST", "operationId": "syncProducts", "summary": "Save multiple products", "description": "Save or update multiple products and their categories", "tags": [ "Product Sync" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "builder_id", "type": "string", "format": null, "required": true, "description": "Base64 encoded builder ID", "enum": null, "example": "MQ==", "items": null, "properties": null }, { "name": "products", "type": "array", "format": null, "required": true, "description": "", "enum": null, "example": null, "items": { "properties": { "product_id": { "type": "integer", "example": 123 }, "product_name": { "type": "string", "example": "Test Product" }, "product_price": { "type": "number", "format": "float", "example": 29.99 }, "product_slug": { "type": "string", "example": "test-product" }, "product_category": { "properties": { "id": { "type": "array", "items": { "type": "integer", "example": 10 } }, "name": { "type": "array", "items": { "type": "string", "example": "Health Products" } } }, "type": "object" }, "product_variation": { "type": "array", "items": { "properties": { "variation_id": { "type": "integer", "example": 456 }, "display_name": { "type": "string", "example": "Small" }, "price": { "type": "number", "format": "float", "example": 19.99 } }, "type": "object" } } }, "type": "object" }, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "builder_id", "products" ], "properties": { "builder_id": { "description": "Base64 encoded builder ID", "type": "string", "example": "MQ==" }, "products": { "type": "array", "items": { "properties": { "product_id": { "type": "integer", "example": 123 }, "product_name": { "type": "string", "example": "Test Product" }, "product_price": { "type": "number", "format": "float", "example": 29.99 }, "product_slug": { "type": "string", "example": "test-product" }, "product_category": { "properties": { "id": { "type": "array", "items": { "type": "integer", "example": 10 } }, "name": { "type": "array", "items": { "type": "string", "example": "Health Products" } } }, "type": "object" }, "product_variation": { "type": "array", "items": { "properties": { "variation_id": { "type": "integer", "example": 456 }, "display_name": { "type": "string", "example": "Small" }, "price": { "type": "number", "format": "float", "example": 19.99 } }, "type": "object" } } }, "type": "object" } } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Products saved successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "string", "example": "Product successfully!" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Something went wrong!" } }, "type": "object" } } } } } }, { "path": "/api/plans-product-update", "method": "POST", "operationId": "updateOnPublish", "summary": "Update product on publish", "description": "Update a product when it is published", "tags": [ "Product Sync" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "builder_id", "type": "string", "format": null, "required": true, "description": "Base64 encoded builder ID", "enum": null, "example": "MQ==", "items": null, "properties": null }, { "name": "product_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 123, "items": null, "properties": null }, { "name": "product_name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Test Product", "items": null, "properties": null }, { "name": "product_price", "type": "number", "format": "float", "required": true, "description": "", "enum": null, "example": 29.99, "items": null, "properties": null }, { "name": "product_slug", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "test-product", "items": null, "properties": null }, { "name": "product_category", "type": "object", "format": null, "required": true, "description": "", "enum": null, "example": null, "items": null, "properties": { "id": { "type": "array", "items": { "type": "integer", "example": 10 } }, "name": { "type": "array", "items": { "type": "string", "example": "Health Products" } } } }, { "name": "product_variation", "type": "array", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": { "properties": { "variation_id": { "type": "integer", "example": 456 }, "display_name": { "type": "string", "example": "Small" }, "price": { "type": "number", "format": "float", "example": 19.99 } }, "type": "object" }, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "builder_id", "product_id", "product_name", "product_price", "product_slug", "product_category" ], "properties": { "builder_id": { "description": "Base64 encoded builder ID", "type": "string", "example": "MQ==" }, "product_id": { "type": "integer", "example": 123 }, "product_name": { "type": "string", "example": "Test Product" }, "product_price": { "type": "number", "format": "float", "example": 29.99 }, "product_slug": { "type": "string", "example": "test-product" }, "product_category": { "properties": { "id": { "type": "array", "items": { "type": "integer", "example": 10 } }, "name": { "type": "array", "items": { "type": "string", "example": "Health Products" } } }, "type": "object" }, "product_variation": { "type": "array", "items": { "properties": { "variation_id": { "type": "integer", "example": 456 }, "display_name": { "type": "string", "example": "Small" }, "price": { "type": "number", "format": "float", "example": 19.99 } }, "type": "object" } } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Product updated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "string", "example": "Product successfully!" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "500": { "description": "Server error" } } }, { "path": "/api/practitioners-list", "method": "GET", "operationId": "practitioner", "summary": "Get practitioners list", "description": "Returns a list of all practitioners", "tags": [ "User Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "phone": { "type": "string", "example": "123-456-7890" }, "type": { "type": "string", "example": "practitioner" }, "fname": { "type": "string", "example": "John" }, "lname": { "type": "string", "example": "Doe" } }, "type": "object" } }, "message": { "type": "string", "example": "Practitioner list!" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "500": { "description": "Server error" } } }, { "path": "/api/provider-add-availability", "method": "POST", "operationId": "storeProviderAvailability", "summary": "Store provider availability", "description": "Creates a new provider availability time slot or event", "tags": [ "Provider" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "title", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Available", "items": null, "properties": null }, { "name": "start", "type": "string", "format": "date-time", "required": true, "description": "", "enum": null, "example": "2023-07-01T09:00:00", "items": null, "properties": null }, { "name": "end", "type": "string", "format": "date-time", "required": true, "description": "", "enum": null, "example": "2023-07-01T17:00:00", "items": null, "properties": null }, { "name": "type", "type": "string", "format": null, "required": true, "description": "availability or event", "enum": null, "example": "availability", "items": null, "properties": null }, { "name": "comment", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "practitioner_id", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 1, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "title", "start", "end", "type" ], "properties": { "title": { "type": "string", "example": "Available" }, "start": { "type": "string", "format": "date-time", "example": "2023-07-01T09:00:00" }, "end": { "type": "string", "format": "date-time", "example": "2023-07-01T17:00:00" }, "type": { "description": "availability or event", "type": "string", "example": "availability" }, "comment": { "type": "string" }, "practitioner_id": { "type": "integer", "example": 1 } }, "type": "object" }, "examples": {} } } }, "responses": { "201": { "description": "Provider availability created successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Provider availability created successfully" } }, "type": "object" } } } } } }, { "path": "/api/provider/auth/logout", "method": "POST", "operationId": "logout", "summary": "Logout provider", "description": "Invalidate the provider's access token", "tags": [ "Authentication" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successfully logged out", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "User logged out successfully" } }, "type": "object" } } } }, "401": { "description": "Invalid or missing token", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Invalid access token" } }, "type": "object" } } } } } }, { "path": "/api/provider/practitioners-list", "method": "GET", "operationId": "providerPractitioner", "summary": "Get practitioners list", "description": "Get a list of practitioners associated with the provider", "tags": [ "Provider" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "type": "object" } }, "message": { "type": "string", "example": "Practitioner list!" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" } } }, { "path": "/api/redirect-with-auth/{pid}", "method": "GET", "operationId": "redirectWithAuth", "summary": "Get authentication token for redirect", "description": "Creates an authentication token for a patient to be used in redirects", "tags": [ "Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "pid", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Authentication token created successfully", "content": { "application/json": { "schema": { "properties": { "token": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." } }, "type": "object" } } } }, "404": { "description": "Patient not found", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Patient not found" } }, "type": "object" } } } } } }, { "path": "/api/refresh-token", "method": "POST", "operationId": "refresh", "summary": "Refresh authentication token", "description": "Refresh an existing authentication token using a refresh token", "tags": [ "Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "refresh_token", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "eyJ0eXAiOiJKV1QiLCJhbGc...", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "refresh_token" ], "properties": { "refresh_token": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGc..." } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Token refreshed successfully", "content": { "application/json": { "schema": { "properties": { "accessToken": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGc..." }, "refreshToken": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGc..." }, "tokenType": { "type": "string", "example": "Bearer" } }, "type": "object" } } } }, "401": { "description": "Invalid refresh token", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Invalid refresh token" } }, "type": "object" } } } } } }, { "path": "/api/register-patient", "method": "POST", "operationId": "registerPatientWithoutAuthAuth", "summary": "Register patient without authentication", "description": "Register a new patient without requiring authentication", "tags": [ "Patient Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "firstName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "John", "items": null, "properties": null }, { "name": "lastName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Doe", "items": null, "properties": null }, { "name": "email", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "john.doe@example.com", "items": null, "properties": null }, { "name": "password", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "password123", "items": null, "properties": null }, { "name": "dateOfBirth", "type": "string", "format": "date", "required": true, "description": "", "enum": null, "example": "1990-01-01", "items": null, "properties": null }, { "name": "gender", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "M", "items": null, "properties": null }, { "name": "phone", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "123-456-7890", "items": null, "properties": null }, { "name": "username", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "johndoe", "items": null, "properties": null }, { "name": "provider_id", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 1, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "firstName", "lastName", "email", "password", "dateOfBirth", "gender", "phone", "username" ], "properties": { "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "password": { "type": "string", "example": "password123" }, "dateOfBirth": { "type": "string", "format": "date", "example": "1990-01-01" }, "gender": { "type": "string", "example": "M" }, "phone": { "type": "string", "example": "123-456-7890" }, "username": { "type": "string", "example": "johndoe" }, "provider_id": { "type": "integer", "example": 1 } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Patient registered successfully", "content": { "application/json": { "schema": { "properties": { "accessToken": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGc..." }, "userAbilityRules": { "type": "array", "items": { "properties": { "action": { "type": "string", "example": "manage" }, "subject": { "type": "string", "example": "all" } }, "type": "object" } }, "userData": { "properties": { "id": { "type": "integer", "example": 1 }, "fname": { "type": "string", "example": "John" }, "lname": { "type": "string", "example": "Doe" }, "phone": { "type": "string", "example": "123-456-7890" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "dob": { "type": "string", "format": "date", "example": "1990-01-01" }, "role": { "type": "string", "example": "patient" } }, "type": "object" }, "message": { "type": "string", "example": "User LoggedIn" } }, "type": "object" } } } }, "400": { "description": "Email already exists", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "email already exist." } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "An error occurred while registering." }, "exception": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/register-patients", "method": "POST", "operationId": "registerPatientWithoutAuthPatient", "summary": "Register a new patient without authentication", "description": "Creates a new patient account without requiring authentication", "tags": [ "Patients" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "first_name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "John", "items": null, "properties": null }, { "name": "last_name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Doe", "items": null, "properties": null }, { "name": "email", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "john.doe@example.com", "items": null, "properties": null }, { "name": "phone_no", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "1234567890", "items": null, "properties": null }, { "name": "dob", "type": "string", "format": "date", "required": true, "description": "", "enum": null, "example": "1990-01-01", "items": null, "properties": null }, { "name": "gender", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Male", "items": null, "properties": null }, { "name": "provider_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "username", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "johndoe", "items": null, "properties": null }, { "name": "isportalAccess", "type": "boolean", "format": null, "required": false, "description": "", "enum": null, "example": true, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "first_name", "last_name", "email", "phone_no", "dob", "gender", "provider_id" ], "properties": { "first_name": { "type": "string", "example": "John" }, "last_name": { "type": "string", "example": "Doe" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "phone_no": { "type": "string", "example": "1234567890" }, "dob": { "type": "string", "format": "date", "example": "1990-01-01" }, "gender": { "type": "string", "example": "Male" }, "provider_id": { "type": "integer", "example": 1 }, "username": { "type": "string", "example": "johndoe" }, "isportalAccess": { "type": "boolean", "example": true } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Patient registered successfully", "content": { "application/json": { "schema": { "properties": { "accessToken": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." }, "userAbilityRules": { "type": "array", "items": { "properties": { "action": { "type": "string", "example": "manage" } }, "type": "object" } }, "userData": { "properties": { "id": { "type": "integer", "example": 1 }, "fname": { "type": "string", "example": "John" }, "lname": { "type": "string", "example": "Doe" }, "phone": { "type": "string", "example": "1234567890" }, "email": { "type": "string", "example": "john.doe@example.com" }, "dob": { "type": "string", "format": "date", "example": "1990-01-01" }, "role": { "type": "string", "example": "patient" } }, "type": "object" }, "message": { "type": "string", "example": "User LoggedIn" } }, "type": "object" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "email already exist." } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "An error occurred while booking." }, "exception": { "type": "string", "example": "Error message details" } }, "type": "object" } } } } } }, { "path": "/api/render/pdf/{rowId}", "method": "GET", "operationId": "renderPdf", "summary": "Render a PDF document", "description": "Renders a PDF document from a patient intake form", "tags": [ "Documents" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "rowId", "type": "integer", "format": null, "required": true, "description": "ID of the intake form record", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "PDF document stream", "content": { "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "404": { "description": "PDF not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Not Found" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Server Error" } }, "type": "object" } } } } } }, { "path": "/api/save-category", "method": "POST", "operationId": "storeCategory", "summary": "Store product category", "description": "Creates a new product category", "tags": [ "Products" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Supplements", "items": null, "properties": null }, { "name": "description", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Nutritional supplements and vitamins", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "name" ], "properties": { "name": { "type": "string", "example": "Supplements" }, "description": { "type": "string", "example": "Nutritional supplements and vitamins" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Category stored successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "category": { "type": "object" } }, "type": "object" } } } } } }, { "path": "/api/save-payment-method", "method": "POST", "operationId": "storePaymentMethodConfigAssistant", "summary": "Store payment method configuration", "description": "Stores payment method configuration settings", "tags": [ "Assistant" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "payment_method", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "stripe", "items": null, "properties": null }, { "name": "api_key", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "secret_key", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "is_active", "type": "boolean", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "payment_method" ], "properties": { "payment_method": { "type": "string", "example": "stripe" }, "api_key": { "type": "string" }, "secret_key": { "type": "string" }, "is_active": { "type": "boolean" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Payment method configuration stored successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "message": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/save-product", "method": "POST", "operationId": "assistantSaveProduct", "summary": "Save product", "description": "Creates a new product", "tags": [ "Products" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Vitamin D3", "items": null, "properties": null }, { "name": "description", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Vitamin D3 supplement", "items": null, "properties": null }, { "name": "price", "type": "number", "format": "float", "required": true, "description": "", "enum": null, "example": 19.99, "items": null, "properties": null }, { "name": "category_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "sku", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "VIT-D3-1000", "items": null, "properties": null }, { "name": "stock_quantity", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 100, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "name", "price", "category_id" ], "properties": { "name": { "type": "string", "example": "Vitamin D3" }, "description": { "type": "string", "example": "Vitamin D3 supplement" }, "price": { "type": "number", "format": "float", "example": 19.99 }, "category_id": { "type": "integer", "example": 1 }, "sku": { "type": "string", "example": "VIT-D3-1000" }, "stock_quantity": { "type": "integer", "example": 100 } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Product saved successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "product": { "type": "object" } }, "type": "object" } } } } } }, { "path": "/api/save-signature", "method": "POST", "operationId": "storeSignature", "summary": "Save provider signature", "description": "Store or update the provider's signature", "tags": [ "Provider" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "signature", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "signature" ], "properties": { "signature": { "type": "string", "example": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..." } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Signature saved successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Updated Successfully!" }, "data": { "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The signature field is required." }, "errors": { "properties": { "signature": { "type": "array", "items": { "type": "string" } } }, "type": "object" } }, "type": "object" } } } } } }, { "path": "/api/set-password/{token}", "method": "POST", "operationId": "setPassword", "summary": "Set password for patient account", "description": "Set a new password for a patient account using a token", "tags": [ "Patient Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "token", "type": "string", "format": null, "required": true, "description": "Password reset token", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "password", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "newpassword123", "items": null, "properties": null }, { "name": "password_confirmation", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "newpassword123", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "password", "password_confirmation" ], "properties": { "password": { "type": "string", "example": "newpassword123" }, "password_confirmation": { "type": "string", "example": "newpassword123" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Password set successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Password set successfully" } }, "type": "object" } } } }, "422": { "description": "Validation error" }, "500": { "description": "Failed to set password", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Failed to set password" }, "message": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/start-call/{patient_id}/{agent_id}/{appointment_id}", "method": "POST", "operationId": "startCall", "summary": "Start a call", "description": "Start a video call between patient and agent", "tags": [ "Meetings" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null }, { "name": "agent_id", "type": "integer", "format": null, "required": true, "description": "Agent ID", "in": "path", "enum": null, "example": null }, { "name": "appointment_id", "type": "integer", "format": null, "required": true, "description": "Appointment ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "title", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Consultation call", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": false, "description": "", "content": { "application/json": { "schema": { "properties": { "title": { "type": "string", "example": "Consultation call" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Call started successfully", "content": { "application/json": { "schema": { "properties": { "token": { "type": "string" }, "appointment_id": { "type": "integer" }, "url": { "type": "string" } }, "type": "object" } } } }, "404": { "description": "Appointment not found" }, "500": { "description": "Failed to start call" } } }, { "path": "/api/store-company", "method": "POST", "operationId": "updateCompanyAssistant", "summary": "Update company information", "description": "Updates company profile information and logo", "tags": [ "Assistant" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Health Guru Hub", "items": null, "properties": null }, { "name": "address", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "city", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "state", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "zip", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "phone", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "email", "type": "string", "format": "email", "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "website", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "logo", "type": "file", "format": null, "required": false, "description": "Company logo", "enum": null, "example": null, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "multipart/form-data": { "schema": { "required": [ "name" ], "properties": { "name": { "type": "string", "example": "Health Guru Hub" }, "address": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "zip": { "type": "string" }, "phone": { "type": "string" }, "email": { "type": "string", "format": "email" }, "website": { "type": "string" }, "logo": { "description": "Company logo", "type": "file" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Company information updated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "message": { "type": "string" } }, "type": "object" } } } }, "409": { "description": "Error updating company information", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/store-document/{patientId}", "method": "POST", "operationId": "storeDocuments", "summary": "Store patient documents", "description": "Upload and store documents for a patient", "tags": [ "Documents" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "files[]", "type": "array", "format": null, "required": false, "description": "Document files to upload", "enum": null, "example": null, "items": { "type": "string", "format": "binary" }, "properties": null }, { "name": "document_type", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "medical_record", "items": null, "properties": null }, { "name": "notes", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Patient medical records", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "multipart/form-data": { "schema": { "properties": { "files[]": { "description": "Document files to upload", "type": "array", "items": { "type": "string", "format": "binary" } }, "document_type": { "type": "string", "example": "medical_record" }, "notes": { "type": "string", "example": "Patient medical records" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Documents stored successfully", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "array", "items": { "type": "object" } } }, "type": "object" } } } }, "400": { "description": "Invalid input", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Invalid file format" } }, "type": "object" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthenticated" } }, "type": "object" } } } } } }, { "path": "/api/store-form", "method": "POST", "operationId": "formDataStore", "summary": "Store a new form", "description": "Creates a new form (intake, consent, etc.)", "tags": [ "Forms Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "type", "type": "string", "format": null, "required": true, "description": "Form type (simple-forms, consent-forms, charting-forms, etc.)", "enum": null, "example": "simple-forms", "items": null, "properties": null }, { "name": "data", "type": "object", "format": null, "required": true, "description": "Form structure and fields", "enum": null, "example": null, "items": null, "properties": null }, { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "New Patient Intake Form", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "type", "data", "name" ], "properties": { "type": { "description": "Form type (simple-forms, consent-forms, charting-forms, etc.)", "type": "string", "example": "simple-forms" }, "data": { "description": "Form structure and fields", "type": "object" }, "name": { "type": "string", "example": "New Patient Intake Form" } }, "type": "object" }, "examples": {} } } }, "responses": { "201": { "description": "Form created successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Form created successfully" }, "data": { "properties": { "id": { "type": "integer", "example": 1 }, "type": { "type": "string", "example": "simple-forms" }, "name": { "type": "string", "example": "New Patient Intake Form" }, "data": { "type": "object" }, "provider_id": { "type": "integer", "example": 1 }, "created_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "422": { "description": "Validation error" }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Form not created" }, "error": { "type": "string", "example": "Error message" } }, "type": "object" } } } } } }, { "path": "/api/store-intake-form-data", "method": "POST", "operationId": "storeIntakeFormData", "summary": "Store intake form data", "description": "Stores patient intake form data with support for file uploads", "tags": [ "Patient Forms" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "form_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "pid", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 2, "items": null, "properties": null }, { "name": "practitioner_id", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 3, "items": null, "properties": null }, { "name": "schema", "type": "string", "format": null, "required": true, "description": "JSON schema of the form", "enum": null, "example": null, "items": null, "properties": null }, { "name": "orginal_form_schema", "type": "string", "format": null, "required": true, "description": "Original JSON schema of the form", "enum": null, "example": null, "items": null, "properties": null }, { "name": "signatureMetaData", "type": "string", "format": null, "required": false, "description": "JSON metadata for signatures", "enum": null, "example": null, "items": null, "properties": null }, { "name": "file_field_name", "type": "file", "format": null, "required": false, "description": "File upload fields (multiple can be included)", "enum": null, "example": null, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "multipart/form-data": { "schema": { "required": [ "form_id", "pid", "schema", "orginal_form_schema" ], "properties": { "form_id": { "type": "integer", "example": 1 }, "pid": { "type": "integer", "example": 2 }, "practitioner_id": { "type": "integer", "example": 3 }, "schema": { "description": "JSON schema of the form", "type": "string" }, "orginal_form_schema": { "description": "Original JSON schema of the form", "type": "string" }, "signatureMetaData": { "description": "JSON metadata for signatures", "type": "string" }, "file_field_name": { "description": "File upload fields (multiple can be included)", "type": "file" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Form data updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatientIntakeForms" } } } }, "201": { "description": "Form data stored successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 1 }, "form_id": { "type": "integer", "example": 1 }, "pid": { "type": "integer", "example": 2 }, "provider_id": { "type": "integer", "example": 1 }, "data": { "type": "object" }, "schema": { "type": "object" }, "practitioner_id": { "type": "integer", "example": 3 }, "orginal_form_schema": { "type": "object" }, "signature_meta": { "type": "object" }, "pdf_url": { "type": "string", "nullable": true }, "created_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Error message" } }, "type": "object" } } } } } }, { "path": "/api/store-patient-consent-form", "method": "POST", "operationId": "storePatientConsentForm", "summary": "Store patient consent form", "description": "Stores a new patient consent form submission", "tags": [ "Consent Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "form_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "pid", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 2, "items": null, "properties": null }, { "name": "data", "type": "object", "format": null, "required": true, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "John Doe", "items": null, "properties": null }, { "name": "signature", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "base64encoded-signature-data", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "form_id", "pid", "data", "name", "signature" ], "properties": { "form_id": { "type": "integer", "example": 1 }, "pid": { "type": "integer", "example": 2 }, "data": { "type": "object" }, "name": { "type": "string", "example": "John Doe" }, "signature": { "type": "string", "example": "base64encoded-signature-data" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Form stored successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 1 }, "form_id": { "type": "integer", "example": 1 }, "pid": { "type": "integer", "example": 2 }, "provider_id": { "type": "integer", "example": 1 }, "data": { "type": "string" }, "name": { "type": "string", "example": "John Doe" }, "signature": { "type": "string", "example": "base64encoded-signature-data" }, "created_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" } } }, { "path": "/api/task/{id}", "method": "GET", "operationId": "getOneTaskById", "summary": "Get a task by ID", "description": "Retrieves the details of a specific task by its ID", "tags": [ "Tasks" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "ID of the task to retrieve", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 1 }, "patient_id": { "type": "integer", "example": 42 }, "task_title": { "type": "string", "example": "Complete blood work" }, "task_body": { "type": "string", "example": "Patient needs to complete blood work at local lab" }, "task_due_date": { "type": "string", "format": "date-time", "example": "2025-07-10 10:00:00" }, "task_assigned_to": { "type": "integer", "example": 5 }, "task_watchers": { "type": "string", "example": "[1,2]" }, "sendEmailtoPatientApplicationForTask": { "type": "integer", "example": 1 }, "task_priority": { "type": "string", "example": "normal" }, "task_status": { "type": "string", "example": "pending" }, "created_at": { "type": "string", "format": "date-time", "example": "2025-07-01 14:30:00" }, "updated_at": { "type": "string", "format": "date-time", "example": "2025-07-01 14:30:00" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "Task not found" } } }, { "path": "/api/tasks/{patient_id}", "method": "GET", "operationId": "getTasks", "summary": "Get all tasks for a patient", "description": "Retrieves all tasks associated with a specific patient with pagination support via DataTables", "tags": [ "Tasks" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "ID of the patient", "in": "path", "enum": null, "example": null } ], "query": [ { "name": "draw", "type": "integer", "format": null, "required": false, "description": "DataTables draw counter", "in": "query", "enum": null, "example": null }, { "name": "start", "type": "integer", "format": null, "required": false, "description": "DataTables start offset", "in": "query", "enum": null, "example": null }, { "name": "length", "type": "integer", "format": null, "required": false, "description": "DataTables page length", "in": "query", "enum": null, "example": null }, { "name": "search[value]", "type": "string", "format": null, "required": false, "description": "DataTables search value", "in": "query", "enum": null, "example": null }, { "name": "order[0][column]", "type": "integer", "format": null, "required": false, "description": "DataTables column index for ordering", "in": "query", "enum": null, "example": null }, { "name": "order[0][dir]", "type": "string", "format": null, "required": false, "description": "DataTables order direction (asc/desc)", "in": "query", "enum": null, "example": null } ], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "draw": { "type": "integer", "example": 1 }, "recordsTotal": { "type": "integer", "example": 10 }, "recordsFiltered": { "type": "integer", "example": 10 }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "patient_id": { "type": "integer", "example": 42 }, "task_title": { "type": "string", "example": "Complete blood work" }, "task_body": { "type": "string", "example": "Patient needs to complete blood work at local lab" }, "task_due_date": { "type": "string", "format": "date-time", "example": "2025-07-10 10:00:00" }, "task_assigned_to": { "type": "integer", "example": 5 }, "task_watchers": { "type": "string", "example": "[1,2]" }, "sendemailtopatientapplicationfortask": { "type": "boolean", "example": true }, "task_priority": { "type": "string", "example": "normal" }, "task_status": { "type": "string", "example": "pending" }, "created_at": { "type": "string", "format": "date-time", "example": "2025-07-01 14:30:00" }, "updated_at": { "type": "string", "format": "date-time", "example": "2025-07-01 14:30:00" }, "DT_RowIndex": { "type": "integer", "example": 0 } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Failed to fetch tasks: Error message" } }, "type": "object" } } } } } }, { "path": "/api/token/create-with-abilities", "method": "POST", "operationId": "createTokenWithAbilities", "summary": "Create a token with specific abilities", "description": "Creates a token with specific abilities (permissions) for a user", "tags": [ "Token Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "user_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "token_name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "api-access-token", "items": null, "properties": null }, { "name": "abilities", "type": "array", "format": null, "required": true, "description": "", "enum": null, "example": null, "items": { "type": "string", "example": "read" }, "properties": null }, { "name": "expires_in_hours", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 72, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "user_id", "token_name", "abilities" ], "properties": { "user_id": { "type": "integer", "example": 1 }, "token_name": { "type": "string", "example": "api-access-token" }, "abilities": { "type": "array", "items": { "type": "string", "example": "read" } }, "expires_in_hours": { "type": "integer", "example": 72 } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Token created successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Token created successfully" }, "user": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "John Doe" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" } }, "type": "object" }, "token": { "properties": { "name": { "type": "string", "example": "api-access-token" }, "abilities": { "type": "array", "items": { "type": "string", "example": "read" } }, "plain_text": { "type": "string", "example": "1|LNEBIslIcADi7yjPgHPxNZ0EfFdRrHG5g3KJw1Bd" }, "expires_at": { "type": "string", "format": "date-time", "example": "2023-07-05T12:00:00Z" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Validation failed" }, "errors": { "type": "object" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Failed to create token" }, "error": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/token/generate-temporary", "method": "POST", "operationId": "generateTemporaryToken", "summary": "Generate a temporary API token", "description": "Creates a token with specified expiration time for a user", "tags": [ "Token Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "user_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "expires_in_hours", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 24, "items": null, "properties": null }, { "name": "abilities", "type": "array", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": { "type": "string", "example": "read" }, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "user_id", "expires_in_hours" ], "properties": { "user_id": { "type": "integer", "example": 1 }, "expires_in_hours": { "type": "integer", "example": 24 }, "abilities": { "type": "array", "items": { "type": "string", "example": "read" } } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Temporary token generated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "user": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "John Doe" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" } }, "type": "object" }, "token": { "type": "string", "example": "1|LNEBIslIcADi7yjPgHPxNZ0EfFdRrHG5g3KJw1Bd" }, "expires_at": { "type": "string", "format": "date-time", "example": "2023-07-03T12:00:00Z" }, "expires_in_hours": { "type": "integer", "example": 24 } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Validation failed" }, "errors": { "type": "object" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Failed to generate temporary token" }, "error": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/token/list/{userId}", "method": "GET", "operationId": "listUserTokens", "summary": "List all tokens for a user", "description": "Retrieves all active tokens for the specified user", "tags": [ "Token Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "userId", "type": "integer", "format": null, "required": true, "description": "User ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "List of user tokens", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "user": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "John Doe" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" } }, "type": "object" }, "tokens_count": { "type": "integer", "example": 2 }, "tokens": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "permanent-access-token" }, "abilities": { "type": "array", "items": { "type": "string", "example": "*" } }, "last_used_at": { "type": "string", "format": "date-time", "example": "2023-07-01T10:00:00Z" }, "created_at": { "type": "string", "format": "date-time", "example": "2023-06-15T08:30:00Z" }, "expires_at": { "type": "string", "example": "Never" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "404": { "description": "User not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "User not found" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Failed to retrieve tokens" }, "error": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/token/refresh", "method": "POST", "operationId": "refreshCurrentToken", "summary": "Refresh current token", "description": "Refreshes the current token while preserving its abilities and expiration settings", "tags": [ "Token Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Token refreshed successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Token refreshed successfully" }, "user": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "John Doe" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" } }, "type": "object" }, "token": { "type": "string", "example": "1|LNEBIslIcADi7yjPgHPxNZ0EfFdRrHG5g3KJw1Bd" }, "expires_at": { "type": "string", "format": "date-time", "example": "2023-07-05T12:00:00Z" } }, "type": "object" } } } }, "400": { "description": "Invalid token", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Invalid token" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Unauthenticated" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Failed to refresh token" }, "error": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/token/revoke", "method": "DELETE", "operationId": "revokeToken", "summary": "Revoke a specific token", "description": "Revokes a token by its ID. Only the token owner or an admin can revoke a token.", "tags": [ "Token Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "token_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "token_id" ], "properties": { "token_id": { "type": "integer", "example": 1 } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Token revoked successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Token revoked successfully" }, "token_id": { "type": "integer", "example": 1 } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Unauthorized to revoke this token" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Validation failed" }, "errors": { "type": "object" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Failed to revoke token" }, "error": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/token/revoke-all/{userId}", "method": "DELETE", "operationId": "revokeAllUserTokens", "summary": "Revoke all tokens for a user", "description": "Revokes all tokens for the specified user. Only the user themselves or an admin can perform this action.", "tags": [ "Token Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "userId", "type": "integer", "format": null, "required": true, "description": "User ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "All tokens revoked successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "All tokens revoked successfully" }, "tokens_revoked": { "type": "integer", "example": 5 }, "user_id": { "type": "integer", "example": 1 } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Unauthorized to revoke tokens for this user" } }, "type": "object" } } } }, "404": { "description": "User not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "User not found" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Failed to revoke tokens" }, "error": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/update-category/{id}", "method": "POST", "operationId": "updateCategory", "summary": "Update product category", "description": "Updates an existing product category", "tags": [ "Products" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Category ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Updated Supplements", "items": null, "properties": null }, { "name": "description", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Updated description", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "name" ], "properties": { "name": { "type": "string", "example": "Updated Supplements" }, "description": { "type": "string", "example": "Updated description" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Category updated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "category": { "type": "object" } }, "type": "object" } } } }, "404": { "description": "Category not found" } } }, { "path": "/api/update-form-status", "method": "PUT", "operationId": "updateFormRequestStatus", "summary": "Update form request status", "description": "Updates the status of a patient's form request", "tags": [ "Patient Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "form_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 2, "items": null, "properties": null }, { "name": "status", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "completed", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "form_id", "patient_id", "status" ], "properties": { "form_id": { "type": "integer", "example": 1 }, "patient_id": { "type": "integer", "example": 2 }, "status": { "type": "string", "example": "completed" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Status updated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Status updated successfully" } }, "type": "object" } } } }, "404": { "description": "Form request not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Form request not found" } }, "type": "object" } } } }, "422": { "description": "Validation error" }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Error message" } }, "type": "object" } } } } } }, { "path": "/api/update-form/{id}", "method": "PUT", "operationId": "updateForm", "summary": "Update form", "description": "Updates an existing form with the provided data", "tags": [ "Forms Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Form ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "type", "type": "string", "format": null, "required": true, "description": "Form type (simple-forms, consent-forms, charting-forms, etc.)", "enum": null, "example": "simple-forms", "items": null, "properties": null }, { "name": "data", "type": "object", "format": null, "required": true, "description": "Form structure and fields", "enum": null, "example": null, "items": null, "properties": null }, { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Updated Patient Intake Form", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "type", "data", "name" ], "properties": { "type": { "description": "Form type (simple-forms, consent-forms, charting-forms, etc.)", "type": "string", "example": "simple-forms" }, "data": { "description": "Form structure and fields", "type": "object" }, "name": { "type": "string", "example": "Updated Patient Intake Form" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Form updated successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Form updated successfully" }, "data": { "properties": { "id": { "type": "integer", "example": 1 }, "type": { "type": "string", "example": "simple-forms" }, "name": { "type": "string", "example": "Updated Patient Intake Form" }, "data": { "type": "object" }, "provider_id": { "type": "integer", "example": 1 }, "created_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-07-01T12:00:00Z" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "Form not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Form not found" } }, "type": "object" } } } }, "422": { "description": "Validation error" }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Error updating form" }, "error": { "type": "string", "example": "Error message" } }, "type": "object" } } } } } }, { "path": "/api/update-intake-form-data", "method": "POST", "operationId": "updateIntakeFormData", "summary": "Update intake form data", "description": "Updates data in a patient intake form", "tags": [ "Forms" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "form_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "pid", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 123, "items": null, "properties": null }, { "name": "data", "type": "object", "format": null, "required": true, "description": "", "enum": null, "example": null, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "form_id", "pid", "data" ], "properties": { "form_id": { "type": "integer", "example": 1 }, "pid": { "type": "integer", "example": 123 }, "data": { "type": "object" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Form data updated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string" }, "form": { "type": "object" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/update-intake-form-data/{id}", "method": "POST", "operationId": "updatesIntakeFormData", "summary": "Update intake form data", "description": "Updates patient intake form data with support for file uploads", "tags": [ "Patient Forms" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Intake form record ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "form_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "pid", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 2, "items": null, "properties": null }, { "name": "practitioner_id", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 3, "items": null, "properties": null }, { "name": "schema", "type": "string", "format": null, "required": true, "description": "JSON schema of the form", "enum": null, "example": null, "items": null, "properties": null }, { "name": "orginal_form_schema", "type": "string", "format": null, "required": true, "description": "Original JSON schema of the form", "enum": null, "example": null, "items": null, "properties": null }, { "name": "signatureMetaData", "type": "string", "format": null, "required": false, "description": "JSON metadata for signatures", "enum": null, "example": null, "items": null, "properties": null }, { "name": "file_field_name", "type": "file", "format": null, "required": false, "description": "File upload fields (multiple can be included)", "enum": null, "example": null, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "multipart/form-data": { "schema": { "required": [ "form_id", "pid", "schema", "orginal_form_schema" ], "properties": { "form_id": { "type": "integer", "example": 1 }, "pid": { "type": "integer", "example": 2 }, "practitioner_id": { "type": "integer", "example": 3 }, "schema": { "description": "JSON schema of the form", "type": "string" }, "orginal_form_schema": { "description": "Original JSON schema of the form", "type": "string" }, "signatureMetaData": { "description": "JSON metadata for signatures", "type": "string" }, "file_field_name": { "description": "File upload fields (multiple can be included)", "type": "file" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Form data updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatientIntakeForms" } } } }, "201": { "description": "Form data created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatientIntakeForms" } } } }, "500": { "description": "Server error" } } }, { "path": "/api/update-location/{id}", "method": "PUT", "operationId": "updateLocation", "summary": "Update a location by ID", "description": "Updates an existing facility location by ID", "tags": [ "Locations" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "ID of the location to update", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Updated Clinic Name", "items": null, "properties": null }, { "name": "npiNumber", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "1234567890", "items": null, "properties": null }, { "name": "phoneNumber", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "(123) 456-7890", "items": null, "properties": null }, { "name": "address", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "123 Main St", "items": null, "properties": null }, { "name": "city", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "New York", "items": null, "properties": null }, { "name": "state", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "NY", "items": null, "properties": null }, { "name": "zipcode", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "10001", "items": null, "properties": null }, { "name": "country", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "US", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "name", "npiNumber", "phoneNumber", "address", "city", "state", "zipcode", "country" ], "properties": { "name": { "type": "string", "example": "Updated Clinic Name" }, "npiNumber": { "type": "string", "example": "1234567890" }, "phoneNumber": { "type": "string", "example": "(123) 456-7890" }, "address": { "type": "string", "example": "123 Main St" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "zipcode": { "type": "string", "example": "10001" }, "country": { "type": "string", "example": "US" } }, "type": "object" }, "examples": {} } } }, "responses": { "201": { "description": "Location updated successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Location updated successfully" }, "data": { "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "Location not found" }, "422": { "description": "Validation error" } } }, { "path": "/api/update-location/{uuid}", "method": "PUT", "operationId": "updateLocationByUuid", "summary": "Update a location by UUID", "description": "Updates an existing facility location by UUID (compatibility with PatientController)", "tags": [ "Locations" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "uuid", "type": "string", "format": null, "required": true, "description": "UUID of the location to update", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Updated Clinic Name", "items": null, "properties": null }, { "name": "npiNumber", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "1234567890", "items": null, "properties": null }, { "name": "phoneNumber", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "(123) 456-7890", "items": null, "properties": null }, { "name": "address", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "123 Main St", "items": null, "properties": null }, { "name": "city", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "New York", "items": null, "properties": null }, { "name": "state", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "NY", "items": null, "properties": null }, { "name": "zipcode", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "10001", "items": null, "properties": null }, { "name": "country", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "US", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "name", "npiNumber", "phoneNumber", "address", "city", "state", "zipcode", "country" ], "properties": { "name": { "type": "string", "example": "Updated Clinic Name" }, "npiNumber": { "type": "string", "example": "1234567890" }, "phoneNumber": { "type": "string", "example": "(123) 456-7890" }, "address": { "type": "string", "example": "123 Main St" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "zipcode": { "type": "string", "example": "10001" }, "country": { "type": "string", "example": "US" } }, "type": "object" }, "examples": {} } } }, "responses": { "201": { "description": "Location updated successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Location updated successfully" }, "data": { "properties": { "name": { "type": "string", "example": "Updated Clinic Name" }, "facility_npi": { "type": "string", "example": "1234567890" }, "phone": { "type": "string", "example": "1234567890" }, "street": { "type": "string", "example": "123 Main St" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "postal_code": { "type": "string", "example": "10001" }, "country_code": { "type": "string", "example": "US" }, "uuid": { "type": "string", "format": "uuid", "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "Location not found" }, "422": { "description": "Validation error" } } }, { "path": "/api/update-password", "method": "POST", "operationId": "updatePasswordPatient", "summary": "Update patient password", "description": "Updates a patient's password", "tags": [ "Authentication" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "new_password", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "newSecurePassword123", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "new_password" ], "properties": { "new_password": { "type": "string", "example": "newSecurePassword123" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Password updated successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Password updated successfully." } }, "type": "object" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthenticated" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "new_password": { "type": "array", "items": { "type": "string", "example": "The new password field is required." } } }, "type": "object" } } } } } }, { "path": "/api/update-patient-info/{patientId}", "method": "POST", "operationId": "updateInfo", "summary": "Update patient information", "description": "Updates patient's personal information", "tags": [ "Patients" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "city", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "New York", "items": null, "properties": null }, { "name": "state", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "NY", "items": null, "properties": null }, { "name": "address", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "123 Main St", "items": null, "properties": null }, { "name": "zip_code", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "10001", "items": null, "properties": null }, { "name": "dob", "type": "string", "format": "date", "required": false, "description": "", "enum": null, "example": "1990-01-01", "items": null, "properties": null }, { "name": "country", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "USA", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "properties": { "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "address": { "type": "string", "example": "123 Main St" }, "zip_code": { "type": "string", "example": "10001" }, "dob": { "type": "string", "format": "date", "example": "1990-01-01" }, "country": { "type": "string", "example": "USA" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Patient information updated successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Patient address updated successfully" } }, "type": "object" } } } }, "400": { "description": "Failed to update patient information" } } }, { "path": "/api/update-patient-summary/{patientId}", "method": "POST", "operationId": "updatePatientSummary", "summary": "Update patient summary", "description": "Updates the summary information for a patient", "tags": [ "Patient Summary" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "summary", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Patient summary text", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "summary" ], "properties": { "summary": { "type": "string", "example": "Patient summary text" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Summary updated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string" }, "summary": { "type": "string" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/update-product/{id}", "method": "POST", "operationId": "updateProduct", "summary": "Update product", "description": "Updates an existing product", "tags": [ "Products" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Product ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Updated Vitamin D3", "items": null, "properties": null }, { "name": "description", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Updated description", "items": null, "properties": null }, { "name": "price", "type": "number", "format": "float", "required": true, "description": "", "enum": null, "example": 24.99, "items": null, "properties": null }, { "name": "category_id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "sku", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "VIT-D3-1000-UPD", "items": null, "properties": null }, { "name": "stock_quantity", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 150, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "name", "price", "category_id" ], "properties": { "name": { "type": "string", "example": "Updated Vitamin D3" }, "description": { "type": "string", "example": "Updated description" }, "price": { "type": "number", "format": "float", "example": 24.99 }, "category_id": { "type": "integer", "example": 1 }, "sku": { "type": "string", "example": "VIT-D3-1000-UPD" }, "stock_quantity": { "type": "integer", "example": 150 } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Product updated successfully", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean" }, "product": { "type": "object" } }, "type": "object" } } } }, "404": { "description": "Product not found" } } }, { "path": "/api/update-task/{task_id}", "method": "PUT", "operationId": "updateTask", "summary": "Update an existing task", "description": "Updates the details of an existing task", "tags": [ "Tasks" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "task_id", "type": "integer", "format": null, "required": true, "description": "ID of the task to update", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "task_title", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Updated blood work", "items": null, "properties": null }, { "name": "task_body", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Patient needs to complete updated blood work at local lab", "items": null, "properties": null }, { "name": "task_due_date", "type": "string", "format": "date-time", "required": false, "description": "", "enum": null, "example": "2025-07-15 10:00:00", "items": null, "properties": null }, { "name": "task_assigned_to", "type": "integer", "format": null, "required": false, "description": "", "enum": null, "example": 5, "items": null, "properties": null }, { "name": "task_watchers", "type": "array", "format": null, "required": false, "description": "", "enum": null, "example": [ 1, 2, 3 ], "items": { "type": "integer" }, "properties": null }, { "name": "sendEmailtoPatientApplicationForTask", "type": "boolean", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "task_priority", "type": "string", "format": null, "required": false, "description": "", "enum": [ "low", "normal", "high" ], "example": "high", "items": null, "properties": null }, { "name": "task_status", "type": "string", "format": null, "required": false, "description": "", "enum": [ "pending", "in_progress", "completed" ], "example": "in_progress", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "properties": { "task_title": { "type": "string", "example": "Updated blood work" }, "task_body": { "type": "string", "example": "Patient needs to complete updated blood work at local lab" }, "task_due_date": { "type": "string", "format": "date-time", "example": "2025-07-15 10:00:00" }, "task_assigned_to": { "type": "integer", "example": 5 }, "task_watchers": { "type": "array", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "sendEmailtoPatientApplicationForTask": { "type": "boolean", "example": false }, "task_priority": { "type": "string", "enum": [ "low", "normal", "high" ], "example": "high" }, "task_status": { "type": "string", "enum": [ "pending", "in_progress", "completed" ], "example": "in_progress" } }, "type": "object" }, "examples": {} } } }, "responses": { "201": { "description": "Task updated successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Task updated successfully" }, "data": { "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "Task not found" } } }, { "path": "/api/update-user/{id}", "method": "POST", "operationId": "updateUser", "summary": "Update user", "description": "Update an existing user's information", "tags": [ "User Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "User ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "firstName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "John", "items": null, "properties": null }, { "name": "lastName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Doe", "items": null, "properties": null }, { "name": "textMessageNumber", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "123-456-7890", "items": null, "properties": null }, { "name": "timezone", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "UTC", "items": null, "properties": null }, { "name": "dateOfBirth", "type": "string", "format": "date", "required": false, "description": "", "enum": null, "example": "1990-01-01", "items": null, "properties": null }, { "name": "gender", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "M", "items": null, "properties": null }, { "name": "city", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "New York", "items": null, "properties": null }, { "name": "state", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "NY", "items": null, "properties": null }, { "name": "zipcode", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "10001", "items": null, "properties": null }, { "name": "type", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "practitioner", "items": null, "properties": null }, { "name": "role_id", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "1", "items": null, "properties": null }, { "name": "username", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "johndoe", "items": null, "properties": null }, { "name": "newUserPassword", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "newpassword123", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "firstName", "lastName", "textMessageNumber", "timezone", "role_id" ], "properties": { "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "textMessageNumber": { "type": "string", "example": "123-456-7890" }, "timezone": { "type": "string", "example": "UTC" }, "dateOfBirth": { "type": "string", "format": "date", "example": "1990-01-01" }, "gender": { "type": "string", "example": "M" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "zipcode": { "type": "string", "example": "10001" }, "type": { "type": "string", "example": "practitioner" }, "role_id": { "type": "string", "example": "1" }, "username": { "type": "string", "example": "johndoe" }, "newUserPassword": { "type": "string", "example": "newpassword123" } }, "type": "object" }, "examples": {} } } }, "responses": { "201": { "description": "User updated successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "User updated successfully!" }, "data": { "properties": { "fname": { "type": "string", "example": "John" }, "lname": { "type": "string", "example": "Doe" }, "phone": { "type": "string", "example": "123-456-7890" }, "timezone": { "type": "string", "example": "UTC" }, "last_updated": { "type": "string", "format": "date-time", "example": "2023-06-30T15:30:00Z" }, "profile_image_base64": { "type": "string", "example": "https://example.com/storage/John-Doe/image.jpg" }, "dateOfBirth": { "type": "string", "format": "date", "example": "1990-01-01" }, "gender": { "type": "string", "example": "M" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "zip": { "type": "string", "example": "10001" }, "type": { "type": "string", "example": "practitioner" }, "role_id": { "type": "string", "example": "1" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "User not found" }, "422": { "description": "Validation error" }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "An error occurred" }, "message": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/api/user-list", "method": "GET", "operationId": "getUserList", "summary": "Get list of users", "description": "Returns a list of all users for the authenticated provider", "tags": [ "User Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "draw": { "type": "integer", "example": 1 }, "recordsTotal": { "type": "integer", "example": 10 }, "recordsFiltered": { "type": "integer", "example": 10 }, "data": { "type": "array", "items": { "properties": { "user_id": { "type": "integer", "example": 1 }, "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "username": { "type": "string", "example": "johndoe" }, "role_id": { "type": "string", "example": "1" }, "fullName": { "type": "string", "example": "John Doe" }, "emailAddress": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "textMessageNumber": { "type": "string", "example": "123-456-7890" }, "accessRights": { "properties": { "admin": { "type": "boolean", "example": false }, "practitioner": { "type": "boolean", "example": false }, "patientPortalMessaging": { "type": "boolean", "example": false } }, "type": "object" }, "analytics": { "type": "string", "example": "None" }, "replyToEmail": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "chartCoSigner": { "type": "string", "nullable": true }, "supervisor": { "type": "string", "nullable": true }, "sendEmail": { "type": "boolean", "example": false }, "notes": { "type": "string", "example": "" }, "copyDetailsFrom": { "type": "string", "nullable": true }, "status": { "type": "integer", "example": 1 }, "profile_picture": { "type": "string", "example": "base64encodedstring" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "500": { "description": "Server error" } } }, { "path": "/api/user-list-profile/{id}", "method": "GET", "operationId": "getUserProfileById", "summary": "Get user profile by ID", "description": "Returns user profile information for display", "tags": [ "User Management" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "User ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "id": { "type": "integer", "example": 1 }, "firstName": { "type": "string", "example": "John" }, "timezone": { "type": "string", "example": "UTC" }, "lastName": { "type": "string", "example": "Doe" }, "username": { "type": "string", "example": "johndoe" }, "profile_image_url": { "type": "string", "example": "https://example.com/storage/John-Doe/image.jpg" }, "emailAddress": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "textMessageNumber": { "type": "string", "example": "123-456-7890" }, "role_id": { "type": "string", "example": "1" }, "accessRights": { "properties": { "admin": { "type": "boolean", "example": false }, "practitioner": { "type": "boolean", "example": false }, "patientPortalMessaging": { "type": "boolean", "example": false } }, "type": "object" }, "analytics": { "type": "string", "example": "None" }, "replyToEmail": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "chartCoSigner": { "type": "string", "nullable": true }, "supervisor": { "type": "string", "nullable": true }, "sendEmail": { "type": "boolean", "example": false }, "notes": { "type": "string", "example": "" }, "copyDetailsFrom": { "type": "string", "nullable": true }, "status": { "type": "integer", "example": 1 } }, "type": "object" }, "message": { "type": "string", "example": "Users list!" } }, "type": "object" } } } }, "404": { "description": "User not found", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "type": "string" }, "example": [] }, "message": { "type": "string", "example": "Users profile not exixt!" } }, "type": "object" } } } }, "500": { "description": "Server error" } } }, { "path": "/api/user-list/{id}", "method": "GET", "operationId": "getUserById", "summary": "Get user by ID", "description": "Returns detailed information about a specific user", "tags": [ "User Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "User ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "id": { "type": "integer", "example": 1 }, "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "username": { "type": "string", "example": "johndoe" }, "emailAddress": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "textMessageNumber": { "type": "string", "example": "123-456-7890" }, "dateOfBirth": { "type": "string", "format": "date", "example": "1990-01-01" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "zipcode": { "type": "string", "example": "10001" }, "gender": { "type": "string", "example": "M" }, "accessRights": { "properties": { "admin": { "type": "boolean", "example": false }, "practitioner": { "type": "boolean", "example": false }, "patientPortalMessaging": { "type": "boolean", "example": false } }, "type": "object" }, "analytics": { "type": "string", "example": "None" }, "replyToEmail": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "chartCoSigner": { "type": "string", "nullable": true }, "supervisor": { "type": "string", "nullable": true }, "sendEmail": { "type": "boolean", "example": false }, "notes": { "type": "string", "example": "" }, "copyDetailsFrom": { "type": "string", "nullable": true }, "status": { "type": "integer", "example": 1 }, "role_id": { "type": "string", "example": "1" }, "type": { "type": "string", "example": "practitioner" }, "avatarImg": { "type": "string", "example": "base64encodedstring" } }, "type": "object" }, "message": { "type": "string", "example": "Users list!" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "404": { "description": "User not found" }, "500": { "description": "Server error" } } }, { "path": "/api/user/create", "method": "POST", "operationId": "createUserFromAdmin", "summary": "Create new user from admin", "description": "Creates a new user from the admin panel with improved validation", "tags": [ "User Management" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "firstName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "John", "items": null, "properties": null }, { "name": "lastName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Doe", "items": null, "properties": null }, { "name": "username", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "johndoe", "items": null, "properties": null }, { "name": "emailAddress", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "john.doe@example.com", "items": null, "properties": null }, { "name": "textMessageNumber", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "123-456-7890", "items": null, "properties": null }, { "name": "dateOfBirth", "type": "string", "format": "date", "required": false, "description": "", "enum": null, "example": "1990-01-01", "items": null, "properties": null }, { "name": "gender", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "M", "items": null, "properties": null }, { "name": "city", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "New York", "items": null, "properties": null }, { "name": "state", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "NY", "items": null, "properties": null }, { "name": "zipcode", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "10001", "items": null, "properties": null }, { "name": "role_id", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "1", "items": null, "properties": null }, { "name": "newUserPassword", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "password123", "items": null, "properties": null }, { "name": "type", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "practitioner", "items": null, "properties": null }, { "name": "avatarImg", "type": "file", "format": null, "required": false, "description": "User profile image", "enum": null, "example": null, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "multipart/form-data": { "schema": { "required": [ "firstName", "lastName", "username", "emailAddress", "textMessageNumber", "role_id", "newUserPassword", "type" ], "properties": { "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "username": { "type": "string", "example": "johndoe" }, "emailAddress": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "textMessageNumber": { "type": "string", "example": "123-456-7890" }, "dateOfBirth": { "type": "string", "format": "date", "example": "1990-01-01" }, "gender": { "type": "string", "example": "M" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "zipcode": { "type": "string", "example": "10001" }, "role_id": { "type": "string", "example": "1" }, "newUserPassword": { "type": "string", "example": "password123" }, "type": { "type": "string", "example": "practitioner" }, "avatarImg": { "description": "User profile image", "type": "file" } }, "type": "object" }, "examples": {} } } }, "responses": { "201": { "description": "User created successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "User added successfully" }, "data": { "properties": { "fname": { "type": "string", "example": "John" }, "lname": { "type": "string", "example": "Doe" }, "username": { "type": "string", "example": "johndoe" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "phone": { "type": "string", "example": "123-456-7890" }, "dateOfBirth": { "type": "string", "format": "date", "example": "1990-01-01" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "zipcode": { "type": "string", "example": "10001" }, "gender": { "type": "string", "example": "M" }, "company_id": { "type": "integer", "example": 1 }, "provider_id": { "type": "integer", "example": 1 }, "type": { "type": "string", "example": "practitioner" }, "profile_image_base64": { "type": "string", "example": "https://example.com/storage/John-Doe/image.jpg" }, "timezone": { "type": "string", "example": "UTC" }, "role_id": { "type": "string", "example": "1" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" }, "422": { "description": "Validation error" }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "An error occurred: Error message" }, "message": { "type": "string", "example": "Failed to add user" } }, "type": "object" } } } } } }, { "path": "/api/user/set-password/{token}", "method": "POST", "operationId": "setUserPassword", "summary": "Set user password", "description": "Sets a password for a user with a valid token", "tags": [ "User Management" ], "security": [], "requiresAuth": false, "parameters": { "path": [ { "name": "token", "type": "string", "format": null, "required": true, "description": "Password set token", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "password", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "newpassword123", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "password" ], "properties": { "password": { "type": "string", "example": "newpassword123" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Password set successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Password set successfully. You can now log in." } }, "type": "object" } } } }, "404": { "description": "Invalid or expired token", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Invalid or expired token." } }, "type": "object" } } } }, "422": { "description": "Validation failed", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Validation failed" }, "errors": { "properties": { "password": { "type": "array", "items": { "type": "string", "example": "The password field is required." } } }, "type": "object" } }, "type": "object" } } } }, "500": { "description": "Failed to set password", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Failed to set password." }, "error": { "type": "string", "example": "Detailed error message" } }, "type": "object" } } } } } }, { "path": "/appointment-status/{id}/{status}", "method": "PUT", "operationId": "updateAppointmentStatus", "summary": "Update appointment status", "description": "Updates the status of an appointment", "tags": [ "Appointments" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "Appointment ID", "in": "path", "enum": null, "example": null }, { "name": "status", "type": "string", "format": null, "required": true, "description": "New status for the appointment", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "204": { "description": "Appointment status updated successfully (No Content)", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "status updated !" } }, "type": "object" } } } }, "404": { "description": "Appointment not found" }, "500": { "description": "Failed to update appointment status" } } }, { "path": "/create-meeting/{meeting_id}", "method": "GET", "operationId": "showMeeting", "summary": "Show meeting details", "description": "Display meeting details by meeting ID", "tags": [ "Meetings" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "meeting_id", "type": "string", "format": null, "required": true, "description": "Meeting ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Meeting details retrieved successfully" }, "404": { "description": "Meeting not found" } } }, { "path": "/delete-inventory/{id}", "method": "DELETE", "operationId": "deleteInventoryItem", "summary": "Delete inventory item", "description": "Deletes an existing inventory item", "tags": [ "Inventory" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "ID of the inventory item to delete", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Inventory deleted successfully" }, "data": { "$ref": "#/components/schemas/InventoryItem" } }, "type": "object" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "This action is unauthorized" } }, "type": "object" } } } }, "404": { "description": "Inventory item not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Inventory item not found" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Error deleting inventory: {error message}" } }, "type": "object" } } } } } }, { "path": "/emr-api/company/complete/setup/{status}", "method": "PUT", "operationId": "completeSetup", "summary": "Complete provider setup", "description": "Mark provider setup as complete or incomplete", "tags": [ "Company" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "status", "type": "integer", "format": null, "required": true, "description": "Setup status (1 for complete, 0 for incomplete)", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Setup status updated successfully", "content": { "application/json": { "schema": { "type": "object" } } } }, "401": { "description": "Unauthenticated" } } }, { "path": "/emr-api/company/status", "method": "GET", "operationId": "getCompanyStatus", "summary": "Get company status", "description": "Get the current company status", "tags": [ "Company" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object" } } } }, "401": { "description": "Unauthenticated" } } }, { "path": "/emr-api/get-company", "method": "GET", "operationId": "getCompany", "summary": "Get company information", "description": "Get detailed information about the provider's company", "tags": [ "Company" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "properties": { "data": { "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "403": { "description": "Unauthorized" } } }, { "path": "/emr-api/provider-register", "method": "POST", "operationId": "registerProvider", "summary": "Register a new provider", "description": "Register a new provider and their company", "tags": [ "Provider", "Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "firstName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "John", "items": null, "properties": null }, { "name": "lastName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Doe", "items": null, "properties": null }, { "name": "username", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "johndoe", "items": null, "properties": null }, { "name": "emailAddress", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "john.doe@example.com", "items": null, "properties": null }, { "name": "textMessageNumber", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "1234567890", "items": null, "properties": null }, { "name": "newUserPassword", "type": "string", "format": "password", "required": true, "description": "", "enum": null, "example": "Password123!", "items": null, "properties": null }, { "name": "company_name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Health Clinic", "items": null, "properties": null }, { "name": "on_your_domain", "type": "boolean", "format": null, "required": false, "description": "", "enum": null, "example": true, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "firstName", "lastName", "username", "emailAddress", "textMessageNumber", "newUserPassword", "company_name" ], "properties": { "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "username": { "type": "string", "example": "johndoe" }, "emailAddress": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "textMessageNumber": { "type": "string", "example": "1234567890" }, "newUserPassword": { "type": "string", "format": "password", "example": "Password123!" }, "company_name": { "type": "string", "example": "Health Clinic" }, "on_your_domain": { "type": "boolean", "example": true } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Provider registered successfully", "content": { "application/json": { "schema": { "properties": { "accessToken": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." }, "userAbilityRules": { "type": "array", "items": { "type": "object" } }, "userData": { "type": "object" }, "permissions": { "type": "array", "items": { "type": "string" } }, "message": { "type": "string", "example": "User LoggedIn" } }, "type": "object" } } } }, "409": { "description": "Email or username already exists", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Email Already Exists!" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Validation Error" }, "messages": { "type": "string" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "messages": { "type": "string", "example": "Error" }, "data": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/emr-api/provider-register", "method": "POST", "operationId": "registerProvider", "summary": "Register a new provider", "description": "Register a new provider and their company", "tags": [ "Provider", "Authentication" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "firstName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "John", "items": null, "properties": null }, { "name": "lastName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Doe", "items": null, "properties": null }, { "name": "username", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "johndoe", "items": null, "properties": null }, { "name": "emailAddress", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "john.doe@example.com", "items": null, "properties": null }, { "name": "textMessageNumber", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "1234567890", "items": null, "properties": null }, { "name": "newUserPassword", "type": "string", "format": "password", "required": true, "description": "", "enum": null, "example": "Password123!", "items": null, "properties": null }, { "name": "company_name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Health Clinic", "items": null, "properties": null }, { "name": "on_your_domain", "type": "boolean", "format": null, "required": false, "description": "", "enum": null, "example": true, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "firstName", "lastName", "username", "emailAddress", "textMessageNumber", "newUserPassword", "company_name" ], "properties": { "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "username": { "type": "string", "example": "johndoe" }, "emailAddress": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "textMessageNumber": { "type": "string", "example": "1234567890" }, "newUserPassword": { "type": "string", "format": "password", "example": "Password123!" }, "company_name": { "type": "string", "example": "Health Clinic" }, "on_your_domain": { "type": "boolean", "example": true } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Provider registered successfully", "content": { "application/json": { "schema": { "properties": { "accessToken": { "type": "string", "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." }, "userAbilityRules": { "type": "array", "items": { "type": "object" } }, "userData": { "type": "object" }, "permissions": { "type": "array", "items": { "type": "string" } }, "message": { "type": "string", "example": "User LoggedIn" } }, "type": "object" } } } }, "409": { "description": "Email or username already exists", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Email Already Exists!" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Validation Error" }, "messages": { "type": "string" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "messages": { "type": "string", "example": "Error" }, "data": { "type": "string" } }, "type": "object" } } } } } }, { "path": "/emr-api/provider-wizard-setup", "method": "GET", "operationId": "getCounts", "summary": "Get provider setup counts", "description": "Get counts of various setup items for the provider wizard", "tags": [ "Provider" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "properties": { "total_form": { "type": "integer", "example": 5 }, "signature_count": { "type": "integer", "example": 1 }, "product_count": { "type": "integer", "example": 10 }, "product_cate_count": { "type": "integer", "example": 3 }, "affliate_product_count": { "type": "integer", "example": 2 }, "sync_google_account": { "type": "boolean", "example": true }, "payment_method_setup": { "type": "boolean", "example": true }, "on_your_domain": { "type": "boolean", "example": true }, "method": { "type": "object", "nullable": true }, "company": { "type": "object", "nullable": true } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" } } }, { "path": "/emr-api/store-company", "method": "POST", "operationId": "updateCompany", "summary": "Update company information", "description": "Update company details including logo, contact information, and domain settings", "tags": [ "Company" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "", "enum": null, "example": 1, "items": null, "properties": null }, { "name": "company_name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Health Clinic", "items": null, "properties": null }, { "name": "company_phone", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "1234567890", "items": null, "properties": null }, { "name": "company_email", "type": "string", "format": "email", "required": true, "description": "", "enum": null, "example": "info@healthclinic.com", "items": null, "properties": null }, { "name": "address", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "123 Main St", "items": null, "properties": null }, { "name": "domain_name", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "healthclinic.com", "items": null, "properties": null }, { "name": "city", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "New York", "items": null, "properties": null }, { "name": "state", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "NY", "items": null, "properties": null }, { "name": "zip", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "10001", "items": null, "properties": null }, { "name": "header_scripts", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "footer_scripts", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "logo", "type": "string", "format": "binary", "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "multipart/form-data": { "schema": { "required": [ "id", "company_name", "company_email" ], "properties": { "id": { "type": "integer", "example": 1 }, "company_name": { "type": "string", "example": "Health Clinic" }, "company_phone": { "type": "string", "example": "1234567890" }, "company_email": { "type": "string", "format": "email", "example": "info@healthclinic.com" }, "address": { "type": "string", "example": "123 Main St" }, "domain_name": { "type": "string", "example": "healthclinic.com" }, "city": { "type": "string", "example": "New York" }, "state": { "type": "string", "example": "NY" }, "zip": { "type": "string", "example": "10001" }, "header_scripts": { "type": "string" }, "footer_scripts": { "type": "string" }, "logo": { "type": "string", "format": "binary" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Company updated successfully", "content": { "application/json": { "schema": { "properties": { "data": { "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "409": { "description": "Email already exists", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Email Already Exists!" } }, "type": "object" } } } }, "422": { "description": "Validation error" } } }, { "path": "/get-asseblyai-token", "method": "POST", "operationId": "getAsseblyAiToekn", "summary": "Get AssemblyAI token", "description": "Retrieves an AssemblyAI token for transcription services", "tags": [ "Meetings" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Token retrieved successfully", "content": { "application/json": { "schema": { "properties": { "token": { "type": "string", "example": "9f98sd7f9sd87f9sd87f9sd87f" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Failed to retrieve token" } }, "type": "object" } } } } } }, { "path": "/get-insurance/{patientId}", "method": "GET", "operationId": "getInsurance", "summary": "Get insurance information for a patient", "description": "Retrieves the insurance details for a specific patient", "tags": [ "Insurance" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "ID of the patient", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Insurance data retrieved successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Insurance Listing" }, "data": { "properties": { "insuranceId": { "type": "integer", "example": 1 }, "insuredPlanOrProgramName": { "type": "string", "example": "Blue Cross" }, "insuredIDNumber": { "type": "string", "example": "BC123456" }, "insuredGroupNameNo": { "type": "string", "example": "GRP123" }, "payerName": { "type": "string", "example": "John Doe" }, "relationshiptoInsured": { "type": "string", "example": "Self" }, "insuredDateOfBirth": { "type": "string", "format": "date", "example": "1980-01-01" }, "payerAddress": { "type": "string", "example": "123 Main St" }, "payerZip": { "type": "string", "example": "12345" }, "payerCity": { "type": "string", "example": "Anytown" }, "payerState": { "type": "string", "example": "CA" }, "payerCountry": { "type": "string", "example": "USA" }, "insuredPhone": { "type": "string", "example": "555-123-4567" }, "coPayment": { "type": "number", "format": "float", "example": 20 }, "type": { "type": "string", "example": "primary" }, "subscriber_mname": { "type": "string", "example": "" }, "subscriber_ss": { "type": "string", "example": "" }, "subscriber_employer": { "type": "string", "example": "ABC Company" }, "subscriber_employer_street": { "type": "string", "example": "456 Business Ave" }, "subscriber_employer_postal_code": { "type": "string", "example": "54321" }, "subscriber_employer_state": { "type": "string", "example": "CA" }, "subscriber_employer_country": { "type": "string", "example": "USA" }, "subscriber_employer_city": { "type": "string", "example": "Business City" }, "date": { "type": "string", "format": "date-time", "example": "2023-01-01 12:00:00" }, "subscriber_sex": { "type": "string", "example": "M" }, "accept_assignment": { "type": "string", "example": "" }, "policy_type": { "type": "string", "example": "" } }, "type": "object" } }, "type": "object" } } } }, "404": { "description": "Insurance data not found", "content": { "application/json": { "schema": { "properties": { "data": { "type": "null", "example": null } }, "type": "object" } } } } } }, { "path": "/get-inventory/{id}", "method": "GET", "operationId": "getInventoryItemById", "summary": "Get inventory item by ID", "description": "Retrieves a specific inventory item by its ID", "tags": [ "Inventory" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "ID of the inventory item", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": true }, "data": { "$ref": "#/components/schemas/InventoryItem" } }, "type": "object" } } } }, "404": { "description": "Inventory item not found", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Inventory item not found" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "Error retrieving inventory: {error message}" } }, "type": "object" } } } } } }, { "path": "/get-realtime-questions/{appointmentId}", "method": "GET", "operationId": "getRealtimeQuestions", "summary": "Get real-time questions", "description": "Retrieves real-time questions generated during a session", "tags": [ "Meetings" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "appointmentId", "type": "integer", "format": null, "required": true, "description": "Appointment ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Questions retrieved successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Success" }, "Response": { "type": "string", "example": "Success" }, "questions": { "type": "array", "items": { "properties": { "id": { "type": "integer" }, "appointment_id": { "type": "integer" }, "question": { "type": "string" }, "timestamp": { "type": "string", "format": "date-time" } }, "type": "object" } }, "transcription_status": { "type": "string" } }, "type": "object" } } } }, "404": { "description": "Appointment not found" }, "500": { "description": "Failed to retrieve questions" } } }, { "path": "/inventory", "method": "GET", "operationId": "listInventoryItems", "summary": "Get inventory list", "description": "Retrieves a list of all inventory items for the current provider", "tags": [ "Inventory" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "properties": { "draw": { "type": "integer", "example": 1 }, "recordsTotal": { "type": "integer", "example": 100 }, "recordsFiltered": { "type": "integer", "example": 10 }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "inventoryType": { "type": "string", "example": "Medication" }, "item_name": { "type": "string", "example": "Aspirin 325mg" }, "manufPartNo": { "type": "string", "example": "ASP325" }, "barcode": { "type": "string", "example": "123456789" }, "isTaxable": { "type": "string", "example": "Yes" }, "vendor_name": { "type": "string", "example": "Pharma Inc." }, "price": { "type": "number", "format": "float", "example": 10.99 }, "cost": { "type": "number", "format": "float", "example": 5.99 }, "onhand": { "type": "number", "example": 100 }, "expirationDate": { "type": "string", "format": "date", "example": "2023-12-31" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Unauthenticated" } }, "type": "object" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "This action is unauthorized" } }, "type": "object" } } } } } }, { "path": "/join-meeting/{meeting_id}", "method": "GET", "operationId": "joinMeeting", "summary": "Join a meeting", "description": "Join a meeting by meeting ID", "tags": [ "Meetings" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "meeting_id", "type": "string", "format": null, "required": true, "description": "Meeting ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Joined meeting successfully" }, "404": { "description": "Meeting not found" } } }, { "path": "/patient/me", "method": "GET", "operationId": "getPatientDetailsByAccessToken", "summary": "Get patient details by access token", "description": "Retrieves authenticated patient's profile details using the access token", "tags": [ "Authentication" ], "security": [ { "accessToken": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Patient details retrieved successfully", "content": { "application/json": { "schema": { "properties": { "userAbilityRules": { "type": "array", "items": { "properties": { "action": { "type": "string", "example": "manage" }, "subject": { "type": "string", "example": "all" } }, "type": "object" } }, "userData": { "properties": { "id": { "type": "integer", "example": 1 }, "firstName": { "type": "string", "example": "John" }, "lastName": { "type": "string", "example": "Doe" }, "email": { "type": "string", "format": "email", "example": "john.doe@example.com" }, "phone": { "type": "string", "example": "1234567890" }, "time_zone": { "type": "string", "example": "America/New_York" }, "dob": { "type": "string", "format": "date", "example": "1990-01-01" }, "gender": { "type": "string", "example": "Male" }, "registrationDate": { "type": "string", "format": "date", "example": "2023-01-01" }, "practitioner_id": { "type": "integer", "example": 1 }, "provider_id": { "type": "integer", "example": 1 }, "user_type": { "type": "string", "example": "patient" }, "company": { "type": "string", "example": "Health Guru Hub" }, "fullName": { "type": "string", "example": "John Doe" }, "order_id": { "type": "integer", "example": null, "nullable": true }, "pending_task": { "type": "string", "example": null, "nullable": true }, "builder_id": { "type": "integer", "example": null, "nullable": true }, "completed_task": { "type": "string", "example": null, "nullable": true }, "forms": { "type": "array", "items": { "type": "integer" } } }, "type": "object" }, "message": { "type": "string", "example": "User LoggedIn" } }, "type": "object" } } } }, "400": { "description": "Invalid token format", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Invalid token format" } }, "type": "object" } } } }, "401": { "description": "Invalid access token", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Invalid access token" } }, "type": "object" } } } }, "404": { "description": "Patient not found", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Patient not found" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "An error occurred while retrieving patient details." }, "exception": { "type": "string", "example": "Error message" } }, "type": "object" } } } } } }, { "path": "/phone-log-list/{patient_id}", "method": "GET", "operationId": "getPhoneLogList", "summary": "Get phone logs for a patient", "description": "Retrieves all phone logs for a specific patient in DataTables format", "tags": [ "Phone Logs" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patient_id", "type": "integer", "format": null, "required": true, "description": "ID of the patient", "in": "path", "enum": null, "example": null } ], "query": [ { "name": "draw", "type": "integer", "format": null, "required": false, "description": "Draw counter for DataTables", "in": "query", "enum": null, "example": null }, { "name": "start", "type": "integer", "format": null, "required": false, "description": "Paging first record indicator for DataTables", "in": "query", "enum": null, "example": null }, { "name": "length", "type": "integer", "format": null, "required": false, "description": "Number of records per page for DataTables", "in": "query", "enum": null, "example": null } ], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Phone logs retrieved successfully", "content": { "application/json": { "schema": { "properties": { "draw": { "type": "integer", "example": 1 }, "recordsTotal": { "type": "integer", "example": 10 }, "recordsFiltered": { "type": "integer", "example": 10 }, "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "provider": { "type": "string", "example": "Dr. Smith" }, "message": { "type": "string", "example": "Discussed medication changes" }, "patient_id": { "type": "integer", "example": 123 }, "date": { "type": "string", "format": "date-time", "example": "2023-01-01 12:00:00" } }, "type": "object" } } }, "type": "object" } } } }, "403": { "description": "Unauthorized access", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "This action is unauthorized." } }, "type": "object" } } } } } }, { "path": "/provider/me", "method": "GET", "operationId": "getProviderDetailsByAccessToken", "summary": "Get provider details by access token", "description": "Retrieves authenticated provider's profile details using the access token", "tags": [ "Authentication" ], "security": [ { "accessToken": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Provider details retrieved successfully", "content": { "application/json": { "schema": { "properties": { "userAbilityRules": { "type": "array", "items": { "properties": { "action": { "type": "string", "example": "manage" }, "subject": { "type": "string", "example": "all" } }, "type": "object" } }, "userData": { "properties": { "id": { "type": "integer", "example": 1 }, "uuid": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440000" }, "fullName": { "type": "string", "example": "Dr. Jane Smith" }, "username": { "type": "string", "example": "drjane" }, "avatar": { "type": "string", "example": "base64encodedstring" }, "email": { "type": "string", "format": "email", "example": "jane.smith@example.com" }, "role": { "type": "string", "example": "provider" }, "google_sync_status": { "type": "boolean", "example": true }, "role_name": { "type": "string", "example": "Doctor" }, "user_type": { "type": "string", "example": "practitioner" }, "company": { "type": "string", "example": "Health Guru Hub" }, "time_zone": { "type": "string", "example": "America/New_York" }, "dummy_practitioner": { "type": "boolean", "example": false } }, "type": "object" }, "permissions": { "type": "object" }, "message": { "type": "string", "example": "User LoggedIn" } }, "type": "object" } } } }, "400": { "description": "Invalid token format", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Invalid token format" } }, "type": "object" } } } }, "401": { "description": "Invalid access token", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "Invalid access token" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "example": "An error occurred while retrieving provider details." }, "exception": { "type": "string", "example": "Error message" } }, "type": "object" } } } } } }, { "path": "/room-joined/event", "method": "POST", "operationId": "livekitWebhook", "summary": "LiveKit webhook handler", "description": "Handles LiveKit room events and recording operations", "tags": [ "LiveKit" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "event", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "room_started", "items": null, "properties": null }, { "name": "room", "type": "object", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null }, { "name": "egressInfo", "type": "object", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": false, "description": "", "content": { "application/json": { "schema": { "properties": { "event": { "type": "string", "example": "room_started" }, "room": { "type": "object" }, "egressInfo": { "type": "object" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Event processed successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Success" }, "Response": { "type": "string", "example": "Success" }, "egress_id": { "type": "string" } }, "type": "object" } } } }, "500": { "description": "Failed to process event" } } }, { "path": "/room-joined/event-transcription", "method": "POST", "operationId": "getRecordingUrl", "summary": "Get recording URL", "description": "Retrieves the URL for a meeting recording", "tags": [ "LiveKit" ], "security": [], "requiresAuth": false, "parameters": { "path": [], "query": [], "body": [ { "name": "egressInfo", "type": "object", "format": null, "required": false, "description": "", "enum": null, "example": null, "items": null, "properties": { "roomName": { "type": "string", "example": "appointment-123" } } } ], "header": [] }, "requestBody": { "required": false, "description": "", "content": { "application/json": { "schema": { "properties": { "egressInfo": { "properties": { "roomName": { "type": "string", "example": "appointment-123" } }, "type": "object" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Recording URL retrieved successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Success" }, "Response": { "type": "string", "example": "Success" }, "video_url": { "type": "string" }, "filename": { "type": "string" }, "transcription": { "type": "string", "nullable": true }, "transcription_status": { "type": "string", "nullable": true } }, "type": "object" } } } }, "400": { "description": "Invalid request" }, "404": { "description": "Appointment not found" }, "500": { "description": "Failed to retrieve recording URL" } } }, { "path": "/save-payment-method", "method": "POST", "operationId": "storePaymentMethodConfigProvider", "summary": "Save payment method configuration", "description": "Store or update payment method configuration for the provider", "tags": [ "Provider" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [], "query": [], "body": [ { "name": "name", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Stripe", "items": null, "properties": null }, { "name": "config", "type": "object", "format": null, "required": true, "description": "", "enum": null, "example": { "api_key": "sk_test_123", "public_key": "pk_test_456" }, "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "name", "config" ], "properties": { "name": { "type": "string", "example": "Stripe" }, "config": { "type": "object", "example": { "api_key": "sk_test_123", "public_key": "pk_test_456" } } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Payment method configuration saved successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Updated Successfully!" }, "data": { "type": "object" } }, "type": "object" } } } }, "401": { "description": "Unauthenticated" }, "422": { "description": "Validation error" } } }, { "path": "/store-insurance/{patientId}", "method": "POST", "operationId": "insuranceStore", "summary": "Store insurance information for a patient", "description": "Creates or updates insurance information for a specific patient", "tags": [ "Insurance" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "ID of the patient", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "insurance", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Blue Cross", "items": null, "properties": null }, { "name": "insuredPlanOrProgramName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Blue Cross PPO", "items": null, "properties": null }, { "name": "insuredIDNumber", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "BC123456", "items": null, "properties": null }, { "name": "insuredGroupNameNo", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "GRP123", "items": null, "properties": null }, { "name": "employersSchoolName", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "ABC Company", "items": null, "properties": null }, { "name": "relationshiptoInsured", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Self", "items": null, "properties": null }, { "name": "insuredName", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "John Doe", "items": null, "properties": null }, { "name": "insuredDateOfBirth", "type": "string", "format": "date", "required": true, "description": "", "enum": null, "example": "1980-01-01", "items": null, "properties": null }, { "name": "insuredGender", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "M", "items": null, "properties": null }, { "name": "coPayment", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 20, "items": null, "properties": null }, { "name": "coInsurance", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 20, "items": null, "properties": null }, { "name": "insuranceDeductible", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 500, "items": null, "properties": null }, { "name": "insuredAddress", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "123 Main St", "items": null, "properties": null }, { "name": "insuredCity", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Anytown", "items": null, "properties": null }, { "name": "insuredState", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "CA", "items": null, "properties": null }, { "name": "insuredZip", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "12345", "items": null, "properties": null }, { "name": "insuredPhone", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "555-123-4567", "items": null, "properties": null }, { "name": "payerName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "John Doe", "items": null, "properties": null }, { "name": "payerID", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "PAY123", "items": null, "properties": null }, { "name": "payerAddress", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "456 Payer St", "items": null, "properties": null }, { "name": "payerCity", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Payertown", "items": null, "properties": null }, { "name": "payerState", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "CA", "items": null, "properties": null }, { "name": "payerZip", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "54321", "items": null, "properties": null }, { "name": "referringProviderName", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Dr. Jane Smith", "items": null, "properties": null }, { "name": "referringProviderNPI", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "1234567890", "items": null, "properties": null }, { "name": "referringProviderTaxonomy", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "207Q00000X", "items": null, "properties": null }, { "name": "type", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "primary", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "insuredPlanOrProgramName", "insuredIDNumber", "relationshiptoInsured", "insuredDateOfBirth", "insuredAddress", "insuredCity", "insuredState", "insuredZip", "insuredPhone", "payerName", "payerID", "payerAddress", "payerCity", "payerState", "payerZip", "type" ], "properties": { "insurance": { "type": "string", "example": "Blue Cross" }, "insuredPlanOrProgramName": { "type": "string", "example": "Blue Cross PPO" }, "insuredIDNumber": { "type": "string", "example": "BC123456" }, "insuredGroupNameNo": { "type": "string", "example": "GRP123" }, "employersSchoolName": { "type": "string", "example": "ABC Company" }, "relationshiptoInsured": { "type": "string", "example": "Self" }, "insuredName": { "type": "string", "example": "John Doe" }, "insuredDateOfBirth": { "type": "string", "format": "date", "example": "1980-01-01" }, "insuredGender": { "type": "string", "example": "M" }, "coPayment": { "type": "number", "format": "float", "example": 20 }, "coInsurance": { "type": "number", "format": "float", "example": 20 }, "insuranceDeductible": { "type": "number", "format": "float", "example": 500 }, "insuredAddress": { "type": "string", "example": "123 Main St" }, "insuredCity": { "type": "string", "example": "Anytown" }, "insuredState": { "type": "string", "example": "CA" }, "insuredZip": { "type": "string", "example": "12345" }, "insuredPhone": { "type": "string", "example": "555-123-4567" }, "payerName": { "type": "string", "example": "John Doe" }, "payerID": { "type": "string", "example": "PAY123" }, "payerAddress": { "type": "string", "example": "456 Payer St" }, "payerCity": { "type": "string", "example": "Payertown" }, "payerState": { "type": "string", "example": "CA" }, "payerZip": { "type": "string", "example": "54321" }, "referringProviderName": { "type": "string", "example": "Dr. Jane Smith" }, "referringProviderNPI": { "type": "string", "example": "1234567890" }, "referringProviderTaxonomy": { "type": "string", "example": "207Q00000X" }, "type": { "type": "string", "example": "primary" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Insurance created successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Insurance created" }, "status": { "type": "integer", "example": 200 }, "data": { "type": "object" }, "patientId": { "type": "integer", "example": 1 } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The given data was invalid." }, "errors": { "properties": { "insuredPlanOrProgramName": { "type": "array", "items": { "type": "string", "example": "The insurance plan or program name field is required." } } }, "type": "object" } }, "type": "object" } } } } } }, { "path": "/store-tags/{patientId}", "method": "POST", "operationId": "storeTagsAlternate", "summary": "Store tags for a patient (alternate endpoint)", "description": "Clears all previous tags and stores new tags for a specific patient", "tags": [ "Tags" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "tags", "type": "array", "format": null, "required": true, "description": "Array of tag names to be associated with the patient", "enum": null, "example": null, "items": { "type": "string", "example": "hypertension" }, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "tags" ], "properties": { "tags": { "description": "Array of tag names to be associated with the patient", "type": "array", "items": { "type": "string", "example": "hypertension" } } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Tags stored successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Tags stored" } }, "type": "object" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Invalid request data" } }, "type": "object" } } } } } }, { "path": "/tags/list/{pid}", "method": "GET", "operationId": "getTags", "summary": "Get tags for a patient", "description": "Retrieves all tags associated with a specific patient", "tags": [ "Tags" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "pid", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [], "header": [] }, "requestBody": null, "responses": { "200": { "description": "Tags retrieved successfully", "content": { "application/json": { "schema": { "properties": { "tags": { "description": "Array of tag names associated with the patient", "type": "array", "items": { "type": "string", "example": "diabetes" } } }, "type": "object" } } } }, "404": { "description": "No tags found", "content": { "application/json": { "schema": { "properties": { "tags": { "type": "array", "items": { "type": "string" }, "example": [] } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "An error occurred while retrieving tags" } }, "type": "object" } } } } } }, { "path": "/tags/store/{pid}", "method": "POST", "operationId": "storeTags", "summary": "Store tags for a patient", "description": "Clears all previous tags and stores new tags for a specific patient", "tags": [ "Tags" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "pid", "type": "integer", "format": null, "required": true, "description": "Patient ID", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "tags", "type": "array", "format": null, "required": true, "description": "Array of tag names to be associated with the patient", "enum": null, "example": null, "items": { "type": "string", "example": "diabetes" }, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "tags" ], "properties": { "tags": { "description": "Array of tag names to be associated with the patient", "type": "array", "items": { "type": "string", "example": "diabetes" } } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Tags stored successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Tags stored" } }, "type": "object" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Invalid request data" } }, "type": "object" } } } }, "500": { "description": "Server error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "An error occurred while storing tags" } }, "type": "object" } } } } } }, { "path": "/update-insurance/{patientId}", "method": "PUT", "operationId": "updateInsurance", "summary": "Update insurance information for a patient", "description": "Updates the existing insurance information for a specific patient", "tags": [ "Insurance" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "patientId", "type": "integer", "format": null, "required": true, "description": "ID of the patient", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "insuredPlanOrProgramName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Blue Cross PPO", "items": null, "properties": null }, { "name": "insuredIDNumber", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "BC123456", "items": null, "properties": null }, { "name": "insuredGroupNameNo", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "GRP123", "items": null, "properties": null }, { "name": "relationshiptoInsured", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Self", "items": null, "properties": null }, { "name": "insuredDateOfBirth", "type": "string", "format": "date", "required": true, "description": "", "enum": null, "example": "1980-01-01", "items": null, "properties": null }, { "name": "insuredAddress", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "123 Main St", "items": null, "properties": null }, { "name": "insuredCity", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "Anytown", "items": null, "properties": null }, { "name": "insuredState", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "CA", "items": null, "properties": null }, { "name": "insuredZip", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "12345", "items": null, "properties": null }, { "name": "insuredPhone", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "555-123-4567", "items": null, "properties": null }, { "name": "payerName", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "John Doe", "items": null, "properties": null }, { "name": "coPayment", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 20, "items": null, "properties": null }, { "name": "type", "type": "string", "format": null, "required": true, "description": "", "enum": null, "example": "primary", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "required": [ "insuredPlanOrProgramName", "insuredIDNumber", "relationshiptoInsured", "insuredDateOfBirth", "insuredAddress", "insuredCity", "insuredState", "insuredZip", "insuredPhone", "payerName", "type" ], "properties": { "insuredPlanOrProgramName": { "type": "string", "example": "Blue Cross PPO" }, "insuredIDNumber": { "type": "string", "example": "BC123456" }, "insuredGroupNameNo": { "type": "string", "example": "GRP123" }, "relationshiptoInsured": { "type": "string", "example": "Self" }, "insuredDateOfBirth": { "type": "string", "format": "date", "example": "1980-01-01" }, "insuredAddress": { "type": "string", "example": "123 Main St" }, "insuredCity": { "type": "string", "example": "Anytown" }, "insuredState": { "type": "string", "example": "CA" }, "insuredZip": { "type": "string", "example": "12345" }, "insuredPhone": { "type": "string", "example": "555-123-4567" }, "payerName": { "type": "string", "example": "John Doe" }, "coPayment": { "type": "number", "format": "float", "example": 20 }, "type": { "type": "string", "example": "primary" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Insurance updated successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Updated Successfully!" } }, "type": "object" } } } }, "404": { "description": "Insurance record not found", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Insurance record not found" } }, "type": "object" } } } } } }, { "path": "/update-inventory/{id}", "method": "PUT", "operationId": "updateInventoryItem", "summary": "Update inventory item", "description": "Updates an existing inventory item", "tags": [ "Inventory" ], "security": [ { "bearerAuth": [] } ], "requiresAuth": true, "parameters": { "path": [ { "name": "id", "type": "integer", "format": null, "required": true, "description": "ID of the inventory item to update", "in": "path", "enum": null, "example": null } ], "query": [], "body": [ { "name": "inventoryType", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Medication", "items": null, "properties": null }, { "name": "item_name", "type": "string", "format": null, "required": false, "description": "", "enum": null, "example": "Aspirin 325mg", "items": null, "properties": null }, { "name": "price", "type": "number", "format": "float", "required": false, "description": "", "enum": null, "example": 10.99, "items": null, "properties": null }, { "name": "expirationDate", "type": "string", "format": "date", "required": false, "description": "", "enum": null, "example": "2023-12-31", "items": null, "properties": null } ], "header": [] }, "requestBody": { "required": true, "description": "", "content": { "application/json": { "schema": { "properties": { "inventoryType": { "type": "string", "example": "Medication" }, "item_name": { "type": "string", "example": "Aspirin 325mg" }, "price": { "type": "number", "format": "float", "example": 10.99 }, "expirationDate": { "type": "string", "format": "date", "example": "2023-12-31" } }, "type": "object" }, "examples": {} } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "properties": { "data": { "$ref": "#/components/schemas/InventoryItem" }, "message": { "type": "string", "example": "Inventory updated sucessfully!" } }, "type": "object" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "This action is unauthorized" } }, "type": "object" } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "The given data was invalid." }, "errors": { "properties": { "item_name": { "type": "array", "items": { "type": "string", "example": "The item name field is required." } } }, "type": "object" } }, "type": "object" } } } } } } ]