This endpoint requires authentication. Include your API key in the request headers as X-API-Key.
This endpoint updates an existing metric.
Path Parameters
ID of the metric to update
Request Body
Description of what the metric measures
Unit of measurement for the metric
Array of strings representing the formula used to calculate the metric
ID of the variable used to filter patients for this metric
The threshold below which quality is considered low
The threshold above which quality is considered high
Whether higher values indicate better quality
Example Request
{
"name": "Updated Blood Pressure Control",
"description": "Updated percentage of patients with controlled blood pressure",
"unit": "%",
"calculation_formula": [
"count(patients where bp < 140/90) / count(patients) * 100"
],
"filter_variable_id": 1,
"low_quality_threshold": 55.0,
"high_quality_threshold": 90.0,
"is_ascending": true
}
Response Fields
Unique identifier of the updated metric
Description of what the metric measures
Unit of measurement for the metric
Array of strings representing the formula used to calculate the metric
ID of the variable used to filter patients for this metric
The threshold below which quality is considered low
The threshold above which quality is considered high
Whether higher values indicate better quality
Example Response
{
"id": 1,
"name": "Updated Blood Pressure Control",
"description": "Updated percentage of patients with controlled blood pressure",
"unit": "%",
"calculation_formula": [
"count(patients where bp < 140/90) / count(patients) * 100"
],
"filter_variable_id": 1,
"low_quality_threshold": 55.0,
"high_quality_threshold": 90.0,
"is_ascending": true
}
Error Responses
Invalid request data. Check the request body format and required fields.
Authentication failed. Invalid or missing API key.
Metric not found. The specified metric ID does not exist.
Description of what the metric measures
Unit of measurement for the metric
Array of strings representing the formula used to calculate the metric
ID of the variable used to filter patients for this metric
The threshold below which quality is considered low
The threshold above which quality is considered high
Whether higher values indicate better quality
Metric updated successfully
Unique identifier of the metric
Array of strings representing the formula used to calculate the metric
Number of patients with values for this metric
Description of what the metric measures
Unit of measurement for the metric
ID of the variable used to filter patients for this metric
The threshold below which quality is considered low
The threshold above which quality is considered high
Whether higher values indicate better quality