1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* Stedi Enrollment
*
* The Stedi Enrollment Service manages provider enrollments with healthcare payers. It tracks enrollment status, provider details, and supports batch enrollment processing to ensure providers have the necessary credentials before processing healthcare transactions.
*
* The version of the OpenAPI document: 2024-09-01
* Contact: healthcare@stedi.com
* Generated by: https://openapi-generator.tech
*/
use crate::enrollment::models;
use serde::{Deserialize, Serialize};
/// EnrollmentHistoryEntry : An update to an enrollment, such as a change in the enrollment's status. This object is experimental and may change in the future.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EnrollmentHistoryEntry {
/// The date and time when this change occurred.
#[serde(rename = "changedAt")]
pub changed_at: chrono::DateTime<chrono::FixedOffset>,
/// The source or system that triggered this change.
#[serde(rename = "changedBy")]
pub changed_by: String,
/// The status after this change occurred.
#[serde(rename = "newStatus")]
pub new_status: models::EnrollmentStatus,
/// The status before this change occurred. This will be `UNDEFINED` for the enrollment's initial status after creation.
#[serde(rename = "previousStatus", skip_serializing_if = "Option::is_none")]
pub previous_status: Option<models::EnrollmentStatus>,
/// The type of change that occurred.
#[serde(rename = "type")]
pub r#type: models::EnrollmentHistoryChangeType,
}
impl EnrollmentHistoryEntry {
/// An update to an enrollment, such as a change in the enrollment's status. This object is experimental and may change in the future.
pub fn new(changed_at: chrono::DateTime<chrono::FixedOffset>, changed_by: String, new_status: models::EnrollmentStatus, r#type: models::EnrollmentHistoryChangeType) -> EnrollmentHistoryEntry {
EnrollmentHistoryEntry {
changed_at,
changed_by,
new_status,
previous_status: None,
r#type,
}
}
}