fhir_rs/resource/r5/
document_reference.rs

1use crate::prelude::*;
2
3#[derive(Resource, Debug, Clone, Default)]
4#[fhir(base="DomainResource")]
5pub struct DocumentReference {
6    /// Logical id of this artifact
7    #[fhir(name="id", min="0", max="1", summary=true, modifier=false, choice="")]
8    pub id: Option<Id>,
9    /// Metadata about the resource
10    #[fhir(name="meta", min="0", max="1", summary=true, modifier=false, choice="")]
11    pub meta: Option<Meta>,
12    /// A set of rules under which this content was created
13    #[fhir(name="implicitRules", min="0", max="1", summary=true, modifier=true)]
14    pub implicit_rules: Option<UriDt>,
15    /// Language of the resource content
16    #[fhir(name="language", min="0", max="1", summary=false, modifier=false, choice="")]
17    pub language: Option<CodeDt>,
18    /// Text summary of the resource, for human interpretation
19    #[fhir(name="text", min="0", max="1", summary=false, modifier=false, choice="")]
20    pub text: Option<Narrative>,
21    /// Contained, inline Resources
22    #[fhir(name="contained", min="0", max="*", summary=false, modifier=false, choice="")]
23    pub contained: Option<Vec<AnyResource>>,
24    /// Additional content defined by implementations
25    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
26    pub extension: Option<Vec<Extension>>,
27    /// Extensions that cannot be ignored
28    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
29    pub modifier_extension: Option<Vec<Extension>>,
30    /// Business identifiers for the document
31    #[fhir(name="identifier", min="0", max="*", summary=true, modifier=false, choice="")]
32    pub identifier: Option<Vec<Identifier>>,
33    /// An explicitly assigned identifer of a variation of the content in the DocumentReference
34    #[fhir(name="version", min="0", max="1", summary=true, modifier=false, choice="")]
35    pub version: Option<StringDt>,
36    /// Procedure that caused this media to be created
37    #[fhir(name="basedOn", min="0", max="*", summary=false, modifier=false, choice="")]
38    pub based_on: Option<Vec<Reference>>,
39    /// current | superseded | entered-in-error
40    #[fhir(name="status", min="1", max="1", summary=true, modifier=true)]
41    pub status: Option<CodeDt>,
42    /// registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown
43    #[fhir(name="docStatus", min="0", max="1", summary=true, modifier=false, choice="")]
44    pub doc_status: Option<CodeDt>,
45    /// Imaging modality used
46    #[fhir(name="modality", min="0", max="*", summary=true, modifier=false, choice="")]
47    pub modality: Option<Vec<CodeableConcept>>,
48    /// Kind of document (LOINC if possible)
49    #[fhir(name="type", min="0", max="1", summary=true, modifier=false, choice="")]
50    pub type_: Option<CodeableConcept>,
51    /// Categorization of document
52    #[fhir(name="category", min="0", max="*", summary=true, modifier=false, choice="")]
53    pub category: Option<Vec<CodeableConcept>>,
54    /// Who/what is the subject of the document
55    #[fhir(name="subject", min="0", max="1", summary=true, modifier=false, choice="")]
56    pub subject: Option<Reference>,
57    /// Context of the document content
58    #[fhir(name="context", min="0", max="*", summary=false, modifier=false, choice="")]
59    pub context: Option<Vec<Reference>>,
60    /// Main clinical acts documented
61    #[fhir(name="event", min="0", max="*", summary=false, modifier=false, choice="")]
62    pub event: Option<Vec<CodeableReference>>,
63    /// Body part included
64    #[fhir(name="bodySite", min="0", max="*", summary=true, modifier=false, choice="")]
65    pub body_site: Option<Vec<CodeableReference>>,
66    /// Kind of facility where patient was seen
67    #[fhir(name="facilityType", min="0", max="1", summary=false, modifier=false, choice="")]
68    pub facility_type: Option<CodeableConcept>,
69    /// Additional details about where the content was created (e.g. clinical specialty)
70    #[fhir(name="practiceSetting", min="0", max="1", summary=false, modifier=false, choice="")]
71    pub practice_setting: Option<CodeableConcept>,
72    /// Time of service that is being documented
73    #[fhir(name="period", min="0", max="1", summary=true, modifier=false, choice="")]
74    pub period: Option<Period>,
75    /// When this document reference was created
76    #[fhir(name="date", min="0", max="1", summary=true, modifier=false, choice="")]
77    pub date: Option<InstantDt>,
78    /// Who and/or what authored the document
79    #[fhir(name="author", min="0", max="*", summary=true, modifier=false, choice="")]
80    pub author: Option<Vec<Reference>>,
81    /// Attests to accuracy of the document
82    #[fhir(name="attester", min="0", max="*", summary=false, modifier=false, choice="")]
83    pub attester: Option<Vec<DocumentReferenceAttesterBackboneElement>>,
84    /// Organization which maintains the document
85    #[fhir(name="custodian", min="0", max="1", summary=false, modifier=false, choice="")]
86    pub custodian: Option<Reference>,
87    /// Relationships to other documents
88    #[fhir(name="relatesTo", min="0", max="*", summary=true, modifier=false, choice="")]
89    pub relates_to: Option<Vec<DocumentReferenceRelatesToBackboneElement>>,
90    /// Human-readable description
91    #[fhir(name="description", min="0", max="1", summary=true, modifier=false, choice="")]
92    pub description: Option<MarkdownDt>,
93    /// Document security-tags
94    #[fhir(name="securityLabel", min="0", max="*", summary=true, modifier=false, choice="")]
95    pub security_label: Option<Vec<CodeableConcept>>,
96    /// Document referenced
97    #[fhir(name="content", min="1", max="*", summary=true, modifier=false, choice="")]
98    pub content: Option<Vec<DocumentReferenceContentBackboneElement>>,
99}
100
101#[derive(Element, BackboneElement, Debug, Clone, Default)]
102pub struct DocumentReferenceRelatesToBackboneElement {
103    /// Unique id for inter-element referencing
104    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
105    pub id: Option<String>,
106    /// Additional content defined by implementations
107    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
108    pub extension: Option<Vec<Extension>>,
109    /// Extensions that cannot be ignored even if unrecognized
110    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
111    pub modifier_extension: Option<Vec<Extension>>,
112    /// The relationship type with another document
113    #[fhir(name="code", min="1", max="1", summary=true, modifier=false, choice="")]
114    pub code: Option<CodeableConcept>,
115    /// Target of the relationship
116    #[fhir(name="target", min="1", max="1", summary=true, modifier=false, choice="")]
117    pub target: Option<Reference>,
118}
119
120#[derive(Element, BackboneElement, Debug, Clone, Default)]
121pub struct DocumentReferenceAttesterBackboneElement {
122    /// Unique id for inter-element referencing
123    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
124    pub id: Option<String>,
125    /// Additional content defined by implementations
126    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
127    pub extension: Option<Vec<Extension>>,
128    /// Extensions that cannot be ignored even if unrecognized
129    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
130    pub modifier_extension: Option<Vec<Extension>>,
131    /// personal | professional | legal | official
132    #[fhir(name="mode", min="1", max="1", summary=false, modifier=false, choice="")]
133    pub mode: Option<CodeableConcept>,
134    /// When the document was attested
135    #[fhir(name="time", min="0", max="1", summary=false, modifier=false, choice="")]
136    pub time: Option<DateTimeDt>,
137    /// Who attested the document
138    #[fhir(name="party", min="0", max="1", summary=false, modifier=false, choice="")]
139    pub party: Option<Reference>,
140}
141
142#[derive(Element, BackboneElement, Debug, Clone, Default)]
143pub struct DocumentReferenceContentBackboneElement {
144    /// Unique id for inter-element referencing
145    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
146    pub id: Option<String>,
147    /// Additional content defined by implementations
148    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
149    pub extension: Option<Vec<Extension>>,
150    /// Extensions that cannot be ignored even if unrecognized
151    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
152    pub modifier_extension: Option<Vec<Extension>>,
153    /// Where to access the document
154    #[fhir(name="attachment", min="1", max="1", summary=true, modifier=false, choice="")]
155    pub attachment: Option<Attachment>,
156    /// Content profile rules for the document
157    #[fhir(name="profile", min="0", max="*", summary=true, modifier=false, choice="")]
158    pub profile: Option<Vec<DocumentReferenceContentProfileBackboneElement>>,
159}
160
161#[derive(Element, BackboneElement, Debug, Clone, Default)]
162pub struct DocumentReferenceContentProfileBackboneElement {
163    /// Unique id for inter-element referencing
164    #[fhir(name="id", min="0", max="1", summary=false, modifier=false, choice="")]
165    pub id: Option<String>,
166    /// Additional content defined by implementations
167    #[fhir(name="extension", min="0", max="*", summary=false, modifier=false, choice="")]
168    pub extension: Option<Vec<Extension>>,
169    /// Extensions that cannot be ignored even if unrecognized
170    #[fhir(name="modifierExtension", min="0", max="*", summary=true, modifier=true)]
171    pub modifier_extension: Option<Vec<Extension>>,
172    /// Code|uri|canonical
173    #[fhir(name="value", min="1", max="1", summary=true, modifier=false, choice="")]
174    pub value: Option<CanonicalDt>,
175}
176