1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package ca.uhn.fhir.model.dstu.composite;
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 import java.util.List;
40
41 import ca.uhn.fhir.model.api.ICompositeDatatype;
42 import ca.uhn.fhir.model.api.IElement;
43 import ca.uhn.fhir.model.api.annotation.Child;
44 import ca.uhn.fhir.model.api.annotation.DatatypeDef;
45 import ca.uhn.fhir.model.api.annotation.Description;
46 import ca.uhn.fhir.model.api.annotation.SimpleSetter;
47 import ca.uhn.fhir.model.base.composite.BaseIdentifierDt;
48 import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
49 import ca.uhn.fhir.model.primitive.BoundCodeDt;
50 import ca.uhn.fhir.model.primitive.CodeDt;
51 import ca.uhn.fhir.model.primitive.StringDt;
52 import ca.uhn.fhir.model.primitive.UriDt;
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68 @DatatypeDef(name="IdentifierDt")
69 public class IdentifierDt
70 extends BaseIdentifierDt implements ICompositeDatatype
71 {
72
73
74
75
76 public IdentifierDt() {
77
78 }
79
80
81
82
83 @SimpleSetter
84 public IdentifierDt(@SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theValue") String theValue) {
85 setSystem(theSystem);
86 setValue(theValue);
87 }
88
89
90
91
92 @SimpleSetter
93 public IdentifierDt(@SimpleSetter.Parameter(name="theUse") IdentifierUseEnum theUse, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theValue") String theValue, @SimpleSetter.Parameter(name="theLabel") String theLabel) {
94 setUse(theUse);
95 setSystem(theSystem);
96 setValue(theValue);
97 setLabel(theLabel);
98 }
99
100 @Override
101 public String toString() {
102 return "IdentifierDt[" + getValueAsQueryToken() + "]";
103 }
104
105 @Child(name="use", type=CodeDt.class, order=0, min=0, max=1)
106 @Description(
107 shortDefinition="usual | official | temp | secondary (If known)",
108 formalDefinition="The purpose of this identifier"
109 )
110 private BoundCodeDt<IdentifierUseEnum> myUse;
111
112 @Child(name="label", type=StringDt.class, order=1, min=0, max=1)
113 @Description(
114 shortDefinition="Description of identifier",
115 formalDefinition="A text string for the identifier that can be displayed to a human so they can recognize the identifier"
116 )
117 private StringDt myLabel;
118
119 @Child(name="system", type=UriDt.class, order=2, min=0, max=1)
120 @Description(
121 shortDefinition="The namespace for the identifier",
122 formalDefinition="Establishes the namespace in which set of possible id values is unique."
123 )
124 private UriDt mySystem;
125
126 @Child(name="value", type=StringDt.class, order=3, min=0, max=1)
127 @Description(
128 shortDefinition="The value that is unique",
129 formalDefinition="The portion of the identifier typically displayed to the user and which is unique within the context of the system."
130 )
131 private StringDt myValue;
132
133 @Child(name="period", type=PeriodDt.class, order=4, min=0, max=1)
134 @Description(
135 shortDefinition="Time period when id is/was valid for use",
136 formalDefinition="Time period during which identifier is/was valid for use"
137 )
138 private PeriodDt myPeriod;
139
140 @Child(name="assigner", order=5, min=0, max=1, type={
141 ca.uhn.fhir.model.dstu.resource.Organization.class })
142 @Description(
143 shortDefinition="Organization that issued id (may be just text)",
144 formalDefinition="Organization that issued/manages the identifier"
145 )
146 private ResourceReferenceDt myAssigner;
147
148
149 @Override
150 public boolean isEmpty() {
151 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myUse, myLabel, mySystem, myValue, myPeriod, myAssigner);
152 }
153
154 @Override
155 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
156 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUse, myLabel, mySystem, myValue, myPeriod, myAssigner);
157 }
158
159
160
161
162
163
164
165
166
167
168
169 public BoundCodeDt<IdentifierUseEnum> getUse() {
170 if (myUse == null) {
171 myUse = new BoundCodeDt<IdentifierUseEnum>(IdentifierUseEnum.VALUESET_BINDER);
172 }
173 return myUse;
174 }
175
176
177
178
179
180
181
182
183
184 public IdentifierDt setUse(BoundCodeDt<IdentifierUseEnum> theValue) {
185 myUse = theValue;
186 return this;
187 }
188
189
190
191
192
193
194
195
196
197 public IdentifierDt setUse(IdentifierUseEnum theValue) {
198 getUse().setValueAsEnum(theValue);
199 return this;
200 }
201
202
203
204
205
206
207
208
209
210
211
212
213 public StringDt getLabel() {
214 if (myLabel == null) {
215 myLabel = new StringDt();
216 }
217 return myLabel;
218 }
219
220
221
222
223
224
225
226
227
228 public IdentifierDt setLabel(StringDt theValue) {
229 myLabel = theValue;
230 return this;
231 }
232
233
234
235
236
237
238
239
240
241 public IdentifierDt setLabel( String theString) {
242 myLabel = new StringDt(theString);
243 return this;
244 }
245
246
247
248
249
250
251
252
253
254
255
256
257 public UriDt getSystem() {
258 if (mySystem == null) {
259 mySystem = new UriDt();
260 }
261 return mySystem;
262 }
263
264
265
266
267
268
269
270
271
272 public IdentifierDt setSystem(UriDt theValue) {
273 mySystem = theValue;
274 return this;
275 }
276
277
278
279
280
281
282
283
284
285 public IdentifierDt setSystem( String theUri) {
286 mySystem = new UriDt(theUri);
287 return this;
288 }
289
290
291
292
293
294
295
296
297
298
299
300
301 public StringDt getValue() {
302 if (myValue == null) {
303 myValue = new StringDt();
304 }
305 return myValue;
306 }
307
308
309
310
311
312
313
314
315
316 public IdentifierDt setValue(StringDt theValue) {
317 myValue = theValue;
318 return this;
319 }
320
321
322
323
324
325
326
327
328
329 public IdentifierDt setValue( String theString) {
330 myValue = new StringDt(theString);
331 return this;
332 }
333
334
335
336
337
338
339
340
341
342
343
344
345 public PeriodDt getPeriod() {
346 if (myPeriod == null) {
347 myPeriod = new PeriodDt();
348 }
349 return myPeriod;
350 }
351
352
353
354
355
356
357
358
359
360 public IdentifierDt setPeriod(PeriodDt theValue) {
361 myPeriod = theValue;
362 return this;
363 }
364
365
366
367
368
369
370
371
372
373
374
375
376 public ResourceReferenceDt getAssigner() {
377 if (myAssigner == null) {
378 myAssigner = new ResourceReferenceDt();
379 }
380 return myAssigner;
381 }
382
383
384
385
386
387
388
389
390
391 public IdentifierDt setAssigner(ResourceReferenceDt theValue) {
392 myAssigner = theValue;
393 return this;
394 }
395
396
397
398
399 }