Files
mcp-tool/api-docs-analysis.json
nasir@endelospay.com 8c74b0e23f first
2025-07-11 20:22:12 +05:00

36798 lines
1.0 MiB

{
"summary": {
"totalEndpoints": 184,
"authenticatedEndpoints": 149,
"publicEndpoints": 35,
"tags": [
"Appointment",
"Appointment Reports",
"Appointments",
"Assistant",
"Authentication",
"Company",
"Consent Forms",
"Doctors",
"Documents",
"Emails",
"Forms",
"Forms Management",
"Insurance",
"Intake Forms",
"Inventory",
"Labs",
"LiveKit",
"Locations",
"Medical Problems",
"Meetings",
"Notes",
"Orders",
"Patient Authentication",
"Patient Data",
"Patient Forms",
"Patient Medical",
"Patient Payment",
"Patient Profile",
"Patient Subscription",
"Patient Summary",
"Patients",
"Payments",
"Phone Logs",
"Product Sync",
"Products",
"Provider",
"Tags",
"Tasks",
"Token Management",
"User Management",
"Vitals"
]
},
"endpointsByTag": {
"Meetings": [
{
"path": "/get-asseblyai-token",
"method": "POST",
"operationId": "getAsseblyAiToekn",
"summary": "Get AssemblyAI token",
"description": "Retrieves an AssemblyAI token for transcription services",
"tags": [
"Meetings"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/create-meeting/{meeting_id}",
"method": "GET",
"operationId": "showMeeting",
"summary": "Show meeting details",
"description": "Display meeting details by meeting ID",
"tags": [
"Meetings"
],
"parameters": [
{
"name": "meeting_id",
"in": "path",
"required": true,
"type": "string",
"description": "Meeting ID"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "Meeting details retrieved successfully"
},
"404": {
"description": "Meeting not found"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/join-meeting/{meeting_id}",
"method": "GET",
"operationId": "joinMeeting",
"summary": "Join a meeting",
"description": "Join a meeting by meeting ID",
"tags": [
"Meetings"
],
"parameters": [
{
"name": "meeting_id",
"in": "path",
"required": true,
"type": "string",
"description": "Meeting ID"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "Joined meeting successfully"
},
"404": {
"description": "Meeting not found"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
},
{
"name": "agent_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Agent ID"
},
{
"name": "appointment_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"properties": {
"title": {
"type": "string",
"example": "Consultation call"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "appointmentId",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/end-call/{patient_id}/{appointment_id}",
"method": "POST",
"operationId": "endCall",
"summary": "End a call",
"description": "End an active video call",
"tags": [
"Meetings"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
},
{
"name": "appointment_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"LiveKit": [
{
"path": "/room-joined/event",
"method": "POST",
"operationId": "livekitWebhook",
"summary": "LiveKit webhook handler",
"description": "Handles LiveKit room events and recording operations",
"tags": [
"LiveKit"
],
"parameters": [],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"properties": {
"event": {
"type": "string",
"example": "room_started"
},
"room": {
"type": "object"
},
"egressInfo": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": []
},
{
"path": "/room-joined/event-transcription",
"method": "POST",
"operationId": "getRecordingUrl",
"summary": "Get recording URL",
"description": "Retrieves the URL for a meeting recording",
"tags": [
"LiveKit"
],
"parameters": [],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"properties": {
"egressInfo": {
"properties": {
"roomName": {
"type": "string",
"example": "appointment-123"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": []
}
],
"Labs": [
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"address"
],
"properties": {
"address": {
"type": "string",
"example": "123 Main St"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "appointment",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Appointments": [
{
"path": "/api/book-appointment",
"method": "POST",
"operationId": "bookAgentAppointment",
"summary": "Book an appointment",
"description": "Books a new appointment with a doctor",
"tags": [
"Appointments"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-appointment-list",
"method": "POST",
"operationId": "getAppointmentList",
"summary": "Get appointments list",
"description": "Retrieves a list of all appointments",
"tags": [
"Appointments"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "date",
"in": "path",
"required": true,
"type": "string",
"description": "Date (YYYY-MM-DD)"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/appointment-detail/{appointment}",
"method": "POST",
"operationId": "appointmentDetail",
"summary": "Get appointment details",
"description": "Retrieves detailed information about a specific appointment",
"tags": [
"Appointments"
],
"parameters": [
{
"name": "appointment",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "appointment",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/appointment-status/{id}/{status}",
"method": "PUT",
"operationId": "updateAppointmentStatus",
"summary": "Update appointment status",
"description": "Updates the status of an appointment",
"tags": [
"Appointments"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
},
{
"name": "status",
"in": "path",
"required": true,
"type": "string",
"description": "New status for the appointment"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"date": {
"type": "string",
"format": "date",
"example": "2023-07-01"
},
"practitioner_id": {
"type": "integer",
"example": 1
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-appointment-by-id",
"method": "POST",
"operationId": "getAppointmentByID",
"summary": "Get appointment by ID",
"description": "Retrieves details of a specific appointment",
"tags": [
"Appointments"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"appointment_id"
],
"properties": {
"appointment_id": {
"type": "integer",
"example": 123
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Appointment retrieved successfully",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"404": {
"description": "Appointment not found"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "appointment_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "start_date",
"in": "query",
"required": true,
"type": "string",
"description": "Start date (YYYY-MM-DD)"
},
{
"name": "end_date",
"in": "query",
"required": true,
"type": "string",
"description": "End date (YYYY-MM-DD)"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/emr/appointment/{appointment}/detail",
"method": "GET",
"operationId": "getAppointmentDetailUnique",
"summary": "Get appointment details",
"description": "Fetches detailed information about an appointment",
"tags": [
"Appointments"
],
"parameters": [
{
"name": "appointment",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "appointment",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "appointment",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"description": "Meeting analytics data",
"type": "object"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient-book-appointment",
"method": "POST",
"operationId": "bookAppointmentPatient",
"summary": "Book a patient appointment",
"description": "Books a new appointment for a patient",
"tags": [
"Appointments"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": []
}
],
"Patients": [
{
"path": "/api/update-patient-info/{patientId}",
"method": "POST",
"operationId": "updateInfo",
"summary": "Update patient information",
"description": "Updates patient's personal information",
"tags": [
"Patients"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-patient-info/{patientId}",
"method": "POST",
"operationId": "getInfo",
"summary": "Get patient information",
"description": "Retrieves patient's personal information",
"tags": [
"Patients"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "firstName",
"in": "query",
"required": false,
"type": "string",
"description": "Filter by patient's first name"
},
{
"name": "lastName",
"in": "query",
"required": false,
"type": "string",
"description": "Filter by patient's last name"
},
{
"name": "dateOfBirth",
"in": "query",
"required": false,
"type": "string",
"description": "Filter by patient's date of birth (YYYY-MM-DD)"
},
{
"name": "email",
"in": "query",
"required": false,
"type": "string",
"description": "Filter by patient's email"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/patient/register-patient",
"method": "POST",
"operationId": "registerPatientForPatient",
"summary": "Register a new patient",
"description": "Creates a new patient account",
"tags": [
"Patients"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Doctors": [
{
"path": "/api/get-doctors-list",
"method": "POST",
"operationId": "getDoctorList",
"summary": "Get doctors list",
"description": "Retrieves a list of all doctors",
"tags": [
"Doctors"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Notes": [
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-note-patient",
"method": "GET",
"operationId": "getNotePatient",
"summary": "Get patient notes",
"description": "Retrieves all notes for the authenticated patient",
"tags": [
"Notes"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Patient Data": [
{
"path": "/api/patient-data/{id}",
"method": "GET",
"operationId": "getAssistantPatientData",
"summary": "Get patient data",
"description": "Retrieves detailed information about a patient",
"tags": [
"Patient Data"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": []
}
],
"Forms": [
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-all-forms",
"method": "GET",
"operationId": "getAllForms",
"summary": "Get all forms",
"description": "Retrieves a list of all available forms",
"tags": [
"Forms"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Form data updated successfully"
},
"201": {
"description": "Form data stored successfully"
},
"400": {
"description": "Invalid input"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/assistant/store-form",
"method": "POST",
"operationId": "assistantFormDataStore",
"summary": "Store form data",
"description": "Creates a new form template",
"tags": [
"Forms"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Form stored successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"form": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"400": {
"description": "Invalid input"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/assistant/update-form/{id}",
"method": "PUT",
"operationId": "updateAssistantForm",
"summary": "Update form",
"description": "Updates an existing form template",
"tags": [
"Forms"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/form-pdf-save",
"method": "POST",
"operationId": "saveFormFile",
"summary": "Save form file",
"description": "Saves a PDF file for a form",
"tags": [
"Forms"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Form file saved successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string",
"description": "Action type (download or view)"
}
],
"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"
}
}
}
}
},
"security": []
}
],
"Assistant": [
{
"path": "/api/store-company",
"method": "POST",
"operationId": "updateCompanyAssistant",
"summary": "Update company information",
"description": "Updates company profile information and logo",
"tags": [
"Assistant"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/save-payment-method",
"method": "POST",
"operationId": "storePaymentMethodConfigAssistant",
"summary": "Store payment method configuration",
"description": "Stores payment method configuration settings",
"tags": [
"Assistant"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Payment method configuration stored successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "status",
"in": "path",
"required": true,
"type": "string",
"description": "Setup status (complete or incomplete)"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Products": [
{
"path": "/api/save-category",
"method": "POST",
"operationId": "storeCategory",
"summary": "Store product category",
"description": "Creates a new product category",
"tags": [
"Products"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"example": "Supplements"
},
"description": {
"type": "string",
"example": "Nutritional supplements and vitamins"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Category stored successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"category": {
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/update-category/{id}",
"method": "POST",
"operationId": "updateCategory",
"summary": "Update product category",
"description": "Updates an existing product category",
"tags": [
"Products"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Category ID"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"example": "Updated Supplements"
},
"description": {
"type": "string",
"example": "Updated description"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Category updated successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"category": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"404": {
"description": "Category not found"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/save-product",
"method": "POST",
"operationId": "assistantSaveProduct",
"summary": "Save product",
"description": "Creates a new product",
"tags": [
"Products"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Product saved successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"product": {
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/update-product/{id}",
"method": "POST",
"operationId": "updateProduct",
"summary": "Update product",
"description": "Updates an existing product",
"tags": [
"Products"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Product ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Product updated successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"product": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"404": {
"description": "Product not found"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Provider": [
{
"path": "/api/assistant/save-signature",
"method": "POST",
"operationId": "assistantStoreSignature",
"summary": "Store signature",
"description": "Stores a provider's signature via assistant API",
"tags": [
"Provider"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Signature stored successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "provider@example.com"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Check completed",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"description": "True if provider exists, false otherwise",
"type": "boolean"
}
},
"type": "object"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"201": {
"description": "Provider availability created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"message": {
"type": "string",
"example": "Provider availability created successfully"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/save-signature",
"method": "POST",
"operationId": "storeSignature",
"summary": "Save provider signature",
"description": "Store or update the provider's signature",
"tags": [
"Provider"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"signature"
],
"properties": {
"signature": {
"type": "string",
"example": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Patient Summary": [
{
"path": "/api/get-patient-summary/{patientId}",
"method": "GET",
"operationId": "getPatientSummary",
"summary": "Get patient summary",
"description": "Retrieves the patient summary information",
"tags": [
"Patient Summary"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"summary"
],
"properties": {
"summary": {
"type": "string",
"example": "Patient summary text"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": []
}
],
"Authentication": [
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/provider/auth/logout",
"method": "POST",
"operationId": "logout",
"summary": "Logout provider",
"description": "Invalidate the provider's access token",
"tags": [
"Authentication"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/login",
"method": "POST",
"operationId": "adminPanelAuthenticate",
"summary": "Authenticate admin panel users",
"description": "Authenticate providers, practitioners, and admins for the admin panel",
"tags": [
"Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"username",
"password"
],
"properties": {
"username": {
"type": "string",
"example": "admin"
},
"password": {
"type": "string",
"example": "password123"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/refresh-token",
"method": "POST",
"operationId": "refresh",
"summary": "Refresh authentication token",
"description": "Refresh an existing authentication token using a refresh token",
"tags": [
"Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"refresh_token"
],
"properties": {
"refresh_token": {
"type": "string",
"example": "eyJ0eXAiOiJKV1QiLCJhbGc..."
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"accessToken": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"accessToken": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"accessToken": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient-login-api",
"method": "POST",
"operationId": "loginPatientWithoutAuthPatient",
"summary": "Patient login without authentication",
"description": "Authenticates a patient and returns access token",
"tags": [
"Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "patient@example.com"
},
"password": {
"type": "string",
"example": "password123"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/update-password",
"method": "POST",
"operationId": "updatePasswordPatient",
"summary": "Update patient password",
"description": "Updates a patient's password",
"tags": [
"Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"new_password"
],
"properties": {
"new_password": {
"type": "string",
"example": "newSecurePassword123"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "user@example.com"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
}
],
"Company": [
{
"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"
],
"parameters": [
{
"name": "status",
"in": "path",
"required": true,
"type": "integer",
"description": "Setup status (1 for complete, 0 for incomplete)"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "Setup status updated successfully",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"401": {
"description": "Unauthenticated"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/emr-api/company/status",
"method": "GET",
"operationId": "getCompanyStatus",
"summary": "Get company status",
"description": "Get the current company status",
"tags": [
"Company"
],
"parameters": [],
"requestBody": null,
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"401": {
"description": "Unauthenticated"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/emr-api/get-company",
"method": "GET",
"operationId": "getCompany",
"summary": "Get company information",
"description": "Get detailed information about the provider's company",
"tags": [
"Company"
],
"parameters": [],
"requestBody": null,
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"401": {
"description": "Unauthenticated"
},
"403": {
"description": "Unauthorized"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Appointment Reports": [
{
"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"
],
"parameters": [
{
"name": "start_date",
"in": "query",
"required": true,
"type": "string",
"description": "Start date (YYYY-MM-DD)"
},
{
"name": "end_date",
"in": "query",
"required": true,
"type": "string",
"description": "End date (YYYY-MM-DD)"
},
{
"name": "provider",
"in": "query",
"required": false,
"type": "string",
"description": "Provider ID or 'all' for all providers"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Patient Authentication": [
{
"path": "/api/login-patient",
"method": "POST",
"operationId": "loginPatient",
"summary": "Patient login",
"description": "Authenticate a patient with OpenEMR integration",
"tags": [
"Patient Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "patient@example.com"
},
"password": {
"type": "string",
"example": "password123"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "patient@example.com"
},
"password": {
"type": "string",
"example": "password123"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/change-password",
"method": "POST",
"operationId": "updatePasswordAuth",
"summary": "Update patient password",
"description": "Update the password for an authenticated patient",
"tags": [
"Patient Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"current_password",
"new_password"
],
"properties": {
"current_password": {
"type": "string",
"example": "currentpassword"
},
"new_password": {
"type": "string",
"example": "newpassword123"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "token",
"in": "path",
"required": true,
"type": "string",
"description": "Password reset token"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"password",
"password_confirmation"
],
"properties": {
"password": {
"type": "string",
"example": "newpassword123"
},
"password_confirmation": {
"type": "string",
"example": "newpassword123"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/register-patient",
"method": "POST",
"operationId": "registerPatientWithoutAuthAuth",
"summary": "Register patient without authentication",
"description": "Register a new patient without requiring authentication",
"tags": [
"Patient Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "patient@example.com"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": []
},
{
"path": "/api/password-reset",
"method": "POST",
"operationId": "resetPassword",
"summary": "Reset password functionality",
"description": "Reset password using a token received via email",
"tags": [
"Patient Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Password reset successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"message": {
"type": "string",
"example": "Password reset successfully"
}
},
"type": "object"
}
}
}
},
"422": {
"description": "Validation error"
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"refresh_token"
],
"properties": {
"refresh_token": {
"type": "string",
"example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
}
],
"Documents": [
{
"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"
],
"parameters": [
{
"name": "rowId",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the intake form record"
},
{
"name": "key",
"in": "path",
"required": true,
"type": "string",
"description": "Key identifier for the document in the form data"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "rowId",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the intake form record"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
},
{
"name": "rowId",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the intake form record"
},
{
"name": "key",
"in": "path",
"required": true,
"type": "string",
"description": "Key identifier for the document in the form data"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/store-document/{patientId}",
"method": "POST",
"operationId": "storeDocuments",
"summary": "Store patient documents",
"description": "Upload and store documents for a patient",
"tags": [
"Documents"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-document/{patientId}",
"method": "GET",
"operationId": "getDocuments",
"summary": "Get patient documents",
"description": "Retrieve documents for a specific patient",
"tags": [
"Documents"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
},
{
"name": "did",
"in": "path",
"required": true,
"type": "integer",
"description": "Document ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Emails": [
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
},
{
"name": "draw",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables draw counter"
},
{
"name": "start",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables start offset"
},
{
"name": "length",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables page length"
},
{
"name": "search[value]",
"in": "query",
"required": false,
"type": "string",
"description": "DataTables search value"
},
{
"name": "order[0][column]",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables column index for ordering"
},
{
"name": "order[0][dir]",
"in": "query",
"required": false,
"type": "string",
"description": "DataTables order direction (asc/desc)"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the email to retrieve"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Forms Management": [
{
"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"
],
"parameters": [
{
"name": "type",
"in": "path",
"required": true,
"type": "string",
"description": "Form type (simple-forms, consent-forms, charting-forms, etc.)"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/update-form/{id}",
"method": "PUT",
"operationId": "updateForm",
"summary": "Update form",
"description": "Updates an existing form with the provided data",
"tags": [
"Forms Management"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/delete-form/{id}",
"method": "DELETE",
"operationId": "deleteForm",
"summary": "Delete form",
"description": "Deletes a form by its ID",
"tags": [
"Forms Management"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/store-form",
"method": "POST",
"operationId": "formDataStore",
"summary": "Store a new form",
"description": "Creates a new form (intake, consent, etc.)",
"tags": [
"Forms Management"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Patient Forms": [
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Intake form record ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "form_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
},
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
},
{
"name": "rowId",
"in": "path",
"required": true,
"type": "integer",
"description": "Row ID of the specific form submission"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "Form data retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PatientIntakeForms"
}
}
}
},
"404": {
"description": "Form data not found"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "form_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
},
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "type",
"in": "path",
"required": true,
"type": "string",
"description": "Form type (simple-forms, consent-forms, charting-forms, etc.)"
},
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form submission ID"
},
{
"name": "signature",
"in": "query",
"required": true,
"type": "string",
"description": "URL signature for validation"
},
{
"name": "expires",
"in": "query",
"required": true,
"type": "integer",
"description": "URL expiration timestamp"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form submission ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "VueFinder initialized (no direct JSON response)"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "List retrieved successfully"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Intake Forms": [
{
"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"
],
"parameters": [],
"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"
}
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "form_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Intake question ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "form_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "Form data retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FormsData"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "form_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "Data retrieved successfully"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Question ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Consent Forms": [
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Insurance": [
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Inventory": [
{
"path": "/inventory",
"method": "GET",
"operationId": "listInventoryItems",
"summary": "Get inventory list",
"description": "Retrieves a list of all inventory items for the current provider",
"tags": [
"Inventory"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the inventory item"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/add-inventory",
"method": "POST",
"operationId": "createInventoryItem",
"summary": "Add new inventory item",
"description": "Creates a new inventory item in the system",
"tags": [
"Inventory"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/update-inventory/{id}",
"method": "PUT",
"operationId": "updateInventoryItem",
"summary": "Update inventory item",
"description": "Updates an existing inventory item",
"tags": [
"Inventory"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the inventory item to update"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/delete-inventory/{id}",
"method": "DELETE",
"operationId": "deleteInventoryItem",
"summary": "Delete inventory item",
"description": "Deletes an existing inventory item",
"tags": [
"Inventory"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the inventory item to delete"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Locations": [
{
"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"
],
"parameters": [
{
"name": "draw",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables draw counter"
},
{
"name": "start",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables start offset"
},
{
"name": "length",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables page length"
},
{
"name": "search[value]",
"in": "query",
"required": false,
"type": "string",
"description": "DataTables search value"
},
{
"name": "order[0][column]",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables column index for ordering"
},
{
"name": "order[0][dir]",
"in": "query",
"required": false,
"type": "string",
"description": "DataTables order direction (asc/desc)"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/location/{id}",
"method": "GET",
"operationId": "getLocationById",
"summary": "Get a location by ID",
"description": "Retrieves a specific location by its ID",
"tags": [
"Locations"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the location to retrieve"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"type": "string",
"description": "UUID of the location to retrieve"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/add-location",
"method": "POST",
"operationId": "addLocation",
"summary": "Add a new location",
"description": "Creates a new facility location",
"tags": [
"Locations"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the location to update"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"type": "string",
"description": "UUID of the location to update"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Medical Problems": [
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the medical problem to update"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the medical problem to retrieve"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Phone Logs": [
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
},
{
"name": "draw",
"in": "query",
"required": false,
"type": "integer",
"description": "Draw counter for DataTables"
},
{
"name": "start",
"in": "query",
"required": false,
"type": "integer",
"description": "Paging first record indicator for DataTables"
},
{
"name": "length",
"in": "query",
"required": false,
"type": "integer",
"description": "Number of records per page for DataTables"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Product Sync": [
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Tags": [
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Tasks": [
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the task to update"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the task to retrieve"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
},
{
"name": "draw",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables draw counter"
},
{
"name": "start",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables start offset"
},
{
"name": "length",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables page length"
},
{
"name": "search[value]",
"in": "query",
"required": false,
"type": "string",
"description": "DataTables search value"
},
{
"name": "order[0][column]",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables column index for ordering"
},
{
"name": "order[0][dir]",
"in": "query",
"required": false,
"type": "string",
"description": "DataTables order direction (asc/desc)"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"User Management": [
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/update-user/{id}",
"method": "POST",
"operationId": "updateUser",
"summary": "Update user",
"description": "Update an existing user's information",
"tags": [
"User Management"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
}
],
"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"
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "token",
"in": "path",
"required": true,
"type": "string",
"description": "Password set token"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"password"
],
"properties": {
"password": {
"type": "string",
"example": "newpassword123"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/practitioners-list",
"method": "GET",
"operationId": "practitioner",
"summary": "Get practitioners list",
"description": "Returns a list of all practitioners",
"tags": [
"User Management"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Orders": [
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": []
}
],
"Appointment": [
{
"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"
],
"parameters": [
{
"name": "date",
"in": "path",
"required": true,
"type": "string",
"description": "Date in YYYY-MM-DD format"
}
],
"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"
}
}
}
}
},
"security": []
}
],
"Vitals": [
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Payments": [
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Patient Medical": [
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Medical problem ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient/medical-problem/{id}",
"method": "PUT",
"operationId": "updatePatientMedicalProblem",
"summary": "Update medical problem",
"description": "Update an existing medical problem record",
"tags": [
"Patient Medical"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Medical problem ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient/history/{patientId}",
"method": "GET",
"operationId": "patientHistory",
"summary": "Get patient history",
"description": "Retrieve patient medical history by patient ID",
"tags": [
"Patient Medical"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient/prescription",
"method": "GET",
"operationId": "getPatientPrescriptions",
"summary": "Get patient prescriptions",
"description": "Get list of prescriptions for the authenticated patient",
"tags": [
"Patient Medical"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Patient Profile": [
{
"path": "/api/patient/profile-picture",
"method": "POST",
"operationId": "uploadProfilePicture",
"summary": "Upload profile picture",
"description": "Upload and update patient profile picture",
"tags": [
"Patient Profile"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"properties": {
"profile_picture": {
"description": "Profile picture file (JPEG, PNG)",
"type": "string",
"format": "binary"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient/notifications",
"method": "GET",
"operationId": "getNotification",
"summary": "Get patient notifications",
"description": "Get list of notifications for the authenticated patient",
"tags": [
"Patient Profile"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient/data",
"method": "GET",
"operationId": "getPatientData",
"summary": "Get patient data",
"description": "Get comprehensive data for the authenticated patient",
"tags": [
"Patient Profile"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Patient Subscription": [
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient/subscription/{subscription}/cancel",
"method": "POST",
"operationId": "cancelSubscription",
"summary": "Cancel subscription",
"description": "Cancel an existing patient subscription",
"tags": [
"Patient Subscription"
],
"parameters": [
{
"name": "subscription",
"in": "path",
"required": true,
"type": "integer",
"description": "Subscription ID"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"reason": {
"type": "string",
"example": "Too expensive"
},
"feedback": {
"type": "string",
"example": "I found a better option elsewhere"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Patient Payment": [
{
"path": "/api/patient/process-payment",
"method": "POST",
"operationId": "processPayment",
"summary": "Process payment",
"description": "Process a payment for the patient",
"tags": [
"Patient Payment"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
],
"Token Management": [
{
"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"
],
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"token_id"
],
"properties": {
"token_id": {
"type": "integer",
"example": 1
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
]
},
"allEndpoints": [
{
"path": "/get-asseblyai-token",
"method": "POST",
"operationId": "getAsseblyAiToekn",
"summary": "Get AssemblyAI token",
"description": "Retrieves an AssemblyAI token for transcription services",
"tags": [
"Meetings"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/create-meeting/{meeting_id}",
"method": "GET",
"operationId": "showMeeting",
"summary": "Show meeting details",
"description": "Display meeting details by meeting ID",
"tags": [
"Meetings"
],
"parameters": [
{
"name": "meeting_id",
"in": "path",
"required": true,
"type": "string",
"description": "Meeting ID"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "Meeting details retrieved successfully"
},
"404": {
"description": "Meeting not found"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/join-meeting/{meeting_id}",
"method": "GET",
"operationId": "joinMeeting",
"summary": "Join a meeting",
"description": "Join a meeting by meeting ID",
"tags": [
"Meetings"
],
"parameters": [
{
"name": "meeting_id",
"in": "path",
"required": true,
"type": "string",
"description": "Meeting ID"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "Joined meeting successfully"
},
"404": {
"description": "Meeting not found"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
},
{
"name": "agent_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Agent ID"
},
{
"name": "appointment_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"properties": {
"title": {
"type": "string",
"example": "Consultation call"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/room-joined/event",
"method": "POST",
"operationId": "livekitWebhook",
"summary": "LiveKit webhook handler",
"description": "Handles LiveKit room events and recording operations",
"tags": [
"LiveKit"
],
"parameters": [],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"properties": {
"event": {
"type": "string",
"example": "room_started"
},
"room": {
"type": "object"
},
"egressInfo": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": []
},
{
"path": "/room-joined/event-transcription",
"method": "POST",
"operationId": "getRecordingUrl",
"summary": "Get recording URL",
"description": "Retrieves the URL for a meeting recording",
"tags": [
"LiveKit"
],
"parameters": [],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"properties": {
"egressInfo": {
"properties": {
"roomName": {
"type": "string",
"example": "appointment-123"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "appointmentId",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/end-call/{patient_id}/{appointment_id}",
"method": "POST",
"operationId": "endCall",
"summary": "End a call",
"description": "End an active video call",
"tags": [
"Meetings"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
},
{
"name": "appointment_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"address"
],
"properties": {
"address": {
"type": "string",
"example": "123 Main St"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/book-appointment",
"method": "POST",
"operationId": "bookAgentAppointment",
"summary": "Book an appointment",
"description": "Books a new appointment with a doctor",
"tags": [
"Appointments"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/update-patient-info/{patientId}",
"method": "POST",
"operationId": "updateInfo",
"summary": "Update patient information",
"description": "Updates patient's personal information",
"tags": [
"Patients"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-patient-info/{patientId}",
"method": "POST",
"operationId": "getInfo",
"summary": "Get patient information",
"description": "Retrieves patient's personal information",
"tags": [
"Patients"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-doctors-list",
"method": "POST",
"operationId": "getDoctorList",
"summary": "Get doctors list",
"description": "Retrieves a list of all doctors",
"tags": [
"Doctors"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-appointment-list",
"method": "POST",
"operationId": "getAppointmentList",
"summary": "Get appointments list",
"description": "Retrieves a list of all appointments",
"tags": [
"Appointments"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "date",
"in": "path",
"required": true,
"type": "string",
"description": "Date (YYYY-MM-DD)"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/appointment-detail/{appointment}",
"method": "POST",
"operationId": "appointmentDetail",
"summary": "Get appointment details",
"description": "Retrieves detailed information about a specific appointment",
"tags": [
"Appointments"
],
"parameters": [
{
"name": "appointment",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "appointment",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-note-patient",
"method": "GET",
"operationId": "getNotePatient",
"summary": "Get patient notes",
"description": "Retrieves all notes for the authenticated patient",
"tags": [
"Notes"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/appointment-status/{id}/{status}",
"method": "PUT",
"operationId": "updateAppointmentStatus",
"summary": "Update appointment status",
"description": "Updates the status of an appointment",
"tags": [
"Appointments"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
},
{
"name": "status",
"in": "path",
"required": true,
"type": "string",
"description": "New status for the appointment"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient-data/{id}",
"method": "GET",
"operationId": "getAssistantPatientData",
"summary": "Get patient data",
"description": "Retrieves detailed information about a patient",
"tags": [
"Patient Data"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-all-forms",
"method": "GET",
"operationId": "getAllForms",
"summary": "Get all forms",
"description": "Retrieves a list of all available forms",
"tags": [
"Forms"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Form data updated successfully"
},
"201": {
"description": "Form data stored successfully"
},
"400": {
"description": "Invalid input"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/assistant/store-form",
"method": "POST",
"operationId": "assistantFormDataStore",
"summary": "Store form data",
"description": "Creates a new form template",
"tags": [
"Forms"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Form stored successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"form": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"400": {
"description": "Invalid input"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/store-company",
"method": "POST",
"operationId": "updateCompanyAssistant",
"summary": "Update company information",
"description": "Updates company profile information and logo",
"tags": [
"Assistant"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/assistant/update-form/{id}",
"method": "PUT",
"operationId": "updateAssistantForm",
"summary": "Update form",
"description": "Updates an existing form template",
"tags": [
"Forms"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/save-category",
"method": "POST",
"operationId": "storeCategory",
"summary": "Store product category",
"description": "Creates a new product category",
"tags": [
"Products"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"example": "Supplements"
},
"description": {
"type": "string",
"example": "Nutritional supplements and vitamins"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Category stored successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"category": {
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/update-category/{id}",
"method": "POST",
"operationId": "updateCategory",
"summary": "Update product category",
"description": "Updates an existing product category",
"tags": [
"Products"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Category ID"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"example": "Updated Supplements"
},
"description": {
"type": "string",
"example": "Updated description"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Category updated successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"category": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"404": {
"description": "Category not found"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/save-product",
"method": "POST",
"operationId": "assistantSaveProduct",
"summary": "Save product",
"description": "Creates a new product",
"tags": [
"Products"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Product saved successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"product": {
"type": "object"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/update-product/{id}",
"method": "POST",
"operationId": "updateProduct",
"summary": "Update product",
"description": "Updates an existing product",
"tags": [
"Products"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Product ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Product updated successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"product": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"404": {
"description": "Product not found"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/assistant/save-signature",
"method": "POST",
"operationId": "assistantStoreSignature",
"summary": "Store signature",
"description": "Stores a provider's signature via assistant API",
"tags": [
"Provider"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Signature stored successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/save-payment-method",
"method": "POST",
"operationId": "storePaymentMethodConfigAssistant",
"summary": "Store payment method configuration",
"description": "Stores payment method configuration settings",
"tags": [
"Assistant"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Payment method configuration stored successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "status",
"in": "path",
"required": true,
"type": "string",
"description": "Setup status (complete or incomplete)"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "provider@example.com"
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Check completed",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"description": "True if provider exists, false otherwise",
"type": "boolean"
}
},
"type": "object"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"date": {
"type": "string",
"format": "date",
"example": "2023-07-01"
},
"practitioner_id": {
"type": "integer",
"example": 1
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-appointment-by-id",
"method": "POST",
"operationId": "getAppointmentByID",
"summary": "Get appointment by ID",
"description": "Retrieves details of a specific appointment",
"tags": [
"Appointments"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"appointment_id"
],
"properties": {
"appointment_id": {
"type": "integer",
"example": 123
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Appointment retrieved successfully",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"404": {
"description": "Appointment not found"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-patient-summary/{patientId}",
"method": "GET",
"operationId": "getPatientSummary",
"summary": "Get patient summary",
"description": "Retrieves the patient summary information",
"tags": [
"Patient Summary"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"summary"
],
"properties": {
"summary": {
"type": "string",
"example": "Patient summary text"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/form-pdf-save",
"method": "POST",
"operationId": "saveFormFile",
"summary": "Save form file",
"description": "Saves a PDF file for a form",
"tags": [
"Forms"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Form file saved successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string",
"description": "Action type (download or view)"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"201": {
"description": "Provider availability created successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"message": {
"type": "string",
"example": "Provider availability created successfully"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "status",
"in": "path",
"required": true,
"type": "integer",
"description": "Setup status (1 for complete, 0 for incomplete)"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "Setup status updated successfully",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"401": {
"description": "Unauthenticated"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/emr-api/company/status",
"method": "GET",
"operationId": "getCompanyStatus",
"summary": "Get company status",
"description": "Get the current company status",
"tags": [
"Company"
],
"parameters": [],
"requestBody": null,
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"401": {
"description": "Unauthenticated"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/emr-api/get-company",
"method": "GET",
"operationId": "getCompany",
"summary": "Get company information",
"description": "Get detailed information about the provider's company",
"tags": [
"Company"
],
"parameters": [],
"requestBody": null,
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"type": "object"
}
},
"type": "object"
}
}
}
},
"401": {
"description": "Unauthenticated"
},
"403": {
"description": "Unauthorized"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/save-signature",
"method": "POST",
"operationId": "storeSignature",
"summary": "Save provider signature",
"description": "Store or update the provider's signature",
"tags": [
"Provider"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"signature"
],
"properties": {
"signature": {
"type": "string",
"example": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/provider/auth/logout",
"method": "POST",
"operationId": "logout",
"summary": "Logout provider",
"description": "Invalidate the provider's access token",
"tags": [
"Authentication"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "appointment_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "start_date",
"in": "query",
"required": true,
"type": "string",
"description": "Start date (YYYY-MM-DD)"
},
{
"name": "end_date",
"in": "query",
"required": true,
"type": "string",
"description": "End date (YYYY-MM-DD)"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/emr/appointment/{appointment}/detail",
"method": "GET",
"operationId": "getAppointmentDetailUnique",
"summary": "Get appointment details",
"description": "Fetches detailed information about an appointment",
"tags": [
"Appointments"
],
"parameters": [
{
"name": "appointment",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "start_date",
"in": "query",
"required": true,
"type": "string",
"description": "Start date (YYYY-MM-DD)"
},
{
"name": "end_date",
"in": "query",
"required": true,
"type": "string",
"description": "End date (YYYY-MM-DD)"
},
{
"name": "provider",
"in": "query",
"required": false,
"type": "string",
"description": "Provider ID or 'all' for all providers"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "appointment",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "appointment",
"in": "path",
"required": true,
"type": "integer",
"description": "Appointment ID"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"description": "Meeting analytics data",
"type": "object"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/login",
"method": "POST",
"operationId": "adminPanelAuthenticate",
"summary": "Authenticate admin panel users",
"description": "Authenticate providers, practitioners, and admins for the admin panel",
"tags": [
"Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"username",
"password"
],
"properties": {
"username": {
"type": "string",
"example": "admin"
},
"password": {
"type": "string",
"example": "password123"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/refresh-token",
"method": "POST",
"operationId": "refresh",
"summary": "Refresh authentication token",
"description": "Refresh an existing authentication token using a refresh token",
"tags": [
"Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"refresh_token"
],
"properties": {
"refresh_token": {
"type": "string",
"example": "eyJ0eXAiOiJKV1QiLCJhbGc..."
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/login-patient",
"method": "POST",
"operationId": "loginPatient",
"summary": "Patient login",
"description": "Authenticate a patient with OpenEMR integration",
"tags": [
"Patient Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "patient@example.com"
},
"password": {
"type": "string",
"example": "password123"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "patient@example.com"
},
"password": {
"type": "string",
"example": "password123"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/change-password",
"method": "POST",
"operationId": "updatePasswordAuth",
"summary": "Update patient password",
"description": "Update the password for an authenticated patient",
"tags": [
"Patient Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"current_password",
"new_password"
],
"properties": {
"current_password": {
"type": "string",
"example": "currentpassword"
},
"new_password": {
"type": "string",
"example": "newpassword123"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "token",
"in": "path",
"required": true,
"type": "string",
"description": "Password reset token"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"password",
"password_confirmation"
],
"properties": {
"password": {
"type": "string",
"example": "newpassword123"
},
"password_confirmation": {
"type": "string",
"example": "newpassword123"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/register-patient",
"method": "POST",
"operationId": "registerPatientWithoutAuthAuth",
"summary": "Register patient without authentication",
"description": "Register a new patient without requiring authentication",
"tags": [
"Patient Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "patient@example.com"
}
},
"type": "object"
}
}
}
},
"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"
}
},
"security": []
},
{
"path": "/api/password-reset",
"method": "POST",
"operationId": "resetPassword",
"summary": "Reset password functionality",
"description": "Reset password using a token received via email",
"tags": [
"Patient Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"responses": {
"200": {
"description": "Password reset successfully",
"content": {
"application/json": {
"schema": {
"properties": {
"message": {
"type": "string",
"example": "Password reset successfully"
}
},
"type": "object"
}
}
}
},
"422": {
"description": "Validation error"
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "rowId",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the intake form record"
},
{
"name": "key",
"in": "path",
"required": true,
"type": "string",
"description": "Key identifier for the document in the form data"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "rowId",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the intake form record"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
},
{
"name": "rowId",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the intake form record"
},
{
"name": "key",
"in": "path",
"required": true,
"type": "string",
"description": "Key identifier for the document in the form data"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
},
{
"name": "draw",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables draw counter"
},
{
"name": "start",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables start offset"
},
{
"name": "length",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables page length"
},
{
"name": "search[value]",
"in": "query",
"required": false,
"type": "string",
"description": "DataTables search value"
},
{
"name": "order[0][column]",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables column index for ordering"
},
{
"name": "order[0][dir]",
"in": "query",
"required": false,
"type": "string",
"description": "DataTables order direction (asc/desc)"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the email to retrieve"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "type",
"in": "path",
"required": true,
"type": "string",
"description": "Form type (simple-forms, consent-forms, charting-forms, etc.)"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/update-form/{id}",
"method": "PUT",
"operationId": "updateForm",
"summary": "Update form",
"description": "Updates an existing form with the provided data",
"tags": [
"Forms Management"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/delete-form/{id}",
"method": "DELETE",
"operationId": "deleteForm",
"summary": "Delete form",
"description": "Deletes a form by its ID",
"tags": [
"Forms Management"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Intake form record ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "form_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
},
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
},
{
"name": "rowId",
"in": "path",
"required": true,
"type": "integer",
"description": "Row ID of the specific form submission"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "Form data retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PatientIntakeForms"
}
}
}
},
"404": {
"description": "Form data not found"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "form_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
},
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "type",
"in": "path",
"required": true,
"type": "string",
"description": "Form type (simple-forms, consent-forms, charting-forms, etc.)"
},
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form submission ID"
},
{
"name": "signature",
"in": "query",
"required": true,
"type": "string",
"description": "URL signature for validation"
},
{
"name": "expires",
"in": "query",
"required": true,
"type": "integer",
"description": "URL expiration timestamp"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form submission ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/store-form",
"method": "POST",
"operationId": "formDataStore",
"summary": "Store a new form",
"description": "Creates a new form (intake, consent, etc.)",
"tags": [
"Forms Management"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "form_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Intake question ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "form_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "Form data retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FormsData"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "VueFinder initialized (no direct JSON response)"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "List retrieved successfully"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "form_id",
"in": "path",
"required": true,
"type": "integer",
"description": "Form ID"
}
],
"requestBody": null,
"responses": {
"200": {
"description": "Data retrieved successfully"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Question ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/inventory",
"method": "GET",
"operationId": "listInventoryItems",
"summary": "Get inventory list",
"description": "Retrieves a list of all inventory items for the current provider",
"tags": [
"Inventory"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the inventory item"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/add-inventory",
"method": "POST",
"operationId": "createInventoryItem",
"summary": "Add new inventory item",
"description": "Creates a new inventory item in the system",
"tags": [
"Inventory"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/update-inventory/{id}",
"method": "PUT",
"operationId": "updateInventoryItem",
"summary": "Update inventory item",
"description": "Updates an existing inventory item",
"tags": [
"Inventory"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the inventory item to update"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/delete-inventory/{id}",
"method": "DELETE",
"operationId": "deleteInventoryItem",
"summary": "Delete inventory item",
"description": "Deletes an existing inventory item",
"tags": [
"Inventory"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the inventory item to delete"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "draw",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables draw counter"
},
{
"name": "start",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables start offset"
},
{
"name": "length",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables page length"
},
{
"name": "search[value]",
"in": "query",
"required": false,
"type": "string",
"description": "DataTables search value"
},
{
"name": "order[0][column]",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables column index for ordering"
},
{
"name": "order[0][dir]",
"in": "query",
"required": false,
"type": "string",
"description": "DataTables order direction (asc/desc)"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/location/{id}",
"method": "GET",
"operationId": "getLocationById",
"summary": "Get a location by ID",
"description": "Retrieves a specific location by its ID",
"tags": [
"Locations"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the location to retrieve"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"type": "string",
"description": "UUID of the location to retrieve"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/add-location",
"method": "POST",
"operationId": "addLocation",
"summary": "Add a new location",
"description": "Creates a new facility location",
"tags": [
"Locations"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the location to update"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"type": "string",
"description": "UUID of the location to update"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the medical problem to update"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the medical problem to retrieve"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
},
{
"name": "draw",
"in": "query",
"required": false,
"type": "integer",
"description": "Draw counter for DataTables"
},
{
"name": "start",
"in": "query",
"required": false,
"type": "integer",
"description": "Paging first record indicator for DataTables"
},
{
"name": "length",
"in": "query",
"required": false,
"type": "integer",
"description": "Number of records per page for DataTables"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the task to update"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the task to retrieve"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patient_id",
"in": "path",
"required": true,
"type": "integer",
"description": "ID of the patient"
},
{
"name": "draw",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables draw counter"
},
{
"name": "start",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables start offset"
},
{
"name": "length",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables page length"
},
{
"name": "search[value]",
"in": "query",
"required": false,
"type": "string",
"description": "DataTables search value"
},
{
"name": "order[0][column]",
"in": "query",
"required": false,
"type": "integer",
"description": "DataTables column index for ordering"
},
{
"name": "order[0][dir]",
"in": "query",
"required": false,
"type": "string",
"description": "DataTables order direction (asc/desc)"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/update-user/{id}",
"method": "POST",
"operationId": "updateUser",
"summary": "Update user",
"description": "Update an existing user's information",
"tags": [
"User Management"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
}
],
"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"
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "token",
"in": "path",
"required": true,
"type": "string",
"description": "Password set token"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"password"
],
"properties": {
"password": {
"type": "string",
"example": "newpassword123"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/practitioners-list",
"method": "GET",
"operationId": "practitioner",
"summary": "Get practitioners list",
"description": "Returns a list of all practitioners",
"tags": [
"User Management"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"accessToken": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"accessToken": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"accessToken": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"refresh_token"
],
"properties": {
"refresh_token": {
"type": "string",
"example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [
{
"name": "firstName",
"in": "query",
"required": false,
"type": "string",
"description": "Filter by patient's first name"
},
{
"name": "lastName",
"in": "query",
"required": false,
"type": "string",
"description": "Filter by patient's last name"
},
{
"name": "dateOfBirth",
"in": "query",
"required": false,
"type": "string",
"description": "Filter by patient's date of birth (YYYY-MM-DD)"
},
{
"name": "email",
"in": "query",
"required": false,
"type": "string",
"description": "Filter by patient's email"
}
],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/patient-login-api",
"method": "POST",
"operationId": "loginPatientWithoutAuthPatient",
"summary": "Patient login without authentication",
"description": "Authenticates a patient and returns access token",
"tags": [
"Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "patient@example.com"
},
"password": {
"type": "string",
"example": "password123"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/patient-book-appointment",
"method": "POST",
"operationId": "bookAppointmentPatient",
"summary": "Book a patient appointment",
"description": "Books a new appointment for a patient",
"tags": [
"Appointments"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/patient/register-patient",
"method": "POST",
"operationId": "registerPatientForPatient",
"summary": "Register a new patient",
"description": "Creates a new patient account",
"tags": [
"Patients"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/update-password",
"method": "POST",
"operationId": "updatePasswordPatient",
"summary": "Update patient password",
"description": "Updates a patient's password",
"tags": [
"Authentication"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"new_password"
],
"properties": {
"new_password": {
"type": "string",
"example": "newSecurePassword123"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "date",
"in": "path",
"required": true,
"type": "string",
"description": "Date in YYYY-MM-DD format"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/store-document/{patientId}",
"method": "POST",
"operationId": "storeDocuments",
"summary": "Store patient documents",
"description": "Upload and store documents for a patient",
"tags": [
"Documents"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/get-document/{patientId}",
"method": "GET",
"operationId": "getDocuments",
"summary": "Get patient documents",
"description": "Retrieve documents for a specific patient",
"tags": [
"Documents"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
},
{
"name": "did",
"in": "path",
"required": true,
"type": "integer",
"description": "Document ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Medical problem ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient/medical-problem/{id}",
"method": "PUT",
"operationId": "updatePatientMedicalProblem",
"summary": "Update medical problem",
"description": "Update an existing medical problem record",
"tags": [
"Patient Medical"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"description": "Medical problem ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient/history/{patientId}",
"method": "GET",
"operationId": "patientHistory",
"summary": "Get patient history",
"description": "Retrieve patient medical history by patient ID",
"tags": [
"Patient Medical"
],
"parameters": [
{
"name": "patientId",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "integer",
"description": "Patient ID"
}
],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient/profile-picture",
"method": "POST",
"operationId": "uploadProfilePicture",
"summary": "Upload profile picture",
"description": "Upload and update patient profile picture",
"tags": [
"Patient Profile"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"properties": {
"profile_picture": {
"description": "Profile picture file (JPEG, PNG)",
"type": "string",
"format": "binary"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient/prescription",
"method": "GET",
"operationId": "getPatientPrescriptions",
"summary": "Get patient prescriptions",
"description": "Get list of prescriptions for the authenticated patient",
"tags": [
"Patient Medical"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "user@example.com"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": []
},
{
"path": "/api/patient/notifications",
"method": "GET",
"operationId": "getNotification",
"summary": "Get patient notifications",
"description": "Get list of notifications for the authenticated patient",
"tags": [
"Patient Profile"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient/data",
"method": "GET",
"operationId": "getPatientData",
"summary": "Get patient data",
"description": "Get comprehensive data for the authenticated patient",
"tags": [
"Patient Profile"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient/subscription/{subscription}/cancel",
"method": "POST",
"operationId": "cancelSubscription",
"summary": "Cancel subscription",
"description": "Cancel an existing patient subscription",
"tags": [
"Patient Subscription"
],
"parameters": [
{
"name": "subscription",
"in": "path",
"required": true,
"type": "integer",
"description": "Subscription ID"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"reason": {
"type": "string",
"example": "Too expensive"
},
"feedback": {
"type": "string",
"example": "I found a better option elsewhere"
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"path": "/api/patient/process-payment",
"method": "POST",
"operationId": "processPayment",
"summary": "Process payment",
"description": "Process a payment for the patient",
"tags": [
"Patient Payment"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
}
],
"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"
}
}
}
}
},
"security": []
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"required": [
"token_id"
],
"properties": {
"token_id": {
"type": "integer",
"example": 1
}
},
"type": "object"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"type": "integer",
"description": "User ID"
}
],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"requestBody": {
"required": true,
"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"
}
}
}
},
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
},
{
"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"
],
"parameters": [],
"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"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
],
"requiresAuth": true
}
]
}