This endpoint requires authentication. Include your API key in the request headers as X-API-Key.
Description
Creates a new date variable in the system. Date variables are used to track specific dates or time periods for patients.
Request Body
The name of the date variable (e.g., “Last Visit”, “Next Appointment”)
A description of what the date variable represents
Response
The unique identifier of the created date variable
The name of the date variable
A description of what the date variable represents
The number of patients that have values for this date variable (initially 0)
Example Request
{
"name": "Last Visit",
"description": "Date of the patient's last visit"
}
Example Response
{
"id": 1,
"name": "Last Visit",
"description": "Date of the patient's last visit",
"patient_values_count": 0
}
Error Responses
Invalid request data. The response will include an error message explaining what went wrong.
Authentication required. Make sure you’ve included a valid API key in the request headers.
Name of the date variable
Description of the date variable
Date variable created successfully
The unique identifier of the date variable
The name of the date variable
A description of what the date variable represents
The number of patients that have values for this date variable