001package org.hl7.fhir.dstu2016may.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 033import java.util.ArrayList; 034import java.util.Date; 035import java.util.List; 036 037import org.hl7.fhir.dstu2016may.model.Enumerations.ConformanceResourceStatus; 038import org.hl7.fhir.dstu2016may.model.Enumerations.ConformanceResourceStatusEnumFactory; 039import org.hl7.fhir.exceptions.FHIRException; 040import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 041import org.hl7.fhir.utilities.Utilities; 042 043import ca.uhn.fhir.model.api.annotation.Block; 044import ca.uhn.fhir.model.api.annotation.Child; 045import ca.uhn.fhir.model.api.annotation.Description; 046import ca.uhn.fhir.model.api.annotation.ResourceDef; 047import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 048/** 049 * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types. 050 */ 051@ResourceDef(name="NamingSystem", profile="http://hl7.org/fhir/Profile/NamingSystem") 052public class NamingSystem extends DomainResource { 053 054 public enum NamingSystemType { 055 /** 056 * The naming system is used to define concepts and symbols to represent those concepts; e.g. UCUM, LOINC, NDC code, local lab codes, etc. 057 */ 058 CODESYSTEM, 059 /** 060 * The naming system is used to manage identifiers (e.g. license numbers, order numbers, etc.). 061 */ 062 IDENTIFIER, 063 /** 064 * The naming system is used as the root for other identifiers and naming systems. 065 */ 066 ROOT, 067 /** 068 * added to help the parsers 069 */ 070 NULL; 071 public static NamingSystemType fromCode(String codeString) throws FHIRException { 072 if (codeString == null || "".equals(codeString)) 073 return null; 074 if ("codesystem".equals(codeString)) 075 return CODESYSTEM; 076 if ("identifier".equals(codeString)) 077 return IDENTIFIER; 078 if ("root".equals(codeString)) 079 return ROOT; 080 throw new FHIRException("Unknown NamingSystemType code '"+codeString+"'"); 081 } 082 public String toCode() { 083 switch (this) { 084 case CODESYSTEM: return "codesystem"; 085 case IDENTIFIER: return "identifier"; 086 case ROOT: return "root"; 087 default: return "?"; 088 } 089 } 090 public String getSystem() { 091 switch (this) { 092 case CODESYSTEM: return "http://hl7.org/fhir/namingsystem-type"; 093 case IDENTIFIER: return "http://hl7.org/fhir/namingsystem-type"; 094 case ROOT: return "http://hl7.org/fhir/namingsystem-type"; 095 default: return "?"; 096 } 097 } 098 public String getDefinition() { 099 switch (this) { 100 case CODESYSTEM: return "The naming system is used to define concepts and symbols to represent those concepts; e.g. UCUM, LOINC, NDC code, local lab codes, etc."; 101 case IDENTIFIER: return "The naming system is used to manage identifiers (e.g. license numbers, order numbers, etc.)."; 102 case ROOT: return "The naming system is used as the root for other identifiers and naming systems."; 103 default: return "?"; 104 } 105 } 106 public String getDisplay() { 107 switch (this) { 108 case CODESYSTEM: return "Code System"; 109 case IDENTIFIER: return "Identifier"; 110 case ROOT: return "Root"; 111 default: return "?"; 112 } 113 } 114 } 115 116 public static class NamingSystemTypeEnumFactory implements EnumFactory<NamingSystemType> { 117 public NamingSystemType fromCode(String codeString) throws IllegalArgumentException { 118 if (codeString == null || "".equals(codeString)) 119 if (codeString == null || "".equals(codeString)) 120 return null; 121 if ("codesystem".equals(codeString)) 122 return NamingSystemType.CODESYSTEM; 123 if ("identifier".equals(codeString)) 124 return NamingSystemType.IDENTIFIER; 125 if ("root".equals(codeString)) 126 return NamingSystemType.ROOT; 127 throw new IllegalArgumentException("Unknown NamingSystemType code '"+codeString+"'"); 128 } 129 public Enumeration<NamingSystemType> fromType(Base code) throws FHIRException { 130 if (code == null || code.isEmpty()) 131 return null; 132 String codeString = ((PrimitiveType) code).asStringValue(); 133 if (codeString == null || "".equals(codeString)) 134 return null; 135 if ("codesystem".equals(codeString)) 136 return new Enumeration<NamingSystemType>(this, NamingSystemType.CODESYSTEM); 137 if ("identifier".equals(codeString)) 138 return new Enumeration<NamingSystemType>(this, NamingSystemType.IDENTIFIER); 139 if ("root".equals(codeString)) 140 return new Enumeration<NamingSystemType>(this, NamingSystemType.ROOT); 141 throw new FHIRException("Unknown NamingSystemType code '"+codeString+"'"); 142 } 143 public String toCode(NamingSystemType code) { 144 if (code == NamingSystemType.CODESYSTEM) 145 return "codesystem"; 146 if (code == NamingSystemType.IDENTIFIER) 147 return "identifier"; 148 if (code == NamingSystemType.ROOT) 149 return "root"; 150 return "?"; 151 } 152 public String toSystem(NamingSystemType code) { 153 return code.getSystem(); 154 } 155 } 156 157 public enum NamingSystemIdentifierType { 158 /** 159 * An ISO object identifier; e.g. 1.2.3.4.5. 160 */ 161 OID, 162 /** 163 * A universally unique identifier of the form a5afddf4-e880-459b-876e-e4591b0acc11. 164 */ 165 UUID, 166 /** 167 * A uniform resource identifier (ideally a URL - uniform resource locator); e.g. http://unitsofmeasure.org. 168 */ 169 URI, 170 /** 171 * Some other type of unique identifier; e.g. HL7-assigned reserved string such as LN for LOINC. 172 */ 173 OTHER, 174 /** 175 * added to help the parsers 176 */ 177 NULL; 178 public static NamingSystemIdentifierType fromCode(String codeString) throws FHIRException { 179 if (codeString == null || "".equals(codeString)) 180 return null; 181 if ("oid".equals(codeString)) 182 return OID; 183 if ("uuid".equals(codeString)) 184 return UUID; 185 if ("uri".equals(codeString)) 186 return URI; 187 if ("other".equals(codeString)) 188 return OTHER; 189 throw new FHIRException("Unknown NamingSystemIdentifierType code '"+codeString+"'"); 190 } 191 public String toCode() { 192 switch (this) { 193 case OID: return "oid"; 194 case UUID: return "uuid"; 195 case URI: return "uri"; 196 case OTHER: return "other"; 197 default: return "?"; 198 } 199 } 200 public String getSystem() { 201 switch (this) { 202 case OID: return "http://hl7.org/fhir/namingsystem-identifier-type"; 203 case UUID: return "http://hl7.org/fhir/namingsystem-identifier-type"; 204 case URI: return "http://hl7.org/fhir/namingsystem-identifier-type"; 205 case OTHER: return "http://hl7.org/fhir/namingsystem-identifier-type"; 206 default: return "?"; 207 } 208 } 209 public String getDefinition() { 210 switch (this) { 211 case OID: return "An ISO object identifier; e.g. 1.2.3.4.5."; 212 case UUID: return "A universally unique identifier of the form a5afddf4-e880-459b-876e-e4591b0acc11."; 213 case URI: return "A uniform resource identifier (ideally a URL - uniform resource locator); e.g. http://unitsofmeasure.org."; 214 case OTHER: return "Some other type of unique identifier; e.g. HL7-assigned reserved string such as LN for LOINC."; 215 default: return "?"; 216 } 217 } 218 public String getDisplay() { 219 switch (this) { 220 case OID: return "OID"; 221 case UUID: return "UUID"; 222 case URI: return "URI"; 223 case OTHER: return "Other"; 224 default: return "?"; 225 } 226 } 227 } 228 229 public static class NamingSystemIdentifierTypeEnumFactory implements EnumFactory<NamingSystemIdentifierType> { 230 public NamingSystemIdentifierType fromCode(String codeString) throws IllegalArgumentException { 231 if (codeString == null || "".equals(codeString)) 232 if (codeString == null || "".equals(codeString)) 233 return null; 234 if ("oid".equals(codeString)) 235 return NamingSystemIdentifierType.OID; 236 if ("uuid".equals(codeString)) 237 return NamingSystemIdentifierType.UUID; 238 if ("uri".equals(codeString)) 239 return NamingSystemIdentifierType.URI; 240 if ("other".equals(codeString)) 241 return NamingSystemIdentifierType.OTHER; 242 throw new IllegalArgumentException("Unknown NamingSystemIdentifierType code '"+codeString+"'"); 243 } 244 public Enumeration<NamingSystemIdentifierType> fromType(Base code) throws FHIRException { 245 if (code == null || code.isEmpty()) 246 return null; 247 String codeString = ((PrimitiveType) code).asStringValue(); 248 if (codeString == null || "".equals(codeString)) 249 return null; 250 if ("oid".equals(codeString)) 251 return new Enumeration<NamingSystemIdentifierType>(this, NamingSystemIdentifierType.OID); 252 if ("uuid".equals(codeString)) 253 return new Enumeration<NamingSystemIdentifierType>(this, NamingSystemIdentifierType.UUID); 254 if ("uri".equals(codeString)) 255 return new Enumeration<NamingSystemIdentifierType>(this, NamingSystemIdentifierType.URI); 256 if ("other".equals(codeString)) 257 return new Enumeration<NamingSystemIdentifierType>(this, NamingSystemIdentifierType.OTHER); 258 throw new FHIRException("Unknown NamingSystemIdentifierType code '"+codeString+"'"); 259 } 260 public String toCode(NamingSystemIdentifierType code) { 261 if (code == NamingSystemIdentifierType.OID) 262 return "oid"; 263 if (code == NamingSystemIdentifierType.UUID) 264 return "uuid"; 265 if (code == NamingSystemIdentifierType.URI) 266 return "uri"; 267 if (code == NamingSystemIdentifierType.OTHER) 268 return "other"; 269 return "?"; 270 } 271 public String toSystem(NamingSystemIdentifierType code) { 272 return code.getSystem(); 273 } 274 } 275 276 @Block() 277 public static class NamingSystemContactComponent extends BackboneElement implements IBaseBackboneElement { 278 /** 279 * The name of an individual to contact regarding the naming system. 280 */ 281 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 282 @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the naming system." ) 283 protected StringType name; 284 285 /** 286 * Contact details for individual (if a name was provided) or the publisher. 287 */ 288 @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 289 @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) 290 protected List<ContactPoint> telecom; 291 292 private static final long serialVersionUID = -1179697803L; 293 294 /** 295 * Constructor 296 */ 297 public NamingSystemContactComponent() { 298 super(); 299 } 300 301 /** 302 * @return {@link #name} (The name of an individual to contact regarding the naming system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 303 */ 304 public StringType getNameElement() { 305 if (this.name == null) 306 if (Configuration.errorOnAutoCreate()) 307 throw new Error("Attempt to auto-create NamingSystemContactComponent.name"); 308 else if (Configuration.doAutoCreate()) 309 this.name = new StringType(); // bb 310 return this.name; 311 } 312 313 public boolean hasNameElement() { 314 return this.name != null && !this.name.isEmpty(); 315 } 316 317 public boolean hasName() { 318 return this.name != null && !this.name.isEmpty(); 319 } 320 321 /** 322 * @param value {@link #name} (The name of an individual to contact regarding the naming system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 323 */ 324 public NamingSystemContactComponent setNameElement(StringType value) { 325 this.name = value; 326 return this; 327 } 328 329 /** 330 * @return The name of an individual to contact regarding the naming system. 331 */ 332 public String getName() { 333 return this.name == null ? null : this.name.getValue(); 334 } 335 336 /** 337 * @param value The name of an individual to contact regarding the naming system. 338 */ 339 public NamingSystemContactComponent setName(String value) { 340 if (Utilities.noString(value)) 341 this.name = null; 342 else { 343 if (this.name == null) 344 this.name = new StringType(); 345 this.name.setValue(value); 346 } 347 return this; 348 } 349 350 /** 351 * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) 352 */ 353 public List<ContactPoint> getTelecom() { 354 if (this.telecom == null) 355 this.telecom = new ArrayList<ContactPoint>(); 356 return this.telecom; 357 } 358 359 public boolean hasTelecom() { 360 if (this.telecom == null) 361 return false; 362 for (ContactPoint item : this.telecom) 363 if (!item.isEmpty()) 364 return true; 365 return false; 366 } 367 368 /** 369 * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) 370 */ 371 // syntactic sugar 372 public ContactPoint addTelecom() { //3 373 ContactPoint t = new ContactPoint(); 374 if (this.telecom == null) 375 this.telecom = new ArrayList<ContactPoint>(); 376 this.telecom.add(t); 377 return t; 378 } 379 380 // syntactic sugar 381 public NamingSystemContactComponent addTelecom(ContactPoint t) { //3 382 if (t == null) 383 return this; 384 if (this.telecom == null) 385 this.telecom = new ArrayList<ContactPoint>(); 386 this.telecom.add(t); 387 return this; 388 } 389 390 protected void listChildren(List<Property> childrenList) { 391 super.listChildren(childrenList); 392 childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the naming system.", 0, java.lang.Integer.MAX_VALUE, name)); 393 childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); 394 } 395 396 @Override 397 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 398 switch (hash) { 399 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 400 case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint 401 default: return super.getProperty(hash, name, checkValid); 402 } 403 404 } 405 406 @Override 407 public void setProperty(int hash, String name, Base value) throws FHIRException { 408 switch (hash) { 409 case 3373707: // name 410 this.name = castToString(value); // StringType 411 break; 412 case -1429363305: // telecom 413 this.getTelecom().add(castToContactPoint(value)); // ContactPoint 414 break; 415 default: super.setProperty(hash, name, value); 416 } 417 418 } 419 420 @Override 421 public void setProperty(String name, Base value) throws FHIRException { 422 if (name.equals("name")) 423 this.name = castToString(value); // StringType 424 else if (name.equals("telecom")) 425 this.getTelecom().add(castToContactPoint(value)); 426 else 427 super.setProperty(name, value); 428 } 429 430 @Override 431 public Base makeProperty(int hash, String name) throws FHIRException { 432 switch (hash) { 433 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 434 case -1429363305: return addTelecom(); // ContactPoint 435 default: return super.makeProperty(hash, name); 436 } 437 438 } 439 440 @Override 441 public Base addChild(String name) throws FHIRException { 442 if (name.equals("name")) { 443 throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.name"); 444 } 445 else if (name.equals("telecom")) { 446 return addTelecom(); 447 } 448 else 449 return super.addChild(name); 450 } 451 452 public NamingSystemContactComponent copy() { 453 NamingSystemContactComponent dst = new NamingSystemContactComponent(); 454 copyValues(dst); 455 dst.name = name == null ? null : name.copy(); 456 if (telecom != null) { 457 dst.telecom = new ArrayList<ContactPoint>(); 458 for (ContactPoint i : telecom) 459 dst.telecom.add(i.copy()); 460 }; 461 return dst; 462 } 463 464 @Override 465 public boolean equalsDeep(Base other) { 466 if (!super.equalsDeep(other)) 467 return false; 468 if (!(other instanceof NamingSystemContactComponent)) 469 return false; 470 NamingSystemContactComponent o = (NamingSystemContactComponent) other; 471 return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); 472 } 473 474 @Override 475 public boolean equalsShallow(Base other) { 476 if (!super.equalsShallow(other)) 477 return false; 478 if (!(other instanceof NamingSystemContactComponent)) 479 return false; 480 NamingSystemContactComponent o = (NamingSystemContactComponent) other; 481 return compareValues(name, o.name, true); 482 } 483 484 public boolean isEmpty() { 485 return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) 486 ; 487 } 488 489 public String fhirType() { 490 return "NamingSystem.contact"; 491 492 } 493 494 } 495 496 @Block() 497 public static class NamingSystemUniqueIdComponent extends BackboneElement implements IBaseBackboneElement { 498 /** 499 * Identifies the unique identifier scheme used for this particular identifier. 500 */ 501 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 502 @Description(shortDefinition="oid | uuid | uri | other", formalDefinition="Identifies the unique identifier scheme used for this particular identifier." ) 503 protected Enumeration<NamingSystemIdentifierType> type; 504 505 /** 506 * The string that should be sent over the wire to identify the code system or identifier system. 507 */ 508 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 509 @Description(shortDefinition="The unique identifier", formalDefinition="The string that should be sent over the wire to identify the code system or identifier system." ) 510 protected StringType value; 511 512 /** 513 * Indicates whether this identifier is the "preferred" identifier of this type. 514 */ 515 @Child(name = "preferred", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) 516 @Description(shortDefinition="Is this the id that should be used for this type", formalDefinition="Indicates whether this identifier is the \"preferred\" identifier of this type." ) 517 protected BooleanType preferred; 518 519 /** 520 * Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic. 521 */ 522 @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=false) 523 @Description(shortDefinition="When is identifier valid?", formalDefinition="Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic." ) 524 protected Period period; 525 526 private static final long serialVersionUID = -193711840L; 527 528 /** 529 * Constructor 530 */ 531 public NamingSystemUniqueIdComponent() { 532 super(); 533 } 534 535 /** 536 * Constructor 537 */ 538 public NamingSystemUniqueIdComponent(Enumeration<NamingSystemIdentifierType> type, StringType value) { 539 super(); 540 this.type = type; 541 this.value = value; 542 } 543 544 /** 545 * @return {@link #type} (Identifies the unique identifier scheme used for this particular identifier.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 546 */ 547 public Enumeration<NamingSystemIdentifierType> getTypeElement() { 548 if (this.type == null) 549 if (Configuration.errorOnAutoCreate()) 550 throw new Error("Attempt to auto-create NamingSystemUniqueIdComponent.type"); 551 else if (Configuration.doAutoCreate()) 552 this.type = new Enumeration<NamingSystemIdentifierType>(new NamingSystemIdentifierTypeEnumFactory()); // bb 553 return this.type; 554 } 555 556 public boolean hasTypeElement() { 557 return this.type != null && !this.type.isEmpty(); 558 } 559 560 public boolean hasType() { 561 return this.type != null && !this.type.isEmpty(); 562 } 563 564 /** 565 * @param value {@link #type} (Identifies the unique identifier scheme used for this particular identifier.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 566 */ 567 public NamingSystemUniqueIdComponent setTypeElement(Enumeration<NamingSystemIdentifierType> value) { 568 this.type = value; 569 return this; 570 } 571 572 /** 573 * @return Identifies the unique identifier scheme used for this particular identifier. 574 */ 575 public NamingSystemIdentifierType getType() { 576 return this.type == null ? null : this.type.getValue(); 577 } 578 579 /** 580 * @param value Identifies the unique identifier scheme used for this particular identifier. 581 */ 582 public NamingSystemUniqueIdComponent setType(NamingSystemIdentifierType value) { 583 if (this.type == null) 584 this.type = new Enumeration<NamingSystemIdentifierType>(new NamingSystemIdentifierTypeEnumFactory()); 585 this.type.setValue(value); 586 return this; 587 } 588 589 /** 590 * @return {@link #value} (The string that should be sent over the wire to identify the code system or identifier system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 591 */ 592 public StringType getValueElement() { 593 if (this.value == null) 594 if (Configuration.errorOnAutoCreate()) 595 throw new Error("Attempt to auto-create NamingSystemUniqueIdComponent.value"); 596 else if (Configuration.doAutoCreate()) 597 this.value = new StringType(); // bb 598 return this.value; 599 } 600 601 public boolean hasValueElement() { 602 return this.value != null && !this.value.isEmpty(); 603 } 604 605 public boolean hasValue() { 606 return this.value != null && !this.value.isEmpty(); 607 } 608 609 /** 610 * @param value {@link #value} (The string that should be sent over the wire to identify the code system or identifier system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 611 */ 612 public NamingSystemUniqueIdComponent setValueElement(StringType value) { 613 this.value = value; 614 return this; 615 } 616 617 /** 618 * @return The string that should be sent over the wire to identify the code system or identifier system. 619 */ 620 public String getValue() { 621 return this.value == null ? null : this.value.getValue(); 622 } 623 624 /** 625 * @param value The string that should be sent over the wire to identify the code system or identifier system. 626 */ 627 public NamingSystemUniqueIdComponent setValue(String value) { 628 if (this.value == null) 629 this.value = new StringType(); 630 this.value.setValue(value); 631 return this; 632 } 633 634 /** 635 * @return {@link #preferred} (Indicates whether this identifier is the "preferred" identifier of this type.). This is the underlying object with id, value and extensions. The accessor "getPreferred" gives direct access to the value 636 */ 637 public BooleanType getPreferredElement() { 638 if (this.preferred == null) 639 if (Configuration.errorOnAutoCreate()) 640 throw new Error("Attempt to auto-create NamingSystemUniqueIdComponent.preferred"); 641 else if (Configuration.doAutoCreate()) 642 this.preferred = new BooleanType(); // bb 643 return this.preferred; 644 } 645 646 public boolean hasPreferredElement() { 647 return this.preferred != null && !this.preferred.isEmpty(); 648 } 649 650 public boolean hasPreferred() { 651 return this.preferred != null && !this.preferred.isEmpty(); 652 } 653 654 /** 655 * @param value {@link #preferred} (Indicates whether this identifier is the "preferred" identifier of this type.). This is the underlying object with id, value and extensions. The accessor "getPreferred" gives direct access to the value 656 */ 657 public NamingSystemUniqueIdComponent setPreferredElement(BooleanType value) { 658 this.preferred = value; 659 return this; 660 } 661 662 /** 663 * @return Indicates whether this identifier is the "preferred" identifier of this type. 664 */ 665 public boolean getPreferred() { 666 return this.preferred == null || this.preferred.isEmpty() ? false : this.preferred.getValue(); 667 } 668 669 /** 670 * @param value Indicates whether this identifier is the "preferred" identifier of this type. 671 */ 672 public NamingSystemUniqueIdComponent setPreferred(boolean value) { 673 if (this.preferred == null) 674 this.preferred = new BooleanType(); 675 this.preferred.setValue(value); 676 return this; 677 } 678 679 /** 680 * @return {@link #period} (Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.) 681 */ 682 public Period getPeriod() { 683 if (this.period == null) 684 if (Configuration.errorOnAutoCreate()) 685 throw new Error("Attempt to auto-create NamingSystemUniqueIdComponent.period"); 686 else if (Configuration.doAutoCreate()) 687 this.period = new Period(); // cc 688 return this.period; 689 } 690 691 public boolean hasPeriod() { 692 return this.period != null && !this.period.isEmpty(); 693 } 694 695 /** 696 * @param value {@link #period} (Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.) 697 */ 698 public NamingSystemUniqueIdComponent setPeriod(Period value) { 699 this.period = value; 700 return this; 701 } 702 703 protected void listChildren(List<Property> childrenList) { 704 super.listChildren(childrenList); 705 childrenList.add(new Property("type", "code", "Identifies the unique identifier scheme used for this particular identifier.", 0, java.lang.Integer.MAX_VALUE, type)); 706 childrenList.add(new Property("value", "string", "The string that should be sent over the wire to identify the code system or identifier system.", 0, java.lang.Integer.MAX_VALUE, value)); 707 childrenList.add(new Property("preferred", "boolean", "Indicates whether this identifier is the \"preferred\" identifier of this type.", 0, java.lang.Integer.MAX_VALUE, preferred)); 708 childrenList.add(new Property("period", "Period", "Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.", 0, java.lang.Integer.MAX_VALUE, period)); 709 } 710 711 @Override 712 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 713 switch (hash) { 714 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<NamingSystemIdentifierType> 715 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 716 case -1294005119: /*preferred*/ return this.preferred == null ? new Base[0] : new Base[] {this.preferred}; // BooleanType 717 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 718 default: return super.getProperty(hash, name, checkValid); 719 } 720 721 } 722 723 @Override 724 public void setProperty(int hash, String name, Base value) throws FHIRException { 725 switch (hash) { 726 case 3575610: // type 727 this.type = new NamingSystemIdentifierTypeEnumFactory().fromType(value); // Enumeration<NamingSystemIdentifierType> 728 break; 729 case 111972721: // value 730 this.value = castToString(value); // StringType 731 break; 732 case -1294005119: // preferred 733 this.preferred = castToBoolean(value); // BooleanType 734 break; 735 case -991726143: // period 736 this.period = castToPeriod(value); // Period 737 break; 738 default: super.setProperty(hash, name, value); 739 } 740 741 } 742 743 @Override 744 public void setProperty(String name, Base value) throws FHIRException { 745 if (name.equals("type")) 746 this.type = new NamingSystemIdentifierTypeEnumFactory().fromType(value); // Enumeration<NamingSystemIdentifierType> 747 else if (name.equals("value")) 748 this.value = castToString(value); // StringType 749 else if (name.equals("preferred")) 750 this.preferred = castToBoolean(value); // BooleanType 751 else if (name.equals("period")) 752 this.period = castToPeriod(value); // Period 753 else 754 super.setProperty(name, value); 755 } 756 757 @Override 758 public Base makeProperty(int hash, String name) throws FHIRException { 759 switch (hash) { 760 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<NamingSystemIdentifierType> 761 case 111972721: throw new FHIRException("Cannot make property value as it is not a complex type"); // StringType 762 case -1294005119: throw new FHIRException("Cannot make property preferred as it is not a complex type"); // BooleanType 763 case -991726143: return getPeriod(); // Period 764 default: return super.makeProperty(hash, name); 765 } 766 767 } 768 769 @Override 770 public Base addChild(String name) throws FHIRException { 771 if (name.equals("type")) { 772 throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.type"); 773 } 774 else if (name.equals("value")) { 775 throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.value"); 776 } 777 else if (name.equals("preferred")) { 778 throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.preferred"); 779 } 780 else if (name.equals("period")) { 781 this.period = new Period(); 782 return this.period; 783 } 784 else 785 return super.addChild(name); 786 } 787 788 public NamingSystemUniqueIdComponent copy() { 789 NamingSystemUniqueIdComponent dst = new NamingSystemUniqueIdComponent(); 790 copyValues(dst); 791 dst.type = type == null ? null : type.copy(); 792 dst.value = value == null ? null : value.copy(); 793 dst.preferred = preferred == null ? null : preferred.copy(); 794 dst.period = period == null ? null : period.copy(); 795 return dst; 796 } 797 798 @Override 799 public boolean equalsDeep(Base other) { 800 if (!super.equalsDeep(other)) 801 return false; 802 if (!(other instanceof NamingSystemUniqueIdComponent)) 803 return false; 804 NamingSystemUniqueIdComponent o = (NamingSystemUniqueIdComponent) other; 805 return compareDeep(type, o.type, true) && compareDeep(value, o.value, true) && compareDeep(preferred, o.preferred, true) 806 && compareDeep(period, o.period, true); 807 } 808 809 @Override 810 public boolean equalsShallow(Base other) { 811 if (!super.equalsShallow(other)) 812 return false; 813 if (!(other instanceof NamingSystemUniqueIdComponent)) 814 return false; 815 NamingSystemUniqueIdComponent o = (NamingSystemUniqueIdComponent) other; 816 return compareValues(type, o.type, true) && compareValues(value, o.value, true) && compareValues(preferred, o.preferred, true) 817 ; 818 } 819 820 public boolean isEmpty() { 821 return super.isEmpty() && (type == null || type.isEmpty()) && (value == null || value.isEmpty()) 822 && (preferred == null || preferred.isEmpty()) && (period == null || period.isEmpty()); 823 } 824 825 public String fhirType() { 826 return "NamingSystem.uniqueId"; 827 828 } 829 830 } 831 832 /** 833 * The descriptive name of this particular identifier type or code system. 834 */ 835 @Child(name = "name", type = {StringType.class}, order=0, min=1, max=1, modifier=false, summary=false) 836 @Description(shortDefinition="Human-readable label", formalDefinition="The descriptive name of this particular identifier type or code system." ) 837 protected StringType name; 838 839 /** 840 * Indicates whether the naming system is "ready for use" or not. 841 */ 842 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=false) 843 @Description(shortDefinition="draft | active | retired", formalDefinition="Indicates whether the naming system is \"ready for use\" or not." ) 844 protected Enumeration<ConformanceResourceStatus> status; 845 846 /** 847 * Indicates the purpose for the naming system - what kinds of things does it make unique? 848 */ 849 @Child(name = "kind", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) 850 @Description(shortDefinition="codesystem | identifier | root", formalDefinition="Indicates the purpose for the naming system - what kinds of things does it make unique?" ) 851 protected Enumeration<NamingSystemType> kind; 852 853 /** 854 * The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes. 855 */ 856 @Child(name = "date", type = {DateTimeType.class}, order=3, min=1, max=1, modifier=false, summary=true) 857 @Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes." ) 858 protected DateTimeType date; 859 860 /** 861 * The name of the individual or organization that published the naming system. 862 */ 863 @Child(name = "publisher", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 864 @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the naming system." ) 865 protected StringType publisher; 866 867 /** 868 * Contacts to assist a user in finding and communicating with the publisher. 869 */ 870 @Child(name = "contact", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 871 @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) 872 protected List<NamingSystemContactComponent> contact; 873 874 /** 875 * The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision. 876 */ 877 @Child(name = "responsible", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 878 @Description(shortDefinition="Who maintains system namespace?", formalDefinition="The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision." ) 879 protected StringType responsible; 880 881 /** 882 * Categorizes a naming system for easier search by grouping related naming systems. 883 */ 884 @Child(name = "type", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) 885 @Description(shortDefinition="e.g. driver, provider, patient, bank etc.", formalDefinition="Categorizes a naming system for easier search by grouping related naming systems." ) 886 protected CodeableConcept type; 887 888 /** 889 * Details about what the namespace identifies including scope, granularity, version labeling, etc. 890 */ 891 @Child(name = "description", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) 892 @Description(shortDefinition="What does naming system identify?", formalDefinition="Details about what the namespace identifies including scope, granularity, version labeling, etc." ) 893 protected StringType description; 894 895 /** 896 * 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 of naming systems. 897 */ 898 @Child(name = "useContext", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 899 @Description(shortDefinition="Content intends to support these contexts", formalDefinition="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 of naming systems." ) 900 protected List<CodeableConcept> useContext; 901 902 /** 903 * Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc. 904 */ 905 @Child(name = "usage", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 906 @Description(shortDefinition="How/where is it used", formalDefinition="Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc." ) 907 protected StringType usage; 908 909 /** 910 * Indicates how the system may be identified when referenced in electronic exchange. 911 */ 912 @Child(name = "uniqueId", type = {}, order=11, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 913 @Description(shortDefinition="Unique identifiers used for system", formalDefinition="Indicates how the system may be identified when referenced in electronic exchange." ) 914 protected List<NamingSystemUniqueIdComponent> uniqueId; 915 916 /** 917 * For naming systems that are retired, indicates the naming system that should be used in their place (if any). 918 */ 919 @Child(name = "replacedBy", type = {NamingSystem.class}, order=12, min=0, max=1, modifier=false, summary=false) 920 @Description(shortDefinition="Use this instead", formalDefinition="For naming systems that are retired, indicates the naming system that should be used in their place (if any)." ) 921 protected Reference replacedBy; 922 923 /** 924 * The actual object that is the target of the reference (For naming systems that are retired, indicates the naming system that should be used in their place (if any).) 925 */ 926 protected NamingSystem replacedByTarget; 927 928 private static final long serialVersionUID = -1633030631L; 929 930 /** 931 * Constructor 932 */ 933 public NamingSystem() { 934 super(); 935 } 936 937 /** 938 * Constructor 939 */ 940 public NamingSystem(StringType name, Enumeration<ConformanceResourceStatus> status, Enumeration<NamingSystemType> kind, DateTimeType date) { 941 super(); 942 this.name = name; 943 this.status = status; 944 this.kind = kind; 945 this.date = date; 946 } 947 948 /** 949 * @return {@link #name} (The descriptive name of this particular identifier type or code system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 950 */ 951 public StringType getNameElement() { 952 if (this.name == null) 953 if (Configuration.errorOnAutoCreate()) 954 throw new Error("Attempt to auto-create NamingSystem.name"); 955 else if (Configuration.doAutoCreate()) 956 this.name = new StringType(); // bb 957 return this.name; 958 } 959 960 public boolean hasNameElement() { 961 return this.name != null && !this.name.isEmpty(); 962 } 963 964 public boolean hasName() { 965 return this.name != null && !this.name.isEmpty(); 966 } 967 968 /** 969 * @param value {@link #name} (The descriptive name of this particular identifier type or code system.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 970 */ 971 public NamingSystem setNameElement(StringType value) { 972 this.name = value; 973 return this; 974 } 975 976 /** 977 * @return The descriptive name of this particular identifier type or code system. 978 */ 979 public String getName() { 980 return this.name == null ? null : this.name.getValue(); 981 } 982 983 /** 984 * @param value The descriptive name of this particular identifier type or code system. 985 */ 986 public NamingSystem setName(String value) { 987 if (this.name == null) 988 this.name = new StringType(); 989 this.name.setValue(value); 990 return this; 991 } 992 993 /** 994 * @return {@link #status} (Indicates whether the naming system is "ready for use" or not.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 995 */ 996 public Enumeration<ConformanceResourceStatus> getStatusElement() { 997 if (this.status == null) 998 if (Configuration.errorOnAutoCreate()) 999 throw new Error("Attempt to auto-create NamingSystem.status"); 1000 else if (Configuration.doAutoCreate()) 1001 this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); // bb 1002 return this.status; 1003 } 1004 1005 public boolean hasStatusElement() { 1006 return this.status != null && !this.status.isEmpty(); 1007 } 1008 1009 public boolean hasStatus() { 1010 return this.status != null && !this.status.isEmpty(); 1011 } 1012 1013 /** 1014 * @param value {@link #status} (Indicates whether the naming system is "ready for use" or not.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1015 */ 1016 public NamingSystem setStatusElement(Enumeration<ConformanceResourceStatus> value) { 1017 this.status = value; 1018 return this; 1019 } 1020 1021 /** 1022 * @return Indicates whether the naming system is "ready for use" or not. 1023 */ 1024 public ConformanceResourceStatus getStatus() { 1025 return this.status == null ? null : this.status.getValue(); 1026 } 1027 1028 /** 1029 * @param value Indicates whether the naming system is "ready for use" or not. 1030 */ 1031 public NamingSystem setStatus(ConformanceResourceStatus value) { 1032 if (this.status == null) 1033 this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); 1034 this.status.setValue(value); 1035 return this; 1036 } 1037 1038 /** 1039 * @return {@link #kind} (Indicates the purpose for the naming system - what kinds of things does it make unique?). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 1040 */ 1041 public Enumeration<NamingSystemType> getKindElement() { 1042 if (this.kind == null) 1043 if (Configuration.errorOnAutoCreate()) 1044 throw new Error("Attempt to auto-create NamingSystem.kind"); 1045 else if (Configuration.doAutoCreate()) 1046 this.kind = new Enumeration<NamingSystemType>(new NamingSystemTypeEnumFactory()); // bb 1047 return this.kind; 1048 } 1049 1050 public boolean hasKindElement() { 1051 return this.kind != null && !this.kind.isEmpty(); 1052 } 1053 1054 public boolean hasKind() { 1055 return this.kind != null && !this.kind.isEmpty(); 1056 } 1057 1058 /** 1059 * @param value {@link #kind} (Indicates the purpose for the naming system - what kinds of things does it make unique?). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 1060 */ 1061 public NamingSystem setKindElement(Enumeration<NamingSystemType> value) { 1062 this.kind = value; 1063 return this; 1064 } 1065 1066 /** 1067 * @return Indicates the purpose for the naming system - what kinds of things does it make unique? 1068 */ 1069 public NamingSystemType getKind() { 1070 return this.kind == null ? null : this.kind.getValue(); 1071 } 1072 1073 /** 1074 * @param value Indicates the purpose for the naming system - what kinds of things does it make unique? 1075 */ 1076 public NamingSystem setKind(NamingSystemType value) { 1077 if (this.kind == null) 1078 this.kind = new Enumeration<NamingSystemType>(new NamingSystemTypeEnumFactory()); 1079 this.kind.setValue(value); 1080 return this; 1081 } 1082 1083 /** 1084 * @return {@link #date} (The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1085 */ 1086 public DateTimeType getDateElement() { 1087 if (this.date == null) 1088 if (Configuration.errorOnAutoCreate()) 1089 throw new Error("Attempt to auto-create NamingSystem.date"); 1090 else if (Configuration.doAutoCreate()) 1091 this.date = new DateTimeType(); // bb 1092 return this.date; 1093 } 1094 1095 public boolean hasDateElement() { 1096 return this.date != null && !this.date.isEmpty(); 1097 } 1098 1099 public boolean hasDate() { 1100 return this.date != null && !this.date.isEmpty(); 1101 } 1102 1103 /** 1104 * @param value {@link #date} (The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1105 */ 1106 public NamingSystem setDateElement(DateTimeType value) { 1107 this.date = value; 1108 return this; 1109 } 1110 1111 /** 1112 * @return The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes. 1113 */ 1114 public Date getDate() { 1115 return this.date == null ? null : this.date.getValue(); 1116 } 1117 1118 /** 1119 * @param value The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes. 1120 */ 1121 public NamingSystem setDate(Date value) { 1122 if (this.date == null) 1123 this.date = new DateTimeType(); 1124 this.date.setValue(value); 1125 return this; 1126 } 1127 1128 /** 1129 * @return {@link #publisher} (The name of the individual or organization that published the naming system.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 1130 */ 1131 public StringType getPublisherElement() { 1132 if (this.publisher == null) 1133 if (Configuration.errorOnAutoCreate()) 1134 throw new Error("Attempt to auto-create NamingSystem.publisher"); 1135 else if (Configuration.doAutoCreate()) 1136 this.publisher = new StringType(); // bb 1137 return this.publisher; 1138 } 1139 1140 public boolean hasPublisherElement() { 1141 return this.publisher != null && !this.publisher.isEmpty(); 1142 } 1143 1144 public boolean hasPublisher() { 1145 return this.publisher != null && !this.publisher.isEmpty(); 1146 } 1147 1148 /** 1149 * @param value {@link #publisher} (The name of the individual or organization that published the naming system.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 1150 */ 1151 public NamingSystem setPublisherElement(StringType value) { 1152 this.publisher = value; 1153 return this; 1154 } 1155 1156 /** 1157 * @return The name of the individual or organization that published the naming system. 1158 */ 1159 public String getPublisher() { 1160 return this.publisher == null ? null : this.publisher.getValue(); 1161 } 1162 1163 /** 1164 * @param value The name of the individual or organization that published the naming system. 1165 */ 1166 public NamingSystem setPublisher(String value) { 1167 if (Utilities.noString(value)) 1168 this.publisher = null; 1169 else { 1170 if (this.publisher == null) 1171 this.publisher = new StringType(); 1172 this.publisher.setValue(value); 1173 } 1174 return this; 1175 } 1176 1177 /** 1178 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 1179 */ 1180 public List<NamingSystemContactComponent> getContact() { 1181 if (this.contact == null) 1182 this.contact = new ArrayList<NamingSystemContactComponent>(); 1183 return this.contact; 1184 } 1185 1186 public boolean hasContact() { 1187 if (this.contact == null) 1188 return false; 1189 for (NamingSystemContactComponent item : this.contact) 1190 if (!item.isEmpty()) 1191 return true; 1192 return false; 1193 } 1194 1195 /** 1196 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 1197 */ 1198 // syntactic sugar 1199 public NamingSystemContactComponent addContact() { //3 1200 NamingSystemContactComponent t = new NamingSystemContactComponent(); 1201 if (this.contact == null) 1202 this.contact = new ArrayList<NamingSystemContactComponent>(); 1203 this.contact.add(t); 1204 return t; 1205 } 1206 1207 // syntactic sugar 1208 public NamingSystem addContact(NamingSystemContactComponent t) { //3 1209 if (t == null) 1210 return this; 1211 if (this.contact == null) 1212 this.contact = new ArrayList<NamingSystemContactComponent>(); 1213 this.contact.add(t); 1214 return this; 1215 } 1216 1217 /** 1218 * @return {@link #responsible} (The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.). This is the underlying object with id, value and extensions. The accessor "getResponsible" gives direct access to the value 1219 */ 1220 public StringType getResponsibleElement() { 1221 if (this.responsible == null) 1222 if (Configuration.errorOnAutoCreate()) 1223 throw new Error("Attempt to auto-create NamingSystem.responsible"); 1224 else if (Configuration.doAutoCreate()) 1225 this.responsible = new StringType(); // bb 1226 return this.responsible; 1227 } 1228 1229 public boolean hasResponsibleElement() { 1230 return this.responsible != null && !this.responsible.isEmpty(); 1231 } 1232 1233 public boolean hasResponsible() { 1234 return this.responsible != null && !this.responsible.isEmpty(); 1235 } 1236 1237 /** 1238 * @param value {@link #responsible} (The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.). This is the underlying object with id, value and extensions. The accessor "getResponsible" gives direct access to the value 1239 */ 1240 public NamingSystem setResponsibleElement(StringType value) { 1241 this.responsible = value; 1242 return this; 1243 } 1244 1245 /** 1246 * @return The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision. 1247 */ 1248 public String getResponsible() { 1249 return this.responsible == null ? null : this.responsible.getValue(); 1250 } 1251 1252 /** 1253 * @param value The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision. 1254 */ 1255 public NamingSystem setResponsible(String value) { 1256 if (Utilities.noString(value)) 1257 this.responsible = null; 1258 else { 1259 if (this.responsible == null) 1260 this.responsible = new StringType(); 1261 this.responsible.setValue(value); 1262 } 1263 return this; 1264 } 1265 1266 /** 1267 * @return {@link #type} (Categorizes a naming system for easier search by grouping related naming systems.) 1268 */ 1269 public CodeableConcept getType() { 1270 if (this.type == null) 1271 if (Configuration.errorOnAutoCreate()) 1272 throw new Error("Attempt to auto-create NamingSystem.type"); 1273 else if (Configuration.doAutoCreate()) 1274 this.type = new CodeableConcept(); // cc 1275 return this.type; 1276 } 1277 1278 public boolean hasType() { 1279 return this.type != null && !this.type.isEmpty(); 1280 } 1281 1282 /** 1283 * @param value {@link #type} (Categorizes a naming system for easier search by grouping related naming systems.) 1284 */ 1285 public NamingSystem setType(CodeableConcept value) { 1286 this.type = value; 1287 return this; 1288 } 1289 1290 /** 1291 * @return {@link #description} (Details about what the namespace identifies including scope, granularity, version labeling, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1292 */ 1293 public StringType getDescriptionElement() { 1294 if (this.description == null) 1295 if (Configuration.errorOnAutoCreate()) 1296 throw new Error("Attempt to auto-create NamingSystem.description"); 1297 else if (Configuration.doAutoCreate()) 1298 this.description = new StringType(); // bb 1299 return this.description; 1300 } 1301 1302 public boolean hasDescriptionElement() { 1303 return this.description != null && !this.description.isEmpty(); 1304 } 1305 1306 public boolean hasDescription() { 1307 return this.description != null && !this.description.isEmpty(); 1308 } 1309 1310 /** 1311 * @param value {@link #description} (Details about what the namespace identifies including scope, granularity, version labeling, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1312 */ 1313 public NamingSystem setDescriptionElement(StringType value) { 1314 this.description = value; 1315 return this; 1316 } 1317 1318 /** 1319 * @return Details about what the namespace identifies including scope, granularity, version labeling, etc. 1320 */ 1321 public String getDescription() { 1322 return this.description == null ? null : this.description.getValue(); 1323 } 1324 1325 /** 1326 * @param value Details about what the namespace identifies including scope, granularity, version labeling, etc. 1327 */ 1328 public NamingSystem setDescription(String value) { 1329 if (Utilities.noString(value)) 1330 this.description = null; 1331 else { 1332 if (this.description == null) 1333 this.description = new StringType(); 1334 this.description.setValue(value); 1335 } 1336 return this; 1337 } 1338 1339 /** 1340 * @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 of naming systems.) 1341 */ 1342 public List<CodeableConcept> getUseContext() { 1343 if (this.useContext == null) 1344 this.useContext = new ArrayList<CodeableConcept>(); 1345 return this.useContext; 1346 } 1347 1348 public boolean hasUseContext() { 1349 if (this.useContext == null) 1350 return false; 1351 for (CodeableConcept item : this.useContext) 1352 if (!item.isEmpty()) 1353 return true; 1354 return false; 1355 } 1356 1357 /** 1358 * @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 of naming systems.) 1359 */ 1360 // syntactic sugar 1361 public CodeableConcept addUseContext() { //3 1362 CodeableConcept t = new CodeableConcept(); 1363 if (this.useContext == null) 1364 this.useContext = new ArrayList<CodeableConcept>(); 1365 this.useContext.add(t); 1366 return t; 1367 } 1368 1369 // syntactic sugar 1370 public NamingSystem addUseContext(CodeableConcept t) { //3 1371 if (t == null) 1372 return this; 1373 if (this.useContext == null) 1374 this.useContext = new ArrayList<CodeableConcept>(); 1375 this.useContext.add(t); 1376 return this; 1377 } 1378 1379 /** 1380 * @return {@link #usage} (Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value 1381 */ 1382 public StringType getUsageElement() { 1383 if (this.usage == null) 1384 if (Configuration.errorOnAutoCreate()) 1385 throw new Error("Attempt to auto-create NamingSystem.usage"); 1386 else if (Configuration.doAutoCreate()) 1387 this.usage = new StringType(); // bb 1388 return this.usage; 1389 } 1390 1391 public boolean hasUsageElement() { 1392 return this.usage != null && !this.usage.isEmpty(); 1393 } 1394 1395 public boolean hasUsage() { 1396 return this.usage != null && !this.usage.isEmpty(); 1397 } 1398 1399 /** 1400 * @param value {@link #usage} (Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value 1401 */ 1402 public NamingSystem setUsageElement(StringType value) { 1403 this.usage = value; 1404 return this; 1405 } 1406 1407 /** 1408 * @return Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc. 1409 */ 1410 public String getUsage() { 1411 return this.usage == null ? null : this.usage.getValue(); 1412 } 1413 1414 /** 1415 * @param value Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc. 1416 */ 1417 public NamingSystem setUsage(String value) { 1418 if (Utilities.noString(value)) 1419 this.usage = null; 1420 else { 1421 if (this.usage == null) 1422 this.usage = new StringType(); 1423 this.usage.setValue(value); 1424 } 1425 return this; 1426 } 1427 1428 /** 1429 * @return {@link #uniqueId} (Indicates how the system may be identified when referenced in electronic exchange.) 1430 */ 1431 public List<NamingSystemUniqueIdComponent> getUniqueId() { 1432 if (this.uniqueId == null) 1433 this.uniqueId = new ArrayList<NamingSystemUniqueIdComponent>(); 1434 return this.uniqueId; 1435 } 1436 1437 public boolean hasUniqueId() { 1438 if (this.uniqueId == null) 1439 return false; 1440 for (NamingSystemUniqueIdComponent item : this.uniqueId) 1441 if (!item.isEmpty()) 1442 return true; 1443 return false; 1444 } 1445 1446 /** 1447 * @return {@link #uniqueId} (Indicates how the system may be identified when referenced in electronic exchange.) 1448 */ 1449 // syntactic sugar 1450 public NamingSystemUniqueIdComponent addUniqueId() { //3 1451 NamingSystemUniqueIdComponent t = new NamingSystemUniqueIdComponent(); 1452 if (this.uniqueId == null) 1453 this.uniqueId = new ArrayList<NamingSystemUniqueIdComponent>(); 1454 this.uniqueId.add(t); 1455 return t; 1456 } 1457 1458 // syntactic sugar 1459 public NamingSystem addUniqueId(NamingSystemUniqueIdComponent t) { //3 1460 if (t == null) 1461 return this; 1462 if (this.uniqueId == null) 1463 this.uniqueId = new ArrayList<NamingSystemUniqueIdComponent>(); 1464 this.uniqueId.add(t); 1465 return this; 1466 } 1467 1468 /** 1469 * @return {@link #replacedBy} (For naming systems that are retired, indicates the naming system that should be used in their place (if any).) 1470 */ 1471 public Reference getReplacedBy() { 1472 if (this.replacedBy == null) 1473 if (Configuration.errorOnAutoCreate()) 1474 throw new Error("Attempt to auto-create NamingSystem.replacedBy"); 1475 else if (Configuration.doAutoCreate()) 1476 this.replacedBy = new Reference(); // cc 1477 return this.replacedBy; 1478 } 1479 1480 public boolean hasReplacedBy() { 1481 return this.replacedBy != null && !this.replacedBy.isEmpty(); 1482 } 1483 1484 /** 1485 * @param value {@link #replacedBy} (For naming systems that are retired, indicates the naming system that should be used in their place (if any).) 1486 */ 1487 public NamingSystem setReplacedBy(Reference value) { 1488 this.replacedBy = value; 1489 return this; 1490 } 1491 1492 /** 1493 * @return {@link #replacedBy} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (For naming systems that are retired, indicates the naming system that should be used in their place (if any).) 1494 */ 1495 public NamingSystem getReplacedByTarget() { 1496 if (this.replacedByTarget == null) 1497 if (Configuration.errorOnAutoCreate()) 1498 throw new Error("Attempt to auto-create NamingSystem.replacedBy"); 1499 else if (Configuration.doAutoCreate()) 1500 this.replacedByTarget = new NamingSystem(); // aa 1501 return this.replacedByTarget; 1502 } 1503 1504 /** 1505 * @param value {@link #replacedBy} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (For naming systems that are retired, indicates the naming system that should be used in their place (if any).) 1506 */ 1507 public NamingSystem setReplacedByTarget(NamingSystem value) { 1508 this.replacedByTarget = value; 1509 return this; 1510 } 1511 1512 protected void listChildren(List<Property> childrenList) { 1513 super.listChildren(childrenList); 1514 childrenList.add(new Property("name", "string", "The descriptive name of this particular identifier type or code system.", 0, java.lang.Integer.MAX_VALUE, name)); 1515 childrenList.add(new Property("status", "code", "Indicates whether the naming system is \"ready for use\" or not.", 0, java.lang.Integer.MAX_VALUE, status)); 1516 childrenList.add(new Property("kind", "code", "Indicates the purpose for the naming system - what kinds of things does it make unique?", 0, java.lang.Integer.MAX_VALUE, kind)); 1517 childrenList.add(new Property("date", "dateTime", "The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.", 0, java.lang.Integer.MAX_VALUE, date)); 1518 childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the naming system.", 0, java.lang.Integer.MAX_VALUE, publisher)); 1519 childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 1520 childrenList.add(new Property("responsible", "string", "The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.", 0, java.lang.Integer.MAX_VALUE, responsible)); 1521 childrenList.add(new Property("type", "CodeableConcept", "Categorizes a naming system for easier search by grouping related naming systems.", 0, java.lang.Integer.MAX_VALUE, type)); 1522 childrenList.add(new Property("description", "string", "Details about what the namespace identifies including scope, granularity, version labeling, etc.", 0, java.lang.Integer.MAX_VALUE, description)); 1523 childrenList.add(new Property("useContext", "CodeableConcept", "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 of naming systems.", 0, java.lang.Integer.MAX_VALUE, useContext)); 1524 childrenList.add(new Property("usage", "string", "Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.", 0, java.lang.Integer.MAX_VALUE, usage)); 1525 childrenList.add(new Property("uniqueId", "", "Indicates how the system may be identified when referenced in electronic exchange.", 0, java.lang.Integer.MAX_VALUE, uniqueId)); 1526 childrenList.add(new Property("replacedBy", "Reference(NamingSystem)", "For naming systems that are retired, indicates the naming system that should be used in their place (if any).", 0, java.lang.Integer.MAX_VALUE, replacedBy)); 1527 } 1528 1529 @Override 1530 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1531 switch (hash) { 1532 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1533 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ConformanceResourceStatus> 1534 case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<NamingSystemType> 1535 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 1536 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 1537 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // NamingSystemContactComponent 1538 case 1847674614: /*responsible*/ return this.responsible == null ? new Base[0] : new Base[] {this.responsible}; // StringType 1539 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1540 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1541 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // CodeableConcept 1542 case 111574433: /*usage*/ return this.usage == null ? new Base[0] : new Base[] {this.usage}; // StringType 1543 case -294460212: /*uniqueId*/ return this.uniqueId == null ? new Base[0] : this.uniqueId.toArray(new Base[this.uniqueId.size()]); // NamingSystemUniqueIdComponent 1544 case -1233035097: /*replacedBy*/ return this.replacedBy == null ? new Base[0] : new Base[] {this.replacedBy}; // Reference 1545 default: return super.getProperty(hash, name, checkValid); 1546 } 1547 1548 } 1549 1550 @Override 1551 public void setProperty(int hash, String name, Base value) throws FHIRException { 1552 switch (hash) { 1553 case 3373707: // name 1554 this.name = castToString(value); // StringType 1555 break; 1556 case -892481550: // status 1557 this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus> 1558 break; 1559 case 3292052: // kind 1560 this.kind = new NamingSystemTypeEnumFactory().fromType(value); // Enumeration<NamingSystemType> 1561 break; 1562 case 3076014: // date 1563 this.date = castToDateTime(value); // DateTimeType 1564 break; 1565 case 1447404028: // publisher 1566 this.publisher = castToString(value); // StringType 1567 break; 1568 case 951526432: // contact 1569 this.getContact().add((NamingSystemContactComponent) value); // NamingSystemContactComponent 1570 break; 1571 case 1847674614: // responsible 1572 this.responsible = castToString(value); // StringType 1573 break; 1574 case 3575610: // type 1575 this.type = castToCodeableConcept(value); // CodeableConcept 1576 break; 1577 case -1724546052: // description 1578 this.description = castToString(value); // StringType 1579 break; 1580 case -669707736: // useContext 1581 this.getUseContext().add(castToCodeableConcept(value)); // CodeableConcept 1582 break; 1583 case 111574433: // usage 1584 this.usage = castToString(value); // StringType 1585 break; 1586 case -294460212: // uniqueId 1587 this.getUniqueId().add((NamingSystemUniqueIdComponent) value); // NamingSystemUniqueIdComponent 1588 break; 1589 case -1233035097: // replacedBy 1590 this.replacedBy = castToReference(value); // Reference 1591 break; 1592 default: super.setProperty(hash, name, value); 1593 } 1594 1595 } 1596 1597 @Override 1598 public void setProperty(String name, Base value) throws FHIRException { 1599 if (name.equals("name")) 1600 this.name = castToString(value); // StringType 1601 else if (name.equals("status")) 1602 this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus> 1603 else if (name.equals("kind")) 1604 this.kind = new NamingSystemTypeEnumFactory().fromType(value); // Enumeration<NamingSystemType> 1605 else if (name.equals("date")) 1606 this.date = castToDateTime(value); // DateTimeType 1607 else if (name.equals("publisher")) 1608 this.publisher = castToString(value); // StringType 1609 else if (name.equals("contact")) 1610 this.getContact().add((NamingSystemContactComponent) value); 1611 else if (name.equals("responsible")) 1612 this.responsible = castToString(value); // StringType 1613 else if (name.equals("type")) 1614 this.type = castToCodeableConcept(value); // CodeableConcept 1615 else if (name.equals("description")) 1616 this.description = castToString(value); // StringType 1617 else if (name.equals("useContext")) 1618 this.getUseContext().add(castToCodeableConcept(value)); 1619 else if (name.equals("usage")) 1620 this.usage = castToString(value); // StringType 1621 else if (name.equals("uniqueId")) 1622 this.getUniqueId().add((NamingSystemUniqueIdComponent) value); 1623 else if (name.equals("replacedBy")) 1624 this.replacedBy = castToReference(value); // Reference 1625 else 1626 super.setProperty(name, value); 1627 } 1628 1629 @Override 1630 public Base makeProperty(int hash, String name) throws FHIRException { 1631 switch (hash) { 1632 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 1633 case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<ConformanceResourceStatus> 1634 case 3292052: throw new FHIRException("Cannot make property kind as it is not a complex type"); // Enumeration<NamingSystemType> 1635 case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType 1636 case 1447404028: throw new FHIRException("Cannot make property publisher as it is not a complex type"); // StringType 1637 case 951526432: return addContact(); // NamingSystemContactComponent 1638 case 1847674614: throw new FHIRException("Cannot make property responsible as it is not a complex type"); // StringType 1639 case 3575610: return getType(); // CodeableConcept 1640 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 1641 case -669707736: return addUseContext(); // CodeableConcept 1642 case 111574433: throw new FHIRException("Cannot make property usage as it is not a complex type"); // StringType 1643 case -294460212: return addUniqueId(); // NamingSystemUniqueIdComponent 1644 case -1233035097: return getReplacedBy(); // Reference 1645 default: return super.makeProperty(hash, name); 1646 } 1647 1648 } 1649 1650 @Override 1651 public Base addChild(String name) throws FHIRException { 1652 if (name.equals("name")) { 1653 throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.name"); 1654 } 1655 else if (name.equals("status")) { 1656 throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.status"); 1657 } 1658 else if (name.equals("kind")) { 1659 throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.kind"); 1660 } 1661 else if (name.equals("date")) { 1662 throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.date"); 1663 } 1664 else if (name.equals("publisher")) { 1665 throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.publisher"); 1666 } 1667 else if (name.equals("contact")) { 1668 return addContact(); 1669 } 1670 else if (name.equals("responsible")) { 1671 throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.responsible"); 1672 } 1673 else if (name.equals("type")) { 1674 this.type = new CodeableConcept(); 1675 return this.type; 1676 } 1677 else if (name.equals("description")) { 1678 throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.description"); 1679 } 1680 else if (name.equals("useContext")) { 1681 return addUseContext(); 1682 } 1683 else if (name.equals("usage")) { 1684 throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.usage"); 1685 } 1686 else if (name.equals("uniqueId")) { 1687 return addUniqueId(); 1688 } 1689 else if (name.equals("replacedBy")) { 1690 this.replacedBy = new Reference(); 1691 return this.replacedBy; 1692 } 1693 else 1694 return super.addChild(name); 1695 } 1696 1697 public String fhirType() { 1698 return "NamingSystem"; 1699 1700 } 1701 1702 public NamingSystem copy() { 1703 NamingSystem dst = new NamingSystem(); 1704 copyValues(dst); 1705 dst.name = name == null ? null : name.copy(); 1706 dst.status = status == null ? null : status.copy(); 1707 dst.kind = kind == null ? null : kind.copy(); 1708 dst.date = date == null ? null : date.copy(); 1709 dst.publisher = publisher == null ? null : publisher.copy(); 1710 if (contact != null) { 1711 dst.contact = new ArrayList<NamingSystemContactComponent>(); 1712 for (NamingSystemContactComponent i : contact) 1713 dst.contact.add(i.copy()); 1714 }; 1715 dst.responsible = responsible == null ? null : responsible.copy(); 1716 dst.type = type == null ? null : type.copy(); 1717 dst.description = description == null ? null : description.copy(); 1718 if (useContext != null) { 1719 dst.useContext = new ArrayList<CodeableConcept>(); 1720 for (CodeableConcept i : useContext) 1721 dst.useContext.add(i.copy()); 1722 }; 1723 dst.usage = usage == null ? null : usage.copy(); 1724 if (uniqueId != null) { 1725 dst.uniqueId = new ArrayList<NamingSystemUniqueIdComponent>(); 1726 for (NamingSystemUniqueIdComponent i : uniqueId) 1727 dst.uniqueId.add(i.copy()); 1728 }; 1729 dst.replacedBy = replacedBy == null ? null : replacedBy.copy(); 1730 return dst; 1731 } 1732 1733 protected NamingSystem typedCopy() { 1734 return copy(); 1735 } 1736 1737 @Override 1738 public boolean equalsDeep(Base other) { 1739 if (!super.equalsDeep(other)) 1740 return false; 1741 if (!(other instanceof NamingSystem)) 1742 return false; 1743 NamingSystem o = (NamingSystem) other; 1744 return compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(kind, o.kind, true) 1745 && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) 1746 && compareDeep(responsible, o.responsible, true) && compareDeep(type, o.type, true) && compareDeep(description, o.description, true) 1747 && compareDeep(useContext, o.useContext, true) && compareDeep(usage, o.usage, true) && compareDeep(uniqueId, o.uniqueId, true) 1748 && compareDeep(replacedBy, o.replacedBy, true); 1749 } 1750 1751 @Override 1752 public boolean equalsShallow(Base other) { 1753 if (!super.equalsShallow(other)) 1754 return false; 1755 if (!(other instanceof NamingSystem)) 1756 return false; 1757 NamingSystem o = (NamingSystem) other; 1758 return compareValues(name, o.name, true) && compareValues(status, o.status, true) && compareValues(kind, o.kind, true) 1759 && compareValues(date, o.date, true) && compareValues(publisher, o.publisher, true) && compareValues(responsible, o.responsible, true) 1760 && compareValues(description, o.description, true) && compareValues(usage, o.usage, true); 1761 } 1762 1763 public boolean isEmpty() { 1764 return super.isEmpty() && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) 1765 && (kind == null || kind.isEmpty()) && (date == null || date.isEmpty()) && (publisher == null || publisher.isEmpty()) 1766 && (contact == null || contact.isEmpty()) && (responsible == null || responsible.isEmpty()) 1767 && (type == null || type.isEmpty()) && (description == null || description.isEmpty()) && (useContext == null || useContext.isEmpty()) 1768 && (usage == null || usage.isEmpty()) && (uniqueId == null || uniqueId.isEmpty()) && (replacedBy == null || replacedBy.isEmpty()) 1769 ; 1770 } 1771 1772 @Override 1773 public ResourceType getResourceType() { 1774 return ResourceType.NamingSystem; 1775 } 1776 1777 /** 1778 * Search parameter: <b>responsible</b> 1779 * <p> 1780 * Description: <b>Who maintains system namespace?</b><br> 1781 * Type: <b>string</b><br> 1782 * Path: <b>NamingSystem.responsible</b><br> 1783 * </p> 1784 */ 1785 @SearchParamDefinition(name="responsible", path="NamingSystem.responsible", description="Who maintains system namespace?", type="string" ) 1786 public static final String SP_RESPONSIBLE = "responsible"; 1787 /** 1788 * <b>Fluent Client</b> search parameter constant for <b>responsible</b> 1789 * <p> 1790 * Description: <b>Who maintains system namespace?</b><br> 1791 * Type: <b>string</b><br> 1792 * Path: <b>NamingSystem.responsible</b><br> 1793 * </p> 1794 */ 1795 public static final ca.uhn.fhir.rest.gclient.StringClientParam RESPONSIBLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_RESPONSIBLE); 1796 1797 /** 1798 * Search parameter: <b>status</b> 1799 * <p> 1800 * Description: <b>draft | active | retired</b><br> 1801 * Type: <b>token</b><br> 1802 * Path: <b>NamingSystem.status</b><br> 1803 * </p> 1804 */ 1805 @SearchParamDefinition(name="status", path="NamingSystem.status", description="draft | active | retired", type="token" ) 1806 public static final String SP_STATUS = "status"; 1807 /** 1808 * <b>Fluent Client</b> search parameter constant for <b>status</b> 1809 * <p> 1810 * Description: <b>draft | active | retired</b><br> 1811 * Type: <b>token</b><br> 1812 * Path: <b>NamingSystem.status</b><br> 1813 * </p> 1814 */ 1815 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 1816 1817 /** 1818 * Search parameter: <b>type</b> 1819 * <p> 1820 * Description: <b>e.g. driver, provider, patient, bank etc.</b><br> 1821 * Type: <b>token</b><br> 1822 * Path: <b>NamingSystem.type</b><br> 1823 * </p> 1824 */ 1825 @SearchParamDefinition(name="type", path="NamingSystem.type", description="e.g. driver, provider, patient, bank etc.", type="token" ) 1826 public static final String SP_TYPE = "type"; 1827 /** 1828 * <b>Fluent Client</b> search parameter constant for <b>type</b> 1829 * <p> 1830 * Description: <b>e.g. driver, provider, patient, bank etc.</b><br> 1831 * Type: <b>token</b><br> 1832 * Path: <b>NamingSystem.type</b><br> 1833 * </p> 1834 */ 1835 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 1836 1837 /** 1838 * Search parameter: <b>date</b> 1839 * <p> 1840 * Description: <b>Publication Date(/time)</b><br> 1841 * Type: <b>date</b><br> 1842 * Path: <b>NamingSystem.date</b><br> 1843 * </p> 1844 */ 1845 @SearchParamDefinition(name="date", path="NamingSystem.date", description="Publication Date(/time)", type="date" ) 1846 public static final String SP_DATE = "date"; 1847 /** 1848 * <b>Fluent Client</b> search parameter constant for <b>date</b> 1849 * <p> 1850 * Description: <b>Publication Date(/time)</b><br> 1851 * Type: <b>date</b><br> 1852 * Path: <b>NamingSystem.date</b><br> 1853 * </p> 1854 */ 1855 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 1856 1857 /** 1858 * Search parameter: <b>period</b> 1859 * <p> 1860 * Description: <b>When is identifier valid?</b><br> 1861 * Type: <b>date</b><br> 1862 * Path: <b>NamingSystem.uniqueId.period</b><br> 1863 * </p> 1864 */ 1865 @SearchParamDefinition(name="period", path="NamingSystem.uniqueId.period", description="When is identifier valid?", type="date" ) 1866 public static final String SP_PERIOD = "period"; 1867 /** 1868 * <b>Fluent Client</b> search parameter constant for <b>period</b> 1869 * <p> 1870 * Description: <b>When is identifier valid?</b><br> 1871 * Type: <b>date</b><br> 1872 * Path: <b>NamingSystem.uniqueId.period</b><br> 1873 * </p> 1874 */ 1875 public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD); 1876 1877 /** 1878 * Search parameter: <b>contact</b> 1879 * <p> 1880 * Description: <b>Name of an individual to contact</b><br> 1881 * Type: <b>string</b><br> 1882 * Path: <b>NamingSystem.contact.name</b><br> 1883 * </p> 1884 */ 1885 @SearchParamDefinition(name="contact", path="NamingSystem.contact.name", description="Name of an individual to contact", type="string" ) 1886 public static final String SP_CONTACT = "contact"; 1887 /** 1888 * <b>Fluent Client</b> search parameter constant for <b>contact</b> 1889 * <p> 1890 * Description: <b>Name of an individual to contact</b><br> 1891 * Type: <b>string</b><br> 1892 * Path: <b>NamingSystem.contact.name</b><br> 1893 * </p> 1894 */ 1895 public static final ca.uhn.fhir.rest.gclient.StringClientParam CONTACT = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_CONTACT); 1896 1897 /** 1898 * Search parameter: <b>kind</b> 1899 * <p> 1900 * Description: <b>codesystem | identifier | root</b><br> 1901 * Type: <b>token</b><br> 1902 * Path: <b>NamingSystem.kind</b><br> 1903 * </p> 1904 */ 1905 @SearchParamDefinition(name="kind", path="NamingSystem.kind", description="codesystem | identifier | root", type="token" ) 1906 public static final String SP_KIND = "kind"; 1907 /** 1908 * <b>Fluent Client</b> search parameter constant for <b>kind</b> 1909 * <p> 1910 * Description: <b>codesystem | identifier | root</b><br> 1911 * Type: <b>token</b><br> 1912 * Path: <b>NamingSystem.kind</b><br> 1913 * </p> 1914 */ 1915 public static final ca.uhn.fhir.rest.gclient.TokenClientParam KIND = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_KIND); 1916 1917 /** 1918 * Search parameter: <b>publisher</b> 1919 * <p> 1920 * Description: <b>Name of the publisher (Organization or individual)</b><br> 1921 * Type: <b>string</b><br> 1922 * Path: <b>NamingSystem.publisher</b><br> 1923 * </p> 1924 */ 1925 @SearchParamDefinition(name="publisher", path="NamingSystem.publisher", description="Name of the publisher (Organization or individual)", type="string" ) 1926 public static final String SP_PUBLISHER = "publisher"; 1927 /** 1928 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 1929 * <p> 1930 * Description: <b>Name of the publisher (Organization or individual)</b><br> 1931 * Type: <b>string</b><br> 1932 * Path: <b>NamingSystem.publisher</b><br> 1933 * </p> 1934 */ 1935 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 1936 1937 /** 1938 * Search parameter: <b>id-type</b> 1939 * <p> 1940 * Description: <b>oid | uuid | uri | other</b><br> 1941 * Type: <b>token</b><br> 1942 * Path: <b>NamingSystem.uniqueId.type</b><br> 1943 * </p> 1944 */ 1945 @SearchParamDefinition(name="id-type", path="NamingSystem.uniqueId.type", description="oid | uuid | uri | other", type="token" ) 1946 public static final String SP_ID_TYPE = "id-type"; 1947 /** 1948 * <b>Fluent Client</b> search parameter constant for <b>id-type</b> 1949 * <p> 1950 * Description: <b>oid | uuid | uri | other</b><br> 1951 * Type: <b>token</b><br> 1952 * Path: <b>NamingSystem.uniqueId.type</b><br> 1953 * </p> 1954 */ 1955 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ID_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ID_TYPE); 1956 1957 /** 1958 * Search parameter: <b>name</b> 1959 * <p> 1960 * Description: <b>Human-readable label</b><br> 1961 * Type: <b>string</b><br> 1962 * Path: <b>NamingSystem.name</b><br> 1963 * </p> 1964 */ 1965 @SearchParamDefinition(name="name", path="NamingSystem.name", description="Human-readable label", type="string" ) 1966 public static final String SP_NAME = "name"; 1967 /** 1968 * <b>Fluent Client</b> search parameter constant for <b>name</b> 1969 * <p> 1970 * Description: <b>Human-readable label</b><br> 1971 * Type: <b>string</b><br> 1972 * Path: <b>NamingSystem.name</b><br> 1973 * </p> 1974 */ 1975 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 1976 1977 /** 1978 * Search parameter: <b>context</b> 1979 * <p> 1980 * Description: <b>Content intends to support these contexts</b><br> 1981 * Type: <b>token</b><br> 1982 * Path: <b>NamingSystem.useContext</b><br> 1983 * </p> 1984 */ 1985 @SearchParamDefinition(name="context", path="NamingSystem.useContext", description="Content intends to support these contexts", type="token" ) 1986 public static final String SP_CONTEXT = "context"; 1987 /** 1988 * <b>Fluent Client</b> search parameter constant for <b>context</b> 1989 * <p> 1990 * Description: <b>Content intends to support these contexts</b><br> 1991 * Type: <b>token</b><br> 1992 * Path: <b>NamingSystem.useContext</b><br> 1993 * </p> 1994 */ 1995 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); 1996 1997 /** 1998 * Search parameter: <b>value</b> 1999 * <p> 2000 * Description: <b>The unique identifier</b><br> 2001 * Type: <b>string</b><br> 2002 * Path: <b>NamingSystem.uniqueId.value</b><br> 2003 * </p> 2004 */ 2005 @SearchParamDefinition(name="value", path="NamingSystem.uniqueId.value", description="The unique identifier", type="string" ) 2006 public static final String SP_VALUE = "value"; 2007 /** 2008 * <b>Fluent Client</b> search parameter constant for <b>value</b> 2009 * <p> 2010 * Description: <b>The unique identifier</b><br> 2011 * Type: <b>string</b><br> 2012 * Path: <b>NamingSystem.uniqueId.value</b><br> 2013 * </p> 2014 */ 2015 public static final ca.uhn.fhir.rest.gclient.StringClientParam VALUE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_VALUE); 2016 2017 /** 2018 * Search parameter: <b>telecom</b> 2019 * <p> 2020 * Description: <b>Contact details for individual or publisher</b><br> 2021 * Type: <b>token</b><br> 2022 * Path: <b>NamingSystem.contact.telecom</b><br> 2023 * </p> 2024 */ 2025 @SearchParamDefinition(name="telecom", path="NamingSystem.contact.telecom", description="Contact details for individual or publisher", type="token" ) 2026 public static final String SP_TELECOM = "telecom"; 2027 /** 2028 * <b>Fluent Client</b> search parameter constant for <b>telecom</b> 2029 * <p> 2030 * Description: <b>Contact details for individual or publisher</b><br> 2031 * Type: <b>token</b><br> 2032 * Path: <b>NamingSystem.contact.telecom</b><br> 2033 * </p> 2034 */ 2035 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TELECOM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TELECOM); 2036 2037 /** 2038 * Search parameter: <b>replaced-by</b> 2039 * <p> 2040 * Description: <b>Use this instead</b><br> 2041 * Type: <b>reference</b><br> 2042 * Path: <b>NamingSystem.replacedBy</b><br> 2043 * </p> 2044 */ 2045 @SearchParamDefinition(name="replaced-by", path="NamingSystem.replacedBy", description="Use this instead", type="reference" ) 2046 public static final String SP_REPLACED_BY = "replaced-by"; 2047 /** 2048 * <b>Fluent Client</b> search parameter constant for <b>replaced-by</b> 2049 * <p> 2050 * Description: <b>Use this instead</b><br> 2051 * Type: <b>reference</b><br> 2052 * Path: <b>NamingSystem.replacedBy</b><br> 2053 * </p> 2054 */ 2055 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REPLACED_BY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REPLACED_BY); 2056 2057/** 2058 * Constant for fluent queries to be used to add include statements. Specifies 2059 * the path value of "<b>NamingSystem:replaced-by</b>". 2060 */ 2061 public static final ca.uhn.fhir.model.api.Include INCLUDE_REPLACED_BY = new ca.uhn.fhir.model.api.Include("NamingSystem:replaced-by").toLocked(); 2062 2063 2064} 2065