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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
//! # meta
//!
//! ## Description
//!
//! The `meta` attribute contains metadata about a FHIR resource that is
//! maintained by the infrastructure. It provides information about the
//! resource's versioning, last modification, security labels, profiles, and
//! tags in FHIR R5.
//!
//! ## Purpose
//!
//! The `meta` element serves to:
//!
//! - Track resource versioning and modification history
//! - Specify which profiles the resource claims to conform to
//! - Apply security labels and access control information
//! - Provide tags for categorization and workflow management
//! - Enable optimistic locking through version control
//! - Support provenance and audit requirements
//!
//! ## Usage
//!
//! Use the `meta` attribute to:
//!
//! - Track when resources were last updated
//! - Specify profile conformance for validation
//! - Apply security classifications to resources
//! - Tag resources for workflow or categorization purposes
//! - Enable version-aware updates and conflict detection
//! - Support system-level metadata requirements
//!
//! The `meta` element is typically managed by the server infrastructure, though
//! clients may provide some elements.
//!
//! ## Data Type
//!
//! **Meta** - A complex data type containing the following optional
//! sub-elements:
//!
//! - `versionId`: string - Version identifier for the resource
//! - `lastUpdated`: instant - When the resource was last updated
//! - `source`: uri - Identifies where the resource came from
//! - `profile`: array of canonical URIs - Profiles this resource claims to
//! conform to
//! - `security`: array of Coding - Security labels applied to the resource
//! - `tag`: array of Coding - Tags applied to the resource for categorization
//!
//! ## Constraints
//!
//! - **Required**: No - The entire `meta` element is optional
//! - **Cardinality**: 0..1 (zero to one occurrence)
//! - **Server Managed**: Most sub-elements are controlled by the server
//! - **versionId**: Must change when resource content changes
//! - **lastUpdated**: Must be updated when resource content changes
//! - **profile**: Must reference valid StructureDefinition resources
//!
//! ## Examples
//!
//! See the accompanying `example.json` file for a complete Practitioner
//! resource demonstrating comprehensive use of the `meta` attribute.
//!
//! ## Related Keys
//!
//! - `id` - Resource identifier that the meta information describes
//! - `resourceType` - Resource type that determines applicable profiles
//! - `extension` - May contain additional metadata not covered by meta
//! - Bundle entries use `meta` for version control during transactions
//!
//! ## Specification Reference
//!
//! Based on FHIR R5 specification. For complete details on metadata management,
//! versioning, and security labeling, refer to the official FHIR R5
//! documentation.
use ;