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