Skip to main content

cima_rs/endpoints/
safety_notes.rs

1use crate::api_client::CimaClient;
2use crate::models::SafetyNote;
3use anyhow::{Context, Result};
4
5impl CimaClient {
6    /// Get safety notes associated with a medication
7    pub async fn get_safety_notes(&self, registration_number: &str) -> Result<Vec<SafetyNote>> {
8        let params = vec![("nregistro", registration_number.to_string())];
9
10        self.get_with_params("notas", &params)
11            .await
12            .context("Failed to get safety notes")
13    }
14}