001package org.hl7.fhir.dstu3.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import org.hl7.fhir.dstu3.model.Enumerations.*; 038import ca.uhn.fhir.model.api.annotation.ResourceDef; 039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 040import ca.uhn.fhir.model.api.annotation.Child; 041import ca.uhn.fhir.model.api.annotation.ChildOrder; 042import ca.uhn.fhir.model.api.annotation.Description; 043import ca.uhn.fhir.model.api.annotation.Block; 044import org.hl7.fhir.instance.model.api.*; 045import org.hl7.fhir.exceptions.FHIRException; 046import org.hl7.fhir.exceptions.FHIRFormatError; 047/** 048 * The formal description of a single piece of information that can be gathered and reported. 049 */ 050@ResourceDef(name="DataElement", profile="http://hl7.org/fhir/StructureDefinition/DataElement") 051@ChildOrder(names={"url", "identifier", "version", "status", "experimental", "date", "publisher", "name", "title", "contact", "useContext", "jurisdiction", "copyright", "stringency", "mapping", "element"}) 052public class DataElement extends MetadataResource { 053 054 public enum DataElementStringency { 055 /** 056 * The data element is sufficiently well-constrained that multiple pieces of data captured according to the constraints of the data element will be comparable (though in some cases, a degree of automated conversion/normalization may be required). 057 */ 058 COMPARABLE, 059 /** 060 * The data element is fully specified down to a single value set, single unit of measure, single data type, etc. Multiple pieces of data associated with this data element are fully comparable. 061 */ 062 FULLYSPECIFIED, 063 /** 064 * The data element allows multiple units of measure having equivalent meaning; e.g. "cc" (cubic centimeter) and "mL" (milliliter). 065 */ 066 EQUIVALENT, 067 /** 068 * The data element allows multiple units of measure that are convertable between each other (e.g. inches and centimeters) and/or allows data to be captured in multiple value sets for which a known mapping exists allowing conversion of meaning. 069 */ 070 CONVERTABLE, 071 /** 072 * A convertable data element where unit conversions are different only by a power of 10; e.g. g, mg, kg. 073 */ 074 SCALEABLE, 075 /** 076 * The data element is unconstrained in units, choice of data types and/or choice of vocabulary such that automated comparison of data captured using the data element is not possible. 077 */ 078 FLEXIBLE, 079 /** 080 * added to help the parsers with the generic types 081 */ 082 NULL; 083 public static DataElementStringency fromCode(String codeString) throws FHIRException { 084 if (codeString == null || "".equals(codeString)) 085 return null; 086 if ("comparable".equals(codeString)) 087 return COMPARABLE; 088 if ("fully-specified".equals(codeString)) 089 return FULLYSPECIFIED; 090 if ("equivalent".equals(codeString)) 091 return EQUIVALENT; 092 if ("convertable".equals(codeString)) 093 return CONVERTABLE; 094 if ("scaleable".equals(codeString)) 095 return SCALEABLE; 096 if ("flexible".equals(codeString)) 097 return FLEXIBLE; 098 if (Configuration.isAcceptInvalidEnums()) 099 return null; 100 else 101 throw new FHIRException("Unknown DataElementStringency code '"+codeString+"'"); 102 } 103 public String toCode() { 104 switch (this) { 105 case COMPARABLE: return "comparable"; 106 case FULLYSPECIFIED: return "fully-specified"; 107 case EQUIVALENT: return "equivalent"; 108 case CONVERTABLE: return "convertable"; 109 case SCALEABLE: return "scaleable"; 110 case FLEXIBLE: return "flexible"; 111 default: return "?"; 112 } 113 } 114 public String getSystem() { 115 switch (this) { 116 case COMPARABLE: return "http://hl7.org/fhir/dataelement-stringency"; 117 case FULLYSPECIFIED: return "http://hl7.org/fhir/dataelement-stringency"; 118 case EQUIVALENT: return "http://hl7.org/fhir/dataelement-stringency"; 119 case CONVERTABLE: return "http://hl7.org/fhir/dataelement-stringency"; 120 case SCALEABLE: return "http://hl7.org/fhir/dataelement-stringency"; 121 case FLEXIBLE: return "http://hl7.org/fhir/dataelement-stringency"; 122 default: return "?"; 123 } 124 } 125 public String getDefinition() { 126 switch (this) { 127 case COMPARABLE: return "The data element is sufficiently well-constrained that multiple pieces of data captured according to the constraints of the data element will be comparable (though in some cases, a degree of automated conversion/normalization may be required)."; 128 case FULLYSPECIFIED: return "The data element is fully specified down to a single value set, single unit of measure, single data type, etc. Multiple pieces of data associated with this data element are fully comparable."; 129 case EQUIVALENT: return "The data element allows multiple units of measure having equivalent meaning; e.g. \"cc\" (cubic centimeter) and \"mL\" (milliliter)."; 130 case CONVERTABLE: return "The data element allows multiple units of measure that are convertable between each other (e.g. inches and centimeters) and/or allows data to be captured in multiple value sets for which a known mapping exists allowing conversion of meaning."; 131 case SCALEABLE: return "A convertable data element where unit conversions are different only by a power of 10; e.g. g, mg, kg."; 132 case FLEXIBLE: return "The data element is unconstrained in units, choice of data types and/or choice of vocabulary such that automated comparison of data captured using the data element is not possible."; 133 default: return "?"; 134 } 135 } 136 public String getDisplay() { 137 switch (this) { 138 case COMPARABLE: return "Comparable"; 139 case FULLYSPECIFIED: return "Fully Specified"; 140 case EQUIVALENT: return "Equivalent"; 141 case CONVERTABLE: return "Convertable"; 142 case SCALEABLE: return "Scaleable"; 143 case FLEXIBLE: return "Flexible"; 144 default: return "?"; 145 } 146 } 147 } 148 149 public static class DataElementStringencyEnumFactory implements EnumFactory<DataElementStringency> { 150 public DataElementStringency fromCode(String codeString) throws IllegalArgumentException { 151 if (codeString == null || "".equals(codeString)) 152 if (codeString == null || "".equals(codeString)) 153 return null; 154 if ("comparable".equals(codeString)) 155 return DataElementStringency.COMPARABLE; 156 if ("fully-specified".equals(codeString)) 157 return DataElementStringency.FULLYSPECIFIED; 158 if ("equivalent".equals(codeString)) 159 return DataElementStringency.EQUIVALENT; 160 if ("convertable".equals(codeString)) 161 return DataElementStringency.CONVERTABLE; 162 if ("scaleable".equals(codeString)) 163 return DataElementStringency.SCALEABLE; 164 if ("flexible".equals(codeString)) 165 return DataElementStringency.FLEXIBLE; 166 throw new IllegalArgumentException("Unknown DataElementStringency code '"+codeString+"'"); 167 } 168 public Enumeration<DataElementStringency> fromType(Base code) throws FHIRException { 169 if (code == null) 170 return null; 171 if (code.isEmpty()) 172 return new Enumeration<DataElementStringency>(this); 173 String codeString = ((PrimitiveType) code).asStringValue(); 174 if (codeString == null || "".equals(codeString)) 175 return null; 176 if ("comparable".equals(codeString)) 177 return new Enumeration<DataElementStringency>(this, DataElementStringency.COMPARABLE); 178 if ("fully-specified".equals(codeString)) 179 return new Enumeration<DataElementStringency>(this, DataElementStringency.FULLYSPECIFIED); 180 if ("equivalent".equals(codeString)) 181 return new Enumeration<DataElementStringency>(this, DataElementStringency.EQUIVALENT); 182 if ("convertable".equals(codeString)) 183 return new Enumeration<DataElementStringency>(this, DataElementStringency.CONVERTABLE); 184 if ("scaleable".equals(codeString)) 185 return new Enumeration<DataElementStringency>(this, DataElementStringency.SCALEABLE); 186 if ("flexible".equals(codeString)) 187 return new Enumeration<DataElementStringency>(this, DataElementStringency.FLEXIBLE); 188 throw new FHIRException("Unknown DataElementStringency code '"+codeString+"'"); 189 } 190 public String toCode(DataElementStringency code) { 191 if (code == DataElementStringency.COMPARABLE) 192 return "comparable"; 193 if (code == DataElementStringency.FULLYSPECIFIED) 194 return "fully-specified"; 195 if (code == DataElementStringency.EQUIVALENT) 196 return "equivalent"; 197 if (code == DataElementStringency.CONVERTABLE) 198 return "convertable"; 199 if (code == DataElementStringency.SCALEABLE) 200 return "scaleable"; 201 if (code == DataElementStringency.FLEXIBLE) 202 return "flexible"; 203 return "?"; 204 } 205 public String toSystem(DataElementStringency code) { 206 return code.getSystem(); 207 } 208 } 209 210 @Block() 211 public static class DataElementMappingComponent extends BackboneElement implements IBaseBackboneElement { 212 /** 213 * An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis. 214 */ 215 @Child(name = "identity", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 216 @Description(shortDefinition="Internal id when this mapping is used", formalDefinition="An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis." ) 217 protected IdType identity; 218 219 /** 220 * An absolute URI that identifies the specification that this mapping is expressed to. 221 */ 222 @Child(name = "uri", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false) 223 @Description(shortDefinition="Identifies what this mapping refers to", formalDefinition="An absolute URI that identifies the specification that this mapping is expressed to." ) 224 protected UriType uri; 225 226 /** 227 * A name for the specification that is being mapped to. 228 */ 229 @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 230 @Description(shortDefinition="Names what this mapping refers to", formalDefinition="A name for the specification that is being mapped to." ) 231 protected StringType name; 232 233 /** 234 * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. 235 */ 236 @Child(name = "comment", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 237 @Description(shortDefinition="Versions, issues, scope limitations, etc.", formalDefinition="Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage." ) 238 protected StringType comment; 239 240 private static final long serialVersionUID = 9610265L; 241 242 /** 243 * Constructor 244 */ 245 public DataElementMappingComponent() { 246 super(); 247 } 248 249 /** 250 * Constructor 251 */ 252 public DataElementMappingComponent(IdType identity) { 253 super(); 254 this.identity = identity; 255 } 256 257 /** 258 * @return {@link #identity} (An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value 259 */ 260 public IdType getIdentityElement() { 261 if (this.identity == null) 262 if (Configuration.errorOnAutoCreate()) 263 throw new Error("Attempt to auto-create DataElementMappingComponent.identity"); 264 else if (Configuration.doAutoCreate()) 265 this.identity = new IdType(); // bb 266 return this.identity; 267 } 268 269 public boolean hasIdentityElement() { 270 return this.identity != null && !this.identity.isEmpty(); 271 } 272 273 public boolean hasIdentity() { 274 return this.identity != null && !this.identity.isEmpty(); 275 } 276 277 /** 278 * @param value {@link #identity} (An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value 279 */ 280 public DataElementMappingComponent setIdentityElement(IdType value) { 281 this.identity = value; 282 return this; 283 } 284 285 /** 286 * @return An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis. 287 */ 288 public String getIdentity() { 289 return this.identity == null ? null : this.identity.getValue(); 290 } 291 292 /** 293 * @param value An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis. 294 */ 295 public DataElementMappingComponent setIdentity(String value) { 296 if (this.identity == null) 297 this.identity = new IdType(); 298 this.identity.setValue(value); 299 return this; 300 } 301 302 /** 303 * @return {@link #uri} (An absolute URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value 304 */ 305 public UriType getUriElement() { 306 if (this.uri == null) 307 if (Configuration.errorOnAutoCreate()) 308 throw new Error("Attempt to auto-create DataElementMappingComponent.uri"); 309 else if (Configuration.doAutoCreate()) 310 this.uri = new UriType(); // bb 311 return this.uri; 312 } 313 314 public boolean hasUriElement() { 315 return this.uri != null && !this.uri.isEmpty(); 316 } 317 318 public boolean hasUri() { 319 return this.uri != null && !this.uri.isEmpty(); 320 } 321 322 /** 323 * @param value {@link #uri} (An absolute URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value 324 */ 325 public DataElementMappingComponent setUriElement(UriType value) { 326 this.uri = value; 327 return this; 328 } 329 330 /** 331 * @return An absolute URI that identifies the specification that this mapping is expressed to. 332 */ 333 public String getUri() { 334 return this.uri == null ? null : this.uri.getValue(); 335 } 336 337 /** 338 * @param value An absolute URI that identifies the specification that this mapping is expressed to. 339 */ 340 public DataElementMappingComponent setUri(String value) { 341 if (Utilities.noString(value)) 342 this.uri = null; 343 else { 344 if (this.uri == null) 345 this.uri = new UriType(); 346 this.uri.setValue(value); 347 } 348 return this; 349 } 350 351 /** 352 * @return {@link #name} (A name for the specification that is being mapped to.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 353 */ 354 public StringType getNameElement() { 355 if (this.name == null) 356 if (Configuration.errorOnAutoCreate()) 357 throw new Error("Attempt to auto-create DataElementMappingComponent.name"); 358 else if (Configuration.doAutoCreate()) 359 this.name = new StringType(); // bb 360 return this.name; 361 } 362 363 public boolean hasNameElement() { 364 return this.name != null && !this.name.isEmpty(); 365 } 366 367 public boolean hasName() { 368 return this.name != null && !this.name.isEmpty(); 369 } 370 371 /** 372 * @param value {@link #name} (A name for the specification that is being mapped to.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 373 */ 374 public DataElementMappingComponent setNameElement(StringType value) { 375 this.name = value; 376 return this; 377 } 378 379 /** 380 * @return A name for the specification that is being mapped to. 381 */ 382 public String getName() { 383 return this.name == null ? null : this.name.getValue(); 384 } 385 386 /** 387 * @param value A name for the specification that is being mapped to. 388 */ 389 public DataElementMappingComponent setName(String value) { 390 if (Utilities.noString(value)) 391 this.name = null; 392 else { 393 if (this.name == null) 394 this.name = new StringType(); 395 this.name.setValue(value); 396 } 397 return this; 398 } 399 400 /** 401 * @return {@link #comment} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 402 */ 403 public StringType getCommentElement() { 404 if (this.comment == null) 405 if (Configuration.errorOnAutoCreate()) 406 throw new Error("Attempt to auto-create DataElementMappingComponent.comment"); 407 else if (Configuration.doAutoCreate()) 408 this.comment = new StringType(); // bb 409 return this.comment; 410 } 411 412 public boolean hasCommentElement() { 413 return this.comment != null && !this.comment.isEmpty(); 414 } 415 416 public boolean hasComment() { 417 return this.comment != null && !this.comment.isEmpty(); 418 } 419 420 /** 421 * @param value {@link #comment} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 422 */ 423 public DataElementMappingComponent setCommentElement(StringType value) { 424 this.comment = value; 425 return this; 426 } 427 428 /** 429 * @return Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. 430 */ 431 public String getComment() { 432 return this.comment == null ? null : this.comment.getValue(); 433 } 434 435 /** 436 * @param value Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. 437 */ 438 public DataElementMappingComponent setComment(String value) { 439 if (Utilities.noString(value)) 440 this.comment = null; 441 else { 442 if (this.comment == null) 443 this.comment = new StringType(); 444 this.comment.setValue(value); 445 } 446 return this; 447 } 448 449 protected void listChildren(List<Property> children) { 450 super.listChildren(children); 451 children.add(new Property("identity", "id", "An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.", 0, 1, identity)); 452 children.add(new Property("uri", "uri", "An absolute URI that identifies the specification that this mapping is expressed to.", 0, 1, uri)); 453 children.add(new Property("name", "string", "A name for the specification that is being mapped to.", 0, 1, name)); 454 children.add(new Property("comment", "string", "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", 0, 1, comment)); 455 } 456 457 @Override 458 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 459 switch (_hash) { 460 case -135761730: /*identity*/ return new Property("identity", "id", "An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.", 0, 1, identity); 461 case 116076: /*uri*/ return new Property("uri", "uri", "An absolute URI that identifies the specification that this mapping is expressed to.", 0, 1, uri); 462 case 3373707: /*name*/ return new Property("name", "string", "A name for the specification that is being mapped to.", 0, 1, name); 463 case 950398559: /*comment*/ return new Property("comment", "string", "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", 0, 1, comment); 464 default: return super.getNamedProperty(_hash, _name, _checkValid); 465 } 466 467 } 468 469 @Override 470 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 471 switch (hash) { 472 case -135761730: /*identity*/ return this.identity == null ? new Base[0] : new Base[] {this.identity}; // IdType 473 case 116076: /*uri*/ return this.uri == null ? new Base[0] : new Base[] {this.uri}; // UriType 474 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 475 case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType 476 default: return super.getProperty(hash, name, checkValid); 477 } 478 479 } 480 481 @Override 482 public Base setProperty(int hash, String name, Base value) throws FHIRException { 483 switch (hash) { 484 case -135761730: // identity 485 this.identity = castToId(value); // IdType 486 return value; 487 case 116076: // uri 488 this.uri = castToUri(value); // UriType 489 return value; 490 case 3373707: // name 491 this.name = castToString(value); // StringType 492 return value; 493 case 950398559: // comment 494 this.comment = castToString(value); // StringType 495 return value; 496 default: return super.setProperty(hash, name, value); 497 } 498 499 } 500 501 @Override 502 public Base setProperty(String name, Base value) throws FHIRException { 503 if (name.equals("identity")) { 504 this.identity = castToId(value); // IdType 505 } else if (name.equals("uri")) { 506 this.uri = castToUri(value); // UriType 507 } else if (name.equals("name")) { 508 this.name = castToString(value); // StringType 509 } else if (name.equals("comment")) { 510 this.comment = castToString(value); // StringType 511 } else 512 return super.setProperty(name, value); 513 return value; 514 } 515 516 @Override 517 public Base makeProperty(int hash, String name) throws FHIRException { 518 switch (hash) { 519 case -135761730: return getIdentityElement(); 520 case 116076: return getUriElement(); 521 case 3373707: return getNameElement(); 522 case 950398559: return getCommentElement(); 523 default: return super.makeProperty(hash, name); 524 } 525 526 } 527 528 @Override 529 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 530 switch (hash) { 531 case -135761730: /*identity*/ return new String[] {"id"}; 532 case 116076: /*uri*/ return new String[] {"uri"}; 533 case 3373707: /*name*/ return new String[] {"string"}; 534 case 950398559: /*comment*/ return new String[] {"string"}; 535 default: return super.getTypesForProperty(hash, name); 536 } 537 538 } 539 540 @Override 541 public Base addChild(String name) throws FHIRException { 542 if (name.equals("identity")) { 543 throw new FHIRException("Cannot call addChild on a primitive type DataElement.identity"); 544 } 545 else if (name.equals("uri")) { 546 throw new FHIRException("Cannot call addChild on a primitive type DataElement.uri"); 547 } 548 else if (name.equals("name")) { 549 throw new FHIRException("Cannot call addChild on a primitive type DataElement.name"); 550 } 551 else if (name.equals("comment")) { 552 throw new FHIRException("Cannot call addChild on a primitive type DataElement.comment"); 553 } 554 else 555 return super.addChild(name); 556 } 557 558 public DataElementMappingComponent copy() { 559 DataElementMappingComponent dst = new DataElementMappingComponent(); 560 copyValues(dst); 561 dst.identity = identity == null ? null : identity.copy(); 562 dst.uri = uri == null ? null : uri.copy(); 563 dst.name = name == null ? null : name.copy(); 564 dst.comment = comment == null ? null : comment.copy(); 565 return dst; 566 } 567 568 @Override 569 public boolean equalsDeep(Base other_) { 570 if (!super.equalsDeep(other_)) 571 return false; 572 if (!(other_ instanceof DataElementMappingComponent)) 573 return false; 574 DataElementMappingComponent o = (DataElementMappingComponent) other_; 575 return compareDeep(identity, o.identity, true) && compareDeep(uri, o.uri, true) && compareDeep(name, o.name, true) 576 && compareDeep(comment, o.comment, true); 577 } 578 579 @Override 580 public boolean equalsShallow(Base other_) { 581 if (!super.equalsShallow(other_)) 582 return false; 583 if (!(other_ instanceof DataElementMappingComponent)) 584 return false; 585 DataElementMappingComponent o = (DataElementMappingComponent) other_; 586 return compareValues(identity, o.identity, true) && compareValues(uri, o.uri, true) && compareValues(name, o.name, true) 587 && compareValues(comment, o.comment, true); 588 } 589 590 public boolean isEmpty() { 591 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identity, uri, name, comment 592 ); 593 } 594 595 public String fhirType() { 596 return "DataElement.mapping"; 597 598 } 599 600 } 601 602 /** 603 * A formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance. 604 */ 605 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 606 @Description(shortDefinition="Additional identifier for the data element", formalDefinition="A formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance." ) 607 protected List<Identifier> identifier; 608 609 /** 610 * A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element. 611 */ 612 @Child(name = "copyright", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false) 613 @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element." ) 614 protected MarkdownType copyright; 615 616 /** 617 * Identifies how precise the data element is in its definition. 618 */ 619 @Child(name = "stringency", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) 620 @Description(shortDefinition="comparable | fully-specified | equivalent | convertable | scaleable | flexible", formalDefinition="Identifies how precise the data element is in its definition." ) 621 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/dataelement-stringency") 622 protected Enumeration<DataElementStringency> stringency; 623 624 /** 625 * Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with. 626 */ 627 @Child(name = "mapping", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 628 @Description(shortDefinition="External specification mapped to", formalDefinition="Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with." ) 629 protected List<DataElementMappingComponent> mapping; 630 631 /** 632 * Defines the structure, type, allowed values and other constraining characteristics of the data element. 633 */ 634 @Child(name = "element", type = {ElementDefinition.class}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 635 @Description(shortDefinition="Definition of element", formalDefinition="Defines the structure, type, allowed values and other constraining characteristics of the data element." ) 636 protected List<ElementDefinition> element; 637 638 private static final long serialVersionUID = 634422795L; 639 640 /** 641 * Constructor 642 */ 643 public DataElement() { 644 super(); 645 } 646 647 /** 648 * Constructor 649 */ 650 public DataElement(Enumeration<PublicationStatus> status) { 651 super(); 652 this.status = status; 653 } 654 655 /** 656 * @return {@link #url} (An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 657 */ 658 public UriType getUrlElement() { 659 if (this.url == null) 660 if (Configuration.errorOnAutoCreate()) 661 throw new Error("Attempt to auto-create DataElement.url"); 662 else if (Configuration.doAutoCreate()) 663 this.url = new UriType(); // bb 664 return this.url; 665 } 666 667 public boolean hasUrlElement() { 668 return this.url != null && !this.url.isEmpty(); 669 } 670 671 public boolean hasUrl() { 672 return this.url != null && !this.url.isEmpty(); 673 } 674 675 /** 676 * @param value {@link #url} (An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 677 */ 678 public DataElement setUrlElement(UriType value) { 679 this.url = value; 680 return this; 681 } 682 683 /** 684 * @return An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions). 685 */ 686 public String getUrl() { 687 return this.url == null ? null : this.url.getValue(); 688 } 689 690 /** 691 * @param value An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions). 692 */ 693 public DataElement setUrl(String value) { 694 if (Utilities.noString(value)) 695 this.url = null; 696 else { 697 if (this.url == null) 698 this.url = new UriType(); 699 this.url.setValue(value); 700 } 701 return this; 702 } 703 704 /** 705 * @return {@link #identifier} (A formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.) 706 */ 707 public List<Identifier> getIdentifier() { 708 if (this.identifier == null) 709 this.identifier = new ArrayList<Identifier>(); 710 return this.identifier; 711 } 712 713 /** 714 * @return Returns a reference to <code>this</code> for easy method chaining 715 */ 716 public DataElement setIdentifier(List<Identifier> theIdentifier) { 717 this.identifier = theIdentifier; 718 return this; 719 } 720 721 public boolean hasIdentifier() { 722 if (this.identifier == null) 723 return false; 724 for (Identifier item : this.identifier) 725 if (!item.isEmpty()) 726 return true; 727 return false; 728 } 729 730 public Identifier addIdentifier() { //3 731 Identifier t = new Identifier(); 732 if (this.identifier == null) 733 this.identifier = new ArrayList<Identifier>(); 734 this.identifier.add(t); 735 return t; 736 } 737 738 public DataElement addIdentifier(Identifier t) { //3 739 if (t == null) 740 return this; 741 if (this.identifier == null) 742 this.identifier = new ArrayList<Identifier>(); 743 this.identifier.add(t); 744 return this; 745 } 746 747 /** 748 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 749 */ 750 public Identifier getIdentifierFirstRep() { 751 if (getIdentifier().isEmpty()) { 752 addIdentifier(); 753 } 754 return getIdentifier().get(0); 755 } 756 757 /** 758 * @return {@link #version} (The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 759 */ 760 public StringType getVersionElement() { 761 if (this.version == null) 762 if (Configuration.errorOnAutoCreate()) 763 throw new Error("Attempt to auto-create DataElement.version"); 764 else if (Configuration.doAutoCreate()) 765 this.version = new StringType(); // bb 766 return this.version; 767 } 768 769 public boolean hasVersionElement() { 770 return this.version != null && !this.version.isEmpty(); 771 } 772 773 public boolean hasVersion() { 774 return this.version != null && !this.version.isEmpty(); 775 } 776 777 /** 778 * @param value {@link #version} (The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 779 */ 780 public DataElement setVersionElement(StringType value) { 781 this.version = value; 782 return this; 783 } 784 785 /** 786 * @return The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 787 */ 788 public String getVersion() { 789 return this.version == null ? null : this.version.getValue(); 790 } 791 792 /** 793 * @param value The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 794 */ 795 public DataElement setVersion(String value) { 796 if (Utilities.noString(value)) 797 this.version = null; 798 else { 799 if (this.version == null) 800 this.version = new StringType(); 801 this.version.setValue(value); 802 } 803 return this; 804 } 805 806 /** 807 * @return {@link #status} (The status of this data element. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 808 */ 809 public Enumeration<PublicationStatus> getStatusElement() { 810 if (this.status == null) 811 if (Configuration.errorOnAutoCreate()) 812 throw new Error("Attempt to auto-create DataElement.status"); 813 else if (Configuration.doAutoCreate()) 814 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 815 return this.status; 816 } 817 818 public boolean hasStatusElement() { 819 return this.status != null && !this.status.isEmpty(); 820 } 821 822 public boolean hasStatus() { 823 return this.status != null && !this.status.isEmpty(); 824 } 825 826 /** 827 * @param value {@link #status} (The status of this data element. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 828 */ 829 public DataElement setStatusElement(Enumeration<PublicationStatus> value) { 830 this.status = value; 831 return this; 832 } 833 834 /** 835 * @return The status of this data element. Enables tracking the life-cycle of the content. 836 */ 837 public PublicationStatus getStatus() { 838 return this.status == null ? null : this.status.getValue(); 839 } 840 841 /** 842 * @param value The status of this data element. Enables tracking the life-cycle of the content. 843 */ 844 public DataElement setStatus(PublicationStatus value) { 845 if (this.status == null) 846 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 847 this.status.setValue(value); 848 return this; 849 } 850 851 /** 852 * @return {@link #experimental} (A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 853 */ 854 public BooleanType getExperimentalElement() { 855 if (this.experimental == null) 856 if (Configuration.errorOnAutoCreate()) 857 throw new Error("Attempt to auto-create DataElement.experimental"); 858 else if (Configuration.doAutoCreate()) 859 this.experimental = new BooleanType(); // bb 860 return this.experimental; 861 } 862 863 public boolean hasExperimentalElement() { 864 return this.experimental != null && !this.experimental.isEmpty(); 865 } 866 867 public boolean hasExperimental() { 868 return this.experimental != null && !this.experimental.isEmpty(); 869 } 870 871 /** 872 * @param value {@link #experimental} (A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 873 */ 874 public DataElement setExperimentalElement(BooleanType value) { 875 this.experimental = value; 876 return this; 877 } 878 879 /** 880 * @return A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 881 */ 882 public boolean getExperimental() { 883 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 884 } 885 886 /** 887 * @param value A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 888 */ 889 public DataElement setExperimental(boolean value) { 890 if (this.experimental == null) 891 this.experimental = new BooleanType(); 892 this.experimental.setValue(value); 893 return this; 894 } 895 896 /** 897 * @return {@link #date} (The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 898 */ 899 public DateTimeType getDateElement() { 900 if (this.date == null) 901 if (Configuration.errorOnAutoCreate()) 902 throw new Error("Attempt to auto-create DataElement.date"); 903 else if (Configuration.doAutoCreate()) 904 this.date = new DateTimeType(); // bb 905 return this.date; 906 } 907 908 public boolean hasDateElement() { 909 return this.date != null && !this.date.isEmpty(); 910 } 911 912 public boolean hasDate() { 913 return this.date != null && !this.date.isEmpty(); 914 } 915 916 /** 917 * @param value {@link #date} (The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 918 */ 919 public DataElement setDateElement(DateTimeType value) { 920 this.date = value; 921 return this; 922 } 923 924 /** 925 * @return The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes. 926 */ 927 public Date getDate() { 928 return this.date == null ? null : this.date.getValue(); 929 } 930 931 /** 932 * @param value The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes. 933 */ 934 public DataElement setDate(Date value) { 935 if (value == null) 936 this.date = null; 937 else { 938 if (this.date == null) 939 this.date = new DateTimeType(); 940 this.date.setValue(value); 941 } 942 return this; 943 } 944 945 /** 946 * @return {@link #publisher} (The name of the individual or organization that published the data element.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 947 */ 948 public StringType getPublisherElement() { 949 if (this.publisher == null) 950 if (Configuration.errorOnAutoCreate()) 951 throw new Error("Attempt to auto-create DataElement.publisher"); 952 else if (Configuration.doAutoCreate()) 953 this.publisher = new StringType(); // bb 954 return this.publisher; 955 } 956 957 public boolean hasPublisherElement() { 958 return this.publisher != null && !this.publisher.isEmpty(); 959 } 960 961 public boolean hasPublisher() { 962 return this.publisher != null && !this.publisher.isEmpty(); 963 } 964 965 /** 966 * @param value {@link #publisher} (The name of the individual or organization that published the data element.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 967 */ 968 public DataElement setPublisherElement(StringType value) { 969 this.publisher = value; 970 return this; 971 } 972 973 /** 974 * @return The name of the individual or organization that published the data element. 975 */ 976 public String getPublisher() { 977 return this.publisher == null ? null : this.publisher.getValue(); 978 } 979 980 /** 981 * @param value The name of the individual or organization that published the data element. 982 */ 983 public DataElement setPublisher(String value) { 984 if (Utilities.noString(value)) 985 this.publisher = null; 986 else { 987 if (this.publisher == null) 988 this.publisher = new StringType(); 989 this.publisher.setValue(value); 990 } 991 return this; 992 } 993 994 /** 995 * @return {@link #name} (A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 996 */ 997 public StringType getNameElement() { 998 if (this.name == null) 999 if (Configuration.errorOnAutoCreate()) 1000 throw new Error("Attempt to auto-create DataElement.name"); 1001 else if (Configuration.doAutoCreate()) 1002 this.name = new StringType(); // bb 1003 return this.name; 1004 } 1005 1006 public boolean hasNameElement() { 1007 return this.name != null && !this.name.isEmpty(); 1008 } 1009 1010 public boolean hasName() { 1011 return this.name != null && !this.name.isEmpty(); 1012 } 1013 1014 /** 1015 * @param value {@link #name} (A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1016 */ 1017 public DataElement setNameElement(StringType value) { 1018 this.name = value; 1019 return this; 1020 } 1021 1022 /** 1023 * @return A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation. 1024 */ 1025 public String getName() { 1026 return this.name == null ? null : this.name.getValue(); 1027 } 1028 1029 /** 1030 * @param value A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation. 1031 */ 1032 public DataElement setName(String value) { 1033 if (Utilities.noString(value)) 1034 this.name = null; 1035 else { 1036 if (this.name == null) 1037 this.name = new StringType(); 1038 this.name.setValue(value); 1039 } 1040 return this; 1041 } 1042 1043 /** 1044 * @return {@link #title} (A short, descriptive, user-friendly title for the data element.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1045 */ 1046 public StringType getTitleElement() { 1047 if (this.title == null) 1048 if (Configuration.errorOnAutoCreate()) 1049 throw new Error("Attempt to auto-create DataElement.title"); 1050 else if (Configuration.doAutoCreate()) 1051 this.title = new StringType(); // bb 1052 return this.title; 1053 } 1054 1055 public boolean hasTitleElement() { 1056 return this.title != null && !this.title.isEmpty(); 1057 } 1058 1059 public boolean hasTitle() { 1060 return this.title != null && !this.title.isEmpty(); 1061 } 1062 1063 /** 1064 * @param value {@link #title} (A short, descriptive, user-friendly title for the data element.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1065 */ 1066 public DataElement setTitleElement(StringType value) { 1067 this.title = value; 1068 return this; 1069 } 1070 1071 /** 1072 * @return A short, descriptive, user-friendly title for the data element. 1073 */ 1074 public String getTitle() { 1075 return this.title == null ? null : this.title.getValue(); 1076 } 1077 1078 /** 1079 * @param value A short, descriptive, user-friendly title for the data element. 1080 */ 1081 public DataElement setTitle(String value) { 1082 if (Utilities.noString(value)) 1083 this.title = null; 1084 else { 1085 if (this.title == null) 1086 this.title = new StringType(); 1087 this.title.setValue(value); 1088 } 1089 return this; 1090 } 1091 1092 /** 1093 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 1094 */ 1095 public List<ContactDetail> getContact() { 1096 if (this.contact == null) 1097 this.contact = new ArrayList<ContactDetail>(); 1098 return this.contact; 1099 } 1100 1101 /** 1102 * @return Returns a reference to <code>this</code> for easy method chaining 1103 */ 1104 public DataElement setContact(List<ContactDetail> theContact) { 1105 this.contact = theContact; 1106 return this; 1107 } 1108 1109 public boolean hasContact() { 1110 if (this.contact == null) 1111 return false; 1112 for (ContactDetail item : this.contact) 1113 if (!item.isEmpty()) 1114 return true; 1115 return false; 1116 } 1117 1118 public ContactDetail addContact() { //3 1119 ContactDetail t = new ContactDetail(); 1120 if (this.contact == null) 1121 this.contact = new ArrayList<ContactDetail>(); 1122 this.contact.add(t); 1123 return t; 1124 } 1125 1126 public DataElement addContact(ContactDetail t) { //3 1127 if (t == null) 1128 return this; 1129 if (this.contact == null) 1130 this.contact = new ArrayList<ContactDetail>(); 1131 this.contact.add(t); 1132 return this; 1133 } 1134 1135 /** 1136 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 1137 */ 1138 public ContactDetail getContactFirstRep() { 1139 if (getContact().isEmpty()) { 1140 addContact(); 1141 } 1142 return getContact().get(0); 1143 } 1144 1145 /** 1146 * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate data element instances.) 1147 */ 1148 public List<UsageContext> getUseContext() { 1149 if (this.useContext == null) 1150 this.useContext = new ArrayList<UsageContext>(); 1151 return this.useContext; 1152 } 1153 1154 /** 1155 * @return Returns a reference to <code>this</code> for easy method chaining 1156 */ 1157 public DataElement setUseContext(List<UsageContext> theUseContext) { 1158 this.useContext = theUseContext; 1159 return this; 1160 } 1161 1162 public boolean hasUseContext() { 1163 if (this.useContext == null) 1164 return false; 1165 for (UsageContext item : this.useContext) 1166 if (!item.isEmpty()) 1167 return true; 1168 return false; 1169 } 1170 1171 public UsageContext addUseContext() { //3 1172 UsageContext t = new UsageContext(); 1173 if (this.useContext == null) 1174 this.useContext = new ArrayList<UsageContext>(); 1175 this.useContext.add(t); 1176 return t; 1177 } 1178 1179 public DataElement addUseContext(UsageContext t) { //3 1180 if (t == null) 1181 return this; 1182 if (this.useContext == null) 1183 this.useContext = new ArrayList<UsageContext>(); 1184 this.useContext.add(t); 1185 return this; 1186 } 1187 1188 /** 1189 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist 1190 */ 1191 public UsageContext getUseContextFirstRep() { 1192 if (getUseContext().isEmpty()) { 1193 addUseContext(); 1194 } 1195 return getUseContext().get(0); 1196 } 1197 1198 /** 1199 * @return {@link #jurisdiction} (A legal or geographic region in which the data element is intended to be used.) 1200 */ 1201 public List<CodeableConcept> getJurisdiction() { 1202 if (this.jurisdiction == null) 1203 this.jurisdiction = new ArrayList<CodeableConcept>(); 1204 return this.jurisdiction; 1205 } 1206 1207 /** 1208 * @return Returns a reference to <code>this</code> for easy method chaining 1209 */ 1210 public DataElement setJurisdiction(List<CodeableConcept> theJurisdiction) { 1211 this.jurisdiction = theJurisdiction; 1212 return this; 1213 } 1214 1215 public boolean hasJurisdiction() { 1216 if (this.jurisdiction == null) 1217 return false; 1218 for (CodeableConcept item : this.jurisdiction) 1219 if (!item.isEmpty()) 1220 return true; 1221 return false; 1222 } 1223 1224 public CodeableConcept addJurisdiction() { //3 1225 CodeableConcept t = new CodeableConcept(); 1226 if (this.jurisdiction == null) 1227 this.jurisdiction = new ArrayList<CodeableConcept>(); 1228 this.jurisdiction.add(t); 1229 return t; 1230 } 1231 1232 public DataElement addJurisdiction(CodeableConcept t) { //3 1233 if (t == null) 1234 return this; 1235 if (this.jurisdiction == null) 1236 this.jurisdiction = new ArrayList<CodeableConcept>(); 1237 this.jurisdiction.add(t); 1238 return this; 1239 } 1240 1241 /** 1242 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 1243 */ 1244 public CodeableConcept getJurisdictionFirstRep() { 1245 if (getJurisdiction().isEmpty()) { 1246 addJurisdiction(); 1247 } 1248 return getJurisdiction().get(0); 1249 } 1250 1251 /** 1252 * @return {@link #copyright} (A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 1253 */ 1254 public MarkdownType getCopyrightElement() { 1255 if (this.copyright == null) 1256 if (Configuration.errorOnAutoCreate()) 1257 throw new Error("Attempt to auto-create DataElement.copyright"); 1258 else if (Configuration.doAutoCreate()) 1259 this.copyright = new MarkdownType(); // bb 1260 return this.copyright; 1261 } 1262 1263 public boolean hasCopyrightElement() { 1264 return this.copyright != null && !this.copyright.isEmpty(); 1265 } 1266 1267 public boolean hasCopyright() { 1268 return this.copyright != null && !this.copyright.isEmpty(); 1269 } 1270 1271 /** 1272 * @param value {@link #copyright} (A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 1273 */ 1274 public DataElement setCopyrightElement(MarkdownType value) { 1275 this.copyright = value; 1276 return this; 1277 } 1278 1279 /** 1280 * @return A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element. 1281 */ 1282 public String getCopyright() { 1283 return this.copyright == null ? null : this.copyright.getValue(); 1284 } 1285 1286 /** 1287 * @param value A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element. 1288 */ 1289 public DataElement setCopyright(String value) { 1290 if (value == null) 1291 this.copyright = null; 1292 else { 1293 if (this.copyright == null) 1294 this.copyright = new MarkdownType(); 1295 this.copyright.setValue(value); 1296 } 1297 return this; 1298 } 1299 1300 /** 1301 * @return {@link #stringency} (Identifies how precise the data element is in its definition.). This is the underlying object with id, value and extensions. The accessor "getStringency" gives direct access to the value 1302 */ 1303 public Enumeration<DataElementStringency> getStringencyElement() { 1304 if (this.stringency == null) 1305 if (Configuration.errorOnAutoCreate()) 1306 throw new Error("Attempt to auto-create DataElement.stringency"); 1307 else if (Configuration.doAutoCreate()) 1308 this.stringency = new Enumeration<DataElementStringency>(new DataElementStringencyEnumFactory()); // bb 1309 return this.stringency; 1310 } 1311 1312 public boolean hasStringencyElement() { 1313 return this.stringency != null && !this.stringency.isEmpty(); 1314 } 1315 1316 public boolean hasStringency() { 1317 return this.stringency != null && !this.stringency.isEmpty(); 1318 } 1319 1320 /** 1321 * @param value {@link #stringency} (Identifies how precise the data element is in its definition.). This is the underlying object with id, value and extensions. The accessor "getStringency" gives direct access to the value 1322 */ 1323 public DataElement setStringencyElement(Enumeration<DataElementStringency> value) { 1324 this.stringency = value; 1325 return this; 1326 } 1327 1328 /** 1329 * @return Identifies how precise the data element is in its definition. 1330 */ 1331 public DataElementStringency getStringency() { 1332 return this.stringency == null ? null : this.stringency.getValue(); 1333 } 1334 1335 /** 1336 * @param value Identifies how precise the data element is in its definition. 1337 */ 1338 public DataElement setStringency(DataElementStringency value) { 1339 if (value == null) 1340 this.stringency = null; 1341 else { 1342 if (this.stringency == null) 1343 this.stringency = new Enumeration<DataElementStringency>(new DataElementStringencyEnumFactory()); 1344 this.stringency.setValue(value); 1345 } 1346 return this; 1347 } 1348 1349 /** 1350 * @return {@link #mapping} (Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.) 1351 */ 1352 public List<DataElementMappingComponent> getMapping() { 1353 if (this.mapping == null) 1354 this.mapping = new ArrayList<DataElementMappingComponent>(); 1355 return this.mapping; 1356 } 1357 1358 /** 1359 * @return Returns a reference to <code>this</code> for easy method chaining 1360 */ 1361 public DataElement setMapping(List<DataElementMappingComponent> theMapping) { 1362 this.mapping = theMapping; 1363 return this; 1364 } 1365 1366 public boolean hasMapping() { 1367 if (this.mapping == null) 1368 return false; 1369 for (DataElementMappingComponent item : this.mapping) 1370 if (!item.isEmpty()) 1371 return true; 1372 return false; 1373 } 1374 1375 public DataElementMappingComponent addMapping() { //3 1376 DataElementMappingComponent t = new DataElementMappingComponent(); 1377 if (this.mapping == null) 1378 this.mapping = new ArrayList<DataElementMappingComponent>(); 1379 this.mapping.add(t); 1380 return t; 1381 } 1382 1383 public DataElement addMapping(DataElementMappingComponent t) { //3 1384 if (t == null) 1385 return this; 1386 if (this.mapping == null) 1387 this.mapping = new ArrayList<DataElementMappingComponent>(); 1388 this.mapping.add(t); 1389 return this; 1390 } 1391 1392 /** 1393 * @return The first repetition of repeating field {@link #mapping}, creating it if it does not already exist 1394 */ 1395 public DataElementMappingComponent getMappingFirstRep() { 1396 if (getMapping().isEmpty()) { 1397 addMapping(); 1398 } 1399 return getMapping().get(0); 1400 } 1401 1402 /** 1403 * @return {@link #element} (Defines the structure, type, allowed values and other constraining characteristics of the data element.) 1404 */ 1405 public List<ElementDefinition> getElement() { 1406 if (this.element == null) 1407 this.element = new ArrayList<ElementDefinition>(); 1408 return this.element; 1409 } 1410 1411 /** 1412 * @return Returns a reference to <code>this</code> for easy method chaining 1413 */ 1414 public DataElement setElement(List<ElementDefinition> theElement) { 1415 this.element = theElement; 1416 return this; 1417 } 1418 1419 public boolean hasElement() { 1420 if (this.element == null) 1421 return false; 1422 for (ElementDefinition item : this.element) 1423 if (!item.isEmpty()) 1424 return true; 1425 return false; 1426 } 1427 1428 public ElementDefinition addElement() { //3 1429 ElementDefinition t = new ElementDefinition(); 1430 if (this.element == null) 1431 this.element = new ArrayList<ElementDefinition>(); 1432 this.element.add(t); 1433 return t; 1434 } 1435 1436 public DataElement addElement(ElementDefinition t) { //3 1437 if (t == null) 1438 return this; 1439 if (this.element == null) 1440 this.element = new ArrayList<ElementDefinition>(); 1441 this.element.add(t); 1442 return this; 1443 } 1444 1445 /** 1446 * @return The first repetition of repeating field {@link #element}, creating it if it does not already exist 1447 */ 1448 public ElementDefinition getElementFirstRep() { 1449 if (getElement().isEmpty()) { 1450 addElement(); 1451 } 1452 return getElement().get(0); 1453 } 1454 1455 protected void listChildren(List<Property> children) { 1456 super.listChildren(children); 1457 children.add(new Property("url", "uri", "An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url)); 1458 children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1459 children.add(new Property("version", "string", "The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version)); 1460 children.add(new Property("status", "code", "The status of this data element. Enables tracking the life-cycle of the content.", 0, 1, status)); 1461 children.add(new Property("experimental", "boolean", "A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental)); 1462 children.add(new Property("date", "dateTime", "The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.", 0, 1, date)); 1463 children.add(new Property("publisher", "string", "The name of the individual or organization that published the data element.", 0, 1, publisher)); 1464 children.add(new Property("name", "string", "A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name)); 1465 children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the data element.", 0, 1, title)); 1466 children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 1467 children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate data element instances.", 0, java.lang.Integer.MAX_VALUE, useContext)); 1468 children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the data element is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction)); 1469 children.add(new Property("copyright", "markdown", "A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element.", 0, 1, copyright)); 1470 children.add(new Property("stringency", "code", "Identifies how precise the data element is in its definition.", 0, 1, stringency)); 1471 children.add(new Property("mapping", "", "Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.", 0, java.lang.Integer.MAX_VALUE, mapping)); 1472 children.add(new Property("element", "ElementDefinition", "Defines the structure, type, allowed values and other constraining characteristics of the data element.", 0, java.lang.Integer.MAX_VALUE, element)); 1473 } 1474 1475 @Override 1476 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1477 switch (_hash) { 1478 case 116079: /*url*/ return new Property("url", "uri", "An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url); 1479 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier); 1480 case 351608024: /*version*/ return new Property("version", "string", "The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version); 1481 case -892481550: /*status*/ return new Property("status", "code", "The status of this data element. Enables tracking the life-cycle of the content.", 0, 1, status); 1482 case -404562712: /*experimental*/ return new Property("experimental", "boolean", "A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental); 1483 case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.", 0, 1, date); 1484 case 1447404028: /*publisher*/ return new Property("publisher", "string", "The name of the individual or organization that published the data element.", 0, 1, publisher); 1485 case 3373707: /*name*/ return new Property("name", "string", "A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name); 1486 case 110371416: /*title*/ return new Property("title", "string", "A short, descriptive, user-friendly title for the data element.", 0, 1, title); 1487 case 951526432: /*contact*/ return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact); 1488 case -669707736: /*useContext*/ return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate data element instances.", 0, java.lang.Integer.MAX_VALUE, useContext); 1489 case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the data element is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction); 1490 case 1522889671: /*copyright*/ return new Property("copyright", "markdown", "A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element.", 0, 1, copyright); 1491 case -1572568464: /*stringency*/ return new Property("stringency", "code", "Identifies how precise the data element is in its definition.", 0, 1, stringency); 1492 case 837556430: /*mapping*/ return new Property("mapping", "", "Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.", 0, java.lang.Integer.MAX_VALUE, mapping); 1493 case -1662836996: /*element*/ return new Property("element", "ElementDefinition", "Defines the structure, type, allowed values and other constraining characteristics of the data element.", 0, java.lang.Integer.MAX_VALUE, element); 1494 default: return super.getNamedProperty(_hash, _name, _checkValid); 1495 } 1496 1497 } 1498 1499 @Override 1500 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1501 switch (hash) { 1502 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 1503 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1504 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 1505 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 1506 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 1507 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 1508 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 1509 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1510 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 1511 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 1512 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 1513 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 1514 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 1515 case -1572568464: /*stringency*/ return this.stringency == null ? new Base[0] : new Base[] {this.stringency}; // Enumeration<DataElementStringency> 1516 case 837556430: /*mapping*/ return this.mapping == null ? new Base[0] : this.mapping.toArray(new Base[this.mapping.size()]); // DataElementMappingComponent 1517 case -1662836996: /*element*/ return this.element == null ? new Base[0] : this.element.toArray(new Base[this.element.size()]); // ElementDefinition 1518 default: return super.getProperty(hash, name, checkValid); 1519 } 1520 1521 } 1522 1523 @Override 1524 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1525 switch (hash) { 1526 case 116079: // url 1527 this.url = castToUri(value); // UriType 1528 return value; 1529 case -1618432855: // identifier 1530 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1531 return value; 1532 case 351608024: // version 1533 this.version = castToString(value); // StringType 1534 return value; 1535 case -892481550: // status 1536 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 1537 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 1538 return value; 1539 case -404562712: // experimental 1540 this.experimental = castToBoolean(value); // BooleanType 1541 return value; 1542 case 3076014: // date 1543 this.date = castToDateTime(value); // DateTimeType 1544 return value; 1545 case 1447404028: // publisher 1546 this.publisher = castToString(value); // StringType 1547 return value; 1548 case 3373707: // name 1549 this.name = castToString(value); // StringType 1550 return value; 1551 case 110371416: // title 1552 this.title = castToString(value); // StringType 1553 return value; 1554 case 951526432: // contact 1555 this.getContact().add(castToContactDetail(value)); // ContactDetail 1556 return value; 1557 case -669707736: // useContext 1558 this.getUseContext().add(castToUsageContext(value)); // UsageContext 1559 return value; 1560 case -507075711: // jurisdiction 1561 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 1562 return value; 1563 case 1522889671: // copyright 1564 this.copyright = castToMarkdown(value); // MarkdownType 1565 return value; 1566 case -1572568464: // stringency 1567 value = new DataElementStringencyEnumFactory().fromType(castToCode(value)); 1568 this.stringency = (Enumeration) value; // Enumeration<DataElementStringency> 1569 return value; 1570 case 837556430: // mapping 1571 this.getMapping().add((DataElementMappingComponent) value); // DataElementMappingComponent 1572 return value; 1573 case -1662836996: // element 1574 this.getElement().add(castToElementDefinition(value)); // ElementDefinition 1575 return value; 1576 default: return super.setProperty(hash, name, value); 1577 } 1578 1579 } 1580 1581 @Override 1582 public Base setProperty(String name, Base value) throws FHIRException { 1583 if (name.equals("url")) { 1584 this.url = castToUri(value); // UriType 1585 } else if (name.equals("identifier")) { 1586 this.getIdentifier().add(castToIdentifier(value)); 1587 } else if (name.equals("version")) { 1588 this.version = castToString(value); // StringType 1589 } else if (name.equals("status")) { 1590 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 1591 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 1592 } else if (name.equals("experimental")) { 1593 this.experimental = castToBoolean(value); // BooleanType 1594 } else if (name.equals("date")) { 1595 this.date = castToDateTime(value); // DateTimeType 1596 } else if (name.equals("publisher")) { 1597 this.publisher = castToString(value); // StringType 1598 } else if (name.equals("name")) { 1599 this.name = castToString(value); // StringType 1600 } else if (name.equals("title")) { 1601 this.title = castToString(value); // StringType 1602 } else if (name.equals("contact")) { 1603 this.getContact().add(castToContactDetail(value)); 1604 } else if (name.equals("useContext")) { 1605 this.getUseContext().add(castToUsageContext(value)); 1606 } else if (name.equals("jurisdiction")) { 1607 this.getJurisdiction().add(castToCodeableConcept(value)); 1608 } else if (name.equals("copyright")) { 1609 this.copyright = castToMarkdown(value); // MarkdownType 1610 } else if (name.equals("stringency")) { 1611 value = new DataElementStringencyEnumFactory().fromType(castToCode(value)); 1612 this.stringency = (Enumeration) value; // Enumeration<DataElementStringency> 1613 } else if (name.equals("mapping")) { 1614 this.getMapping().add((DataElementMappingComponent) value); 1615 } else if (name.equals("element")) { 1616 this.getElement().add(castToElementDefinition(value)); 1617 } else 1618 return super.setProperty(name, value); 1619 return value; 1620 } 1621 1622 @Override 1623 public Base makeProperty(int hash, String name) throws FHIRException { 1624 switch (hash) { 1625 case 116079: return getUrlElement(); 1626 case -1618432855: return addIdentifier(); 1627 case 351608024: return getVersionElement(); 1628 case -892481550: return getStatusElement(); 1629 case -404562712: return getExperimentalElement(); 1630 case 3076014: return getDateElement(); 1631 case 1447404028: return getPublisherElement(); 1632 case 3373707: return getNameElement(); 1633 case 110371416: return getTitleElement(); 1634 case 951526432: return addContact(); 1635 case -669707736: return addUseContext(); 1636 case -507075711: return addJurisdiction(); 1637 case 1522889671: return getCopyrightElement(); 1638 case -1572568464: return getStringencyElement(); 1639 case 837556430: return addMapping(); 1640 case -1662836996: return addElement(); 1641 default: return super.makeProperty(hash, name); 1642 } 1643 1644 } 1645 1646 @Override 1647 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1648 switch (hash) { 1649 case 116079: /*url*/ return new String[] {"uri"}; 1650 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1651 case 351608024: /*version*/ return new String[] {"string"}; 1652 case -892481550: /*status*/ return new String[] {"code"}; 1653 case -404562712: /*experimental*/ return new String[] {"boolean"}; 1654 case 3076014: /*date*/ return new String[] {"dateTime"}; 1655 case 1447404028: /*publisher*/ return new String[] {"string"}; 1656 case 3373707: /*name*/ return new String[] {"string"}; 1657 case 110371416: /*title*/ return new String[] {"string"}; 1658 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 1659 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 1660 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 1661 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 1662 case -1572568464: /*stringency*/ return new String[] {"code"}; 1663 case 837556430: /*mapping*/ return new String[] {}; 1664 case -1662836996: /*element*/ return new String[] {"ElementDefinition"}; 1665 default: return super.getTypesForProperty(hash, name); 1666 } 1667 1668 } 1669 1670 @Override 1671 public Base addChild(String name) throws FHIRException { 1672 if (name.equals("url")) { 1673 throw new FHIRException("Cannot call addChild on a primitive type DataElement.url"); 1674 } 1675 else if (name.equals("identifier")) { 1676 return addIdentifier(); 1677 } 1678 else if (name.equals("version")) { 1679 throw new FHIRException("Cannot call addChild on a primitive type DataElement.version"); 1680 } 1681 else if (name.equals("status")) { 1682 throw new FHIRException("Cannot call addChild on a primitive type DataElement.status"); 1683 } 1684 else if (name.equals("experimental")) { 1685 throw new FHIRException("Cannot call addChild on a primitive type DataElement.experimental"); 1686 } 1687 else if (name.equals("date")) { 1688 throw new FHIRException("Cannot call addChild on a primitive type DataElement.date"); 1689 } 1690 else if (name.equals("publisher")) { 1691 throw new FHIRException("Cannot call addChild on a primitive type DataElement.publisher"); 1692 } 1693 else if (name.equals("name")) { 1694 throw new FHIRException("Cannot call addChild on a primitive type DataElement.name"); 1695 } 1696 else if (name.equals("title")) { 1697 throw new FHIRException("Cannot call addChild on a primitive type DataElement.title"); 1698 } 1699 else if (name.equals("contact")) { 1700 return addContact(); 1701 } 1702 else if (name.equals("useContext")) { 1703 return addUseContext(); 1704 } 1705 else if (name.equals("jurisdiction")) { 1706 return addJurisdiction(); 1707 } 1708 else if (name.equals("copyright")) { 1709 throw new FHIRException("Cannot call addChild on a primitive type DataElement.copyright"); 1710 } 1711 else if (name.equals("stringency")) { 1712 throw new FHIRException("Cannot call addChild on a primitive type DataElement.stringency"); 1713 } 1714 else if (name.equals("mapping")) { 1715 return addMapping(); 1716 } 1717 else if (name.equals("element")) { 1718 return addElement(); 1719 } 1720 else 1721 return super.addChild(name); 1722 } 1723 1724 public String fhirType() { 1725 return "DataElement"; 1726 1727 } 1728 1729 public DataElement copy() { 1730 DataElement dst = new DataElement(); 1731 copyValues(dst); 1732 dst.url = url == null ? null : url.copy(); 1733 if (identifier != null) { 1734 dst.identifier = new ArrayList<Identifier>(); 1735 for (Identifier i : identifier) 1736 dst.identifier.add(i.copy()); 1737 }; 1738 dst.version = version == null ? null : version.copy(); 1739 dst.status = status == null ? null : status.copy(); 1740 dst.experimental = experimental == null ? null : experimental.copy(); 1741 dst.date = date == null ? null : date.copy(); 1742 dst.publisher = publisher == null ? null : publisher.copy(); 1743 dst.name = name == null ? null : name.copy(); 1744 dst.title = title == null ? null : title.copy(); 1745 if (contact != null) { 1746 dst.contact = new ArrayList<ContactDetail>(); 1747 for (ContactDetail i : contact) 1748 dst.contact.add(i.copy()); 1749 }; 1750 if (useContext != null) { 1751 dst.useContext = new ArrayList<UsageContext>(); 1752 for (UsageContext i : useContext) 1753 dst.useContext.add(i.copy()); 1754 }; 1755 if (jurisdiction != null) { 1756 dst.jurisdiction = new ArrayList<CodeableConcept>(); 1757 for (CodeableConcept i : jurisdiction) 1758 dst.jurisdiction.add(i.copy()); 1759 }; 1760 dst.copyright = copyright == null ? null : copyright.copy(); 1761 dst.stringency = stringency == null ? null : stringency.copy(); 1762 if (mapping != null) { 1763 dst.mapping = new ArrayList<DataElementMappingComponent>(); 1764 for (DataElementMappingComponent i : mapping) 1765 dst.mapping.add(i.copy()); 1766 }; 1767 if (element != null) { 1768 dst.element = new ArrayList<ElementDefinition>(); 1769 for (ElementDefinition i : element) 1770 dst.element.add(i.copy()); 1771 }; 1772 return dst; 1773 } 1774 1775 protected DataElement typedCopy() { 1776 return copy(); 1777 } 1778 1779 @Override 1780 public boolean equalsDeep(Base other_) { 1781 if (!super.equalsDeep(other_)) 1782 return false; 1783 if (!(other_ instanceof DataElement)) 1784 return false; 1785 DataElement o = (DataElement) other_; 1786 return compareDeep(identifier, o.identifier, true) && compareDeep(copyright, o.copyright, true) 1787 && compareDeep(stringency, o.stringency, true) && compareDeep(mapping, o.mapping, true) && compareDeep(element, o.element, true) 1788 ; 1789 } 1790 1791 @Override 1792 public boolean equalsShallow(Base other_) { 1793 if (!super.equalsShallow(other_)) 1794 return false; 1795 if (!(other_ instanceof DataElement)) 1796 return false; 1797 DataElement o = (DataElement) other_; 1798 return compareValues(copyright, o.copyright, true) && compareValues(stringency, o.stringency, true) 1799 ; 1800 } 1801 1802 public boolean isEmpty() { 1803 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, copyright, stringency 1804 , mapping, element); 1805 } 1806 1807 @Override 1808 public ResourceType getResourceType() { 1809 return ResourceType.DataElement; 1810 } 1811 1812 /** 1813 * Search parameter: <b>date</b> 1814 * <p> 1815 * Description: <b>The data element publication date</b><br> 1816 * Type: <b>date</b><br> 1817 * Path: <b>DataElement.date</b><br> 1818 * </p> 1819 */ 1820 @SearchParamDefinition(name="date", path="DataElement.date", description="The data element publication date", type="date" ) 1821 public static final String SP_DATE = "date"; 1822 /** 1823 * <b>Fluent Client</b> search parameter constant for <b>date</b> 1824 * <p> 1825 * Description: <b>The data element publication date</b><br> 1826 * Type: <b>date</b><br> 1827 * Path: <b>DataElement.date</b><br> 1828 * </p> 1829 */ 1830 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 1831 1832 /** 1833 * Search parameter: <b>identifier</b> 1834 * <p> 1835 * Description: <b>External identifier for the data element</b><br> 1836 * Type: <b>token</b><br> 1837 * Path: <b>DataElement.identifier</b><br> 1838 * </p> 1839 */ 1840 @SearchParamDefinition(name="identifier", path="DataElement.identifier", description="External identifier for the data element", type="token" ) 1841 public static final String SP_IDENTIFIER = "identifier"; 1842 /** 1843 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1844 * <p> 1845 * Description: <b>External identifier for the data element</b><br> 1846 * Type: <b>token</b><br> 1847 * Path: <b>DataElement.identifier</b><br> 1848 * </p> 1849 */ 1850 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1851 1852 /** 1853 * Search parameter: <b>code</b> 1854 * <p> 1855 * Description: <b>A code for the data element (server may choose to do subsumption)</b><br> 1856 * Type: <b>token</b><br> 1857 * Path: <b>DataElement.element.code</b><br> 1858 * </p> 1859 */ 1860 @SearchParamDefinition(name="code", path="DataElement.element.code", description="A code for the data element (server may choose to do subsumption)", type="token" ) 1861 public static final String SP_CODE = "code"; 1862 /** 1863 * <b>Fluent Client</b> search parameter constant for <b>code</b> 1864 * <p> 1865 * Description: <b>A code for the data element (server may choose to do subsumption)</b><br> 1866 * Type: <b>token</b><br> 1867 * Path: <b>DataElement.element.code</b><br> 1868 * </p> 1869 */ 1870 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 1871 1872 /** 1873 * Search parameter: <b>stringency</b> 1874 * <p> 1875 * Description: <b>The stringency of the data element definition</b><br> 1876 * Type: <b>token</b><br> 1877 * Path: <b>DataElement.stringency</b><br> 1878 * </p> 1879 */ 1880 @SearchParamDefinition(name="stringency", path="DataElement.stringency", description="The stringency of the data element definition", type="token" ) 1881 public static final String SP_STRINGENCY = "stringency"; 1882 /** 1883 * <b>Fluent Client</b> search parameter constant for <b>stringency</b> 1884 * <p> 1885 * Description: <b>The stringency of the data element definition</b><br> 1886 * Type: <b>token</b><br> 1887 * Path: <b>DataElement.stringency</b><br> 1888 * </p> 1889 */ 1890 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STRINGENCY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STRINGENCY); 1891 1892 /** 1893 * Search parameter: <b>jurisdiction</b> 1894 * <p> 1895 * Description: <b>Intended jurisdiction for the data element</b><br> 1896 * Type: <b>token</b><br> 1897 * Path: <b>DataElement.jurisdiction</b><br> 1898 * </p> 1899 */ 1900 @SearchParamDefinition(name="jurisdiction", path="DataElement.jurisdiction", description="Intended jurisdiction for the data element", type="token" ) 1901 public static final String SP_JURISDICTION = "jurisdiction"; 1902 /** 1903 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 1904 * <p> 1905 * Description: <b>Intended jurisdiction for the data element</b><br> 1906 * Type: <b>token</b><br> 1907 * Path: <b>DataElement.jurisdiction</b><br> 1908 * </p> 1909 */ 1910 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION); 1911 1912 /** 1913 * Search parameter: <b>name</b> 1914 * <p> 1915 * Description: <b>Computationally friendly name of the data element</b><br> 1916 * Type: <b>string</b><br> 1917 * Path: <b>DataElement.name</b><br> 1918 * </p> 1919 */ 1920 @SearchParamDefinition(name="name", path="DataElement.name", description="Computationally friendly name of the data element", type="string" ) 1921 public static final String SP_NAME = "name"; 1922 /** 1923 * <b>Fluent Client</b> search parameter constant for <b>name</b> 1924 * <p> 1925 * Description: <b>Computationally friendly name of the data element</b><br> 1926 * Type: <b>string</b><br> 1927 * Path: <b>DataElement.name</b><br> 1928 * </p> 1929 */ 1930 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 1931 1932 /** 1933 * Search parameter: <b>publisher</b> 1934 * <p> 1935 * Description: <b>Name of the publisher of the data element</b><br> 1936 * Type: <b>string</b><br> 1937 * Path: <b>DataElement.publisher</b><br> 1938 * </p> 1939 */ 1940 @SearchParamDefinition(name="publisher", path="DataElement.publisher", description="Name of the publisher of the data element", type="string" ) 1941 public static final String SP_PUBLISHER = "publisher"; 1942 /** 1943 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 1944 * <p> 1945 * Description: <b>Name of the publisher of the data element</b><br> 1946 * Type: <b>string</b><br> 1947 * Path: <b>DataElement.publisher</b><br> 1948 * </p> 1949 */ 1950 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 1951 1952 /** 1953 * Search parameter: <b>description</b> 1954 * <p> 1955 * Description: <b>Text search in the description of the data element. This corresponds to the definition of the first DataElement.element.</b><br> 1956 * Type: <b>string</b><br> 1957 * Path: <b>DataElement.element.definition</b><br> 1958 * </p> 1959 */ 1960 @SearchParamDefinition(name="description", path="DataElement.element.definition", description="Text search in the description of the data element. This corresponds to the definition of the first DataElement.element.", type="string" ) 1961 public static final String SP_DESCRIPTION = "description"; 1962 /** 1963 * <b>Fluent Client</b> search parameter constant for <b>description</b> 1964 * <p> 1965 * Description: <b>Text search in the description of the data element. This corresponds to the definition of the first DataElement.element.</b><br> 1966 * Type: <b>string</b><br> 1967 * Path: <b>DataElement.element.definition</b><br> 1968 * </p> 1969 */ 1970 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 1971 1972 /** 1973 * Search parameter: <b>title</b> 1974 * <p> 1975 * Description: <b>The human-friendly name of the data element</b><br> 1976 * Type: <b>string</b><br> 1977 * Path: <b>DataElement.title</b><br> 1978 * </p> 1979 */ 1980 @SearchParamDefinition(name="title", path="DataElement.title", description="The human-friendly name of the data element", type="string" ) 1981 public static final String SP_TITLE = "title"; 1982 /** 1983 * <b>Fluent Client</b> search parameter constant for <b>title</b> 1984 * <p> 1985 * Description: <b>The human-friendly name of the data element</b><br> 1986 * Type: <b>string</b><br> 1987 * Path: <b>DataElement.title</b><br> 1988 * </p> 1989 */ 1990 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); 1991 1992 /** 1993 * Search parameter: <b>version</b> 1994 * <p> 1995 * Description: <b>The business version of the data element</b><br> 1996 * Type: <b>token</b><br> 1997 * Path: <b>DataElement.version</b><br> 1998 * </p> 1999 */ 2000 @SearchParamDefinition(name="version", path="DataElement.version", description="The business version of the data element", type="token" ) 2001 public static final String SP_VERSION = "version"; 2002 /** 2003 * <b>Fluent Client</b> search parameter constant for <b>version</b> 2004 * <p> 2005 * Description: <b>The business version of the data element</b><br> 2006 * Type: <b>token</b><br> 2007 * Path: <b>DataElement.version</b><br> 2008 * </p> 2009 */ 2010 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 2011 2012 /** 2013 * Search parameter: <b>url</b> 2014 * <p> 2015 * Description: <b>The uri that identifies the data element</b><br> 2016 * Type: <b>uri</b><br> 2017 * Path: <b>DataElement.url</b><br> 2018 * </p> 2019 */ 2020 @SearchParamDefinition(name="url", path="DataElement.url", description="The uri that identifies the data element", type="uri" ) 2021 public static final String SP_URL = "url"; 2022 /** 2023 * <b>Fluent Client</b> search parameter constant for <b>url</b> 2024 * <p> 2025 * Description: <b>The uri that identifies the data element</b><br> 2026 * Type: <b>uri</b><br> 2027 * Path: <b>DataElement.url</b><br> 2028 * </p> 2029 */ 2030 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 2031 2032 /** 2033 * Search parameter: <b>status</b> 2034 * <p> 2035 * Description: <b>The current status of the data element</b><br> 2036 * Type: <b>token</b><br> 2037 * Path: <b>DataElement.status</b><br> 2038 * </p> 2039 */ 2040 @SearchParamDefinition(name="status", path="DataElement.status", description="The current status of the data element", type="token" ) 2041 public static final String SP_STATUS = "status"; 2042 /** 2043 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2044 * <p> 2045 * Description: <b>The current status of the data element</b><br> 2046 * Type: <b>token</b><br> 2047 * Path: <b>DataElement.status</b><br> 2048 * </p> 2049 */ 2050 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2051 2052 2053} 2054