View Javadoc
1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  package ca.uhn.fhir.model.dstu.resource;
18  
19  /*
20   * #%L
21   * HAPI FHIR - Core Library
22   * %%
23   * Copyright (C) 2014 University Health Network
24   * %%
25   * Licensed under the Apache License, Version 2.0 (the "License");
26   * you may not use this file except in compliance with the License.
27   * You may obtain a copy of the License at
28   * 
29   *      http://www.apache.org/licenses/LICENSE-2.0
30   * 
31   * Unless required by applicable law or agreed to in writing, software
32   * distributed under the License is distributed on an "AS IS" BASIS,
33   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34   * See the License for the specific language governing permissions and
35   * limitations under the License.
36   * #L%
37   */
38  
39  
40  import java.util.Date;
41  import java.util.List;
42  
43  import ca.uhn.fhir.model.api.BaseIdentifiableElement;
44  import ca.uhn.fhir.model.api.BaseResource;
45  import ca.uhn.fhir.model.api.IDatatype;
46  import ca.uhn.fhir.model.api.IElement;
47  import ca.uhn.fhir.model.api.IResource;
48  import ca.uhn.fhir.model.api.IResourceBlock;
49  import ca.uhn.fhir.model.api.Include;
50  import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
51  import ca.uhn.fhir.model.api.annotation.Block;
52  import ca.uhn.fhir.model.api.annotation.Child;
53  import ca.uhn.fhir.model.api.annotation.Description;
54  import ca.uhn.fhir.model.api.annotation.ResourceDef;
55  import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
56  import ca.uhn.fhir.model.dstu.composite.CodingDt;
57  import ca.uhn.fhir.model.dstu.composite.ContactDt;
58  import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum;
59  import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum;
60  import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum;
61  import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
62  import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum;
63  import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum;
64  import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum;
65  import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum;
66  import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum;
67  import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum;
68  import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum;
69  import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum;
70  import ca.uhn.fhir.model.primitive.BooleanDt;
71  import ca.uhn.fhir.model.primitive.BoundCodeDt;
72  import ca.uhn.fhir.model.primitive.CodeDt;
73  import ca.uhn.fhir.model.primitive.DateTimeDt;
74  import ca.uhn.fhir.model.primitive.IdDt;
75  import ca.uhn.fhir.model.primitive.IntegerDt;
76  import ca.uhn.fhir.model.primitive.StringDt;
77  import ca.uhn.fhir.model.primitive.UriDt;
78  import ca.uhn.fhir.rest.gclient.DateClientParam;
79  import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
80  import ca.uhn.fhir.rest.gclient.StringClientParam;
81  import ca.uhn.fhir.rest.gclient.TokenClientParam;
82  
83  
84  /**
85   * HAPI/FHIR <b>Profile</b> Resource
86   * (Resource Profile)
87   *
88   * <p>
89   * <b>Definition:</b>
90   * A Resource Profile - a statement of use of one or more FHIR Resources.  It may include constraints on Resources and Data Types, Terminology Binding Statements and Extension Definitions
91   * </p> 
92   *
93   * <p>
94   * <b>Requirements:</b>
95   * 
96   * </p> 
97   *
98   * <p>
99   * <b>Profile Definition:</b>
100  * <a href="http://hl7.org/fhir/profiles/Profile">http://hl7.org/fhir/profiles/Profile</a> 
101  * </p>
102  *
103  */
104 @ResourceDef(name="Profile", profile="http://hl7.org/fhir/profiles/Profile", id="profile")
105 public class Profile extends BaseResource implements IResource {
106 
107 	/**
108 	 * Search parameter constant for <b>identifier</b>
109 	 * <p>
110 	 * Description: <b>The identifier of the profile</b><br/>
111 	 * Type: <b>token</b><br/>
112 	 * Path: <b>Profile.identifier</b><br/>
113 	 * </p>
114 	 */
115 	@SearchParamDefinition(name="identifier", path="Profile.identifier", description="The identifier of the profile", type="token"  )
116 	public static final String SP_IDENTIFIER = "identifier";
117 
118 	/**
119 	 * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
120 	 * <p>
121 	 * Description: <b>The identifier of the profile</b><br/>
122 	 * Type: <b>token</b><br/>
123 	 * Path: <b>Profile.identifier</b><br/>
124 	 * </p>
125 	 */
126 	public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
127 
128 	/**
129 	 * Search parameter constant for <b>version</b>
130 	 * <p>
131 	 * Description: <b>The version identifier of the profile</b><br/>
132 	 * Type: <b>token</b><br/>
133 	 * Path: <b>Profile.version</b><br/>
134 	 * </p>
135 	 */
136 	@SearchParamDefinition(name="version", path="Profile.version", description="The version identifier of the profile", type="token"  )
137 	public static final String SP_VERSION = "version";
138 
139 	/**
140 	 * <b>Fluent Client</b> search parameter constant for <b>version</b>
141 	 * <p>
142 	 * Description: <b>The version identifier of the profile</b><br/>
143 	 * Type: <b>token</b><br/>
144 	 * Path: <b>Profile.version</b><br/>
145 	 * </p>
146 	 */
147 	public static final TokenClientParam VERSION = new TokenClientParam(SP_VERSION);
148 
149 	/**
150 	 * Search parameter constant for <b>name</b>
151 	 * <p>
152 	 * Description: <b>Name of the profile</b><br/>
153 	 * Type: <b>string</b><br/>
154 	 * Path: <b>Profile.name</b><br/>
155 	 * </p>
156 	 */
157 	@SearchParamDefinition(name="name", path="Profile.name", description="Name of the profile", type="string"  )
158 	public static final String SP_NAME = "name";
159 
160 	/**
161 	 * <b>Fluent Client</b> search parameter constant for <b>name</b>
162 	 * <p>
163 	 * Description: <b>Name of the profile</b><br/>
164 	 * Type: <b>string</b><br/>
165 	 * Path: <b>Profile.name</b><br/>
166 	 * </p>
167 	 */
168 	public static final StringClientParam NAME = new StringClientParam(SP_NAME);
169 
170 	/**
171 	 * Search parameter constant for <b>publisher</b>
172 	 * <p>
173 	 * Description: <b>Name of the publisher of the profile</b><br/>
174 	 * Type: <b>string</b><br/>
175 	 * Path: <b>Profile.publisher</b><br/>
176 	 * </p>
177 	 */
178 	@SearchParamDefinition(name="publisher", path="Profile.publisher", description="Name of the publisher of the profile", type="string"  )
179 	public static final String SP_PUBLISHER = "publisher";
180 
181 	/**
182 	 * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
183 	 * <p>
184 	 * Description: <b>Name of the publisher of the profile</b><br/>
185 	 * Type: <b>string</b><br/>
186 	 * Path: <b>Profile.publisher</b><br/>
187 	 * </p>
188 	 */
189 	public static final StringClientParam PUBLISHER = new StringClientParam(SP_PUBLISHER);
190 
191 	/**
192 	 * Search parameter constant for <b>description</b>
193 	 * <p>
194 	 * Description: <b>Text search in the description of the profile</b><br/>
195 	 * Type: <b>string</b><br/>
196 	 * Path: <b>Profile.description</b><br/>
197 	 * </p>
198 	 */
199 	@SearchParamDefinition(name="description", path="Profile.description", description="Text search in the description of the profile", type="string"  )
200 	public static final String SP_DESCRIPTION = "description";
201 
202 	/**
203 	 * <b>Fluent Client</b> search parameter constant for <b>description</b>
204 	 * <p>
205 	 * Description: <b>Text search in the description of the profile</b><br/>
206 	 * Type: <b>string</b><br/>
207 	 * Path: <b>Profile.description</b><br/>
208 	 * </p>
209 	 */
210 	public static final StringClientParam DESCRIPTION = new StringClientParam(SP_DESCRIPTION);
211 
212 	/**
213 	 * Search parameter constant for <b>status</b>
214 	 * <p>
215 	 * Description: <b>The current status of the profile</b><br/>
216 	 * Type: <b>token</b><br/>
217 	 * Path: <b>Profile.status</b><br/>
218 	 * </p>
219 	 */
220 	@SearchParamDefinition(name="status", path="Profile.status", description="The current status of the profile", type="token"  )
221 	public static final String SP_STATUS = "status";
222 
223 	/**
224 	 * <b>Fluent Client</b> search parameter constant for <b>status</b>
225 	 * <p>
226 	 * Description: <b>The current status of the profile</b><br/>
227 	 * Type: <b>token</b><br/>
228 	 * Path: <b>Profile.status</b><br/>
229 	 * </p>
230 	 */
231 	public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
232 
233 	/**
234 	 * Search parameter constant for <b>date</b>
235 	 * <p>
236 	 * Description: <b>The profile publication date</b><br/>
237 	 * Type: <b>date</b><br/>
238 	 * Path: <b>Profile.date</b><br/>
239 	 * </p>
240 	 */
241 	@SearchParamDefinition(name="date", path="Profile.date", description="The profile publication date", type="date"  )
242 	public static final String SP_DATE = "date";
243 
244 	/**
245 	 * <b>Fluent Client</b> search parameter constant for <b>date</b>
246 	 * <p>
247 	 * Description: <b>The profile publication date</b><br/>
248 	 * Type: <b>date</b><br/>
249 	 * Path: <b>Profile.date</b><br/>
250 	 * </p>
251 	 */
252 	public static final DateClientParam DATE = new DateClientParam(SP_DATE);
253 
254 	/**
255 	 * Search parameter constant for <b>code</b>
256 	 * <p>
257 	 * Description: <b>A code for the profile in the format uri::code (server may choose to do subsumption)</b><br/>
258 	 * Type: <b>token</b><br/>
259 	 * Path: <b>Profile.code</b><br/>
260 	 * </p>
261 	 */
262 	@SearchParamDefinition(name="code", path="Profile.code", description="A code for the profile in the format uri::code (server may choose to do subsumption)", type="token"  )
263 	public static final String SP_CODE = "code";
264 
265 	/**
266 	 * <b>Fluent Client</b> search parameter constant for <b>code</b>
267 	 * <p>
268 	 * Description: <b>A code for the profile in the format uri::code (server may choose to do subsumption)</b><br/>
269 	 * Type: <b>token</b><br/>
270 	 * Path: <b>Profile.code</b><br/>
271 	 * </p>
272 	 */
273 	public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
274 
275 	/**
276 	 * Search parameter constant for <b>extension</b>
277 	 * <p>
278 	 * Description: <b>An extension code (use or definition)</b><br/>
279 	 * Type: <b>token</b><br/>
280 	 * Path: <b>Profile.extensionDefn.code</b><br/>
281 	 * </p>
282 	 */
283 	@SearchParamDefinition(name="extension", path="Profile.extensionDefn.code", description="An extension code (use or definition)", type="token"  )
284 	public static final String SP_EXTENSION = "extension";
285 
286 	/**
287 	 * <b>Fluent Client</b> search parameter constant for <b>extension</b>
288 	 * <p>
289 	 * Description: <b>An extension code (use or definition)</b><br/>
290 	 * Type: <b>token</b><br/>
291 	 * Path: <b>Profile.extensionDefn.code</b><br/>
292 	 * </p>
293 	 */
294 	public static final TokenClientParam EXTENSION = new TokenClientParam(SP_EXTENSION);
295 
296 	/**
297 	 * Search parameter constant for <b>valueset</b>
298 	 * <p>
299 	 * Description: <b>A vocabulary binding code</b><br/>
300 	 * Type: <b>reference</b><br/>
301 	 * Path: <b>Profile.structure.element.definition.binding.reference[x]</b><br/>
302 	 * </p>
303 	 */
304 	@SearchParamDefinition(name="valueset", path="Profile.structure.element.definition.binding.reference[x]", description="A vocabulary binding code", type="reference"  )
305 	public static final String SP_VALUESET = "valueset";
306 
307 	/**
308 	 * <b>Fluent Client</b> search parameter constant for <b>valueset</b>
309 	 * <p>
310 	 * Description: <b>A vocabulary binding code</b><br/>
311 	 * Type: <b>reference</b><br/>
312 	 * Path: <b>Profile.structure.element.definition.binding.reference[x]</b><br/>
313 	 * </p>
314 	 */
315 	public static final ReferenceClientParam VALUESET = new ReferenceClientParam(SP_VALUESET);
316 
317 	/**
318 	 * Constant for fluent queries to be used to add include statements. Specifies
319 	 * the path value of "<b>Profile.structure.element.definition.binding.reference[x]</b>".
320 	 */
321 	public static final Include INCLUDE_STRUCTURE_ELEMENT_DEFINITION_BINDING_REFERENCE = new Include("Profile.structure.element.definition.binding.reference[x]");
322 
323 	/**
324 	 * Search parameter constant for <b>type</b>
325 	 * <p>
326 	 * Description: <b>Type of resource that is constrained in the profile</b><br/>
327 	 * Type: <b>token</b><br/>
328 	 * Path: <b>Profile.structure.type</b><br/>
329 	 * </p>
330 	 */
331 	@SearchParamDefinition(name="type", path="Profile.structure.type", description="Type of resource that is constrained in the profile", type="token"  )
332 	public static final String SP_TYPE = "type";
333 
334 	/**
335 	 * <b>Fluent Client</b> search parameter constant for <b>type</b>
336 	 * <p>
337 	 * Description: <b>Type of resource that is constrained in the profile</b><br/>
338 	 * Type: <b>token</b><br/>
339 	 * Path: <b>Profile.structure.type</b><br/>
340 	 * </p>
341 	 */
342 	public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
343 
344 
345 	@Child(name="identifier", type=StringDt.class, order=0, min=0, max=1)	
346 	@Description(
347 		shortDefinition="Logical id to reference this profile",
348 		formalDefinition="The identifier that is used to identify this profile when it is referenced in a specification, model, design or an instance  (should be globally unique OID, UUID, or URI)"
349 	)
350 	private StringDt myIdentifier;
351 	
352 	@Child(name="version", type=StringDt.class, order=1, min=0, max=1)	
353 	@Description(
354 		shortDefinition="Logical id for this version of the profile",
355 		formalDefinition="The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp"
356 	)
357 	private StringDt myVersion;
358 	
359 	@Child(name="name", type=StringDt.class, order=2, min=1, max=1)	
360 	@Description(
361 		shortDefinition="Informal name for this profile",
362 		formalDefinition="A free text natural language name identifying the Profile"
363 	)
364 	private StringDt myName;
365 	
366 	@Child(name="publisher", type=StringDt.class, order=3, min=0, max=1)	
367 	@Description(
368 		shortDefinition="Name of the publisher (Organization or individual)",
369 		formalDefinition="Details of the individual or organization who accepts responsibility for publishing the profile"
370 	)
371 	private StringDt myPublisher;
372 	
373 	@Child(name="telecom", type=ContactDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)	
374 	@Description(
375 		shortDefinition="Contact information of the publisher",
376 		formalDefinition="Contact details to assist a user in finding and communicating with the publisher"
377 	)
378 	private java.util.List<ContactDt> myTelecom;
379 	
380 	@Child(name="description", type=StringDt.class, order=5, min=0, max=1)	
381 	@Description(
382 		shortDefinition="Natural language description of the profile",
383 		formalDefinition="A free text natural language description of the profile and its use"
384 	)
385 	private StringDt myDescription;
386 	
387 	@Child(name="code", type=CodingDt.class, order=6, min=0, max=Child.MAX_UNLIMITED)	
388 	@Description(
389 		shortDefinition="Assist with indexing and finding",
390 		formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of templates."
391 	)
392 	private java.util.List<CodingDt> myCode;
393 	
394 	@Child(name="status", type=CodeDt.class, order=7, min=1, max=1)	
395 	@Description(
396 		shortDefinition="draft | active | retired",
397 		formalDefinition="The status of the profile"
398 	)
399 	private BoundCodeDt<ResourceProfileStatusEnum> myStatus;
400 	
401 	@Child(name="experimental", type=BooleanDt.class, order=8, min=0, max=1)	
402 	@Description(
403 		shortDefinition="If for testing purposes, not real usage",
404 		formalDefinition="This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage"
405 	)
406 	private BooleanDt myExperimental;
407 	
408 	@Child(name="date", type=DateTimeDt.class, order=9, min=0, max=1)	
409 	@Description(
410 		shortDefinition="Date for this version of the profile",
411 		formalDefinition="The date that this version of the profile was published"
412 	)
413 	private DateTimeDt myDate;
414 	
415 	@Child(name="requirements", type=StringDt.class, order=10, min=0, max=1)	
416 	@Description(
417 		shortDefinition="Scope and Usage this profile is for",
418 		formalDefinition="The Scope and Usage that this profile was created to meet"
419 	)
420 	private StringDt myRequirements;
421 	
422 	@Child(name="fhirVersion", type=IdDt.class, order=11, min=0, max=1)	
423 	@Description(
424 		shortDefinition="FHIR Version this profile targets",
425 		formalDefinition="The version of the FHIR specification on which this profile is based"
426 	)
427 	private IdDt myFhirVersion;
428 	
429 	@Child(name="mapping", order=12, min=0, max=Child.MAX_UNLIMITED)	
430 	@Description(
431 		shortDefinition="External specification that the content is mapped to",
432 		formalDefinition="An external specification that the content is mapped to"
433 	)
434 	private java.util.List<Mapping> myMapping;
435 	
436 	@Child(name="structure", order=13, min=0, max=Child.MAX_UNLIMITED)	
437 	@Description(
438 		shortDefinition="A constraint on a resource or a data type",
439 		formalDefinition="A constraint statement about what contents a resource or data type may have"
440 	)
441 	private java.util.List<Structure> myStructure;
442 	
443 	@Child(name="extensionDefn", order=14, min=0, max=Child.MAX_UNLIMITED)	
444 	@Description(
445 		shortDefinition="Definition of an extension",
446 		formalDefinition="An extension defined as part of the profile"
447 	)
448 	private java.util.List<ExtensionDefn> myExtensionDefn;
449 	
450 	@Child(name="query", order=15, min=0, max=Child.MAX_UNLIMITED)	
451 	@Description(
452 		shortDefinition="Definition of a named query",
453 		formalDefinition="Definition of a named query and its parameters and their meaning"
454 	)
455 	private java.util.List<Query> myQuery;
456 	
457 
458 	@Override
459 	public boolean isEmpty() {
460 		return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myVersion,  myName,  myPublisher,  myTelecom,  myDescription,  myCode,  myStatus,  myExperimental,  myDate,  myRequirements,  myFhirVersion,  myMapping,  myStructure,  myExtensionDefn,  myQuery);
461 	}
462 	
463 	@Override
464 	public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
465 		return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myVersion, myName, myPublisher, myTelecom, myDescription, myCode, myStatus, myExperimental, myDate, myRequirements, myFhirVersion, myMapping, myStructure, myExtensionDefn, myQuery);
466 	}
467 
468 	/**
469 	 * Gets the value(s) for <b>identifier</b> (Logical id to reference this profile).
470 	 * creating it if it does
471 	 * not exist. Will not return <code>null</code>.
472 	 *
473      * <p>
474      * <b>Definition:</b>
475      * The identifier that is used to identify this profile when it is referenced in a specification, model, design or an instance  (should be globally unique OID, UUID, or URI)
476      * </p> 
477 	 */
478 	public StringDt getIdentifier() {  
479 		if (myIdentifier == null) {
480 			myIdentifier = new StringDt();
481 		}
482 		return myIdentifier;
483 	}
484 
485 	/**
486 	 * Sets the value(s) for <b>identifier</b> (Logical id to reference this profile)
487 	 *
488      * <p>
489      * <b>Definition:</b>
490      * The identifier that is used to identify this profile when it is referenced in a specification, model, design or an instance  (should be globally unique OID, UUID, or URI)
491      * </p> 
492 	 */
493 	public Profile setIdentifier(StringDt theValue) {
494 		myIdentifier = theValue;
495 		return this;
496 	}
497 
498  	/**
499 	 * Sets the value for <b>identifier</b> (Logical id to reference this profile)
500 	 *
501      * <p>
502      * <b>Definition:</b>
503      * The identifier that is used to identify this profile when it is referenced in a specification, model, design or an instance  (should be globally unique OID, UUID, or URI)
504      * </p> 
505 	 */
506 	public Profile setIdentifier( String theString) {
507 		myIdentifier = new StringDt(theString); 
508 		return this; 
509 	}
510 
511  
512 	/**
513 	 * Gets the value(s) for <b>version</b> (Logical id for this version of the profile).
514 	 * creating it if it does
515 	 * not exist. Will not return <code>null</code>.
516 	 *
517      * <p>
518      * <b>Definition:</b>
519      * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp
520      * </p> 
521 	 */
522 	public StringDt getVersion() {  
523 		if (myVersion == null) {
524 			myVersion = new StringDt();
525 		}
526 		return myVersion;
527 	}
528 
529 	/**
530 	 * Sets the value(s) for <b>version</b> (Logical id for this version of the profile)
531 	 *
532      * <p>
533      * <b>Definition:</b>
534      * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp
535      * </p> 
536 	 */
537 	public Profile setVersion(StringDt theValue) {
538 		myVersion = theValue;
539 		return this;
540 	}
541 
542  	/**
543 	 * Sets the value for <b>version</b> (Logical id for this version of the profile)
544 	 *
545      * <p>
546      * <b>Definition:</b>
547      * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp
548      * </p> 
549 	 */
550 	public Profile setVersion( String theString) {
551 		myVersion = new StringDt(theString); 
552 		return this; 
553 	}
554 
555  
556 	/**
557 	 * Gets the value(s) for <b>name</b> (Informal name for this profile).
558 	 * creating it if it does
559 	 * not exist. Will not return <code>null</code>.
560 	 *
561      * <p>
562      * <b>Definition:</b>
563      * A free text natural language name identifying the Profile
564      * </p> 
565 	 */
566 	public StringDt getName() {  
567 		if (myName == null) {
568 			myName = new StringDt();
569 		}
570 		return myName;
571 	}
572 
573 	/**
574 	 * Sets the value(s) for <b>name</b> (Informal name for this profile)
575 	 *
576      * <p>
577      * <b>Definition:</b>
578      * A free text natural language name identifying the Profile
579      * </p> 
580 	 */
581 	public Profile setName(StringDt theValue) {
582 		myName = theValue;
583 		return this;
584 	}
585 
586  	/**
587 	 * Sets the value for <b>name</b> (Informal name for this profile)
588 	 *
589      * <p>
590      * <b>Definition:</b>
591      * A free text natural language name identifying the Profile
592      * </p> 
593 	 */
594 	public Profile setName( String theString) {
595 		myName = new StringDt(theString); 
596 		return this; 
597 	}
598 
599  
600 	/**
601 	 * Gets the value(s) for <b>publisher</b> (Name of the publisher (Organization or individual)).
602 	 * creating it if it does
603 	 * not exist. Will not return <code>null</code>.
604 	 *
605      * <p>
606      * <b>Definition:</b>
607      * Details of the individual or organization who accepts responsibility for publishing the profile
608      * </p> 
609 	 */
610 	public StringDt getPublisher() {  
611 		if (myPublisher == null) {
612 			myPublisher = new StringDt();
613 		}
614 		return myPublisher;
615 	}
616 
617 	/**
618 	 * Sets the value(s) for <b>publisher</b> (Name of the publisher (Organization or individual))
619 	 *
620      * <p>
621      * <b>Definition:</b>
622      * Details of the individual or organization who accepts responsibility for publishing the profile
623      * </p> 
624 	 */
625 	public Profile setPublisher(StringDt theValue) {
626 		myPublisher = theValue;
627 		return this;
628 	}
629 
630  	/**
631 	 * Sets the value for <b>publisher</b> (Name of the publisher (Organization or individual))
632 	 *
633      * <p>
634      * <b>Definition:</b>
635      * Details of the individual or organization who accepts responsibility for publishing the profile
636      * </p> 
637 	 */
638 	public Profile setPublisher( String theString) {
639 		myPublisher = new StringDt(theString); 
640 		return this; 
641 	}
642 
643  
644 	/**
645 	 * Gets the value(s) for <b>telecom</b> (Contact information of the publisher).
646 	 * creating it if it does
647 	 * not exist. Will not return <code>null</code>.
648 	 *
649      * <p>
650      * <b>Definition:</b>
651      * Contact details to assist a user in finding and communicating with the publisher
652      * </p> 
653 	 */
654 	public java.util.List<ContactDt> getTelecom() {  
655 		if (myTelecom == null) {
656 			myTelecom = new java.util.ArrayList<ContactDt>();
657 		}
658 		return myTelecom;
659 	}
660 
661 	/**
662 	 * Sets the value(s) for <b>telecom</b> (Contact information of the publisher)
663 	 *
664      * <p>
665      * <b>Definition:</b>
666      * Contact details to assist a user in finding and communicating with the publisher
667      * </p> 
668 	 */
669 	public Profile setTelecom(java.util.List<ContactDt> theValue) {
670 		myTelecom = theValue;
671 		return this;
672 	}
673 
674 	/**
675 	 * Adds and returns a new value for <b>telecom</b> (Contact information of the publisher)
676 	 *
677      * <p>
678      * <b>Definition:</b>
679      * Contact details to assist a user in finding and communicating with the publisher
680      * </p> 
681 	 */
682 	public ContactDt addTelecom() {
683 		ContactDt newType = new ContactDt();
684 		getTelecom().add(newType);
685 		return newType; 
686 	}
687 
688 	/**
689 	 * Gets the first repetition for <b>telecom</b> (Contact information of the publisher),
690 	 * creating it if it does not already exist.
691 	 *
692      * <p>
693      * <b>Definition:</b>
694      * Contact details to assist a user in finding and communicating with the publisher
695      * </p> 
696 	 */
697 	public ContactDt getTelecomFirstRep() {
698 		if (getTelecom().isEmpty()) {
699 			return addTelecom();
700 		}
701 		return getTelecom().get(0); 
702 	}
703  	/**
704 	 * Adds a new value for <b>telecom</b> (Contact information of the publisher)
705 	 *
706      * <p>
707      * <b>Definition:</b>
708      * Contact details to assist a user in finding and communicating with the publisher
709      * </p> 
710      *
711      * @return Returns a reference to this object, to allow for simple chaining.
712 	 */
713 	public Profile addTelecom( ContactUseEnum theContactUse,  String theValue) {
714 		if (myTelecom == null) {
715 			myTelecom = new java.util.ArrayList<ContactDt>();
716 		}
717 		myTelecom.add(new ContactDt(theContactUse, theValue));
718 		return this; 
719 	}
720 
721 	/**
722 	 * Adds a new value for <b>telecom</b> (Contact information of the publisher)
723 	 *
724      * <p>
725      * <b>Definition:</b>
726      * Contact details to assist a user in finding and communicating with the publisher
727      * </p> 
728      *
729      * @return Returns a reference to this object, to allow for simple chaining.
730 	 */
731 	public Profile addTelecom( String theValue) {
732 		if (myTelecom == null) {
733 			myTelecom = new java.util.ArrayList<ContactDt>();
734 		}
735 		myTelecom.add(new ContactDt(theValue));
736 		return this; 
737 	}
738 
739  
740 	/**
741 	 * Gets the value(s) for <b>description</b> (Natural language description of the profile).
742 	 * creating it if it does
743 	 * not exist. Will not return <code>null</code>.
744 	 *
745      * <p>
746      * <b>Definition:</b>
747      * A free text natural language description of the profile and its use
748      * </p> 
749 	 */
750 	public StringDt getDescription() {  
751 		if (myDescription == null) {
752 			myDescription = new StringDt();
753 		}
754 		return myDescription;
755 	}
756 
757 	/**
758 	 * Sets the value(s) for <b>description</b> (Natural language description of the profile)
759 	 *
760      * <p>
761      * <b>Definition:</b>
762      * A free text natural language description of the profile and its use
763      * </p> 
764 	 */
765 	public Profile setDescription(StringDt theValue) {
766 		myDescription = theValue;
767 		return this;
768 	}
769 
770  	/**
771 	 * Sets the value for <b>description</b> (Natural language description of the profile)
772 	 *
773      * <p>
774      * <b>Definition:</b>
775      * A free text natural language description of the profile and its use
776      * </p> 
777 	 */
778 	public Profile setDescription( String theString) {
779 		myDescription = new StringDt(theString); 
780 		return this; 
781 	}
782 
783  
784 	/**
785 	 * Gets the value(s) for <b>code</b> (Assist with indexing and finding).
786 	 * creating it if it does
787 	 * not exist. Will not return <code>null</code>.
788 	 *
789      * <p>
790      * <b>Definition:</b>
791      * A set of terms from external terminologies that may be used to assist with indexing and searching of templates.
792      * </p> 
793 	 */
794 	public java.util.List<CodingDt> getCode() {  
795 		if (myCode == null) {
796 			myCode = new java.util.ArrayList<CodingDt>();
797 		}
798 		return myCode;
799 	}
800 
801 	/**
802 	 * Sets the value(s) for <b>code</b> (Assist with indexing and finding)
803 	 *
804      * <p>
805      * <b>Definition:</b>
806      * A set of terms from external terminologies that may be used to assist with indexing and searching of templates.
807      * </p> 
808 	 */
809 	public Profile setCode(java.util.List<CodingDt> theValue) {
810 		myCode = theValue;
811 		return this;
812 	}
813 
814 	/**
815 	 * Adds and returns a new value for <b>code</b> (Assist with indexing and finding)
816 	 *
817      * <p>
818      * <b>Definition:</b>
819      * A set of terms from external terminologies that may be used to assist with indexing and searching of templates.
820      * </p> 
821 	 */
822 	public CodingDt addCode() {
823 		CodingDt newType = new CodingDt();
824 		getCode().add(newType);
825 		return newType; 
826 	}
827 
828 	/**
829 	 * Gets the first repetition for <b>code</b> (Assist with indexing and finding),
830 	 * creating it if it does not already exist.
831 	 *
832      * <p>
833      * <b>Definition:</b>
834      * A set of terms from external terminologies that may be used to assist with indexing and searching of templates.
835      * </p> 
836 	 */
837 	public CodingDt getCodeFirstRep() {
838 		if (getCode().isEmpty()) {
839 			return addCode();
840 		}
841 		return getCode().get(0); 
842 	}
843   
844 	/**
845 	 * Gets the value(s) for <b>status</b> (draft | active | retired).
846 	 * creating it if it does
847 	 * not exist. Will not return <code>null</code>.
848 	 *
849      * <p>
850      * <b>Definition:</b>
851      * The status of the profile
852      * </p> 
853 	 */
854 	public BoundCodeDt<ResourceProfileStatusEnum> getStatus() {  
855 		if (myStatus == null) {
856 			myStatus = new BoundCodeDt<ResourceProfileStatusEnum>(ResourceProfileStatusEnum.VALUESET_BINDER);
857 		}
858 		return myStatus;
859 	}
860 
861 	/**
862 	 * Sets the value(s) for <b>status</b> (draft | active | retired)
863 	 *
864      * <p>
865      * <b>Definition:</b>
866      * The status of the profile
867      * </p> 
868 	 */
869 	public Profile setStatus(BoundCodeDt<ResourceProfileStatusEnum> theValue) {
870 		myStatus = theValue;
871 		return this;
872 	}
873 
874 	/**
875 	 * Sets the value(s) for <b>status</b> (draft | active | retired)
876 	 *
877      * <p>
878      * <b>Definition:</b>
879      * The status of the profile
880      * </p> 
881 	 */
882 	public Profile setStatus(ResourceProfileStatusEnum theValue) {
883 		getStatus().setValueAsEnum(theValue);
884 		return this;
885 	}
886 
887   
888 	/**
889 	 * Gets the value(s) for <b>experimental</b> (If for testing purposes, not real usage).
890 	 * creating it if it does
891 	 * not exist. Will not return <code>null</code>.
892 	 *
893      * <p>
894      * <b>Definition:</b>
895      * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
896      * </p> 
897 	 */
898 	public BooleanDt getExperimental() {  
899 		if (myExperimental == null) {
900 			myExperimental = new BooleanDt();
901 		}
902 		return myExperimental;
903 	}
904 
905 	/**
906 	 * Sets the value(s) for <b>experimental</b> (If for testing purposes, not real usage)
907 	 *
908      * <p>
909      * <b>Definition:</b>
910      * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
911      * </p> 
912 	 */
913 	public Profile setExperimental(BooleanDt theValue) {
914 		myExperimental = theValue;
915 		return this;
916 	}
917 
918  	/**
919 	 * Sets the value for <b>experimental</b> (If for testing purposes, not real usage)
920 	 *
921      * <p>
922      * <b>Definition:</b>
923      * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
924      * </p> 
925 	 */
926 	public Profile setExperimental( boolean theBoolean) {
927 		myExperimental = new BooleanDt(theBoolean); 
928 		return this; 
929 	}
930 
931  
932 	/**
933 	 * Gets the value(s) for <b>date</b> (Date for this version of the profile).
934 	 * creating it if it does
935 	 * not exist. Will not return <code>null</code>.
936 	 *
937      * <p>
938      * <b>Definition:</b>
939      * The date that this version of the profile was published
940      * </p> 
941 	 */
942 	public DateTimeDt getDate() {  
943 		if (myDate == null) {
944 			myDate = new DateTimeDt();
945 		}
946 		return myDate;
947 	}
948 
949 	/**
950 	 * Sets the value(s) for <b>date</b> (Date for this version of the profile)
951 	 *
952      * <p>
953      * <b>Definition:</b>
954      * The date that this version of the profile was published
955      * </p> 
956 	 */
957 	public Profile setDate(DateTimeDt theValue) {
958 		myDate = theValue;
959 		return this;
960 	}
961 
962  	/**
963 	 * Sets the value for <b>date</b> (Date for this version of the profile)
964 	 *
965      * <p>
966      * <b>Definition:</b>
967      * The date that this version of the profile was published
968      * </p> 
969 	 */
970 	public Profile setDateWithSecondsPrecision( Date theDate) {
971 		myDate = new DateTimeDt(theDate); 
972 		return this; 
973 	}
974 
975 	/**
976 	 * Sets the value for <b>date</b> (Date for this version of the profile)
977 	 *
978      * <p>
979      * <b>Definition:</b>
980      * The date that this version of the profile was published
981      * </p> 
982 	 */
983 	public Profile setDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
984 		myDate = new DateTimeDt(theDate, thePrecision); 
985 		return this; 
986 	}
987 
988  
989 	/**
990 	 * Gets the value(s) for <b>requirements</b> (Scope and Usage this profile is for).
991 	 * creating it if it does
992 	 * not exist. Will not return <code>null</code>.
993 	 *
994      * <p>
995      * <b>Definition:</b>
996      * The Scope and Usage that this profile was created to meet
997      * </p> 
998 	 */
999 	public StringDt getRequirements() {  
1000 		if (myRequirements == null) {
1001 			myRequirements = new StringDt();
1002 		}
1003 		return myRequirements;
1004 	}
1005 
1006 	/**
1007 	 * Sets the value(s) for <b>requirements</b> (Scope and Usage this profile is for)
1008 	 *
1009      * <p>
1010      * <b>Definition:</b>
1011      * The Scope and Usage that this profile was created to meet
1012      * </p> 
1013 	 */
1014 	public Profile setRequirements(StringDt theValue) {
1015 		myRequirements = theValue;
1016 		return this;
1017 	}
1018 
1019  	/**
1020 	 * Sets the value for <b>requirements</b> (Scope and Usage this profile is for)
1021 	 *
1022      * <p>
1023      * <b>Definition:</b>
1024      * The Scope and Usage that this profile was created to meet
1025      * </p> 
1026 	 */
1027 	public Profile setRequirements( String theString) {
1028 		myRequirements = new StringDt(theString); 
1029 		return this; 
1030 	}
1031 
1032  
1033 	/**
1034 	 * Gets the value(s) for <b>fhirVersion</b> (FHIR Version this profile targets).
1035 	 * creating it if it does
1036 	 * not exist. Will not return <code>null</code>.
1037 	 *
1038      * <p>
1039      * <b>Definition:</b>
1040      * The version of the FHIR specification on which this profile is based
1041      * </p> 
1042 	 */
1043 	public IdDt getFhirVersion() {  
1044 		if (myFhirVersion == null) {
1045 			myFhirVersion = new IdDt();
1046 		}
1047 		return myFhirVersion;
1048 	}
1049 
1050 	/**
1051 	 * Sets the value(s) for <b>fhirVersion</b> (FHIR Version this profile targets)
1052 	 *
1053      * <p>
1054      * <b>Definition:</b>
1055      * The version of the FHIR specification on which this profile is based
1056      * </p> 
1057 	 */
1058 	public Profile setFhirVersion(IdDt theValue) {
1059 		myFhirVersion = theValue;
1060 		return this;
1061 	}
1062 
1063  	/**
1064 	 * Sets the value for <b>fhirVersion</b> (FHIR Version this profile targets)
1065 	 *
1066      * <p>
1067      * <b>Definition:</b>
1068      * The version of the FHIR specification on which this profile is based
1069      * </p> 
1070 	 */
1071 	public Profile setFhirVersion( String theId) {
1072 		myFhirVersion = new IdDt(theId); 
1073 		return this; 
1074 	}
1075 
1076  
1077 	/**
1078 	 * Gets the value(s) for <b>mapping</b> (External specification that the content is mapped to).
1079 	 * creating it if it does
1080 	 * not exist. Will not return <code>null</code>.
1081 	 *
1082      * <p>
1083      * <b>Definition:</b>
1084      * An external specification that the content is mapped to
1085      * </p> 
1086 	 */
1087 	public java.util.List<Mapping> getMapping() {  
1088 		if (myMapping == null) {
1089 			myMapping = new java.util.ArrayList<Mapping>();
1090 		}
1091 		return myMapping;
1092 	}
1093 
1094 	/**
1095 	 * Sets the value(s) for <b>mapping</b> (External specification that the content is mapped to)
1096 	 *
1097      * <p>
1098      * <b>Definition:</b>
1099      * An external specification that the content is mapped to
1100      * </p> 
1101 	 */
1102 	public Profile setMapping(java.util.List<Mapping> theValue) {
1103 		myMapping = theValue;
1104 		return this;
1105 	}
1106 
1107 	/**
1108 	 * Adds and returns a new value for <b>mapping</b> (External specification that the content is mapped to)
1109 	 *
1110      * <p>
1111      * <b>Definition:</b>
1112      * An external specification that the content is mapped to
1113      * </p> 
1114 	 */
1115 	public Mapping addMapping() {
1116 		Mapping newType = new Mapping();
1117 		getMapping().add(newType);
1118 		return newType; 
1119 	}
1120 
1121 	/**
1122 	 * Gets the first repetition for <b>mapping</b> (External specification that the content is mapped to),
1123 	 * creating it if it does not already exist.
1124 	 *
1125      * <p>
1126      * <b>Definition:</b>
1127      * An external specification that the content is mapped to
1128      * </p> 
1129 	 */
1130 	public Mapping getMappingFirstRep() {
1131 		if (getMapping().isEmpty()) {
1132 			return addMapping();
1133 		}
1134 		return getMapping().get(0); 
1135 	}
1136   
1137 	/**
1138 	 * Gets the value(s) for <b>structure</b> (A constraint on a resource or a data type).
1139 	 * creating it if it does
1140 	 * not exist. Will not return <code>null</code>.
1141 	 *
1142      * <p>
1143      * <b>Definition:</b>
1144      * A constraint statement about what contents a resource or data type may have
1145      * </p> 
1146 	 */
1147 	public java.util.List<Structure> getStructure() {  
1148 		if (myStructure == null) {
1149 			myStructure = new java.util.ArrayList<Structure>();
1150 		}
1151 		return myStructure;
1152 	}
1153 
1154 	/**
1155 	 * Sets the value(s) for <b>structure</b> (A constraint on a resource or a data type)
1156 	 *
1157      * <p>
1158      * <b>Definition:</b>
1159      * A constraint statement about what contents a resource or data type may have
1160      * </p> 
1161 	 */
1162 	public Profile setStructure(java.util.List<Structure> theValue) {
1163 		myStructure = theValue;
1164 		return this;
1165 	}
1166 
1167 	/**
1168 	 * Adds and returns a new value for <b>structure</b> (A constraint on a resource or a data type)
1169 	 *
1170      * <p>
1171      * <b>Definition:</b>
1172      * A constraint statement about what contents a resource or data type may have
1173      * </p> 
1174 	 */
1175 	public Structure addStructure() {
1176 		Structure newType = new Structure();
1177 		getStructure().add(newType);
1178 		return newType; 
1179 	}
1180 
1181 	/**
1182 	 * Gets the first repetition for <b>structure</b> (A constraint on a resource or a data type),
1183 	 * creating it if it does not already exist.
1184 	 *
1185      * <p>
1186      * <b>Definition:</b>
1187      * A constraint statement about what contents a resource or data type may have
1188      * </p> 
1189 	 */
1190 	public Structure getStructureFirstRep() {
1191 		if (getStructure().isEmpty()) {
1192 			return addStructure();
1193 		}
1194 		return getStructure().get(0); 
1195 	}
1196   
1197 	/**
1198 	 * Gets the value(s) for <b>extensionDefn</b> (Definition of an extension).
1199 	 * creating it if it does
1200 	 * not exist. Will not return <code>null</code>.
1201 	 *
1202      * <p>
1203      * <b>Definition:</b>
1204      * An extension defined as part of the profile
1205      * </p> 
1206 	 */
1207 	public java.util.List<ExtensionDefn> getExtensionDefn() {  
1208 		if (myExtensionDefn == null) {
1209 			myExtensionDefn = new java.util.ArrayList<ExtensionDefn>();
1210 		}
1211 		return myExtensionDefn;
1212 	}
1213 
1214 	/**
1215 	 * Sets the value(s) for <b>extensionDefn</b> (Definition of an extension)
1216 	 *
1217      * <p>
1218      * <b>Definition:</b>
1219      * An extension defined as part of the profile
1220      * </p> 
1221 	 */
1222 	public Profile setExtensionDefn(java.util.List<ExtensionDefn> theValue) {
1223 		myExtensionDefn = theValue;
1224 		return this;
1225 	}
1226 
1227 	/**
1228 	 * Adds and returns a new value for <b>extensionDefn</b> (Definition of an extension)
1229 	 *
1230      * <p>
1231      * <b>Definition:</b>
1232      * An extension defined as part of the profile
1233      * </p> 
1234 	 */
1235 	public ExtensionDefn addExtensionDefn() {
1236 		ExtensionDefn newType = new ExtensionDefn();
1237 		getExtensionDefn().add(newType);
1238 		return newType; 
1239 	}
1240 
1241 	/**
1242 	 * Gets the first repetition for <b>extensionDefn</b> (Definition of an extension),
1243 	 * creating it if it does not already exist.
1244 	 *
1245      * <p>
1246      * <b>Definition:</b>
1247      * An extension defined as part of the profile
1248      * </p> 
1249 	 */
1250 	public ExtensionDefn getExtensionDefnFirstRep() {
1251 		if (getExtensionDefn().isEmpty()) {
1252 			return addExtensionDefn();
1253 		}
1254 		return getExtensionDefn().get(0); 
1255 	}
1256   
1257 	/**
1258 	 * Gets the value(s) for <b>query</b> (Definition of a named query).
1259 	 * creating it if it does
1260 	 * not exist. Will not return <code>null</code>.
1261 	 *
1262      * <p>
1263      * <b>Definition:</b>
1264      * Definition of a named query and its parameters and their meaning
1265      * </p> 
1266 	 */
1267 	public java.util.List<Query> getQuery() {  
1268 		if (myQuery == null) {
1269 			myQuery = new java.util.ArrayList<Query>();
1270 		}
1271 		return myQuery;
1272 	}
1273 
1274 	/**
1275 	 * Sets the value(s) for <b>query</b> (Definition of a named query)
1276 	 *
1277      * <p>
1278      * <b>Definition:</b>
1279      * Definition of a named query and its parameters and their meaning
1280      * </p> 
1281 	 */
1282 	public Profile setQuery(java.util.List<Query> theValue) {
1283 		myQuery = theValue;
1284 		return this;
1285 	}
1286 
1287 	/**
1288 	 * Adds and returns a new value for <b>query</b> (Definition of a named query)
1289 	 *
1290      * <p>
1291      * <b>Definition:</b>
1292      * Definition of a named query and its parameters and their meaning
1293      * </p> 
1294 	 */
1295 	public Query addQuery() {
1296 		Query newType = new Query();
1297 		getQuery().add(newType);
1298 		return newType; 
1299 	}
1300 
1301 	/**
1302 	 * Gets the first repetition for <b>query</b> (Definition of a named query),
1303 	 * creating it if it does not already exist.
1304 	 *
1305      * <p>
1306      * <b>Definition:</b>
1307      * Definition of a named query and its parameters and their meaning
1308      * </p> 
1309 	 */
1310 	public Query getQueryFirstRep() {
1311 		if (getQuery().isEmpty()) {
1312 			return addQuery();
1313 		}
1314 		return getQuery().get(0); 
1315 	}
1316   
1317 	/**
1318 	 * Block class for child element: <b>Profile.mapping</b> (External specification that the content is mapped to)
1319 	 *
1320      * <p>
1321      * <b>Definition:</b>
1322      * An external specification that the content is mapped to
1323      * </p> 
1324 	 */
1325 	@Block()	
1326 	public static class Mapping extends BaseIdentifiableElement implements IResourceBlock {
1327 	
1328 	@Child(name="identity", type=IdDt.class, order=0, min=1, max=1)	
1329 	@Description(
1330 		shortDefinition="Internal id when this mapping is used",
1331 		formalDefinition="An Internal id that is used to identify this mapping set when specific mappings are made"
1332 	)
1333 	private IdDt myIdentity;
1334 	
1335 	@Child(name="uri", type=UriDt.class, order=1, min=0, max=1)	
1336 	@Description(
1337 		shortDefinition="Identifies what this mapping refers to",
1338 		formalDefinition="A URI that identifies the specification that this mapping is expressed to"
1339 	)
1340 	private UriDt myUri;
1341 	
1342 	@Child(name="name", type=StringDt.class, order=2, min=0, max=1)	
1343 	@Description(
1344 		shortDefinition="Names what this mapping refers to",
1345 		formalDefinition="A name for the specification that is being mapped to"
1346 	)
1347 	private StringDt myName;
1348 	
1349 	@Child(name="comments", type=StringDt.class, order=3, min=0, max=1)	
1350 	@Description(
1351 		shortDefinition="Versions, Issues, Scope limitations etc",
1352 		formalDefinition="Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage"
1353 	)
1354 	private StringDt myComments;
1355 	
1356 
1357 	@Override
1358 	public boolean isEmpty() {
1359 		return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentity,  myUri,  myName,  myComments);
1360 	}
1361 	
1362 	@Override
1363 	public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1364 		return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentity, myUri, myName, myComments);
1365 	}
1366 
1367 	/**
1368 	 * Gets the value(s) for <b>identity</b> (Internal id when this mapping is used).
1369 	 * creating it if it does
1370 	 * not exist. Will not return <code>null</code>.
1371 	 *
1372      * <p>
1373      * <b>Definition:</b>
1374      * An Internal id that is used to identify this mapping set when specific mappings are made
1375      * </p> 
1376 	 */
1377 	public IdDt getIdentity() {  
1378 		if (myIdentity == null) {
1379 			myIdentity = new IdDt();
1380 		}
1381 		return myIdentity;
1382 	}
1383 
1384 	/**
1385 	 * Sets the value(s) for <b>identity</b> (Internal id when this mapping is used)
1386 	 *
1387      * <p>
1388      * <b>Definition:</b>
1389      * An Internal id that is used to identify this mapping set when specific mappings are made
1390      * </p> 
1391 	 */
1392 	public Mapping setIdentity(IdDt theValue) {
1393 		myIdentity = theValue;
1394 		return this;
1395 	}
1396 
1397  	/**
1398 	 * Sets the value for <b>identity</b> (Internal id when this mapping is used)
1399 	 *
1400      * <p>
1401      * <b>Definition:</b>
1402      * An Internal id that is used to identify this mapping set when specific mappings are made
1403      * </p> 
1404 	 */
1405 	public Mapping setIdentity( String theId) {
1406 		myIdentity = new IdDt(theId); 
1407 		return this; 
1408 	}
1409 
1410  
1411 	/**
1412 	 * Gets the value(s) for <b>uri</b> (Identifies what this mapping refers to).
1413 	 * creating it if it does
1414 	 * not exist. Will not return <code>null</code>.
1415 	 *
1416      * <p>
1417      * <b>Definition:</b>
1418      * A URI that identifies the specification that this mapping is expressed to
1419      * </p> 
1420 	 */
1421 	public UriDt getUri() {  
1422 		if (myUri == null) {
1423 			myUri = new UriDt();
1424 		}
1425 		return myUri;
1426 	}
1427 
1428 	/**
1429 	 * Sets the value(s) for <b>uri</b> (Identifies what this mapping refers to)
1430 	 *
1431      * <p>
1432      * <b>Definition:</b>
1433      * A URI that identifies the specification that this mapping is expressed to
1434      * </p> 
1435 	 */
1436 	public Mapping setUri(UriDt theValue) {
1437 		myUri = theValue;
1438 		return this;
1439 	}
1440 
1441  	/**
1442 	 * Sets the value for <b>uri</b> (Identifies what this mapping refers to)
1443 	 *
1444      * <p>
1445      * <b>Definition:</b>
1446      * A URI that identifies the specification that this mapping is expressed to
1447      * </p> 
1448 	 */
1449 	public Mapping setUri( String theUri) {
1450 		myUri = new UriDt(theUri); 
1451 		return this; 
1452 	}
1453 
1454  
1455 	/**
1456 	 * Gets the value(s) for <b>name</b> (Names what this mapping refers to).
1457 	 * creating it if it does
1458 	 * not exist. Will not return <code>null</code>.
1459 	 *
1460      * <p>
1461      * <b>Definition:</b>
1462      * A name for the specification that is being mapped to
1463      * </p> 
1464 	 */
1465 	public StringDt getName() {  
1466 		if (myName == null) {
1467 			myName = new StringDt();
1468 		}
1469 		return myName;
1470 	}
1471 
1472 	/**
1473 	 * Sets the value(s) for <b>name</b> (Names what this mapping refers to)
1474 	 *
1475      * <p>
1476      * <b>Definition:</b>
1477      * A name for the specification that is being mapped to
1478      * </p> 
1479 	 */
1480 	public Mapping setName(StringDt theValue) {
1481 		myName = theValue;
1482 		return this;
1483 	}
1484 
1485  	/**
1486 	 * Sets the value for <b>name</b> (Names what this mapping refers to)
1487 	 *
1488      * <p>
1489      * <b>Definition:</b>
1490      * A name for the specification that is being mapped to
1491      * </p> 
1492 	 */
1493 	public Mapping setName( String theString) {
1494 		myName = new StringDt(theString); 
1495 		return this; 
1496 	}
1497 
1498  
1499 	/**
1500 	 * Gets the value(s) for <b>comments</b> (Versions, Issues, Scope limitations etc).
1501 	 * creating it if it does
1502 	 * not exist. Will not return <code>null</code>.
1503 	 *
1504      * <p>
1505      * <b>Definition:</b>
1506      * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage
1507      * </p> 
1508 	 */
1509 	public StringDt getComments() {  
1510 		if (myComments == null) {
1511 			myComments = new StringDt();
1512 		}
1513 		return myComments;
1514 	}
1515 
1516 	/**
1517 	 * Sets the value(s) for <b>comments</b> (Versions, Issues, Scope limitations etc)
1518 	 *
1519      * <p>
1520      * <b>Definition:</b>
1521      * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage
1522      * </p> 
1523 	 */
1524 	public Mapping setComments(StringDt theValue) {
1525 		myComments = theValue;
1526 		return this;
1527 	}
1528 
1529  	/**
1530 	 * Sets the value for <b>comments</b> (Versions, Issues, Scope limitations etc)
1531 	 *
1532      * <p>
1533      * <b>Definition:</b>
1534      * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage
1535      * </p> 
1536 	 */
1537 	public Mapping setComments( String theString) {
1538 		myComments = new StringDt(theString); 
1539 		return this; 
1540 	}
1541 
1542  
1543 
1544 	}
1545 
1546 
1547 	/**
1548 	 * Block class for child element: <b>Profile.structure</b> (A constraint on a resource or a data type)
1549 	 *
1550      * <p>
1551      * <b>Definition:</b>
1552      * A constraint statement about what contents a resource or data type may have
1553      * </p> 
1554 	 */
1555 	@Block()	
1556 	public static class Structure extends BaseIdentifiableElement implements IResourceBlock {
1557 	
1558 	@Child(name="type", type=CodeDt.class, order=0, min=1, max=1)	
1559 	@Description(
1560 		shortDefinition="The Resource or Data Type being described",
1561 		formalDefinition="The Resource or Data type being described"
1562 	)
1563 	private BoundCodeDt<FHIRDefinedTypeEnum> myType;
1564 	
1565 	@Child(name="name", type=StringDt.class, order=1, min=0, max=1)	
1566 	@Description(
1567 		shortDefinition="Name for this particular structure (reference target)",
1568 		formalDefinition="The name of this resource constraint statement (to refer to it from other resource constraints - from Profile.structure.element.definition.type.profile)"
1569 	)
1570 	private StringDt myName;
1571 	
1572 	@Child(name="publish", type=BooleanDt.class, order=2, min=0, max=1)	
1573 	@Description(
1574 		shortDefinition="This definition is published (i.e. for validation)",
1575 		formalDefinition="This definition of a profile on a structure is published as a formal statement. Some structural definitions might be defined purely for internal use within the profile, and not intended to be used outside that context"
1576 	)
1577 	private BooleanDt myPublish;
1578 	
1579 	@Child(name="purpose", type=StringDt.class, order=3, min=0, max=1)	
1580 	@Description(
1581 		shortDefinition="Human summary: why describe this resource?",
1582 		formalDefinition="Human summary: why describe this resource?"
1583 	)
1584 	private StringDt myPurpose;
1585 	
1586 	@Child(name="element", order=4, min=0, max=Child.MAX_UNLIMITED)	
1587 	@Description(
1588 		shortDefinition="Definition of elements in the resource (if no profile)",
1589 		formalDefinition="Captures constraints on each element within the resource"
1590 	)
1591 	private java.util.List<StructureElement> myElement;
1592 	
1593 	@Child(name="searchParam", order=5, min=0, max=Child.MAX_UNLIMITED)	
1594 	@Description(
1595 		shortDefinition="Search params defined",
1596 		formalDefinition="Additional search parameters for implementations to support and/or make use of"
1597 	)
1598 	private java.util.List<StructureSearchParam> mySearchParam;
1599 	
1600 
1601 	@Override
1602 	public boolean isEmpty() {
1603 		return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myType,  myName,  myPublish,  myPurpose,  myElement,  mySearchParam);
1604 	}
1605 	
1606 	@Override
1607 	public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1608 		return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myName, myPublish, myPurpose, myElement, mySearchParam);
1609 	}
1610 
1611 	/**
1612 	 * Gets the value(s) for <b>type</b> (The Resource or Data Type being described).
1613 	 * creating it if it does
1614 	 * not exist. Will not return <code>null</code>.
1615 	 *
1616      * <p>
1617      * <b>Definition:</b>
1618      * The Resource or Data type being described
1619      * </p> 
1620 	 */
1621 	public BoundCodeDt<FHIRDefinedTypeEnum> getType() {  
1622 		if (myType == null) {
1623 			myType = new BoundCodeDt<FHIRDefinedTypeEnum>(FHIRDefinedTypeEnum.VALUESET_BINDER);
1624 		}
1625 		return myType;
1626 	}
1627 
1628 	/**
1629 	 * Sets the value(s) for <b>type</b> (The Resource or Data Type being described)
1630 	 *
1631      * <p>
1632      * <b>Definition:</b>
1633      * The Resource or Data type being described
1634      * </p> 
1635 	 */
1636 	public Structure setType(BoundCodeDt<FHIRDefinedTypeEnum> theValue) {
1637 		myType = theValue;
1638 		return this;
1639 	}
1640 
1641 	/**
1642 	 * Sets the value(s) for <b>type</b> (The Resource or Data Type being described)
1643 	 *
1644      * <p>
1645      * <b>Definition:</b>
1646      * The Resource or Data type being described
1647      * </p> 
1648 	 */
1649 	public Structure setType(FHIRDefinedTypeEnum theValue) {
1650 		getType().setValueAsEnum(theValue);
1651 		return this;
1652 	}
1653 
1654   
1655 	/**
1656 	 * Gets the value(s) for <b>name</b> (Name for this particular structure (reference target)).
1657 	 * creating it if it does
1658 	 * not exist. Will not return <code>null</code>.
1659 	 *
1660      * <p>
1661      * <b>Definition:</b>
1662      * The name of this resource constraint statement (to refer to it from other resource constraints - from Profile.structure.element.definition.type.profile)
1663      * </p> 
1664 	 */
1665 	public StringDt getName() {  
1666 		if (myName == null) {
1667 			myName = new StringDt();
1668 		}
1669 		return myName;
1670 	}
1671 
1672 	/**
1673 	 * Sets the value(s) for <b>name</b> (Name for this particular structure (reference target))
1674 	 *
1675      * <p>
1676      * <b>Definition:</b>
1677      * The name of this resource constraint statement (to refer to it from other resource constraints - from Profile.structure.element.definition.type.profile)
1678      * </p> 
1679 	 */
1680 	public Structure setName(StringDt theValue) {
1681 		myName = theValue;
1682 		return this;
1683 	}
1684 
1685  	/**
1686 	 * Sets the value for <b>name</b> (Name for this particular structure (reference target))
1687 	 *
1688      * <p>
1689      * <b>Definition:</b>
1690      * The name of this resource constraint statement (to refer to it from other resource constraints - from Profile.structure.element.definition.type.profile)
1691      * </p> 
1692 	 */
1693 	public Structure setName( String theString) {
1694 		myName = new StringDt(theString); 
1695 		return this; 
1696 	}
1697 
1698  
1699 	/**
1700 	 * Gets the value(s) for <b>publish</b> (This definition is published (i.e. for validation)).
1701 	 * creating it if it does
1702 	 * not exist. Will not return <code>null</code>.
1703 	 *
1704      * <p>
1705      * <b>Definition:</b>
1706      * This definition of a profile on a structure is published as a formal statement. Some structural definitions might be defined purely for internal use within the profile, and not intended to be used outside that context
1707      * </p> 
1708 	 */
1709 	public BooleanDt getPublish() {  
1710 		if (myPublish == null) {
1711 			myPublish = new BooleanDt();
1712 		}
1713 		return myPublish;
1714 	}
1715 
1716 	/**
1717 	 * Sets the value(s) for <b>publish</b> (This definition is published (i.e. for validation))
1718 	 *
1719      * <p>
1720      * <b>Definition:</b>
1721      * This definition of a profile on a structure is published as a formal statement. Some structural definitions might be defined purely for internal use within the profile, and not intended to be used outside that context
1722      * </p> 
1723 	 */
1724 	public Structure setPublish(BooleanDt theValue) {
1725 		myPublish = theValue;
1726 		return this;
1727 	}
1728 
1729  	/**
1730 	 * Sets the value for <b>publish</b> (This definition is published (i.e. for validation))
1731 	 *
1732      * <p>
1733      * <b>Definition:</b>
1734      * This definition of a profile on a structure is published as a formal statement. Some structural definitions might be defined purely for internal use within the profile, and not intended to be used outside that context
1735      * </p> 
1736 	 */
1737 	public Structure setPublish( boolean theBoolean) {
1738 		myPublish = new BooleanDt(theBoolean); 
1739 		return this; 
1740 	}
1741 
1742  
1743 	/**
1744 	 * Gets the value(s) for <b>purpose</b> (Human summary: why describe this resource?).
1745 	 * creating it if it does
1746 	 * not exist. Will not return <code>null</code>.
1747 	 *
1748      * <p>
1749      * <b>Definition:</b>
1750      * Human summary: why describe this resource?
1751      * </p> 
1752 	 */
1753 	public StringDt getPurpose() {  
1754 		if (myPurpose == null) {
1755 			myPurpose = new StringDt();
1756 		}
1757 		return myPurpose;
1758 	}
1759 
1760 	/**
1761 	 * Sets the value(s) for <b>purpose</b> (Human summary: why describe this resource?)
1762 	 *
1763      * <p>
1764      * <b>Definition:</b>
1765      * Human summary: why describe this resource?
1766      * </p> 
1767 	 */
1768 	public Structure setPurpose(StringDt theValue) {
1769 		myPurpose = theValue;
1770 		return this;
1771 	}
1772 
1773  	/**
1774 	 * Sets the value for <b>purpose</b> (Human summary: why describe this resource?)
1775 	 *
1776      * <p>
1777      * <b>Definition:</b>
1778      * Human summary: why describe this resource?
1779      * </p> 
1780 	 */
1781 	public Structure setPurpose( String theString) {
1782 		myPurpose = new StringDt(theString); 
1783 		return this; 
1784 	}
1785 
1786  
1787 	/**
1788 	 * Gets the value(s) for <b>element</b> (Definition of elements in the resource (if no profile)).
1789 	 * creating it if it does
1790 	 * not exist. Will not return <code>null</code>.
1791 	 *
1792      * <p>
1793      * <b>Definition:</b>
1794      * Captures constraints on each element within the resource
1795      * </p> 
1796 	 */
1797 	public java.util.List<StructureElement> getElement() {  
1798 		if (myElement == null) {
1799 			myElement = new java.util.ArrayList<StructureElement>();
1800 		}
1801 		return myElement;
1802 	}
1803 
1804 	/**
1805 	 * Sets the value(s) for <b>element</b> (Definition of elements in the resource (if no profile))
1806 	 *
1807      * <p>
1808      * <b>Definition:</b>
1809      * Captures constraints on each element within the resource
1810      * </p> 
1811 	 */
1812 	public Structure setElement(java.util.List<StructureElement> theValue) {
1813 		myElement = theValue;
1814 		return this;
1815 	}
1816 
1817 	/**
1818 	 * Adds and returns a new value for <b>element</b> (Definition of elements in the resource (if no profile))
1819 	 *
1820      * <p>
1821      * <b>Definition:</b>
1822      * Captures constraints on each element within the resource
1823      * </p> 
1824 	 */
1825 	public StructureElement addElement() {
1826 		StructureElement newType = new StructureElement();
1827 		getElement().add(newType);
1828 		return newType; 
1829 	}
1830 
1831 	/**
1832 	 * Gets the first repetition for <b>element</b> (Definition of elements in the resource (if no profile)),
1833 	 * creating it if it does not already exist.
1834 	 *
1835      * <p>
1836      * <b>Definition:</b>
1837      * Captures constraints on each element within the resource
1838      * </p> 
1839 	 */
1840 	public StructureElement getElementFirstRep() {
1841 		if (getElement().isEmpty()) {
1842 			return addElement();
1843 		}
1844 		return getElement().get(0); 
1845 	}
1846   
1847 	/**
1848 	 * Gets the value(s) for <b>searchParam</b> (Search params defined).
1849 	 * creating it if it does
1850 	 * not exist. Will not return <code>null</code>.
1851 	 *
1852      * <p>
1853      * <b>Definition:</b>
1854      * Additional search parameters for implementations to support and/or make use of
1855      * </p> 
1856 	 */
1857 	public java.util.List<StructureSearchParam> getSearchParam() {  
1858 		if (mySearchParam == null) {
1859 			mySearchParam = new java.util.ArrayList<StructureSearchParam>();
1860 		}
1861 		return mySearchParam;
1862 	}
1863 
1864 	/**
1865 	 * Sets the value(s) for <b>searchParam</b> (Search params defined)
1866 	 *
1867      * <p>
1868      * <b>Definition:</b>
1869      * Additional search parameters for implementations to support and/or make use of
1870      * </p> 
1871 	 */
1872 	public Structure setSearchParam(java.util.List<StructureSearchParam> theValue) {
1873 		mySearchParam = theValue;
1874 		return this;
1875 	}
1876 
1877 	/**
1878 	 * Adds and returns a new value for <b>searchParam</b> (Search params defined)
1879 	 *
1880      * <p>
1881      * <b>Definition:</b>
1882      * Additional search parameters for implementations to support and/or make use of
1883      * </p> 
1884 	 */
1885 	public StructureSearchParam addSearchParam() {
1886 		StructureSearchParam newType = new StructureSearchParam();
1887 		getSearchParam().add(newType);
1888 		return newType; 
1889 	}
1890 
1891 	/**
1892 	 * Gets the first repetition for <b>searchParam</b> (Search params defined),
1893 	 * creating it if it does not already exist.
1894 	 *
1895      * <p>
1896      * <b>Definition:</b>
1897      * Additional search parameters for implementations to support and/or make use of
1898      * </p> 
1899 	 */
1900 	public StructureSearchParam getSearchParamFirstRep() {
1901 		if (getSearchParam().isEmpty()) {
1902 			return addSearchParam();
1903 		}
1904 		return getSearchParam().get(0); 
1905 	}
1906   
1907 
1908 	}
1909 
1910 	/**
1911 	 * Block class for child element: <b>Profile.structure.element</b> (Definition of elements in the resource (if no profile))
1912 	 *
1913      * <p>
1914      * <b>Definition:</b>
1915      * Captures constraints on each element within the resource
1916      * </p> 
1917 	 */
1918 	@Block()	
1919 	public static class StructureElement extends BaseIdentifiableElement implements IResourceBlock {
1920 	
1921 	@Child(name="path", type=StringDt.class, order=0, min=1, max=1)	
1922 	@Description(
1923 		shortDefinition="The path of the element (see the formal definitions)",
1924 		formalDefinition="The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource"
1925 	)
1926 	private StringDt myPath;
1927 	
1928 	@Child(name="representation", type=CodeDt.class, order=1, min=0, max=Child.MAX_UNLIMITED)	
1929 	@Description(
1930 		shortDefinition="How this element is represented in instances",
1931 		formalDefinition="Codes that define how this element is represented in instances, when the deviation varies from the normal case"
1932 	)
1933 	private java.util.List<BoundCodeDt<PropertyRepresentationEnum>> myRepresentation;
1934 	
1935 	@Child(name="name", type=StringDt.class, order=2, min=0, max=1)	
1936 	@Description(
1937 		shortDefinition="Name for this particular element definition (reference target)",
1938 		formalDefinition="The name of this element definition (to refer to it from other element definitions using Profile.structure.element.definition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element"
1939 	)
1940 	private StringDt myName;
1941 	
1942 	@Child(name="slicing", order=3, min=0, max=1)	
1943 	@Description(
1944 		shortDefinition="This element is sliced - slices follow",
1945 		formalDefinition="Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)"
1946 	)
1947 	private StructureElementSlicing mySlicing;
1948 	
1949 	@Child(name="definition", order=4, min=0, max=1)	
1950 	@Description(
1951 		shortDefinition="More specific definition of the element",
1952 		formalDefinition="Definition of the content of the element to provide a more specific definition than that contained for the element in the base resource"
1953 	)
1954 	private StructureElementDefinition myDefinition;
1955 	
1956 
1957 	@Override
1958 	public boolean isEmpty() {
1959 		return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myPath,  myRepresentation,  myName,  mySlicing,  myDefinition);
1960 	}
1961 	
1962 	@Override
1963 	public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1964 		return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myPath, myRepresentation, myName, mySlicing, myDefinition);
1965 	}
1966 
1967 	/**
1968 	 * Gets the value(s) for <b>path</b> (The path of the element (see the formal definitions)).
1969 	 * creating it if it does
1970 	 * not exist. Will not return <code>null</code>.
1971 	 *
1972      * <p>
1973      * <b>Definition:</b>
1974      * The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource
1975      * </p> 
1976 	 */
1977 	public StringDt getPath() {  
1978 		if (myPath == null) {
1979 			myPath = new StringDt();
1980 		}
1981 		return myPath;
1982 	}
1983 
1984 	/**
1985 	 * Sets the value(s) for <b>path</b> (The path of the element (see the formal definitions))
1986 	 *
1987      * <p>
1988      * <b>Definition:</b>
1989      * The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource
1990      * </p> 
1991 	 */
1992 	public StructureElement setPath(StringDt theValue) {
1993 		myPath = theValue;
1994 		return this;
1995 	}
1996 
1997  	/**
1998 	 * Sets the value for <b>path</b> (The path of the element (see the formal definitions))
1999 	 *
2000      * <p>
2001      * <b>Definition:</b>
2002      * The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource
2003      * </p> 
2004 	 */
2005 	public StructureElement setPath( String theString) {
2006 		myPath = new StringDt(theString); 
2007 		return this; 
2008 	}
2009 
2010  
2011 	/**
2012 	 * Gets the value(s) for <b>representation</b> (How this element is represented in instances).
2013 	 * creating it if it does
2014 	 * not exist. Will not return <code>null</code>.
2015 	 *
2016      * <p>
2017      * <b>Definition:</b>
2018      * Codes that define how this element is represented in instances, when the deviation varies from the normal case
2019      * </p> 
2020 	 */
2021 	public java.util.List<BoundCodeDt<PropertyRepresentationEnum>> getRepresentation() {  
2022 		if (myRepresentation == null) {
2023 			myRepresentation = new java.util.ArrayList<BoundCodeDt<PropertyRepresentationEnum>>();
2024 		}
2025 		return myRepresentation;
2026 	}
2027 
2028 	/**
2029 	 * Sets the value(s) for <b>representation</b> (How this element is represented in instances)
2030 	 *
2031      * <p>
2032      * <b>Definition:</b>
2033      * Codes that define how this element is represented in instances, when the deviation varies from the normal case
2034      * </p> 
2035 	 */
2036 	public StructureElement setRepresentation(java.util.List<BoundCodeDt<PropertyRepresentationEnum>> theValue) {
2037 		myRepresentation = theValue;
2038 		return this;
2039 	}
2040 
2041 	/**
2042 	 * Add a value for <b>representation</b> (How this element is represented in instances) using an enumerated type. This
2043 	 * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
2044 	 * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
2045 	 * you may also use the {@link #addType()} method.
2046 	 *
2047      * <p>
2048      * <b>Definition:</b>
2049      * Codes that define how this element is represented in instances, when the deviation varies from the normal case
2050      * </p> 
2051 	 */
2052 	public BoundCodeDt<PropertyRepresentationEnum> addRepresentation(PropertyRepresentationEnum theValue) {
2053 		BoundCodeDt<PropertyRepresentationEnum> retVal = new BoundCodeDt<PropertyRepresentationEnum>(PropertyRepresentationEnum.VALUESET_BINDER, theValue);
2054 		getRepresentation().add(retVal);
2055 		return retVal;
2056 	}
2057 
2058 	/**
2059 	 * Gets the first repetition for <b>representation</b> (How this element is represented in instances),
2060 	 * creating it if it does not already exist.
2061 	 *
2062      * <p>
2063      * <b>Definition:</b>
2064      * Codes that define how this element is represented in instances, when the deviation varies from the normal case
2065      * </p> 
2066 	 */
2067 	public BoundCodeDt<PropertyRepresentationEnum> getRepresentationFirstRep() {
2068 		if (getRepresentation().size() == 0) {
2069 			addRepresentation();
2070 		}
2071 		return getRepresentation().get(0);
2072 	}
2073 
2074 	/**
2075 	 * Add a value for <b>representation</b> (How this element is represented in instances)
2076 	 *
2077      * <p>
2078      * <b>Definition:</b>
2079      * Codes that define how this element is represented in instances, when the deviation varies from the normal case
2080      * </p> 
2081 	 */
2082 	public BoundCodeDt<PropertyRepresentationEnum> addRepresentation() {
2083 		BoundCodeDt<PropertyRepresentationEnum> retVal = new BoundCodeDt<PropertyRepresentationEnum>(PropertyRepresentationEnum.VALUESET_BINDER);
2084 		getRepresentation().add(retVal);
2085 		return retVal;
2086 	}
2087 
2088 	/**
2089 	 * Sets the value(s), and clears any existing value(s) for <b>representation</b> (How this element is represented in instances)
2090 	 *
2091      * <p>
2092      * <b>Definition:</b>
2093      * Codes that define how this element is represented in instances, when the deviation varies from the normal case
2094      * </p> 
2095 	 */
2096 	public StructureElement setRepresentation(PropertyRepresentationEnum theValue) {
2097 		getRepresentation().clear();
2098 		addRepresentation(theValue);
2099 		return this;
2100 	}
2101 
2102   
2103 	/**
2104 	 * Gets the value(s) for <b>name</b> (Name for this particular element definition (reference target)).
2105 	 * creating it if it does
2106 	 * not exist. Will not return <code>null</code>.
2107 	 *
2108      * <p>
2109      * <b>Definition:</b>
2110      * The name of this element definition (to refer to it from other element definitions using Profile.structure.element.definition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element
2111      * </p> 
2112 	 */
2113 	public StringDt getName() {  
2114 		if (myName == null) {
2115 			myName = new StringDt();
2116 		}
2117 		return myName;
2118 	}
2119 
2120 	/**
2121 	 * Sets the value(s) for <b>name</b> (Name for this particular element definition (reference target))
2122 	 *
2123      * <p>
2124      * <b>Definition:</b>
2125      * The name of this element definition (to refer to it from other element definitions using Profile.structure.element.definition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element
2126      * </p> 
2127 	 */
2128 	public StructureElement setName(StringDt theValue) {
2129 		myName = theValue;
2130 		return this;
2131 	}
2132 
2133  	/**
2134 	 * Sets the value for <b>name</b> (Name for this particular element definition (reference target))
2135 	 *
2136      * <p>
2137      * <b>Definition:</b>
2138      * The name of this element definition (to refer to it from other element definitions using Profile.structure.element.definition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element
2139      * </p> 
2140 	 */
2141 	public StructureElement setName( String theString) {
2142 		myName = new StringDt(theString); 
2143 		return this; 
2144 	}
2145 
2146  
2147 	/**
2148 	 * Gets the value(s) for <b>slicing</b> (This element is sliced - slices follow).
2149 	 * creating it if it does
2150 	 * not exist. Will not return <code>null</code>.
2151 	 *
2152      * <p>
2153      * <b>Definition:</b>
2154      * Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)
2155      * </p> 
2156 	 */
2157 	public StructureElementSlicing getSlicing() {  
2158 		if (mySlicing == null) {
2159 			mySlicing = new StructureElementSlicing();
2160 		}
2161 		return mySlicing;
2162 	}
2163 
2164 	/**
2165 	 * Sets the value(s) for <b>slicing</b> (This element is sliced - slices follow)
2166 	 *
2167      * <p>
2168      * <b>Definition:</b>
2169      * Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)
2170      * </p> 
2171 	 */
2172 	public StructureElement setSlicing(StructureElementSlicing theValue) {
2173 		mySlicing = theValue;
2174 		return this;
2175 	}
2176 
2177   
2178 	/**
2179 	 * Gets the value(s) for <b>definition</b> (More specific definition of the element).
2180 	 * creating it if it does
2181 	 * not exist. Will not return <code>null</code>.
2182 	 *
2183      * <p>
2184      * <b>Definition:</b>
2185      * Definition of the content of the element to provide a more specific definition than that contained for the element in the base resource
2186      * </p> 
2187 	 */
2188 	public StructureElementDefinition getDefinition() {  
2189 		if (myDefinition == null) {
2190 			myDefinition = new StructureElementDefinition();
2191 		}
2192 		return myDefinition;
2193 	}
2194 
2195 	/**
2196 	 * Sets the value(s) for <b>definition</b> (More specific definition of the element)
2197 	 *
2198      * <p>
2199      * <b>Definition:</b>
2200      * Definition of the content of the element to provide a more specific definition than that contained for the element in the base resource
2201      * </p> 
2202 	 */
2203 	public StructureElement setDefinition(StructureElementDefinition theValue) {
2204 		myDefinition = theValue;
2205 		return this;
2206 	}
2207 
2208   
2209 
2210 	}
2211 
2212 	/**
2213 	 * Block class for child element: <b>Profile.structure.element.slicing</b> (This element is sliced - slices follow)
2214 	 *
2215      * <p>
2216      * <b>Definition:</b>
2217      * Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)
2218      * </p> 
2219 	 */
2220 	@Block()	
2221 	public static class StructureElementSlicing extends BaseIdentifiableElement implements IResourceBlock {
2222 	
2223 	@Child(name="discriminator", type=IdDt.class, order=0, min=1, max=1)	
2224 	@Description(
2225 		shortDefinition="Element that used to distinguish the slices",
2226 		formalDefinition="Designates which child element is used to discriminate between the slices when processing an instance. The value of the child element in the instance SHALL completely distinguish which slice the element in the resource matches based on the allowed values for that element in each of the slices"
2227 	)
2228 	private IdDt myDiscriminator;
2229 	
2230 	@Child(name="ordered", type=BooleanDt.class, order=1, min=1, max=1)	
2231 	@Description(
2232 		shortDefinition="If elements must be in same order as slices",
2233 		formalDefinition="If the matching elements have to occur in the same order as defined in the profile"
2234 	)
2235 	private BooleanDt myOrdered;
2236 	
2237 	@Child(name="rules", type=CodeDt.class, order=2, min=1, max=1)	
2238 	@Description(
2239 		shortDefinition="closed | open | openAtEnd",
2240 		formalDefinition="Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end"
2241 	)
2242 	private BoundCodeDt<SlicingRulesEnum> myRules;
2243 	
2244 
2245 	@Override
2246 	public boolean isEmpty() {
2247 		return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myDiscriminator,  myOrdered,  myRules);
2248 	}
2249 	
2250 	@Override
2251 	public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2252 		return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myDiscriminator, myOrdered, myRules);
2253 	}
2254 
2255 	/**
2256 	 * Gets the value(s) for <b>discriminator</b> (Element that used to distinguish the slices).
2257 	 * creating it if it does
2258 	 * not exist. Will not return <code>null</code>.
2259 	 *
2260      * <p>
2261      * <b>Definition:</b>
2262      * Designates which child element is used to discriminate between the slices when processing an instance. The value of the child element in the instance SHALL completely distinguish which slice the element in the resource matches based on the allowed values for that element in each of the slices
2263      * </p> 
2264 	 */
2265 	public IdDt getDiscriminator() {  
2266 		if (myDiscriminator == null) {
2267 			myDiscriminator = new IdDt();
2268 		}
2269 		return myDiscriminator;
2270 	}
2271 
2272 	/**
2273 	 * Sets the value(s) for <b>discriminator</b> (Element that used to distinguish the slices)
2274 	 *
2275      * <p>
2276      * <b>Definition:</b>
2277      * Designates which child element is used to discriminate between the slices when processing an instance. The value of the child element in the instance SHALL completely distinguish which slice the element in the resource matches based on the allowed values for that element in each of the slices
2278      * </p> 
2279 	 */
2280 	public StructureElementSlicing setDiscriminator(IdDt theValue) {
2281 		myDiscriminator = theValue;
2282 		return this;
2283 	}
2284 
2285  	/**
2286 	 * Sets the value for <b>discriminator</b> (Element that used to distinguish the slices)
2287 	 *
2288      * <p>
2289      * <b>Definition:</b>
2290      * Designates which child element is used to discriminate between the slices when processing an instance. The value of the child element in the instance SHALL completely distinguish which slice the element in the resource matches based on the allowed values for that element in each of the slices
2291      * </p> 
2292 	 */
2293 	public StructureElementSlicing setDiscriminator( String theId) {
2294 		myDiscriminator = new IdDt(theId); 
2295 		return this; 
2296 	}
2297 
2298  
2299 	/**
2300 	 * Gets the value(s) for <b>ordered</b> (If elements must be in same order as slices).
2301 	 * creating it if it does
2302 	 * not exist. Will not return <code>null</code>.
2303 	 *
2304      * <p>
2305      * <b>Definition:</b>
2306      * If the matching elements have to occur in the same order as defined in the profile
2307      * </p> 
2308 	 */
2309 	public BooleanDt getOrdered() {  
2310 		if (myOrdered == null) {
2311 			myOrdered = new BooleanDt();
2312 		}
2313 		return myOrdered;
2314 	}
2315 
2316 	/**
2317 	 * Sets the value(s) for <b>ordered</b> (If elements must be in same order as slices)
2318 	 *
2319      * <p>
2320      * <b>Definition:</b>
2321      * If the matching elements have to occur in the same order as defined in the profile
2322      * </p> 
2323 	 */
2324 	public StructureElementSlicing setOrdered(BooleanDt theValue) {
2325 		myOrdered = theValue;
2326 		return this;
2327 	}
2328 
2329  	/**
2330 	 * Sets the value for <b>ordered</b> (If elements must be in same order as slices)
2331 	 *
2332      * <p>
2333      * <b>Definition:</b>
2334      * If the matching elements have to occur in the same order as defined in the profile
2335      * </p> 
2336 	 */
2337 	public StructureElementSlicing setOrdered( boolean theBoolean) {
2338 		myOrdered = new BooleanDt(theBoolean); 
2339 		return this; 
2340 	}
2341 
2342  
2343 	/**
2344 	 * Gets the value(s) for <b>rules</b> (closed | open | openAtEnd).
2345 	 * creating it if it does
2346 	 * not exist. Will not return <code>null</code>.
2347 	 *
2348      * <p>
2349      * <b>Definition:</b>
2350      * Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end
2351      * </p> 
2352 	 */
2353 	public BoundCodeDt<SlicingRulesEnum> getRules() {  
2354 		if (myRules == null) {
2355 			myRules = new BoundCodeDt<SlicingRulesEnum>(SlicingRulesEnum.VALUESET_BINDER);
2356 		}
2357 		return myRules;
2358 	}
2359 
2360 	/**
2361 	 * Sets the value(s) for <b>rules</b> (closed | open | openAtEnd)
2362 	 *
2363      * <p>
2364      * <b>Definition:</b>
2365      * Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end
2366      * </p> 
2367 	 */
2368 	public StructureElementSlicing setRules(BoundCodeDt<SlicingRulesEnum> theValue) {
2369 		myRules = theValue;
2370 		return this;
2371 	}
2372 
2373 	/**
2374 	 * Sets the value(s) for <b>rules</b> (closed | open | openAtEnd)
2375 	 *
2376      * <p>
2377      * <b>Definition:</b>
2378      * Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end
2379      * </p> 
2380 	 */
2381 	public StructureElementSlicing setRules(SlicingRulesEnum theValue) {
2382 		getRules().setValueAsEnum(theValue);
2383 		return this;
2384 	}
2385 
2386   
2387 
2388 	}
2389 
2390 
2391 	/**
2392 	 * Block class for child element: <b>Profile.structure.element.definition</b> (More specific definition of the element)
2393 	 *
2394      * <p>
2395      * <b>Definition:</b>
2396      * Definition of the content of the element to provide a more specific definition than that contained for the element in the base resource
2397      * </p> 
2398 	 */
2399 	@Block()	
2400 	public static class StructureElementDefinition extends BaseIdentifiableElement implements IResourceBlock {
2401 	
2402 	@Child(name="short", type=StringDt.class, order=0, min=1, max=1)	
2403 	@Description(
2404 		shortDefinition="Concise definition for xml presentation",
2405 		formalDefinition="A concise definition that  is shown in the generated XML format that summarizes profiles (used throughout the specification)"
2406 	)
2407 	private StringDt myShort;
2408 	
2409 	@Child(name="formal", type=StringDt.class, order=1, min=1, max=1)	
2410 	@Description(
2411 		shortDefinition="Full formal definition in human language",
2412 		formalDefinition="The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource"
2413 	)
2414 	private StringDt myFormal;
2415 	
2416 	@Child(name="comments", type=StringDt.class, order=2, min=0, max=1)	
2417 	@Description(
2418 		shortDefinition="Comments about the use of this element",
2419 		formalDefinition="Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc."
2420 	)
2421 	private StringDt myComments;
2422 	
2423 	@Child(name="requirements", type=StringDt.class, order=3, min=0, max=1)	
2424 	@Description(
2425 		shortDefinition="Why is this needed?",
2426 		formalDefinition="Explains why this element is needed and why it's been constrained as it has"
2427 	)
2428 	private StringDt myRequirements;
2429 	
2430 	@Child(name="synonym", type=StringDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)	
2431 	@Description(
2432 		shortDefinition="Other names",
2433 		formalDefinition="Identifies additional names by which this element might also be known"
2434 	)
2435 	private java.util.List<StringDt> mySynonym;
2436 	
2437 	@Child(name="min", type=IntegerDt.class, order=5, min=1, max=1)	
2438 	@Description(
2439 		shortDefinition="Minimum Cardinality",
2440 		formalDefinition="The minimum number of times this element SHALL appear in the instance"
2441 	)
2442 	private IntegerDt myMin;
2443 	
2444 	@Child(name="max", type=StringDt.class, order=6, min=1, max=1)	
2445 	@Description(
2446 		shortDefinition="Maximum Cardinality (a number or *)",
2447 		formalDefinition="The maximum number of times this element is permitted to appear in the instance"
2448 	)
2449 	private StringDt myMax;
2450 	
2451 	@Child(name="type", order=7, min=0, max=Child.MAX_UNLIMITED)	
2452 	@Description(
2453 		shortDefinition="Data type and Profile for this element",
2454 		formalDefinition="The data type or resource that the value of this element is permitted to be"
2455 	)
2456 	private java.util.List<StructureElementDefinitionType> myType;
2457 	
2458 	@Child(name="nameReference", type=StringDt.class, order=8, min=0, max=1)	
2459 	@Description(
2460 		shortDefinition="To another element constraint (by element.name)",
2461 		formalDefinition="Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element"
2462 	)
2463 	private StringDt myNameReference;
2464 	
2465 	@Child(name="value", type=IDatatype.class, order=9, min=0, max=1)	
2466 	@Description(
2467 		shortDefinition="Fixed value: [as defined for a primitive type]",
2468 		formalDefinition="Specifies a primitive value that SHALL hold for this element in the instance"
2469 	)
2470 	private IDatatype myValue;
2471 	
2472 	@Child(name="example", type=IDatatype.class, order=10, min=0, max=1)	
2473 	@Description(
2474 		shortDefinition="Example value: [as defined for type]",
2475 		formalDefinition="An example value for this element"
2476 	)
2477 	private IDatatype myExample;
2478 	
2479 	@Child(name="maxLength", type=IntegerDt.class, order=11, min=0, max=1)	
2480 	@Description(
2481 		shortDefinition="Length for strings",
2482 		formalDefinition="Indicates the shortest length that SHALL be supported by conformant instances without truncation"
2483 	)
2484 	private IntegerDt myMaxLength;
2485 	
2486 	@Child(name="condition", type=IdDt.class, order=12, min=0, max=Child.MAX_UNLIMITED)	
2487 	@Description(
2488 		shortDefinition="Reference to invariant about presence",
2489 		formalDefinition="A reference to an invariant that may make additional statements about the cardinality or value in the instance"
2490 	)
2491 	private java.util.List<IdDt> myCondition;
2492 	
2493 	@Child(name="constraint", order=13, min=0, max=Child.MAX_UNLIMITED)	
2494 	@Description(
2495 		shortDefinition="Condition that must evaluate to true",
2496 		formalDefinition="Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance"
2497 	)
2498 	private java.util.List<StructureElementDefinitionConstraint> myConstraint;
2499 	
2500 	@Child(name="mustSupport", type=BooleanDt.class, order=14, min=0, max=1)	
2501 	@Description(
2502 		shortDefinition="If the element must supported",
2503 		formalDefinition="If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element.  If false, the element may be ignored and not supported"
2504 	)
2505 	private BooleanDt myMustSupport;
2506 	
2507 	@Child(name="isModifier", type=BooleanDt.class, order=15, min=1, max=1)	
2508 	@Description(
2509 		shortDefinition="If this modifies the meaning of other elements",
2510 		formalDefinition="If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system."
2511 	)
2512 	private BooleanDt myIsModifier;
2513 	
2514 	@Child(name="binding", order=16, min=0, max=1)	
2515 	@Description(
2516 		shortDefinition="ValueSet details if this is coded",
2517 		formalDefinition="Binds to a value set if this element is coded (code, Coding, CodeableConcept)"
2518 	)
2519 	private StructureElementDefinitionBinding myBinding;
2520 	
2521 	@Child(name="mapping", order=17, min=0, max=Child.MAX_UNLIMITED)	
2522 	@Description(
2523 		shortDefinition="Map element to another set of definitions",
2524 		formalDefinition="Identifies a concept from an external specification that roughly corresponds to this element"
2525 	)
2526 	private java.util.List<StructureElementDefinitionMapping> myMapping;
2527 	
2528 
2529 	@Override
2530 	public boolean isEmpty() {
2531 		return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myShort,  myFormal,  myComments,  myRequirements,  mySynonym,  myMin,  myMax,  myType,  myNameReference,  myValue,  myExample,  myMaxLength,  myCondition,  myConstraint,  myMustSupport,  myIsModifier,  myBinding,  myMapping);
2532 	}
2533 	
2534 	@Override
2535 	public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2536 		return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myShort, myFormal, myComments, myRequirements, mySynonym, myMin, myMax, myType, myNameReference, myValue, myExample, myMaxLength, myCondition, myConstraint, myMustSupport, myIsModifier, myBinding, myMapping);
2537 	}
2538 
2539 	/**
2540 	 * Gets the value(s) for <b>short</b> (Concise definition for xml presentation).
2541 	 * creating it if it does
2542 	 * not exist. Will not return <code>null</code>.
2543 	 *
2544      * <p>
2545      * <b>Definition:</b>
2546      * A concise definition that  is shown in the generated XML format that summarizes profiles (used throughout the specification)
2547      * </p> 
2548 	 */
2549 	public StringDt getShort() {  
2550 		if (myShort == null) {
2551 			myShort = new StringDt();
2552 		}
2553 		return myShort;
2554 	}
2555 
2556 	/**
2557 	 * Sets the value(s) for <b>short</b> (Concise definition for xml presentation)
2558 	 *
2559      * <p>
2560      * <b>Definition:</b>
2561      * A concise definition that  is shown in the generated XML format that summarizes profiles (used throughout the specification)
2562      * </p> 
2563 	 */
2564 	public StructureElementDefinition setShort(StringDt theValue) {
2565 		myShort = theValue;
2566 		return this;
2567 	}
2568 
2569  	/**
2570 	 * Sets the value for <b>short</b> (Concise definition for xml presentation)
2571 	 *
2572      * <p>
2573      * <b>Definition:</b>
2574      * A concise definition that  is shown in the generated XML format that summarizes profiles (used throughout the specification)
2575      * </p> 
2576 	 */
2577 	public StructureElementDefinition setShort( String theString) {
2578 		myShort = new StringDt(theString); 
2579 		return this; 
2580 	}
2581 
2582  
2583 	/**
2584 	 * Gets the value(s) for <b>formal</b> (Full formal definition in human language).
2585 	 * creating it if it does
2586 	 * not exist. Will not return <code>null</code>.
2587 	 *
2588      * <p>
2589      * <b>Definition:</b>
2590      * The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource
2591      * </p> 
2592 	 */
2593 	public StringDt getFormal() {  
2594 		if (myFormal == null) {
2595 			myFormal = new StringDt();
2596 		}
2597 		return myFormal;
2598 	}
2599 
2600 	/**
2601 	 * Sets the value(s) for <b>formal</b> (Full formal definition in human language)
2602 	 *
2603      * <p>
2604      * <b>Definition:</b>
2605      * The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource
2606      * </p> 
2607 	 */
2608 	public StructureElementDefinition setFormal(StringDt theValue) {
2609 		myFormal = theValue;
2610 		return this;
2611 	}
2612 
2613  	/**
2614 	 * Sets the value for <b>formal</b> (Full formal definition in human language)
2615 	 *
2616      * <p>
2617      * <b>Definition:</b>
2618      * The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource
2619      * </p> 
2620 	 */
2621 	public StructureElementDefinition setFormal( String theString) {
2622 		myFormal = new StringDt(theString); 
2623 		return this; 
2624 	}
2625 
2626  
2627 	/**
2628 	 * Gets the value(s) for <b>comments</b> (Comments about the use of this element).
2629 	 * creating it if it does
2630 	 * not exist. Will not return <code>null</code>.
2631 	 *
2632      * <p>
2633      * <b>Definition:</b>
2634      * Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc.
2635      * </p> 
2636 	 */
2637 	public StringDt getComments() {  
2638 		if (myComments == null) {
2639 			myComments = new StringDt();
2640 		}
2641 		return myComments;
2642 	}
2643 
2644 	/**
2645 	 * Sets the value(s) for <b>comments</b> (Comments about the use of this element)
2646 	 *
2647      * <p>
2648      * <b>Definition:</b>
2649      * Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc.
2650      * </p> 
2651 	 */
2652 	public StructureElementDefinition setComments(StringDt theValue) {
2653 		myComments = theValue;
2654 		return this;
2655 	}
2656 
2657  	/**
2658 	 * Sets the value for <b>comments</b> (Comments about the use of this element)
2659 	 *
2660      * <p>
2661      * <b>Definition:</b>
2662      * Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc.
2663      * </p> 
2664 	 */
2665 	public StructureElementDefinition setComments( String theString) {
2666 		myComments = new StringDt(theString); 
2667 		return this; 
2668 	}
2669 
2670  
2671 	/**
2672 	 * Gets the value(s) for <b>requirements</b> (Why is this needed?).
2673 	 * creating it if it does
2674 	 * not exist. Will not return <code>null</code>.
2675 	 *
2676      * <p>
2677      * <b>Definition:</b>
2678      * Explains why this element is needed and why it's been constrained as it has
2679      * </p> 
2680 	 */
2681 	public StringDt getRequirements() {  
2682 		if (myRequirements == null) {
2683 			myRequirements = new StringDt();
2684 		}
2685 		return myRequirements;
2686 	}
2687 
2688 	/**
2689 	 * Sets the value(s) for <b>requirements</b> (Why is this needed?)
2690 	 *
2691      * <p>
2692      * <b>Definition:</b>
2693      * Explains why this element is needed and why it's been constrained as it has
2694      * </p> 
2695 	 */
2696 	public StructureElementDefinition setRequirements(StringDt theValue) {
2697 		myRequirements = theValue;
2698 		return this;
2699 	}
2700 
2701  	/**
2702 	 * Sets the value for <b>requirements</b> (Why is this needed?)
2703 	 *
2704      * <p>
2705      * <b>Definition:</b>
2706      * Explains why this element is needed and why it's been constrained as it has
2707      * </p> 
2708 	 */
2709 	public StructureElementDefinition setRequirements( String theString) {
2710 		myRequirements = new StringDt(theString); 
2711 		return this; 
2712 	}
2713 
2714  
2715 	/**
2716 	 * Gets the value(s) for <b>synonym</b> (Other names).
2717 	 * creating it if it does
2718 	 * not exist. Will not return <code>null</code>.
2719 	 *
2720      * <p>
2721      * <b>Definition:</b>
2722      * Identifies additional names by which this element might also be known
2723      * </p> 
2724 	 */
2725 	public java.util.List<StringDt> getSynonym() {  
2726 		if (mySynonym == null) {
2727 			mySynonym = new java.util.ArrayList<StringDt>();
2728 		}
2729 		return mySynonym;
2730 	}
2731 
2732 	/**
2733 	 * Sets the value(s) for <b>synonym</b> (Other names)
2734 	 *
2735      * <p>
2736      * <b>Definition:</b>
2737      * Identifies additional names by which this element might also be known
2738      * </p> 
2739 	 */
2740 	public StructureElementDefinition setSynonym(java.util.List<StringDt> theValue) {
2741 		mySynonym = theValue;
2742 		return this;
2743 	}
2744 
2745 	/**
2746 	 * Adds and returns a new value for <b>synonym</b> (Other names)
2747 	 *
2748      * <p>
2749      * <b>Definition:</b>
2750      * Identifies additional names by which this element might also be known
2751      * </p> 
2752 	 */
2753 	public StringDt addSynonym() {
2754 		StringDt newType = new StringDt();
2755 		getSynonym().add(newType);
2756 		return newType; 
2757 	}
2758 
2759 	/**
2760 	 * Gets the first repetition for <b>synonym</b> (Other names),
2761 	 * creating it if it does not already exist.
2762 	 *
2763      * <p>
2764      * <b>Definition:</b>
2765      * Identifies additional names by which this element might also be known
2766      * </p> 
2767 	 */
2768 	public StringDt getSynonymFirstRep() {
2769 		if (getSynonym().isEmpty()) {
2770 			return addSynonym();
2771 		}
2772 		return getSynonym().get(0); 
2773 	}
2774  	/**
2775 	 * Adds a new value for <b>synonym</b> (Other names)
2776 	 *
2777      * <p>
2778      * <b>Definition:</b>
2779      * Identifies additional names by which this element might also be known
2780      * </p> 
2781      *
2782      * @return Returns a reference to this object, to allow for simple chaining.
2783 	 */
2784 	public StructureElementDefinition addSynonym( String theString) {
2785 		if (mySynonym == null) {
2786 			mySynonym = new java.util.ArrayList<StringDt>();
2787 		}
2788 		mySynonym.add(new StringDt(theString));
2789 		return this; 
2790 	}
2791 
2792  
2793 	/**
2794 	 * Gets the value(s) for <b>min</b> (Minimum Cardinality).
2795 	 * creating it if it does
2796 	 * not exist. Will not return <code>null</code>.
2797 	 *
2798      * <p>
2799      * <b>Definition:</b>
2800      * The minimum number of times this element SHALL appear in the instance
2801      * </p> 
2802 	 */
2803 	public IntegerDt getMin() {  
2804 		if (myMin == null) {
2805 			myMin = new IntegerDt();
2806 		}
2807 		return myMin;
2808 	}
2809 
2810 	/**
2811 	 * Sets the value(s) for <b>min</b> (Minimum Cardinality)
2812 	 *
2813      * <p>
2814      * <b>Definition:</b>
2815      * The minimum number of times this element SHALL appear in the instance
2816      * </p> 
2817 	 */
2818 	public StructureElementDefinition setMin(IntegerDt theValue) {
2819 		myMin = theValue;
2820 		return this;
2821 	}
2822 
2823  	/**
2824 	 * Sets the value for <b>min</b> (Minimum Cardinality)
2825 	 *
2826      * <p>
2827      * <b>Definition:</b>
2828      * The minimum number of times this element SHALL appear in the instance
2829      * </p> 
2830 	 */
2831 	public StructureElementDefinition setMin( int theInteger) {
2832 		myMin = new IntegerDt(theInteger); 
2833 		return this; 
2834 	}
2835 
2836  
2837 	/**
2838 	 * Gets the value(s) for <b>max</b> (Maximum Cardinality (a number or *)).
2839 	 * creating it if it does
2840 	 * not exist. Will not return <code>null</code>.
2841 	 *
2842      * <p>
2843      * <b>Definition:</b>
2844      * The maximum number of times this element is permitted to appear in the instance
2845      * </p> 
2846 	 */
2847 	public StringDt getMax() {  
2848 		if (myMax == null) {
2849 			myMax = new StringDt();
2850 		}
2851 		return myMax;
2852 	}
2853 
2854 	/**
2855 	 * Sets the value(s) for <b>max</b> (Maximum Cardinality (a number or *))
2856 	 *
2857      * <p>
2858      * <b>Definition:</b>
2859      * The maximum number of times this element is permitted to appear in the instance
2860      * </p> 
2861 	 */
2862 	public StructureElementDefinition setMax(StringDt theValue) {
2863 		myMax = theValue;
2864 		return this;
2865 	}
2866 
2867  	/**
2868 	 * Sets the value for <b>max</b> (Maximum Cardinality (a number or *))
2869 	 *
2870      * <p>
2871      * <b>Definition:</b>
2872      * The maximum number of times this element is permitted to appear in the instance
2873      * </p> 
2874 	 */
2875 	public StructureElementDefinition setMax( String theString) {
2876 		myMax = new StringDt(theString); 
2877 		return this; 
2878 	}
2879 
2880  
2881 	/**
2882 	 * Gets the value(s) for <b>type</b> (Data type and Profile for this element).
2883 	 * creating it if it does
2884 	 * not exist. Will not return <code>null</code>.
2885 	 *
2886      * <p>
2887      * <b>Definition:</b>
2888      * The data type or resource that the value of this element is permitted to be
2889      * </p> 
2890 	 */
2891 	public java.util.List<StructureElementDefinitionType> getType() {  
2892 		if (myType == null) {
2893 			myType = new java.util.ArrayList<StructureElementDefinitionType>();
2894 		}
2895 		return myType;
2896 	}
2897 
2898 	/**
2899 	 * Sets the value(s) for <b>type</b> (Data type and Profile for this element)
2900 	 *
2901      * <p>
2902      * <b>Definition:</b>
2903      * The data type or resource that the value of this element is permitted to be
2904      * </p> 
2905 	 */
2906 	public StructureElementDefinition setType(java.util.List<StructureElementDefinitionType> theValue) {
2907 		myType = theValue;
2908 		return this;
2909 	}
2910 
2911 	/**
2912 	 * Adds and returns a new value for <b>type</b> (Data type and Profile for this element)
2913 	 *
2914      * <p>
2915      * <b>Definition:</b>
2916      * The data type or resource that the value of this element is permitted to be
2917      * </p> 
2918 	 */
2919 	public StructureElementDefinitionType addType() {
2920 		StructureElementDefinitionType newType = new StructureElementDefinitionType();
2921 		getType().add(newType);
2922 		return newType; 
2923 	}
2924 
2925 	/**
2926 	 * Gets the first repetition for <b>type</b> (Data type and Profile for this element),
2927 	 * creating it if it does not already exist.
2928 	 *
2929      * <p>
2930      * <b>Definition:</b>
2931      * The data type or resource that the value of this element is permitted to be
2932      * </p> 
2933 	 */
2934 	public StructureElementDefinitionType getTypeFirstRep() {
2935 		if (getType().isEmpty()) {
2936 			return addType();
2937 		}
2938 		return getType().get(0); 
2939 	}
2940   
2941 	/**
2942 	 * Gets the value(s) for <b>nameReference</b> (To another element constraint (by element.name)).
2943 	 * creating it if it does
2944 	 * not exist. Will not return <code>null</code>.
2945 	 *
2946      * <p>
2947      * <b>Definition:</b>
2948      * Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element
2949      * </p> 
2950 	 */
2951 	public StringDt getNameReference() {  
2952 		if (myNameReference == null) {
2953 			myNameReference = new StringDt();
2954 		}
2955 		return myNameReference;
2956 	}
2957 
2958 	/**
2959 	 * Sets the value(s) for <b>nameReference</b> (To another element constraint (by element.name))
2960 	 *
2961      * <p>
2962      * <b>Definition:</b>
2963      * Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element
2964      * </p> 
2965 	 */
2966 	public StructureElementDefinition setNameReference(StringDt theValue) {
2967 		myNameReference = theValue;
2968 		return this;
2969 	}
2970 
2971  	/**
2972 	 * Sets the value for <b>nameReference</b> (To another element constraint (by element.name))
2973 	 *
2974      * <p>
2975      * <b>Definition:</b>
2976      * Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element
2977      * </p> 
2978 	 */
2979 	public StructureElementDefinition setNameReference( String theString) {
2980 		myNameReference = new StringDt(theString); 
2981 		return this; 
2982 	}
2983 
2984  
2985 	/**
2986 	 * Gets the value(s) for <b>value[x]</b> (Fixed value: [as defined for a primitive type]).
2987 	 * creating it if it does
2988 	 * not exist. Will not return <code>null</code>.
2989 	 *
2990      * <p>
2991      * <b>Definition:</b>
2992      * Specifies a primitive value that SHALL hold for this element in the instance
2993      * </p> 
2994 	 */
2995 	public IDatatype getValue() {  
2996 		return myValue;
2997 	}
2998 
2999 	/**
3000 	 * Sets the value(s) for <b>value[x]</b> (Fixed value: [as defined for a primitive type])
3001 	 *
3002      * <p>
3003      * <b>Definition:</b>
3004      * Specifies a primitive value that SHALL hold for this element in the instance
3005      * </p> 
3006 	 */
3007 	public StructureElementDefinition setValue(IDatatype theValue) {
3008 		myValue = theValue;
3009 		return this;
3010 	}
3011 
3012   
3013 	/**
3014 	 * Gets the value(s) for <b>example[x]</b> (Example value: [as defined for type]).
3015 	 * creating it if it does
3016 	 * not exist. Will not return <code>null</code>.
3017 	 *
3018      * <p>
3019      * <b>Definition:</b>
3020      * An example value for this element
3021      * </p> 
3022 	 */
3023 	public IDatatype getExample() {  
3024 		return myExample;
3025 	}
3026 
3027 	/**
3028 	 * Sets the value(s) for <b>example[x]</b> (Example value: [as defined for type])
3029 	 *
3030      * <p>
3031      * <b>Definition:</b>
3032      * An example value for this element
3033      * </p> 
3034 	 */
3035 	public StructureElementDefinition setExample(IDatatype theValue) {
3036 		myExample = theValue;
3037 		return this;
3038 	}
3039 
3040   
3041 	/**
3042 	 * Gets the value(s) for <b>maxLength</b> (Length for strings).
3043 	 * creating it if it does
3044 	 * not exist. Will not return <code>null</code>.
3045 	 *
3046      * <p>
3047      * <b>Definition:</b>
3048      * Indicates the shortest length that SHALL be supported by conformant instances without truncation
3049      * </p> 
3050 	 */
3051 	public IntegerDt getMaxLength() {  
3052 		if (myMaxLength == null) {
3053 			myMaxLength = new IntegerDt();
3054 		}
3055 		return myMaxLength;
3056 	}
3057 
3058 	/**
3059 	 * Sets the value(s) for <b>maxLength</b> (Length for strings)
3060 	 *
3061      * <p>
3062      * <b>Definition:</b>
3063      * Indicates the shortest length that SHALL be supported by conformant instances without truncation
3064      * </p> 
3065 	 */
3066 	public StructureElementDefinition setMaxLength(IntegerDt theValue) {
3067 		myMaxLength = theValue;
3068 		return this;
3069 	}
3070 
3071  	/**
3072 	 * Sets the value for <b>maxLength</b> (Length for strings)
3073 	 *
3074      * <p>
3075      * <b>Definition:</b>
3076      * Indicates the shortest length that SHALL be supported by conformant instances without truncation
3077      * </p> 
3078 	 */
3079 	public StructureElementDefinition setMaxLength( int theInteger) {
3080 		myMaxLength = new IntegerDt(theInteger); 
3081 		return this; 
3082 	}
3083 
3084  
3085 	/**
3086 	 * Gets the value(s) for <b>condition</b> (Reference to invariant about presence).
3087 	 * creating it if it does
3088 	 * not exist. Will not return <code>null</code>.
3089 	 *
3090      * <p>
3091      * <b>Definition:</b>
3092      * A reference to an invariant that may make additional statements about the cardinality or value in the instance
3093      * </p> 
3094 	 */
3095 	public java.util.List<IdDt> getCondition() {  
3096 		if (myCondition == null) {
3097 			myCondition = new java.util.ArrayList<IdDt>();
3098 		}
3099 		return myCondition;
3100 	}
3101 
3102 	/**
3103 	 * Sets the value(s) for <b>condition</b> (Reference to invariant about presence)
3104 	 *
3105      * <p>
3106      * <b>Definition:</b>
3107      * A reference to an invariant that may make additional statements about the cardinality or value in the instance
3108      * </p> 
3109 	 */
3110 	public StructureElementDefinition setCondition(java.util.List<IdDt> theValue) {
3111 		myCondition = theValue;
3112 		return this;
3113 	}
3114 
3115 	/**
3116 	 * Adds and returns a new value for <b>condition</b> (Reference to invariant about presence)
3117 	 *
3118      * <p>
3119      * <b>Definition:</b>
3120      * A reference to an invariant that may make additional statements about the cardinality or value in the instance
3121      * </p> 
3122 	 */
3123 	public IdDt addCondition() {
3124 		IdDt newType = new IdDt();
3125 		getCondition().add(newType);
3126 		return newType; 
3127 	}
3128 
3129 	/**
3130 	 * Gets the first repetition for <b>condition</b> (Reference to invariant about presence),
3131 	 * creating it if it does not already exist.
3132 	 *
3133      * <p>
3134      * <b>Definition:</b>
3135      * A reference to an invariant that may make additional statements about the cardinality or value in the instance
3136      * </p> 
3137 	 */
3138 	public IdDt getConditionFirstRep() {
3139 		if (getCondition().isEmpty()) {
3140 			return addCondition();
3141 		}
3142 		return getCondition().get(0); 
3143 	}
3144  	/**
3145 	 * Adds a new value for <b>condition</b> (Reference to invariant about presence)
3146 	 *
3147      * <p>
3148      * <b>Definition:</b>
3149      * A reference to an invariant that may make additional statements about the cardinality or value in the instance
3150      * </p> 
3151      *
3152      * @return Returns a reference to this object, to allow for simple chaining.
3153 	 */
3154 	public StructureElementDefinition addCondition( String theId) {
3155 		if (myCondition == null) {
3156 			myCondition = new java.util.ArrayList<IdDt>();
3157 		}
3158 		myCondition.add(new IdDt(theId));
3159 		return this; 
3160 	}
3161 
3162  
3163 	/**
3164 	 * Gets the value(s) for <b>constraint</b> (Condition that must evaluate to true).
3165 	 * creating it if it does
3166 	 * not exist. Will not return <code>null</code>.
3167 	 *
3168      * <p>
3169      * <b>Definition:</b>
3170      * Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance
3171      * </p> 
3172 	 */
3173 	public java.util.List<StructureElementDefinitionConstraint> getConstraint() {  
3174 		if (myConstraint == null) {
3175 			myConstraint = new java.util.ArrayList<StructureElementDefinitionConstraint>();
3176 		}
3177 		return myConstraint;
3178 	}
3179 
3180 	/**
3181 	 * Sets the value(s) for <b>constraint</b> (Condition that must evaluate to true)
3182 	 *
3183      * <p>
3184      * <b>Definition:</b>
3185      * Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance
3186      * </p> 
3187 	 */
3188 	public StructureElementDefinition setConstraint(java.util.List<StructureElementDefinitionConstraint> theValue) {
3189 		myConstraint = theValue;
3190 		return this;
3191 	}
3192 
3193 	/**
3194 	 * Adds and returns a new value for <b>constraint</b> (Condition that must evaluate to true)
3195 	 *
3196      * <p>
3197      * <b>Definition:</b>
3198      * Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance
3199      * </p> 
3200 	 */
3201 	public StructureElementDefinitionConstraint addConstraint() {
3202 		StructureElementDefinitionConstraint newType = new StructureElementDefinitionConstraint();
3203 		getConstraint().add(newType);
3204 		return newType; 
3205 	}
3206 
3207 	/**
3208 	 * Gets the first repetition for <b>constraint</b> (Condition that must evaluate to true),
3209 	 * creating it if it does not already exist.
3210 	 *
3211      * <p>
3212      * <b>Definition:</b>
3213      * Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance
3214      * </p> 
3215 	 */
3216 	public StructureElementDefinitionConstraint getConstraintFirstRep() {
3217 		if (getConstraint().isEmpty()) {
3218 			return addConstraint();
3219 		}
3220 		return getConstraint().get(0); 
3221 	}
3222   
3223 	/**
3224 	 * Gets the value(s) for <b>mustSupport</b> (If the element must supported).
3225 	 * creating it if it does
3226 	 * not exist. Will not return <code>null</code>.
3227 	 *
3228      * <p>
3229      * <b>Definition:</b>
3230      * If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element.  If false, the element may be ignored and not supported
3231      * </p> 
3232 	 */
3233 	public BooleanDt getMustSupport() {  
3234 		if (myMustSupport == null) {
3235 			myMustSupport = new BooleanDt();
3236 		}
3237 		return myMustSupport;
3238 	}
3239 
3240 	/**
3241 	 * Sets the value(s) for <b>mustSupport</b> (If the element must supported)
3242 	 *
3243      * <p>
3244      * <b>Definition:</b>
3245      * If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element.  If false, the element may be ignored and not supported
3246      * </p> 
3247 	 */
3248 	public StructureElementDefinition setMustSupport(BooleanDt theValue) {
3249 		myMustSupport = theValue;
3250 		return this;
3251 	}
3252 
3253  	/**
3254 	 * Sets the value for <b>mustSupport</b> (If the element must supported)
3255 	 *
3256      * <p>
3257      * <b>Definition:</b>
3258      * If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element.  If false, the element may be ignored and not supported
3259      * </p> 
3260 	 */
3261 	public StructureElementDefinition setMustSupport( boolean theBoolean) {
3262 		myMustSupport = new BooleanDt(theBoolean); 
3263 		return this; 
3264 	}
3265 
3266  
3267 	/**
3268 	 * Gets the value(s) for <b>isModifier</b> (If this modifies the meaning of other elements).
3269 	 * creating it if it does
3270 	 * not exist. Will not return <code>null</code>.
3271 	 *
3272      * <p>
3273      * <b>Definition:</b>
3274      * If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.
3275      * </p> 
3276 	 */
3277 	public BooleanDt getIsModifier() {  
3278 		if (myIsModifier == null) {
3279 			myIsModifier = new BooleanDt();
3280 		}
3281 		return myIsModifier;
3282 	}
3283 
3284 	/**
3285 	 * Sets the value(s) for <b>isModifier</b> (If this modifies the meaning of other elements)
3286 	 *
3287      * <p>
3288      * <b>Definition:</b>
3289      * If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.
3290      * </p> 
3291 	 */
3292 	public StructureElementDefinition setIsModifier(BooleanDt theValue) {
3293 		myIsModifier = theValue;
3294 		return this;
3295 	}
3296 
3297  	/**
3298 	 * Sets the value for <b>isModifier</b> (If this modifies the meaning of other elements)
3299 	 *
3300      * <p>
3301      * <b>Definition:</b>
3302      * If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.
3303      * </p> 
3304 	 */
3305 	public StructureElementDefinition setIsModifier( boolean theBoolean) {
3306 		myIsModifier = new BooleanDt(theBoolean); 
3307 		return this; 
3308 	}
3309 
3310  
3311 	/**
3312 	 * Gets the value(s) for <b>binding</b> (ValueSet details if this is coded).
3313 	 * creating it if it does
3314 	 * not exist. Will not return <code>null</code>.
3315 	 *
3316      * <p>
3317      * <b>Definition:</b>
3318      * Binds to a value set if this element is coded (code, Coding, CodeableConcept)
3319      * </p> 
3320 	 */
3321 	public StructureElementDefinitionBinding getBinding() {  
3322 		if (myBinding == null) {
3323 			myBinding = new StructureElementDefinitionBinding();
3324 		}
3325 		return myBinding;
3326 	}
3327 
3328 	/**
3329 	 * Sets the value(s) for <b>binding</b> (ValueSet details if this is coded)
3330 	 *
3331      * <p>
3332      * <b>Definition:</b>
3333      * Binds to a value set if this element is coded (code, Coding, CodeableConcept)
3334      * </p> 
3335 	 */
3336 	public StructureElementDefinition setBinding(StructureElementDefinitionBinding theValue) {
3337 		myBinding = theValue;
3338 		return this;
3339 	}
3340 
3341   
3342 	/**
3343 	 * Gets the value(s) for <b>mapping</b> (Map element to another set of definitions).
3344 	 * creating it if it does
3345 	 * not exist. Will not return <code>null</code>.
3346 	 *
3347      * <p>
3348      * <b>Definition:</b>
3349      * Identifies a concept from an external specification that roughly corresponds to this element
3350      * </p> 
3351 	 */
3352 	public java.util.List<StructureElementDefinitionMapping> getMapping() {  
3353 		if (myMapping == null) {
3354 			myMapping = new java.util.ArrayList<StructureElementDefinitionMapping>();
3355 		}
3356 		return myMapping;
3357 	}
3358 
3359 	/**
3360 	 * Sets the value(s) for <b>mapping</b> (Map element to another set of definitions)
3361 	 *
3362      * <p>
3363      * <b>Definition:</b>
3364      * Identifies a concept from an external specification that roughly corresponds to this element
3365      * </p> 
3366 	 */
3367 	public StructureElementDefinition setMapping(java.util.List<StructureElementDefinitionMapping> theValue) {
3368 		myMapping = theValue;
3369 		return this;
3370 	}
3371 
3372 	/**
3373 	 * Adds and returns a new value for <b>mapping</b> (Map element to another set of definitions)
3374 	 *
3375      * <p>
3376      * <b>Definition:</b>
3377      * Identifies a concept from an external specification that roughly corresponds to this element
3378      * </p> 
3379 	 */
3380 	public StructureElementDefinitionMapping addMapping() {
3381 		StructureElementDefinitionMapping newType = new StructureElementDefinitionMapping();
3382 		getMapping().add(newType);
3383 		return newType; 
3384 	}
3385 
3386 	/**
3387 	 * Gets the first repetition for <b>mapping</b> (Map element to another set of definitions),
3388 	 * creating it if it does not already exist.
3389 	 *
3390      * <p>
3391      * <b>Definition:</b>
3392      * Identifies a concept from an external specification that roughly corresponds to this element
3393      * </p> 
3394 	 */
3395 	public StructureElementDefinitionMapping getMappingFirstRep() {
3396 		if (getMapping().isEmpty()) {
3397 			return addMapping();
3398 		}
3399 		return getMapping().get(0); 
3400 	}
3401   
3402 
3403 	}
3404 
3405 	/**
3406 	 * Block class for child element: <b>Profile.structure.element.definition.type</b> (Data type and Profile for this element)
3407 	 *
3408      * <p>
3409      * <b>Definition:</b>
3410      * The data type or resource that the value of this element is permitted to be
3411      * </p> 
3412 	 */
3413 	@Block()	
3414 	public static class StructureElementDefinitionType extends BaseIdentifiableElement implements IResourceBlock {
3415 	
3416 	@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)	
3417 	@Description(
3418 		shortDefinition="Name of Data type or Resource",
3419 		formalDefinition=""
3420 	)
3421 	private BoundCodeDt<DataTypeEnum> myCode;
3422 	
3423 	@Child(name="profile", type=UriDt.class, order=1, min=0, max=1)	
3424 	@Description(
3425 		shortDefinition="Profile.structure to apply",
3426 		formalDefinition="Identifies a profile that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile"
3427 	)
3428 	private UriDt myProfile;
3429 	
3430 	@Child(name="aggregation", type=CodeDt.class, order=2, min=0, max=Child.MAX_UNLIMITED)	
3431 	@Description(
3432 		shortDefinition="contained | referenced | bundled - how aggregated",
3433 		formalDefinition="If the type is a reference to another resource, how the resource is or can be aggreated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle"
3434 	)
3435 	private java.util.List<BoundCodeDt<AggregationModeEnum>> myAggregation;
3436 	
3437 
3438 	@Override
3439 	public boolean isEmpty() {
3440 		return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myProfile,  myAggregation);
3441 	}
3442 	
3443 	@Override
3444 	public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3445 		return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myProfile, myAggregation);
3446 	}
3447 
3448 	/**
3449 	 * Gets the value(s) for <b>code</b> (Name of Data type or Resource).
3450 	 * creating it if it does
3451 	 * not exist. Will not return <code>null</code>.
3452 	 *
3453      * <p>
3454      * <b>Definition:</b>
3455      * 
3456      * </p> 
3457 	 */
3458 	public BoundCodeDt<DataTypeEnum> getCode() {  
3459 		if (myCode == null) {
3460 			myCode = new BoundCodeDt<DataTypeEnum>(DataTypeEnum.VALUESET_BINDER);
3461 		}
3462 		return myCode;
3463 	}
3464 
3465 	/**
3466 	 * Sets the value(s) for <b>code</b> (Name of Data type or Resource)
3467 	 *
3468      * <p>
3469      * <b>Definition:</b>
3470      * 
3471      * </p> 
3472 	 */
3473 	public StructureElementDefinitionType setCode(BoundCodeDt<DataTypeEnum> theValue) {
3474 		myCode = theValue;
3475 		return this;
3476 	}
3477 
3478 	/**
3479 	 * Sets the value(s) for <b>code</b> (Name of Data type or Resource)
3480 	 *
3481      * <p>
3482      * <b>Definition:</b>
3483      * 
3484      * </p> 
3485 	 */
3486 	public StructureElementDefinitionType setCode(DataTypeEnum theValue) {
3487 		getCode().setValueAsEnum(theValue);
3488 		return this;
3489 	}
3490 
3491   
3492 	/**
3493 	 * Gets the value(s) for <b>profile</b> (Profile.structure to apply).
3494 	 * creating it if it does
3495 	 * not exist. Will not return <code>null</code>.
3496 	 *
3497      * <p>
3498      * <b>Definition:</b>
3499      * Identifies a profile that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile
3500      * </p> 
3501 	 */
3502 	public UriDt getProfile() {  
3503 		if (myProfile == null) {
3504 			myProfile = new UriDt();
3505 		}
3506 		return myProfile;
3507 	}
3508 
3509 	/**
3510 	 * Sets the value(s) for <b>profile</b> (Profile.structure to apply)
3511 	 *
3512      * <p>
3513      * <b>Definition:</b>
3514      * Identifies a profile that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile
3515      * </p> 
3516 	 */
3517 	public StructureElementDefinitionType setProfile(UriDt theValue) {
3518 		myProfile = theValue;
3519 		return this;
3520 	}
3521 
3522  	/**
3523 	 * Sets the value for <b>profile</b> (Profile.structure to apply)
3524 	 *
3525      * <p>
3526      * <b>Definition:</b>
3527      * Identifies a profile that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile
3528      * </p> 
3529 	 */
3530 	public StructureElementDefinitionType setProfile( String theUri) {
3531 		myProfile = new UriDt(theUri); 
3532 		return this; 
3533 	}
3534 
3535  
3536 	/**
3537 	 * Gets the value(s) for <b>aggregation</b> (contained | referenced | bundled - how aggregated).
3538 	 * creating it if it does
3539 	 * not exist. Will not return <code>null</code>.
3540 	 *
3541      * <p>
3542      * <b>Definition:</b>
3543      * If the type is a reference to another resource, how the resource is or can be aggreated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle
3544      * </p> 
3545 	 */
3546 	public java.util.List<BoundCodeDt<AggregationModeEnum>> getAggregation() {  
3547 		if (myAggregation == null) {
3548 			myAggregation = new java.util.ArrayList<BoundCodeDt<AggregationModeEnum>>();
3549 		}
3550 		return myAggregation;
3551 	}
3552 
3553 	/**
3554 	 * Sets the value(s) for <b>aggregation</b> (contained | referenced | bundled - how aggregated)
3555 	 *
3556      * <p>
3557      * <b>Definition:</b>
3558      * If the type is a reference to another resource, how the resource is or can be aggreated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle
3559      * </p> 
3560 	 */
3561 	public StructureElementDefinitionType setAggregation(java.util.List<BoundCodeDt<AggregationModeEnum>> theValue) {
3562 		myAggregation = theValue;
3563 		return this;
3564 	}
3565 
3566 	/**
3567 	 * Add a value for <b>aggregation</b> (contained | referenced | bundled - how aggregated) using an enumerated type. This
3568 	 * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
3569 	 * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
3570 	 * you may also use the {@link #addType()} method.
3571 	 *
3572      * <p>
3573      * <b>Definition:</b>
3574      * If the type is a reference to another resource, how the resource is or can be aggreated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle
3575      * </p> 
3576 	 */
3577 	public BoundCodeDt<AggregationModeEnum> addAggregation(AggregationModeEnum theValue) {
3578 		BoundCodeDt<AggregationModeEnum> retVal = new BoundCodeDt<AggregationModeEnum>(AggregationModeEnum.VALUESET_BINDER, theValue);
3579 		getAggregation().add(retVal);
3580 		return retVal;
3581 	}
3582 
3583 	/**
3584 	 * Gets the first repetition for <b>aggregation</b> (contained | referenced | bundled - how aggregated),
3585 	 * creating it if it does not already exist.
3586 	 *
3587      * <p>
3588      * <b>Definition:</b>
3589      * If the type is a reference to another resource, how the resource is or can be aggreated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle
3590      * </p> 
3591 	 */
3592 	public BoundCodeDt<AggregationModeEnum> getAggregationFirstRep() {
3593 		if (getAggregation().size() == 0) {
3594 			addAggregation();
3595 		}
3596 		return getAggregation().get(0);
3597 	}
3598 
3599 	/**
3600 	 * Add a value for <b>aggregation</b> (contained | referenced | bundled - how aggregated)
3601 	 *
3602      * <p>
3603      * <b>Definition:</b>
3604      * If the type is a reference to another resource, how the resource is or can be aggreated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle
3605      * </p> 
3606 	 */
3607 	public BoundCodeDt<AggregationModeEnum> addAggregation() {
3608 		BoundCodeDt<AggregationModeEnum> retVal = new BoundCodeDt<AggregationModeEnum>(AggregationModeEnum.VALUESET_BINDER);
3609 		getAggregation().add(retVal);
3610 		return retVal;
3611 	}
3612 
3613 	/**
3614 	 * Sets the value(s), and clears any existing value(s) for <b>aggregation</b> (contained | referenced | bundled - how aggregated)
3615 	 *
3616      * <p>
3617      * <b>Definition:</b>
3618      * If the type is a reference to another resource, how the resource is or can be aggreated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle
3619      * </p> 
3620 	 */
3621 	public StructureElementDefinitionType setAggregation(AggregationModeEnum theValue) {
3622 		getAggregation().clear();
3623 		addAggregation(theValue);
3624 		return this;
3625 	}
3626 
3627   
3628 
3629 	}
3630 
3631 
3632 	/**
3633 	 * Block class for child element: <b>Profile.structure.element.definition.constraint</b> (Condition that must evaluate to true)
3634 	 *
3635      * <p>
3636      * <b>Definition:</b>
3637      * Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance
3638      * </p> 
3639 	 */
3640 	@Block()	
3641 	public static class StructureElementDefinitionConstraint extends BaseIdentifiableElement implements IResourceBlock {
3642 	
3643 	@Child(name="key", type=IdDt.class, order=0, min=1, max=1)	
3644 	@Description(
3645 		shortDefinition="Target of 'condition' reference above",
3646 		formalDefinition="Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality"
3647 	)
3648 	private IdDt myKey;
3649 	
3650 	@Child(name="name", type=StringDt.class, order=1, min=0, max=1)	
3651 	@Description(
3652 		shortDefinition="Short human label",
3653 		formalDefinition="Used to label the constraint in OCL or in short displays incapable of displaying the full human description"
3654 	)
3655 	private StringDt myName;
3656 	
3657 	@Child(name="severity", type=CodeDt.class, order=2, min=1, max=1)	
3658 	@Description(
3659 		shortDefinition="error | warning",
3660 		formalDefinition="Identifies the impact constraint violation has on the conformance of the instance"
3661 	)
3662 	private BoundCodeDt<ConstraintSeverityEnum> mySeverity;
3663 	
3664 	@Child(name="human", type=StringDt.class, order=3, min=1, max=1)	
3665 	@Description(
3666 		shortDefinition="Human description of constraint",
3667 		formalDefinition="Text that can be used to describe the constraint in messages identifying that the constraint has been violated"
3668 	)
3669 	private StringDt myHuman;
3670 	
3671 	@Child(name="xpath", type=StringDt.class, order=4, min=1, max=1)	
3672 	@Description(
3673 		shortDefinition="XPath expression of constraint",
3674 		formalDefinition="XPath expression of constraint"
3675 	)
3676 	private StringDt myXpath;
3677 	
3678 
3679 	@Override
3680 	public boolean isEmpty() {
3681 		return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myKey,  myName,  mySeverity,  myHuman,  myXpath);
3682 	}
3683 	
3684 	@Override
3685 	public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3686 		return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myKey, myName, mySeverity, myHuman, myXpath);
3687 	}
3688 
3689 	/**
3690 	 * Gets the value(s) for <b>key</b> (Target of 'condition' reference above).
3691 	 * creating it if it does
3692 	 * not exist. Will not return <code>null</code>.
3693 	 *
3694      * <p>
3695      * <b>Definition:</b>
3696      * Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality
3697      * </p> 
3698 	 */
3699 	public IdDt getKey() {  
3700 		if (myKey == null) {
3701 			myKey = new IdDt();
3702 		}
3703 		return myKey;
3704 	}
3705 
3706 	/**
3707 	 * Sets the value(s) for <b>key</b> (Target of 'condition' reference above)
3708 	 *
3709      * <p>
3710      * <b>Definition:</b>
3711      * Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality
3712      * </p> 
3713 	 */
3714 	public StructureElementDefinitionConstraint setKey(IdDt theValue) {
3715 		myKey = theValue;
3716 		return this;
3717 	}
3718 
3719  	/**
3720 	 * Sets the value for <b>key</b> (Target of 'condition' reference above)
3721 	 *
3722      * <p>
3723      * <b>Definition:</b>
3724      * Allows identification of which elements have their cardinalities impacted by the constraint.  Will not be referenced for constraints that do not affect cardinality
3725      * </p> 
3726 	 */
3727 	public StructureElementDefinitionConstraint setKey( String theId) {
3728 		myKey = new IdDt(theId); 
3729 		return this; 
3730 	}
3731 
3732  
3733 	/**
3734 	 * Gets the value(s) for <b>name</b> (Short human label).
3735 	 * creating it if it does
3736 	 * not exist. Will not return <code>null</code>.
3737 	 *
3738      * <p>
3739      * <b>Definition:</b>
3740      * Used to label the constraint in OCL or in short displays incapable of displaying the full human description
3741      * </p> 
3742 	 */
3743 	public StringDt getName() {  
3744 		if (myName == null) {
3745 			myName = new StringDt();
3746 		}
3747 		return myName;
3748 	}
3749 
3750 	/**
3751 	 * Sets the value(s) for <b>name</b> (Short human label)
3752 	 *
3753      * <p>
3754      * <b>Definition:</b>
3755      * Used to label the constraint in OCL or in short displays incapable of displaying the full human description
3756      * </p> 
3757 	 */
3758 	public StructureElementDefinitionConstraint setName(StringDt theValue) {
3759 		myName = theValue;
3760 		return this;
3761 	}
3762 
3763  	/**
3764 	 * Sets the value for <b>name</b> (Short human label)
3765 	 *
3766      * <p>
3767      * <b>Definition:</b>
3768      * Used to label the constraint in OCL or in short displays incapable of displaying the full human description
3769      * </p> 
3770 	 */
3771 	public StructureElementDefinitionConstraint setName( String theString) {
3772 		myName = new StringDt(theString); 
3773 		return this; 
3774 	}
3775 
3776  
3777 	/**
3778 	 * Gets the value(s) for <b>severity</b> (error | warning).
3779 	 * creating it if it does
3780 	 * not exist. Will not return <code>null</code>.
3781 	 *
3782      * <p>
3783      * <b>Definition:</b>
3784      * Identifies the impact constraint violation has on the conformance of the instance
3785      * </p> 
3786 	 */
3787 	public BoundCodeDt<ConstraintSeverityEnum> getSeverity() {  
3788 		if (mySeverity == null) {
3789 			mySeverity = new BoundCodeDt<ConstraintSeverityEnum>(ConstraintSeverityEnum.VALUESET_BINDER);
3790 		}
3791 		return mySeverity;
3792 	}
3793 
3794 	/**
3795 	 * Sets the value(s) for <b>severity</b> (error | warning)
3796 	 *
3797      * <p>
3798      * <b>Definition:</b>
3799      * Identifies the impact constraint violation has on the conformance of the instance
3800      * </p> 
3801 	 */
3802 	public StructureElementDefinitionConstraint setSeverity(BoundCodeDt<ConstraintSeverityEnum> theValue) {
3803 		mySeverity = theValue;
3804 		return this;
3805 	}
3806 
3807 	/**
3808 	 * Sets the value(s) for <b>severity</b> (error | warning)
3809 	 *
3810      * <p>
3811      * <b>Definition:</b>
3812      * Identifies the impact constraint violation has on the conformance of the instance
3813      * </p> 
3814 	 */
3815 	public StructureElementDefinitionConstraint setSeverity(ConstraintSeverityEnum theValue) {
3816 		getSeverity().setValueAsEnum(theValue);
3817 		return this;
3818 	}
3819 
3820   
3821 	/**
3822 	 * Gets the value(s) for <b>human</b> (Human description of constraint).
3823 	 * creating it if it does
3824 	 * not exist. Will not return <code>null</code>.
3825 	 *
3826      * <p>
3827      * <b>Definition:</b>
3828      * Text that can be used to describe the constraint in messages identifying that the constraint has been violated
3829      * </p> 
3830 	 */
3831 	public StringDt getHuman() {  
3832 		if (myHuman == null) {
3833 			myHuman = new StringDt();
3834 		}
3835 		return myHuman;
3836 	}
3837 
3838 	/**
3839 	 * Sets the value(s) for <b>human</b> (Human description of constraint)
3840 	 *
3841      * <p>
3842      * <b>Definition:</b>
3843      * Text that can be used to describe the constraint in messages identifying that the constraint has been violated
3844      * </p> 
3845 	 */
3846 	public StructureElementDefinitionConstraint setHuman(StringDt theValue) {
3847 		myHuman = theValue;
3848 		return this;
3849 	}
3850 
3851  	/**
3852 	 * Sets the value for <b>human</b> (Human description of constraint)
3853 	 *
3854      * <p>
3855      * <b>Definition:</b>
3856      * Text that can be used to describe the constraint in messages identifying that the constraint has been violated
3857      * </p> 
3858 	 */
3859 	public StructureElementDefinitionConstraint setHuman( String theString) {
3860 		myHuman = new StringDt(theString); 
3861 		return this; 
3862 	}
3863 
3864  
3865 	/**
3866 	 * Gets the value(s) for <b>xpath</b> (XPath expression of constraint).
3867 	 * creating it if it does
3868 	 * not exist. Will not return <code>null</code>.
3869 	 *
3870      * <p>
3871      * <b>Definition:</b>
3872      * XPath expression of constraint
3873      * </p> 
3874 	 */
3875 	public StringDt getXpath() {  
3876 		if (myXpath == null) {
3877 			myXpath = new StringDt();
3878 		}
3879 		return myXpath;
3880 	}
3881 
3882 	/**
3883 	 * Sets the value(s) for <b>xpath</b> (XPath expression of constraint)
3884 	 *
3885      * <p>
3886      * <b>Definition:</b>
3887      * XPath expression of constraint
3888      * </p> 
3889 	 */
3890 	public StructureElementDefinitionConstraint setXpath(StringDt theValue) {
3891 		myXpath = theValue;
3892 		return this;
3893 	}
3894 
3895  	/**
3896 	 * Sets the value for <b>xpath</b> (XPath expression of constraint)
3897 	 *
3898      * <p>
3899      * <b>Definition:</b>
3900      * XPath expression of constraint
3901      * </p> 
3902 	 */
3903 	public StructureElementDefinitionConstraint setXpath( String theString) {
3904 		myXpath = new StringDt(theString); 
3905 		return this; 
3906 	}
3907 
3908  
3909 
3910 	}
3911 
3912 
3913 	/**
3914 	 * Block class for child element: <b>Profile.structure.element.definition.binding</b> (ValueSet details if this is coded)
3915 	 *
3916      * <p>
3917      * <b>Definition:</b>
3918      * Binds to a value set if this element is coded (code, Coding, CodeableConcept)
3919      * </p> 
3920 	 */
3921 	@Block()	
3922 	public static class StructureElementDefinitionBinding extends BaseIdentifiableElement implements IResourceBlock {
3923 	
3924 	@Child(name="name", type=StringDt.class, order=0, min=1, max=1)	
3925 	@Description(
3926 		shortDefinition="Descriptive Name",
3927 		formalDefinition="A descriptive name for this - can be useful for generating implementation artifacts"
3928 	)
3929 	private StringDt myName;
3930 	
3931 	@Child(name="isExtensible", type=BooleanDt.class, order=1, min=1, max=1)	
3932 	@Description(
3933 		shortDefinition="Can additional codes be used?",
3934 		formalDefinition="If true, then conformant systems may use additional codes or (where the data type permits) text alone to convey concepts not covered by the set of codes identified in the binding.  If false, then conformant systems are constrained to the provided codes alone"
3935 	)
3936 	private BooleanDt myIsExtensible;
3937 	
3938 	@Child(name="conformance", type=CodeDt.class, order=2, min=0, max=1)	
3939 	@Description(
3940 		shortDefinition="required | preferred | example",
3941 		formalDefinition="Indicates the degree of conformance expectations associated with this binding"
3942 	)
3943 	private BoundCodeDt<BindingConformanceEnum> myConformance;
3944 	
3945 	@Child(name="description", type=StringDt.class, order=3, min=0, max=1)	
3946 	@Description(
3947 		shortDefinition="Human explanation of the value set",
3948 		formalDefinition="Describes the intended use of this particular set of codes"
3949 	)
3950 	private StringDt myDescription;
3951 	
3952 	@Child(name="reference", order=4, min=0, max=1, type={
3953 		UriDt.class, 		ValueSet.class	})
3954 	@Description(
3955 		shortDefinition="Source of value set",
3956 		formalDefinition="Points to the value set or external definition that identifies the set of codes to be used"
3957 	)
3958 	private IDatatype myReference;
3959 	
3960 
3961 	@Override
3962 	public boolean isEmpty() {
3963 		return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myName,  myIsExtensible,  myConformance,  myDescription,  myReference);
3964 	}
3965 	
3966 	@Override
3967 	public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3968 		return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myIsExtensible, myConformance, myDescription, myReference);
3969 	}
3970 
3971 	/**
3972 	 * Gets the value(s) for <b>name</b> (Descriptive Name).
3973 	 * creating it if it does
3974 	 * not exist. Will not return <code>null</code>.
3975 	 *
3976      * <p>
3977      * <b>Definition:</b>
3978      * A descriptive name for this - can be useful for generating implementation artifacts
3979      * </p> 
3980 	 */
3981 	public StringDt getName() {  
3982 		if (myName == null) {
3983 			myName = new StringDt();
3984 		}
3985 		return myName;
3986 	}
3987 
3988 	/**
3989 	 * Sets the value(s) for <b>name</b> (Descriptive Name)
3990 	 *
3991      * <p>
3992      * <b>Definition:</b>
3993      * A descriptive name for this - can be useful for generating implementation artifacts
3994      * </p> 
3995 	 */
3996 	public StructureElementDefinitionBinding setName(StringDt theValue) {
3997 		myName = theValue;
3998 		return this;
3999 	}
4000 
4001  	/**
4002 	 * Sets the value for <b>name</b> (Descriptive Name)
4003 	 *
4004      * <p>
4005      * <b>Definition:</b>
4006      * A descriptive name for this - can be useful for generating implementation artifacts
4007      * </p> 
4008 	 */
4009 	public StructureElementDefinitionBinding setName( String theString) {
4010 		myName = new StringDt(theString); 
4011 		return this; 
4012 	}
4013 
4014  
4015 	/**
4016 	 * Gets the value(s) for <b>isExtensible</b> (Can additional codes be used?).
4017 	 * creating it if it does
4018 	 * not exist. Will not return <code>null</code>.
4019 	 *
4020      * <p>
4021      * <b>Definition:</b>
4022      * If true, then conformant systems may use additional codes or (where the data type permits) text alone to convey concepts not covered by the set of codes identified in the binding.  If false, then conformant systems are constrained to the provided codes alone
4023      * </p> 
4024 	 */
4025 	public BooleanDt getIsExtensible() {  
4026 		if (myIsExtensible == null) {
4027 			myIsExtensible = new BooleanDt();
4028 		}
4029 		return myIsExtensible;
4030 	}
4031 
4032 	/**
4033 	 * Sets the value(s) for <b>isExtensible</b> (Can additional codes be used?)
4034 	 *
4035      * <p>
4036      * <b>Definition:</b>
4037      * If true, then conformant systems may use additional codes or (where the data type permits) text alone to convey concepts not covered by the set of codes identified in the binding.  If false, then conformant systems are constrained to the provided codes alone
4038      * </p> 
4039 	 */
4040 	public StructureElementDefinitionBinding setIsExtensible(BooleanDt theValue) {
4041 		myIsExtensible = theValue;
4042 		return this;
4043 	}
4044 
4045  	/**
4046 	 * Sets the value for <b>isExtensible</b> (Can additional codes be used?)
4047 	 *
4048      * <p>
4049      * <b>Definition:</b>
4050      * If true, then conformant systems may use additional codes or (where the data type permits) text alone to convey concepts not covered by the set of codes identified in the binding.  If false, then conformant systems are constrained to the provided codes alone
4051      * </p> 
4052 	 */
4053 	public StructureElementDefinitionBinding setIsExtensible( boolean theBoolean) {
4054 		myIsExtensible = new BooleanDt(theBoolean); 
4055 		return this; 
4056 	}
4057 
4058  
4059 	/**
4060 	 * Gets the value(s) for <b>conformance</b> (required | preferred | example).
4061 	 * creating it if it does
4062 	 * not exist. Will not return <code>null</code>.
4063 	 *
4064      * <p>
4065      * <b>Definition:</b>
4066      * Indicates the degree of conformance expectations associated with this binding
4067      * </p> 
4068 	 */
4069 	public BoundCodeDt<BindingConformanceEnum> getConformance() {  
4070 		if (myConformance == null) {
4071 			myConformance = new BoundCodeDt<BindingConformanceEnum>(BindingConformanceEnum.VALUESET_BINDER);
4072 		}
4073 		return myConformance;
4074 	}
4075 
4076 	/**
4077 	 * Sets the value(s) for <b>conformance</b> (required | preferred | example)
4078 	 *
4079      * <p>
4080      * <b>Definition:</b>
4081      * Indicates the degree of conformance expectations associated with this binding
4082      * </p> 
4083 	 */
4084 	public StructureElementDefinitionBinding setConformance(BoundCodeDt<BindingConformanceEnum> theValue) {
4085 		myConformance = theValue;
4086 		return this;
4087 	}
4088 
4089 	/**
4090 	 * Sets the value(s) for <b>conformance</b> (required | preferred | example)
4091 	 *
4092      * <p>
4093      * <b>Definition:</b>
4094      * Indicates the degree of conformance expectations associated with this binding
4095      * </p> 
4096 	 */
4097 	public StructureElementDefinitionBinding setConformance(BindingConformanceEnum theValue) {
4098 		getConformance().setValueAsEnum(theValue);
4099 		return this;
4100 	}
4101 
4102   
4103 	/**
4104 	 * Gets the value(s) for <b>description</b> (Human explanation of the value set).
4105 	 * creating it if it does
4106 	 * not exist. Will not return <code>null</code>.
4107 	 *
4108      * <p>
4109      * <b>Definition:</b>
4110      * Describes the intended use of this particular set of codes
4111      * </p> 
4112 	 */
4113 	public StringDt getDescription() {  
4114 		if (myDescription == null) {
4115 			myDescription = new StringDt();
4116 		}
4117 		return myDescription;
4118 	}
4119 
4120 	/**
4121 	 * Sets the value(s) for <b>description</b> (Human explanation of the value set)
4122 	 *
4123      * <p>
4124      * <b>Definition:</b>
4125      * Describes the intended use of this particular set of codes
4126      * </p> 
4127 	 */
4128 	public StructureElementDefinitionBinding setDescription(StringDt theValue) {
4129 		myDescription = theValue;
4130 		return this;
4131 	}
4132 
4133  	/**
4134 	 * Sets the value for <b>description</b> (Human explanation of the value set)
4135 	 *
4136      * <p>
4137      * <b>Definition:</b>
4138      * Describes the intended use of this particular set of codes
4139      * </p> 
4140 	 */
4141 	public StructureElementDefinitionBinding setDescription( String theString) {
4142 		myDescription = new StringDt(theString); 
4143 		return this; 
4144 	}
4145 
4146  
4147 	/**
4148 	 * Gets the value(s) for <b>reference[x]</b> (Source of value set).
4149 	 * creating it if it does
4150 	 * not exist. Will not return <code>null</code>.
4151 	 *
4152      * <p>
4153      * <b>Definition:</b>
4154      * Points to the value set or external definition that identifies the set of codes to be used
4155      * </p> 
4156 	 */
4157 	public IDatatype getReference() {  
4158 		return myReference;
4159 	}
4160 
4161 	/**
4162 	 * Sets the value(s) for <b>reference[x]</b> (Source of value set)
4163 	 *
4164      * <p>
4165      * <b>Definition:</b>
4166      * Points to the value set or external definition that identifies the set of codes to be used
4167      * </p> 
4168 	 */
4169 	public StructureElementDefinitionBinding setReference(IDatatype theValue) {
4170 		myReference = theValue;
4171 		return this;
4172 	}
4173 
4174   
4175 
4176 	}
4177 
4178 
4179 	/**
4180 	 * Block class for child element: <b>Profile.structure.element.definition.mapping</b> (Map element to another set of definitions)
4181 	 *
4182      * <p>
4183      * <b>Definition:</b>
4184      * Identifies a concept from an external specification that roughly corresponds to this element
4185      * </p> 
4186 	 */
4187 	@Block()	
4188 	public static class StructureElementDefinitionMapping extends BaseIdentifiableElement implements IResourceBlock {
4189 	
4190 	@Child(name="identity", type=IdDt.class, order=0, min=1, max=1)	
4191 	@Description(
4192 		shortDefinition="Reference to mapping declaration",
4193 		formalDefinition="An internal reference to the definition of a mapping"
4194 	)
4195 	private IdDt myIdentity;
4196 	
4197 	@Child(name="map", type=StringDt.class, order=1, min=1, max=1)	
4198 	@Description(
4199 		shortDefinition="Details of the mapping",
4200 		formalDefinition="Expresses what part of the target specification corresponds to this element"
4201 	)
4202 	private StringDt myMap;
4203 	
4204 
4205 	@Override
4206 	public boolean isEmpty() {
4207 		return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentity,  myMap);
4208 	}
4209 	
4210 	@Override
4211 	public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4212 		return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentity, myMap);
4213 	}
4214 
4215 	/**
4216 	 * Gets the value(s) for <b>identity</b> (Reference to mapping declaration).
4217 	 * creating it if it does
4218 	 * not exist. Will not return <code>null</code>.
4219 	 *
4220      * <p>
4221      * <b>Definition:</b>
4222      * An internal reference to the definition of a mapping
4223      * </p> 
4224 	 */
4225 	public IdDt getIdentity() {  
4226 		if (myIdentity == null) {
4227 			myIdentity = new IdDt();
4228 		}
4229 		return myIdentity;
4230 	}
4231 
4232 	/**
4233 	 * Sets the value(s) for <b>identity</b> (Reference to mapping declaration)
4234 	 *
4235      * <p>
4236      * <b>Definition:</b>
4237      * An internal reference to the definition of a mapping
4238      * </p> 
4239 	 */
4240 	public StructureElementDefinitionMapping setIdentity(IdDt theValue) {
4241 		myIdentity = theValue;
4242 		return this;
4243 	}
4244 
4245  	/**
4246 	 * Sets the value for <b>identity</b> (Reference to mapping declaration)
4247 	 *
4248      * <p>
4249      * <b>Definition:</b>
4250      * An internal reference to the definition of a mapping
4251      * </p> 
4252 	 */
4253 	public StructureElementDefinitionMapping setIdentity( String theId) {
4254 		myIdentity = new IdDt(theId); 
4255 		return this; 
4256 	}
4257 
4258  
4259 	/**
4260 	 * Gets the value(s) for <b>map</b> (Details of the mapping).
4261 	 * creating it if it does
4262 	 * not exist. Will not return <code>null</code>.
4263 	 *
4264      * <p>
4265      * <b>Definition:</b>
4266      * Expresses what part of the target specification corresponds to this element
4267      * </p> 
4268 	 */
4269 	public StringDt getMap() {  
4270 		if (myMap == null) {
4271 			myMap = new StringDt();
4272 		}
4273 		return myMap;
4274 	}
4275 
4276 	/**
4277 	 * Sets the value(s) for <b>map</b> (Details of the mapping)
4278 	 *
4279      * <p>
4280      * <b>Definition:</b>
4281      * Expresses what part of the target specification corresponds to this element
4282      * </p> 
4283 	 */
4284 	public StructureElementDefinitionMapping setMap(StringDt theValue) {
4285 		myMap = theValue;
4286 		return this;
4287 	}
4288 
4289  	/**
4290 	 * Sets the value for <b>map</b> (Details of the mapping)
4291 	 *
4292      * <p>
4293      * <b>Definition:</b>
4294      * Expresses what part of the target specification corresponds to this element
4295      * </p> 
4296 	 */
4297 	public StructureElementDefinitionMapping setMap( String theString) {
4298 		myMap = new StringDt(theString); 
4299 		return this; 
4300 	}
4301 
4302  
4303 
4304 	}
4305 
4306 
4307 
4308 
4309 	/**
4310 	 * Block class for child element: <b>Profile.structure.searchParam</b> (Search params defined)
4311 	 *
4312      * <p>
4313      * <b>Definition:</b>
4314      * Additional search parameters for implementations to support and/or make use of
4315      * </p> 
4316 	 */
4317 	@Block()	
4318 	public static class StructureSearchParam extends BaseIdentifiableElement implements IResourceBlock {
4319 	
4320 	@Child(name="name", type=StringDt.class, order=0, min=1, max=1)	
4321 	@Description(
4322 		shortDefinition="Name of search parameter",
4323 		formalDefinition="The name of the standard or custom search parameter"
4324 	)
4325 	private StringDt myName;
4326 	
4327 	@Child(name="type", type=CodeDt.class, order=1, min=1, max=1)	
4328 	@Description(
4329 		shortDefinition="number | date | string | token | reference | composite | quantity",
4330 		formalDefinition="The type of value a search parameter refers to, and how the content is interpreted"
4331 	)
4332 	private BoundCodeDt<SearchParamTypeEnum> myType;
4333 	
4334 	@Child(name="documentation", type=StringDt.class, order=2, min=1, max=1)	
4335 	@Description(
4336 		shortDefinition="Contents and meaning of search parameter",
4337 		formalDefinition="A specification for search parameters. For standard parameters, provides additional information on how the parameter is used in this solution.  For custom parameters, provides a description of what the parameter does"
4338 	)
4339 	private StringDt myDocumentation;
4340 	
4341 	@Child(name="xpath", type=StringDt.class, order=3, min=0, max=1)	
4342 	@Description(
4343 		shortDefinition="XPath that extracts the parameter set",
4344 		formalDefinition="An XPath expression that returns a set of elements for the search parameter"
4345 	)
4346 	private StringDt myXpath;
4347 	
4348 	@Child(name="target", type=CodeDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)	
4349 	@Description(
4350 		shortDefinition="Types of resource (if a resource reference)",
4351 		formalDefinition="Types of resource (if a resource is referenced)"
4352 	)
4353 	private java.util.List<BoundCodeDt<ResourceTypeEnum>> myTarget;
4354 	
4355 
4356 	@Override
4357 	public boolean isEmpty() {
4358 		return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myName,  myType,  myDocumentation,  myXpath,  myTarget);
4359 	}
4360 	
4361 	@Override
4362 	public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4363 		return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myType, myDocumentation, myXpath, myTarget);
4364 	}
4365 
4366 	/**
4367 	 * Gets the value(s) for <b>name</b> (Name of search parameter).
4368 	 * creating it if it does
4369 	 * not exist. Will not return <code>null</code>.
4370 	 *
4371      * <p>
4372      * <b>Definition:</b>
4373      * The name of the standard or custom search parameter
4374      * </p> 
4375 	 */
4376 	public StringDt getName() {  
4377 		if (myName == null) {
4378 			myName = new StringDt();
4379 		}
4380 		return myName;
4381 	}
4382 
4383 	/**
4384 	 * Sets the value(s) for <b>name</b> (Name of search parameter)
4385 	 *
4386      * <p>
4387      * <b>Definition:</b>
4388      * The name of the standard or custom search parameter
4389      * </p> 
4390 	 */
4391 	public StructureSearchParam setName(StringDt theValue) {
4392 		myName = theValue;
4393 		return this;
4394 	}
4395 
4396  	/**
4397 	 * Sets the value for <b>name</b> (Name of search parameter)
4398 	 *
4399      * <p>
4400      * <b>Definition:</b>
4401      * The name of the standard or custom search parameter
4402      * </p> 
4403 	 */
4404 	public StructureSearchParam setName( String theString) {
4405 		myName = new StringDt(theString); 
4406 		return this; 
4407 	}
4408 
4409  
4410 	/**
4411 	 * Gets the value(s) for <b>type</b> (number | date | string | token | reference | composite | quantity).
4412 	 * creating it if it does
4413 	 * not exist. Will not return <code>null</code>.
4414 	 *
4415      * <p>
4416      * <b>Definition:</b>
4417      * The type of value a search parameter refers to, and how the content is interpreted
4418      * </p> 
4419 	 */
4420 	public BoundCodeDt<SearchParamTypeEnum> getType() {  
4421 		if (myType == null) {
4422 			myType = new BoundCodeDt<SearchParamTypeEnum>(SearchParamTypeEnum.VALUESET_BINDER);
4423 		}
4424 		return myType;
4425 	}
4426 
4427 	/**
4428 	 * Sets the value(s) for <b>type</b> (number | date | string | token | reference | composite | quantity)
4429 	 *
4430      * <p>
4431      * <b>Definition:</b>
4432      * The type of value a search parameter refers to, and how the content is interpreted
4433      * </p> 
4434 	 */
4435 	public StructureSearchParam setType(BoundCodeDt<SearchParamTypeEnum> theValue) {
4436 		myType = theValue;
4437 		return this;
4438 	}
4439 
4440 	/**
4441 	 * Sets the value(s) for <b>type</b> (number | date | string | token | reference | composite | quantity)
4442 	 *
4443      * <p>
4444      * <b>Definition:</b>
4445      * The type of value a search parameter refers to, and how the content is interpreted
4446      * </p> 
4447 	 */
4448 	public StructureSearchParam setType(SearchParamTypeEnum theValue) {
4449 		getType().setValueAsEnum(theValue);
4450 		return this;
4451 	}
4452 
4453   
4454 	/**
4455 	 * Gets the value(s) for <b>documentation</b> (Contents and meaning of search parameter).
4456 	 * creating it if it does
4457 	 * not exist. Will not return <code>null</code>.
4458 	 *
4459      * <p>
4460      * <b>Definition:</b>
4461      * A specification for search parameters. For standard parameters, provides additional information on how the parameter is used in this solution.  For custom parameters, provides a description of what the parameter does
4462      * </p> 
4463 	 */
4464 	public StringDt getDocumentation() {  
4465 		if (myDocumentation == null) {
4466 			myDocumentation = new StringDt();
4467 		}
4468 		return myDocumentation;
4469 	}
4470 
4471 	/**
4472 	 * Sets the value(s) for <b>documentation</b> (Contents and meaning of search parameter)
4473 	 *
4474      * <p>
4475      * <b>Definition:</b>
4476      * A specification for search parameters. For standard parameters, provides additional information on how the parameter is used in this solution.  For custom parameters, provides a description of what the parameter does
4477      * </p> 
4478 	 */
4479 	public StructureSearchParam setDocumentation(StringDt theValue) {
4480 		myDocumentation = theValue;
4481 		return this;
4482 	}
4483 
4484  	/**
4485 	 * Sets the value for <b>documentation</b> (Contents and meaning of search parameter)
4486 	 *
4487      * <p>
4488      * <b>Definition:</b>
4489      * A specification for search parameters. For standard parameters, provides additional information on how the parameter is used in this solution.  For custom parameters, provides a description of what the parameter does
4490      * </p> 
4491 	 */
4492 	public StructureSearchParam setDocumentation( String theString) {
4493 		myDocumentation = new StringDt(theString); 
4494 		return this; 
4495 	}
4496 
4497  
4498 	/**
4499 	 * Gets the value(s) for <b>xpath</b> (XPath that extracts the parameter set).
4500 	 * creating it if it does
4501 	 * not exist. Will not return <code>null</code>.
4502 	 *
4503      * <p>
4504      * <b>Definition:</b>
4505      * An XPath expression that returns a set of elements for the search parameter
4506      * </p> 
4507 	 */
4508 	public StringDt getXpath() {  
4509 		if (myXpath == null) {
4510 			myXpath = new StringDt();
4511 		}
4512 		return myXpath;
4513 	}
4514 
4515 	/**
4516 	 * Sets the value(s) for <b>xpath</b> (XPath that extracts the parameter set)
4517 	 *
4518      * <p>
4519      * <b>Definition:</b>
4520      * An XPath expression that returns a set of elements for the search parameter
4521      * </p> 
4522 	 */
4523 	public StructureSearchParam setXpath(StringDt theValue) {
4524 		myXpath = theValue;
4525 		return this;
4526 	}
4527 
4528  	/**
4529 	 * Sets the value for <b>xpath</b> (XPath that extracts the parameter set)
4530 	 *
4531      * <p>
4532      * <b>Definition:</b>
4533      * An XPath expression that returns a set of elements for the search parameter
4534      * </p> 
4535 	 */
4536 	public StructureSearchParam setXpath( String theString) {
4537 		myXpath = new StringDt(theString); 
4538 		return this; 
4539 	}
4540 
4541  
4542 	/**
4543 	 * Gets the value(s) for <b>target</b> (Types of resource (if a resource reference)).
4544 	 * creating it if it does
4545 	 * not exist. Will not return <code>null</code>.
4546 	 *
4547      * <p>
4548      * <b>Definition:</b>
4549      * Types of resource (if a resource is referenced)
4550      * </p> 
4551 	 */
4552 	public java.util.List<BoundCodeDt<ResourceTypeEnum>> getTarget() {  
4553 		if (myTarget == null) {
4554 			myTarget = new java.util.ArrayList<BoundCodeDt<ResourceTypeEnum>>();
4555 		}
4556 		return myTarget;
4557 	}
4558 
4559 	/**
4560 	 * Sets the value(s) for <b>target</b> (Types of resource (if a resource reference))
4561 	 *
4562      * <p>
4563      * <b>Definition:</b>
4564      * Types of resource (if a resource is referenced)
4565      * </p> 
4566 	 */
4567 	public StructureSearchParam setTarget(java.util.List<BoundCodeDt<ResourceTypeEnum>> theValue) {
4568 		myTarget = theValue;
4569 		return this;
4570 	}
4571 
4572 	/**
4573 	 * Add a value for <b>target</b> (Types of resource (if a resource reference)) using an enumerated type. This
4574 	 * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
4575 	 * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
4576 	 * you may also use the {@link #addType()} method.
4577 	 *
4578      * <p>
4579      * <b>Definition:</b>
4580      * Types of resource (if a resource is referenced)
4581      * </p> 
4582 	 */
4583 	public BoundCodeDt<ResourceTypeEnum> addTarget(ResourceTypeEnum theValue) {
4584 		BoundCodeDt<ResourceTypeEnum> retVal = new BoundCodeDt<ResourceTypeEnum>(ResourceTypeEnum.VALUESET_BINDER, theValue);
4585 		getTarget().add(retVal);
4586 		return retVal;
4587 	}
4588 
4589 	/**
4590 	 * Gets the first repetition for <b>target</b> (Types of resource (if a resource reference)),
4591 	 * creating it if it does not already exist.
4592 	 *
4593      * <p>
4594      * <b>Definition:</b>
4595      * Types of resource (if a resource is referenced)
4596      * </p> 
4597 	 */
4598 	public BoundCodeDt<ResourceTypeEnum> getTargetFirstRep() {
4599 		if (getTarget().size() == 0) {
4600 			addTarget();
4601 		}
4602 		return getTarget().get(0);
4603 	}
4604 
4605 	/**
4606 	 * Add a value for <b>target</b> (Types of resource (if a resource reference))
4607 	 *
4608      * <p>
4609      * <b>Definition:</b>
4610      * Types of resource (if a resource is referenced)
4611      * </p> 
4612 	 */
4613 	public BoundCodeDt<ResourceTypeEnum> addTarget() {
4614 		BoundCodeDt<ResourceTypeEnum> retVal = new BoundCodeDt<ResourceTypeEnum>(ResourceTypeEnum.VALUESET_BINDER);
4615 		getTarget().add(retVal);
4616 		return retVal;
4617 	}
4618 
4619 	/**
4620 	 * Sets the value(s), and clears any existing value(s) for <b>target</b> (Types of resource (if a resource reference))
4621 	 *
4622      * <p>
4623      * <b>Definition:</b>
4624      * Types of resource (if a resource is referenced)
4625      * </p> 
4626 	 */
4627 	public StructureSearchParam setTarget(ResourceTypeEnum theValue) {
4628 		getTarget().clear();
4629 		addTarget(theValue);
4630 		return this;
4631 	}
4632 
4633   
4634 
4635 	}
4636 
4637 
4638 
4639 	/**
4640 	 * Block class for child element: <b>Profile.extensionDefn</b> (Definition of an extension)
4641 	 *
4642      * <p>
4643      * <b>Definition:</b>
4644      * An extension defined as part of the profile
4645      * </p> 
4646 	 */
4647 	@Block()	
4648 	public static class ExtensionDefn extends BaseIdentifiableElement implements IResourceBlock {
4649 	
4650 	@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)	
4651 	@Description(
4652 		shortDefinition="Identifies the extension in this profile",
4653 		formalDefinition="A unique code (within the profile) used to identify the extension"
4654 	)
4655 	private CodeDt myCode;
4656 	
4657 	@Child(name="display", type=StringDt.class, order=1, min=0, max=1)	
4658 	@Description(
4659 		shortDefinition="Use this name when displaying the value",
4660 		formalDefinition="Defined so that applications can use this name when displaying the value of the extension to the user"
4661 	)
4662 	private StringDt myDisplay;
4663 	
4664 	@Child(name="contextType", type=CodeDt.class, order=2, min=1, max=1)	
4665 	@Description(
4666 		shortDefinition="resource | datatype | mapping | extension",
4667 		formalDefinition="Identifies the type of context to which the extension applies"
4668 	)
4669 	private BoundCodeDt<ExtensionContextEnum> myContextType;
4670 	
4671 	@Child(name="context", type=StringDt.class, order=3, min=1, max=Child.MAX_UNLIMITED)	
4672 	@Description(
4673 		shortDefinition="Where the extension can be used in instances",
4674 		formalDefinition="Identifies the types of resource or data type elements to which the extension can be applied"
4675 	)
4676 	private java.util.List<StringDt> myContext;
4677 	
4678 	@Child(name="definition", type=StructureElementDefinition.class, order=4, min=1, max=1)	
4679 	@Description(
4680 		shortDefinition="Definition of the extension and its content",
4681 		formalDefinition="Definition of the extension and its content"
4682 	)
4683 	private StructureElementDefinition myDefinition;
4684 	
4685 
4686 	@Override
4687 	public boolean isEmpty() {
4688 		return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myDisplay,  myContextType,  myContext,  myDefinition);
4689 	}
4690 	
4691 	@Override
4692 	public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4693 		return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myDisplay, myContextType, myContext, myDefinition);
4694 	}
4695 
4696 	/**
4697 	 * Gets the value(s) for <b>code</b> (Identifies the extension in this profile).
4698 	 * creating it if it does
4699 	 * not exist. Will not return <code>null</code>.
4700 	 *
4701      * <p>
4702      * <b>Definition:</b>
4703      * A unique code (within the profile) used to identify the extension
4704      * </p> 
4705 	 */
4706 	public CodeDt getCode() {  
4707 		if (myCode == null) {
4708 			myCode = new CodeDt();
4709 		}
4710 		return myCode;
4711 	}
4712 
4713 	/**
4714 	 * Sets the value(s) for <b>code</b> (Identifies the extension in this profile)
4715 	 *
4716      * <p>
4717      * <b>Definition:</b>
4718      * A unique code (within the profile) used to identify the extension
4719      * </p> 
4720 	 */
4721 	public ExtensionDefn setCode(CodeDt theValue) {
4722 		myCode = theValue;
4723 		return this;
4724 	}
4725 
4726  	/**
4727 	 * Sets the value for <b>code</b> (Identifies the extension in this profile)
4728 	 *
4729      * <p>
4730      * <b>Definition:</b>
4731      * A unique code (within the profile) used to identify the extension
4732      * </p> 
4733 	 */
4734 	public ExtensionDefn setCode( String theCode) {
4735 		myCode = new CodeDt(theCode); 
4736 		return this; 
4737 	}
4738 
4739  
4740 	/**
4741 	 * Gets the value(s) for <b>display</b> (Use this name when displaying the value).
4742 	 * creating it if it does
4743 	 * not exist. Will not return <code>null</code>.
4744 	 *
4745      * <p>
4746      * <b>Definition:</b>
4747      * Defined so that applications can use this name when displaying the value of the extension to the user
4748      * </p> 
4749 	 */
4750 	public StringDt getDisplay() {  
4751 		if (myDisplay == null) {
4752 			myDisplay = new StringDt();
4753 		}
4754 		return myDisplay;
4755 	}
4756 
4757 	/**
4758 	 * Sets the value(s) for <b>display</b> (Use this name when displaying the value)
4759 	 *
4760      * <p>
4761      * <b>Definition:</b>
4762      * Defined so that applications can use this name when displaying the value of the extension to the user
4763      * </p> 
4764 	 */
4765 	public ExtensionDefn setDisplay(StringDt theValue) {
4766 		myDisplay = theValue;
4767 		return this;
4768 	}
4769 
4770  	/**
4771 	 * Sets the value for <b>display</b> (Use this name when displaying the value)
4772 	 *
4773      * <p>
4774      * <b>Definition:</b>
4775      * Defined so that applications can use this name when displaying the value of the extension to the user
4776      * </p> 
4777 	 */
4778 	public ExtensionDefn setDisplay( String theString) {
4779 		myDisplay = new StringDt(theString); 
4780 		return this; 
4781 	}
4782 
4783  
4784 	/**
4785 	 * Gets the value(s) for <b>contextType</b> (resource | datatype | mapping | extension).
4786 	 * creating it if it does
4787 	 * not exist. Will not return <code>null</code>.
4788 	 *
4789      * <p>
4790      * <b>Definition:</b>
4791      * Identifies the type of context to which the extension applies
4792      * </p> 
4793 	 */
4794 	public BoundCodeDt<ExtensionContextEnum> getContextType() {  
4795 		if (myContextType == null) {
4796 			myContextType = new BoundCodeDt<ExtensionContextEnum>(ExtensionContextEnum.VALUESET_BINDER);
4797 		}
4798 		return myContextType;
4799 	}
4800 
4801 	/**
4802 	 * Sets the value(s) for <b>contextType</b> (resource | datatype | mapping | extension)
4803 	 *
4804      * <p>
4805      * <b>Definition:</b>
4806      * Identifies the type of context to which the extension applies
4807      * </p> 
4808 	 */
4809 	public ExtensionDefn setContextType(BoundCodeDt<ExtensionContextEnum> theValue) {
4810 		myContextType = theValue;
4811 		return this;
4812 	}
4813 
4814 	/**
4815 	 * Sets the value(s) for <b>contextType</b> (resource | datatype | mapping | extension)
4816 	 *
4817      * <p>
4818      * <b>Definition:</b>
4819      * Identifies the type of context to which the extension applies
4820      * </p> 
4821 	 */
4822 	public ExtensionDefn setContextType(ExtensionContextEnum theValue) {
4823 		getContextType().setValueAsEnum(theValue);
4824 		return this;
4825 	}
4826 
4827   
4828 	/**
4829 	 * Gets the value(s) for <b>context</b> (Where the extension can be used in instances).
4830 	 * creating it if it does
4831 	 * not exist. Will not return <code>null</code>.
4832 	 *
4833      * <p>
4834      * <b>Definition:</b>
4835      * Identifies the types of resource or data type elements to which the extension can be applied
4836      * </p> 
4837 	 */
4838 	public java.util.List<StringDt> getContext() {  
4839 		if (myContext == null) {
4840 			myContext = new java.util.ArrayList<StringDt>();
4841 		}
4842 		return myContext;
4843 	}
4844 
4845 	/**
4846 	 * Sets the value(s) for <b>context</b> (Where the extension can be used in instances)
4847 	 *
4848      * <p>
4849      * <b>Definition:</b>
4850      * Identifies the types of resource or data type elements to which the extension can be applied
4851      * </p> 
4852 	 */
4853 	public ExtensionDefn setContext(java.util.List<StringDt> theValue) {
4854 		myContext = theValue;
4855 		return this;
4856 	}
4857 
4858 	/**
4859 	 * Adds and returns a new value for <b>context</b> (Where the extension can be used in instances)
4860 	 *
4861      * <p>
4862      * <b>Definition:</b>
4863      * Identifies the types of resource or data type elements to which the extension can be applied
4864      * </p> 
4865 	 */
4866 	public StringDt addContext() {
4867 		StringDt newType = new StringDt();
4868 		getContext().add(newType);
4869 		return newType; 
4870 	}
4871 
4872 	/**
4873 	 * Gets the first repetition for <b>context</b> (Where the extension can be used in instances),
4874 	 * creating it if it does not already exist.
4875 	 *
4876      * <p>
4877      * <b>Definition:</b>
4878      * Identifies the types of resource or data type elements to which the extension can be applied
4879      * </p> 
4880 	 */
4881 	public StringDt getContextFirstRep() {
4882 		if (getContext().isEmpty()) {
4883 			return addContext();
4884 		}
4885 		return getContext().get(0); 
4886 	}
4887  	/**
4888 	 * Adds a new value for <b>context</b> (Where the extension can be used in instances)
4889 	 *
4890      * <p>
4891      * <b>Definition:</b>
4892      * Identifies the types of resource or data type elements to which the extension can be applied
4893      * </p> 
4894      *
4895      * @return Returns a reference to this object, to allow for simple chaining.
4896 	 */
4897 	public ExtensionDefn addContext( String theString) {
4898 		if (myContext == null) {
4899 			myContext = new java.util.ArrayList<StringDt>();
4900 		}
4901 		myContext.add(new StringDt(theString));
4902 		return this; 
4903 	}
4904 
4905  
4906 	/**
4907 	 * Gets the value(s) for <b>definition</b> (Definition of the extension and its content).
4908 	 * creating it if it does
4909 	 * not exist. Will not return <code>null</code>.
4910 	 *
4911      * <p>
4912      * <b>Definition:</b>
4913      * Definition of the extension and its content
4914      * </p> 
4915 	 */
4916 	public StructureElementDefinition getDefinition() {  
4917 		if (myDefinition == null) {
4918 			myDefinition = new StructureElementDefinition();
4919 		}
4920 		return myDefinition;
4921 	}
4922 
4923 	/**
4924 	 * Sets the value(s) for <b>definition</b> (Definition of the extension and its content)
4925 	 *
4926      * <p>
4927      * <b>Definition:</b>
4928      * Definition of the extension and its content
4929      * </p> 
4930 	 */
4931 	public ExtensionDefn setDefinition(StructureElementDefinition theValue) {
4932 		myDefinition = theValue;
4933 		return this;
4934 	}
4935 
4936   
4937 
4938 	}
4939 
4940 
4941 	/**
4942 	 * Block class for child element: <b>Profile.query</b> (Definition of a named query)
4943 	 *
4944      * <p>
4945      * <b>Definition:</b>
4946      * Definition of a named query and its parameters and their meaning
4947      * </p> 
4948 	 */
4949 	@Block()	
4950 	public static class Query extends BaseIdentifiableElement implements IResourceBlock {
4951 	
4952 	@Child(name="name", type=StringDt.class, order=0, min=1, max=1)	
4953 	@Description(
4954 		shortDefinition="Special named queries (_query=)",
4955 		formalDefinition="The name of a query, which is used in the URI from Conformance statements declaring use of the query.  Typically this will also be the name for the _query parameter when the query is called, though in some cases it may be aliased by a server to avoid collisions"
4956 	)
4957 	private StringDt myName;
4958 	
4959 	@Child(name="documentation", type=StringDt.class, order=1, min=1, max=1)	
4960 	@Description(
4961 		shortDefinition="Describes the named query",
4962 		formalDefinition="Description of the query - the functionality it offers, and considerations about how it functions and to use it"
4963 	)
4964 	private StringDt myDocumentation;
4965 	
4966 	@Child(name="parameter", type=StructureSearchParam.class, order=2, min=0, max=Child.MAX_UNLIMITED)	
4967 	@Description(
4968 		shortDefinition="Parameter for the named query",
4969 		formalDefinition="A parameter of a named query"
4970 	)
4971 	private java.util.List<StructureSearchParam> myParameter;
4972 	
4973 
4974 	@Override
4975 	public boolean isEmpty() {
4976 		return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myName,  myDocumentation,  myParameter);
4977 	}
4978 	
4979 	@Override
4980 	public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
4981 		return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myDocumentation, myParameter);
4982 	}
4983 
4984 	/**
4985 	 * Gets the value(s) for <b>name</b> (Special named queries (_query=)).
4986 	 * creating it if it does
4987 	 * not exist. Will not return <code>null</code>.
4988 	 *
4989      * <p>
4990      * <b>Definition:</b>
4991      * The name of a query, which is used in the URI from Conformance statements declaring use of the query.  Typically this will also be the name for the _query parameter when the query is called, though in some cases it may be aliased by a server to avoid collisions
4992      * </p> 
4993 	 */
4994 	public StringDt getName() {  
4995 		if (myName == null) {
4996 			myName = new StringDt();
4997 		}
4998 		return myName;
4999 	}
5000 
5001 	/**
5002 	 * Sets the value(s) for <b>name</b> (Special named queries (_query=))
5003 	 *
5004      * <p>
5005      * <b>Definition:</b>
5006      * The name of a query, which is used in the URI from Conformance statements declaring use of the query.  Typically this will also be the name for the _query parameter when the query is called, though in some cases it may be aliased by a server to avoid collisions
5007      * </p> 
5008 	 */
5009 	public Query setName(StringDt theValue) {
5010 		myName = theValue;
5011 		return this;
5012 	}
5013 
5014  	/**
5015 	 * Sets the value for <b>name</b> (Special named queries (_query=))
5016 	 *
5017      * <p>
5018      * <b>Definition:</b>
5019      * The name of a query, which is used in the URI from Conformance statements declaring use of the query.  Typically this will also be the name for the _query parameter when the query is called, though in some cases it may be aliased by a server to avoid collisions
5020      * </p> 
5021 	 */
5022 	public Query setName( String theString) {
5023 		myName = new StringDt(theString); 
5024 		return this; 
5025 	}
5026 
5027  
5028 	/**
5029 	 * Gets the value(s) for <b>documentation</b> (Describes the named query).
5030 	 * creating it if it does
5031 	 * not exist. Will not return <code>null</code>.
5032 	 *
5033      * <p>
5034      * <b>Definition:</b>
5035      * Description of the query - the functionality it offers, and considerations about how it functions and to use it
5036      * </p> 
5037 	 */
5038 	public StringDt getDocumentation() {  
5039 		if (myDocumentation == null) {
5040 			myDocumentation = new StringDt();
5041 		}
5042 		return myDocumentation;
5043 	}
5044 
5045 	/**
5046 	 * Sets the value(s) for <b>documentation</b> (Describes the named query)
5047 	 *
5048      * <p>
5049      * <b>Definition:</b>
5050      * Description of the query - the functionality it offers, and considerations about how it functions and to use it
5051      * </p> 
5052 	 */
5053 	public Query setDocumentation(StringDt theValue) {
5054 		myDocumentation = theValue;
5055 		return this;
5056 	}
5057 
5058  	/**
5059 	 * Sets the value for <b>documentation</b> (Describes the named query)
5060 	 *
5061      * <p>
5062      * <b>Definition:</b>
5063      * Description of the query - the functionality it offers, and considerations about how it functions and to use it
5064      * </p> 
5065 	 */
5066 	public Query setDocumentation( String theString) {
5067 		myDocumentation = new StringDt(theString); 
5068 		return this; 
5069 	}
5070 
5071  
5072 	/**
5073 	 * Gets the value(s) for <b>parameter</b> (Parameter for the named query).
5074 	 * creating it if it does
5075 	 * not exist. Will not return <code>null</code>.
5076 	 *
5077      * <p>
5078      * <b>Definition:</b>
5079      * A parameter of a named query
5080      * </p> 
5081 	 */
5082 	public java.util.List<StructureSearchParam> getParameter() {  
5083 		if (myParameter == null) {
5084 			myParameter = new java.util.ArrayList<StructureSearchParam>();
5085 		}
5086 		return myParameter;
5087 	}
5088 
5089 	/**
5090 	 * Sets the value(s) for <b>parameter</b> (Parameter for the named query)
5091 	 *
5092      * <p>
5093      * <b>Definition:</b>
5094      * A parameter of a named query
5095      * </p> 
5096 	 */
5097 	public Query setParameter(java.util.List<StructureSearchParam> theValue) {
5098 		myParameter = theValue;
5099 		return this;
5100 	}
5101 
5102 	/**
5103 	 * Adds and returns a new value for <b>parameter</b> (Parameter for the named query)
5104 	 *
5105      * <p>
5106      * <b>Definition:</b>
5107      * A parameter of a named query
5108      * </p> 
5109 	 */
5110 	public StructureSearchParam addParameter() {
5111 		StructureSearchParam newType = new StructureSearchParam();
5112 		getParameter().add(newType);
5113 		return newType; 
5114 	}
5115 
5116 	/**
5117 	 * Gets the first repetition for <b>parameter</b> (Parameter for the named query),
5118 	 * creating it if it does not already exist.
5119 	 *
5120      * <p>
5121      * <b>Definition:</b>
5122      * A parameter of a named query
5123      * </p> 
5124 	 */
5125 	public StructureSearchParam getParameterFirstRep() {
5126 		if (getParameter().isEmpty()) {
5127 			return addParameter();
5128 		}
5129 		return getParameter().get(0); 
5130 	}
5131   
5132 
5133 	}
5134 
5135 
5136 
5137 
5138 }