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
47
48
49
50
51
52
53
54
/*
* 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};
/// Task : A task representing work that needs to be completed.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Task {
/// The timestamp when the task was completed.
#[serde(rename = "completedAt", skip_serializing_if = "Option::is_none")]
pub completed_at: Option<chrono::DateTime<chrono::FixedOffset>>,
/// A definition that determines the task's behavior, requirements, and data.
#[serde(rename = "definition")]
pub definition: Box<models::TaskDefinition>,
/// The unique, Stedi-assigned identifier for the task.
#[serde(rename = "id")]
pub id: String,
/// Whether the task has been marked as complete through either the API or the Stedi portal.
#[serde(rename = "isComplete")]
pub is_complete: bool,
/// The rank order of this task. Tasks with lower numbers must be completed first. For example, a task with rank `1` must be completed before a task with rank `2`.
#[serde(rename = "rank")]
pub rank: f64,
/// Data collected when the task was completed.
#[serde(rename = "responseData", skip_serializing_if = "Option::is_none")]
pub response_data: Option<Box<models::TaskResponseData>>,
/// The party responsible for completing this task.
#[serde(rename = "responsibleParty")]
pub responsible_party: models::ResponsibleParty,
}
impl Task {
/// A task representing work that needs to be completed.
pub fn new(definition: models::TaskDefinition, id: String, is_complete: bool, rank: f64, responsible_party: models::ResponsibleParty) -> Task {
Task {
completed_at: None,
definition: Box::new(definition),
id,
is_complete,
rank,
response_data: None,
responsible_party,
}
}
}