
001package org.hl7.fhir.r5.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r5.model.Enumerations.*; 039import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.ICompositeType; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.ChildOrder; 047import ca.uhn.fhir.model.api.annotation.Description; 048import ca.uhn.fhir.model.api.annotation.Block; 049 050/** 051 * This is a specialized resource that defines the characteristics and capabilities of a device. 052 */ 053@ResourceDef(name="DeviceDefinition", profile="http://hl7.org/fhir/StructureDefinition/DeviceDefinition") 054public class DeviceDefinition extends DomainResource { 055 056 public enum DeviceCorrectiveActionScope { 057 /** 058 * The corrective action was intended for all units of the same model. 059 */ 060 MODEL, 061 /** 062 * The corrective action was intended for a specific batch of units identified by a lot number. 063 */ 064 LOTNUMBERS, 065 /** 066 * The corrective action was intended for an individual unit (or a set of units) individually identified by serial number. 067 */ 068 SERIALNUMBERS, 069 /** 070 * added to help the parsers with the generic types 071 */ 072 NULL; 073 public static DeviceCorrectiveActionScope fromCode(String codeString) throws FHIRException { 074 if (codeString == null || "".equals(codeString)) 075 return null; 076 if ("model".equals(codeString)) 077 return MODEL; 078 if ("lot-numbers".equals(codeString)) 079 return LOTNUMBERS; 080 if ("serial-numbers".equals(codeString)) 081 return SERIALNUMBERS; 082 if (Configuration.isAcceptInvalidEnums()) 083 return null; 084 else 085 throw new FHIRException("Unknown DeviceCorrectiveActionScope code '"+codeString+"'"); 086 } 087 public String toCode() { 088 switch (this) { 089 case MODEL: return "model"; 090 case LOTNUMBERS: return "lot-numbers"; 091 case SERIALNUMBERS: return "serial-numbers"; 092 case NULL: return null; 093 default: return "?"; 094 } 095 } 096 public String getSystem() { 097 switch (this) { 098 case MODEL: return "http://hl7.org/fhir/device-correctiveactionscope"; 099 case LOTNUMBERS: return "http://hl7.org/fhir/device-correctiveactionscope"; 100 case SERIALNUMBERS: return "http://hl7.org/fhir/device-correctiveactionscope"; 101 case NULL: return null; 102 default: return "?"; 103 } 104 } 105 public String getDefinition() { 106 switch (this) { 107 case MODEL: return "The corrective action was intended for all units of the same model."; 108 case LOTNUMBERS: return "The corrective action was intended for a specific batch of units identified by a lot number."; 109 case SERIALNUMBERS: return "The corrective action was intended for an individual unit (or a set of units) individually identified by serial number."; 110 case NULL: return null; 111 default: return "?"; 112 } 113 } 114 public String getDisplay() { 115 switch (this) { 116 case MODEL: return "Model"; 117 case LOTNUMBERS: return "Lot Numbers"; 118 case SERIALNUMBERS: return "Serial Numbers"; 119 case NULL: return null; 120 default: return "?"; 121 } 122 } 123 } 124 125 public static class DeviceCorrectiveActionScopeEnumFactory implements EnumFactory<DeviceCorrectiveActionScope> { 126 public DeviceCorrectiveActionScope fromCode(String codeString) throws IllegalArgumentException { 127 if (codeString == null || "".equals(codeString)) 128 if (codeString == null || "".equals(codeString)) 129 return null; 130 if ("model".equals(codeString)) 131 return DeviceCorrectiveActionScope.MODEL; 132 if ("lot-numbers".equals(codeString)) 133 return DeviceCorrectiveActionScope.LOTNUMBERS; 134 if ("serial-numbers".equals(codeString)) 135 return DeviceCorrectiveActionScope.SERIALNUMBERS; 136 throw new IllegalArgumentException("Unknown DeviceCorrectiveActionScope code '"+codeString+"'"); 137 } 138 public Enumeration<DeviceCorrectiveActionScope> fromType(PrimitiveType<?> code) throws FHIRException { 139 if (code == null) 140 return null; 141 if (code.isEmpty()) 142 return new Enumeration<DeviceCorrectiveActionScope>(this, DeviceCorrectiveActionScope.NULL, code); 143 String codeString = ((PrimitiveType) code).asStringValue(); 144 if (codeString == null || "".equals(codeString)) 145 return new Enumeration<DeviceCorrectiveActionScope>(this, DeviceCorrectiveActionScope.NULL, code); 146 if ("model".equals(codeString)) 147 return new Enumeration<DeviceCorrectiveActionScope>(this, DeviceCorrectiveActionScope.MODEL, code); 148 if ("lot-numbers".equals(codeString)) 149 return new Enumeration<DeviceCorrectiveActionScope>(this, DeviceCorrectiveActionScope.LOTNUMBERS, code); 150 if ("serial-numbers".equals(codeString)) 151 return new Enumeration<DeviceCorrectiveActionScope>(this, DeviceCorrectiveActionScope.SERIALNUMBERS, code); 152 throw new FHIRException("Unknown DeviceCorrectiveActionScope code '"+codeString+"'"); 153 } 154 public String toCode(DeviceCorrectiveActionScope code) { 155 if (code == DeviceCorrectiveActionScope.MODEL) 156 return "model"; 157 if (code == DeviceCorrectiveActionScope.LOTNUMBERS) 158 return "lot-numbers"; 159 if (code == DeviceCorrectiveActionScope.SERIALNUMBERS) 160 return "serial-numbers"; 161 return "?"; 162 } 163 public String toSystem(DeviceCorrectiveActionScope code) { 164 return code.getSystem(); 165 } 166 } 167 168 public enum DeviceDefinitionRegulatoryIdentifierType { 169 /** 170 * EUDAMED's basic UDI-DI identifier. 171 */ 172 BASIC, 173 /** 174 * EUDAMED's master UDI-DI identifier. 175 */ 176 MASTER, 177 /** 178 * The identifier is a license number. 179 */ 180 LICENSE, 181 /** 182 * added to help the parsers with the generic types 183 */ 184 NULL; 185 public static DeviceDefinitionRegulatoryIdentifierType fromCode(String codeString) throws FHIRException { 186 if (codeString == null || "".equals(codeString)) 187 return null; 188 if ("basic".equals(codeString)) 189 return BASIC; 190 if ("master".equals(codeString)) 191 return MASTER; 192 if ("license".equals(codeString)) 193 return LICENSE; 194 if (Configuration.isAcceptInvalidEnums()) 195 return null; 196 else 197 throw new FHIRException("Unknown DeviceDefinitionRegulatoryIdentifierType code '"+codeString+"'"); 198 } 199 public String toCode() { 200 switch (this) { 201 case BASIC: return "basic"; 202 case MASTER: return "master"; 203 case LICENSE: return "license"; 204 case NULL: return null; 205 default: return "?"; 206 } 207 } 208 public String getSystem() { 209 switch (this) { 210 case BASIC: return "http://hl7.org/fhir/devicedefinition-regulatory-identifier-type"; 211 case MASTER: return "http://hl7.org/fhir/devicedefinition-regulatory-identifier-type"; 212 case LICENSE: return "http://hl7.org/fhir/devicedefinition-regulatory-identifier-type"; 213 case NULL: return null; 214 default: return "?"; 215 } 216 } 217 public String getDefinition() { 218 switch (this) { 219 case BASIC: return "EUDAMED's basic UDI-DI identifier."; 220 case MASTER: return "EUDAMED's master UDI-DI identifier."; 221 case LICENSE: return "The identifier is a license number."; 222 case NULL: return null; 223 default: return "?"; 224 } 225 } 226 public String getDisplay() { 227 switch (this) { 228 case BASIC: return "Basic"; 229 case MASTER: return "Master"; 230 case LICENSE: return "License"; 231 case NULL: return null; 232 default: return "?"; 233 } 234 } 235 } 236 237 public static class DeviceDefinitionRegulatoryIdentifierTypeEnumFactory implements EnumFactory<DeviceDefinitionRegulatoryIdentifierType> { 238 public DeviceDefinitionRegulatoryIdentifierType fromCode(String codeString) throws IllegalArgumentException { 239 if (codeString == null || "".equals(codeString)) 240 if (codeString == null || "".equals(codeString)) 241 return null; 242 if ("basic".equals(codeString)) 243 return DeviceDefinitionRegulatoryIdentifierType.BASIC; 244 if ("master".equals(codeString)) 245 return DeviceDefinitionRegulatoryIdentifierType.MASTER; 246 if ("license".equals(codeString)) 247 return DeviceDefinitionRegulatoryIdentifierType.LICENSE; 248 throw new IllegalArgumentException("Unknown DeviceDefinitionRegulatoryIdentifierType code '"+codeString+"'"); 249 } 250 public Enumeration<DeviceDefinitionRegulatoryIdentifierType> fromType(PrimitiveType<?> code) throws FHIRException { 251 if (code == null) 252 return null; 253 if (code.isEmpty()) 254 return new Enumeration<DeviceDefinitionRegulatoryIdentifierType>(this, DeviceDefinitionRegulatoryIdentifierType.NULL, code); 255 String codeString = ((PrimitiveType) code).asStringValue(); 256 if (codeString == null || "".equals(codeString)) 257 return new Enumeration<DeviceDefinitionRegulatoryIdentifierType>(this, DeviceDefinitionRegulatoryIdentifierType.NULL, code); 258 if ("basic".equals(codeString)) 259 return new Enumeration<DeviceDefinitionRegulatoryIdentifierType>(this, DeviceDefinitionRegulatoryIdentifierType.BASIC, code); 260 if ("master".equals(codeString)) 261 return new Enumeration<DeviceDefinitionRegulatoryIdentifierType>(this, DeviceDefinitionRegulatoryIdentifierType.MASTER, code); 262 if ("license".equals(codeString)) 263 return new Enumeration<DeviceDefinitionRegulatoryIdentifierType>(this, DeviceDefinitionRegulatoryIdentifierType.LICENSE, code); 264 throw new FHIRException("Unknown DeviceDefinitionRegulatoryIdentifierType code '"+codeString+"'"); 265 } 266 public String toCode(DeviceDefinitionRegulatoryIdentifierType code) { 267 if (code == DeviceDefinitionRegulatoryIdentifierType.BASIC) 268 return "basic"; 269 if (code == DeviceDefinitionRegulatoryIdentifierType.MASTER) 270 return "master"; 271 if (code == DeviceDefinitionRegulatoryIdentifierType.LICENSE) 272 return "license"; 273 return "?"; 274 } 275 public String toSystem(DeviceDefinitionRegulatoryIdentifierType code) { 276 return code.getSystem(); 277 } 278 } 279 280 public enum DeviceProductionIdentifierInUDI { 281 /** 282 * The label includes the lot number. 283 */ 284 LOTNUMBER, 285 /** 286 * The label includes the manufacture date. 287 */ 288 MANUFACTUREDDATE, 289 /** 290 * The label includes the serial number. 291 */ 292 SERIALNUMBER, 293 /** 294 * The label includes the expiration date. 295 */ 296 EXPIRATIONDATE, 297 /** 298 * The label includes the biological source identifier. 299 */ 300 BIOLOGICALSOURCE, 301 /** 302 * The label includes the software version. 303 */ 304 SOFTWAREVERSION, 305 /** 306 * added to help the parsers with the generic types 307 */ 308 NULL; 309 public static DeviceProductionIdentifierInUDI fromCode(String codeString) throws FHIRException { 310 if (codeString == null || "".equals(codeString)) 311 return null; 312 if ("lot-number".equals(codeString)) 313 return LOTNUMBER; 314 if ("manufactured-date".equals(codeString)) 315 return MANUFACTUREDDATE; 316 if ("serial-number".equals(codeString)) 317 return SERIALNUMBER; 318 if ("expiration-date".equals(codeString)) 319 return EXPIRATIONDATE; 320 if ("biological-source".equals(codeString)) 321 return BIOLOGICALSOURCE; 322 if ("software-version".equals(codeString)) 323 return SOFTWAREVERSION; 324 if (Configuration.isAcceptInvalidEnums()) 325 return null; 326 else 327 throw new FHIRException("Unknown DeviceProductionIdentifierInUDI code '"+codeString+"'"); 328 } 329 public String toCode() { 330 switch (this) { 331 case LOTNUMBER: return "lot-number"; 332 case MANUFACTUREDDATE: return "manufactured-date"; 333 case SERIALNUMBER: return "serial-number"; 334 case EXPIRATIONDATE: return "expiration-date"; 335 case BIOLOGICALSOURCE: return "biological-source"; 336 case SOFTWAREVERSION: return "software-version"; 337 case NULL: return null; 338 default: return "?"; 339 } 340 } 341 public String getSystem() { 342 switch (this) { 343 case LOTNUMBER: return "http://hl7.org/fhir/device-productidentifierinudi"; 344 case MANUFACTUREDDATE: return "http://hl7.org/fhir/device-productidentifierinudi"; 345 case SERIALNUMBER: return "http://hl7.org/fhir/device-productidentifierinudi"; 346 case EXPIRATIONDATE: return "http://hl7.org/fhir/device-productidentifierinudi"; 347 case BIOLOGICALSOURCE: return "http://hl7.org/fhir/device-productidentifierinudi"; 348 case SOFTWAREVERSION: return "http://hl7.org/fhir/device-productidentifierinudi"; 349 case NULL: return null; 350 default: return "?"; 351 } 352 } 353 public String getDefinition() { 354 switch (this) { 355 case LOTNUMBER: return "The label includes the lot number."; 356 case MANUFACTUREDDATE: return "The label includes the manufacture date."; 357 case SERIALNUMBER: return "The label includes the serial number."; 358 case EXPIRATIONDATE: return "The label includes the expiration date."; 359 case BIOLOGICALSOURCE: return "The label includes the biological source identifier."; 360 case SOFTWAREVERSION: return "The label includes the software version."; 361 case NULL: return null; 362 default: return "?"; 363 } 364 } 365 public String getDisplay() { 366 switch (this) { 367 case LOTNUMBER: return "Lot Number"; 368 case MANUFACTUREDDATE: return "Manufactured date"; 369 case SERIALNUMBER: return "Serial Number"; 370 case EXPIRATIONDATE: return "Expiration date"; 371 case BIOLOGICALSOURCE: return "Biological source"; 372 case SOFTWAREVERSION: return "Software Version"; 373 case NULL: return null; 374 default: return "?"; 375 } 376 } 377 } 378 379 public static class DeviceProductionIdentifierInUDIEnumFactory implements EnumFactory<DeviceProductionIdentifierInUDI> { 380 public DeviceProductionIdentifierInUDI fromCode(String codeString) throws IllegalArgumentException { 381 if (codeString == null || "".equals(codeString)) 382 if (codeString == null || "".equals(codeString)) 383 return null; 384 if ("lot-number".equals(codeString)) 385 return DeviceProductionIdentifierInUDI.LOTNUMBER; 386 if ("manufactured-date".equals(codeString)) 387 return DeviceProductionIdentifierInUDI.MANUFACTUREDDATE; 388 if ("serial-number".equals(codeString)) 389 return DeviceProductionIdentifierInUDI.SERIALNUMBER; 390 if ("expiration-date".equals(codeString)) 391 return DeviceProductionIdentifierInUDI.EXPIRATIONDATE; 392 if ("biological-source".equals(codeString)) 393 return DeviceProductionIdentifierInUDI.BIOLOGICALSOURCE; 394 if ("software-version".equals(codeString)) 395 return DeviceProductionIdentifierInUDI.SOFTWAREVERSION; 396 throw new IllegalArgumentException("Unknown DeviceProductionIdentifierInUDI code '"+codeString+"'"); 397 } 398 public Enumeration<DeviceProductionIdentifierInUDI> fromType(PrimitiveType<?> code) throws FHIRException { 399 if (code == null) 400 return null; 401 if (code.isEmpty()) 402 return new Enumeration<DeviceProductionIdentifierInUDI>(this, DeviceProductionIdentifierInUDI.NULL, code); 403 String codeString = ((PrimitiveType) code).asStringValue(); 404 if (codeString == null || "".equals(codeString)) 405 return new Enumeration<DeviceProductionIdentifierInUDI>(this, DeviceProductionIdentifierInUDI.NULL, code); 406 if ("lot-number".equals(codeString)) 407 return new Enumeration<DeviceProductionIdentifierInUDI>(this, DeviceProductionIdentifierInUDI.LOTNUMBER, code); 408 if ("manufactured-date".equals(codeString)) 409 return new Enumeration<DeviceProductionIdentifierInUDI>(this, DeviceProductionIdentifierInUDI.MANUFACTUREDDATE, code); 410 if ("serial-number".equals(codeString)) 411 return new Enumeration<DeviceProductionIdentifierInUDI>(this, DeviceProductionIdentifierInUDI.SERIALNUMBER, code); 412 if ("expiration-date".equals(codeString)) 413 return new Enumeration<DeviceProductionIdentifierInUDI>(this, DeviceProductionIdentifierInUDI.EXPIRATIONDATE, code); 414 if ("biological-source".equals(codeString)) 415 return new Enumeration<DeviceProductionIdentifierInUDI>(this, DeviceProductionIdentifierInUDI.BIOLOGICALSOURCE, code); 416 if ("software-version".equals(codeString)) 417 return new Enumeration<DeviceProductionIdentifierInUDI>(this, DeviceProductionIdentifierInUDI.SOFTWAREVERSION, code); 418 throw new FHIRException("Unknown DeviceProductionIdentifierInUDI code '"+codeString+"'"); 419 } 420 public String toCode(DeviceProductionIdentifierInUDI code) { 421 if (code == DeviceProductionIdentifierInUDI.LOTNUMBER) 422 return "lot-number"; 423 if (code == DeviceProductionIdentifierInUDI.MANUFACTUREDDATE) 424 return "manufactured-date"; 425 if (code == DeviceProductionIdentifierInUDI.SERIALNUMBER) 426 return "serial-number"; 427 if (code == DeviceProductionIdentifierInUDI.EXPIRATIONDATE) 428 return "expiration-date"; 429 if (code == DeviceProductionIdentifierInUDI.BIOLOGICALSOURCE) 430 return "biological-source"; 431 if (code == DeviceProductionIdentifierInUDI.SOFTWAREVERSION) 432 return "software-version"; 433 return "?"; 434 } 435 public String toSystem(DeviceProductionIdentifierInUDI code) { 436 return code.getSystem(); 437 } 438 } 439 440 @Block() 441 public static class DeviceDefinitionUdiDeviceIdentifierComponent extends BackboneElement implements IBaseBackboneElement { 442 /** 443 * The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdiction provided in the DeviceDefinition.udiDeviceIdentifier. 444 */ 445 @Child(name = "deviceIdentifier", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 446 @Description(shortDefinition="The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdiction provided in the DeviceDefinition.udiDeviceIdentifier", formalDefinition="The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdiction provided in the DeviceDefinition.udiDeviceIdentifier." ) 447 protected StringType deviceIdentifier; 448 449 /** 450 * The organization that assigns the identifier algorithm. 451 */ 452 @Child(name = "issuer", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) 453 @Description(shortDefinition="The organization that assigns the identifier algorithm", formalDefinition="The organization that assigns the identifier algorithm." ) 454 protected UriType issuer; 455 456 /** 457 * The jurisdiction to which the deviceIdentifier applies. 458 */ 459 @Child(name = "jurisdiction", type = {UriType.class}, order=3, min=1, max=1, modifier=false, summary=false) 460 @Description(shortDefinition="The jurisdiction to which the deviceIdentifier applies", formalDefinition="The jurisdiction to which the deviceIdentifier applies." ) 461 protected UriType jurisdiction; 462 463 /** 464 * Indicates where and when the device is available on the market. 465 */ 466 @Child(name = "marketDistribution", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 467 @Description(shortDefinition="Indicates whether and when the device is available on the market", formalDefinition="Indicates where and when the device is available on the market." ) 468 protected List<UdiDeviceIdentifierMarketDistributionComponent> marketDistribution; 469 470 private static final long serialVersionUID = -1819796108L; 471 472 /** 473 * Constructor 474 */ 475 public DeviceDefinitionUdiDeviceIdentifierComponent() { 476 super(); 477 } 478 479 /** 480 * Constructor 481 */ 482 public DeviceDefinitionUdiDeviceIdentifierComponent(String deviceIdentifier, String issuer, String jurisdiction) { 483 super(); 484 this.setDeviceIdentifier(deviceIdentifier); 485 this.setIssuer(issuer); 486 this.setJurisdiction(jurisdiction); 487 } 488 489 /** 490 * @return {@link #deviceIdentifier} (The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdiction provided in the DeviceDefinition.udiDeviceIdentifier.). This is the underlying object with id, value and extensions. The accessor "getDeviceIdentifier" gives direct access to the value 491 */ 492 public StringType getDeviceIdentifierElement() { 493 if (this.deviceIdentifier == null) 494 if (Configuration.errorOnAutoCreate()) 495 throw new Error("Attempt to auto-create DeviceDefinitionUdiDeviceIdentifierComponent.deviceIdentifier"); 496 else if (Configuration.doAutoCreate()) 497 this.deviceIdentifier = new StringType(); // bb 498 return this.deviceIdentifier; 499 } 500 501 public boolean hasDeviceIdentifierElement() { 502 return this.deviceIdentifier != null && !this.deviceIdentifier.isEmpty(); 503 } 504 505 public boolean hasDeviceIdentifier() { 506 return this.deviceIdentifier != null && !this.deviceIdentifier.isEmpty(); 507 } 508 509 /** 510 * @param value {@link #deviceIdentifier} (The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdiction provided in the DeviceDefinition.udiDeviceIdentifier.). This is the underlying object with id, value and extensions. The accessor "getDeviceIdentifier" gives direct access to the value 511 */ 512 public DeviceDefinitionUdiDeviceIdentifierComponent setDeviceIdentifierElement(StringType value) { 513 this.deviceIdentifier = value; 514 return this; 515 } 516 517 /** 518 * @return The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdiction provided in the DeviceDefinition.udiDeviceIdentifier. 519 */ 520 public String getDeviceIdentifier() { 521 return this.deviceIdentifier == null ? null : this.deviceIdentifier.getValue(); 522 } 523 524 /** 525 * @param value The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdiction provided in the DeviceDefinition.udiDeviceIdentifier. 526 */ 527 public DeviceDefinitionUdiDeviceIdentifierComponent setDeviceIdentifier(String value) { 528 if (this.deviceIdentifier == null) 529 this.deviceIdentifier = new StringType(); 530 this.deviceIdentifier.setValue(value); 531 return this; 532 } 533 534 /** 535 * @return {@link #issuer} (The organization that assigns the identifier algorithm.). This is the underlying object with id, value and extensions. The accessor "getIssuer" gives direct access to the value 536 */ 537 public UriType getIssuerElement() { 538 if (this.issuer == null) 539 if (Configuration.errorOnAutoCreate()) 540 throw new Error("Attempt to auto-create DeviceDefinitionUdiDeviceIdentifierComponent.issuer"); 541 else if (Configuration.doAutoCreate()) 542 this.issuer = new UriType(); // bb 543 return this.issuer; 544 } 545 546 public boolean hasIssuerElement() { 547 return this.issuer != null && !this.issuer.isEmpty(); 548 } 549 550 public boolean hasIssuer() { 551 return this.issuer != null && !this.issuer.isEmpty(); 552 } 553 554 /** 555 * @param value {@link #issuer} (The organization that assigns the identifier algorithm.). This is the underlying object with id, value and extensions. The accessor "getIssuer" gives direct access to the value 556 */ 557 public DeviceDefinitionUdiDeviceIdentifierComponent setIssuerElement(UriType value) { 558 this.issuer = value; 559 return this; 560 } 561 562 /** 563 * @return The organization that assigns the identifier algorithm. 564 */ 565 public String getIssuer() { 566 return this.issuer == null ? null : this.issuer.getValue(); 567 } 568 569 /** 570 * @param value The organization that assigns the identifier algorithm. 571 */ 572 public DeviceDefinitionUdiDeviceIdentifierComponent setIssuer(String value) { 573 if (this.issuer == null) 574 this.issuer = new UriType(); 575 this.issuer.setValue(value); 576 return this; 577 } 578 579 /** 580 * @return {@link #jurisdiction} (The jurisdiction to which the deviceIdentifier applies.). This is the underlying object with id, value and extensions. The accessor "getJurisdiction" gives direct access to the value 581 */ 582 public UriType getJurisdictionElement() { 583 if (this.jurisdiction == null) 584 if (Configuration.errorOnAutoCreate()) 585 throw new Error("Attempt to auto-create DeviceDefinitionUdiDeviceIdentifierComponent.jurisdiction"); 586 else if (Configuration.doAutoCreate()) 587 this.jurisdiction = new UriType(); // bb 588 return this.jurisdiction; 589 } 590 591 public boolean hasJurisdictionElement() { 592 return this.jurisdiction != null && !this.jurisdiction.isEmpty(); 593 } 594 595 public boolean hasJurisdiction() { 596 return this.jurisdiction != null && !this.jurisdiction.isEmpty(); 597 } 598 599 /** 600 * @param value {@link #jurisdiction} (The jurisdiction to which the deviceIdentifier applies.). This is the underlying object with id, value and extensions. The accessor "getJurisdiction" gives direct access to the value 601 */ 602 public DeviceDefinitionUdiDeviceIdentifierComponent setJurisdictionElement(UriType value) { 603 this.jurisdiction = value; 604 return this; 605 } 606 607 /** 608 * @return The jurisdiction to which the deviceIdentifier applies. 609 */ 610 public String getJurisdiction() { 611 return this.jurisdiction == null ? null : this.jurisdiction.getValue(); 612 } 613 614 /** 615 * @param value The jurisdiction to which the deviceIdentifier applies. 616 */ 617 public DeviceDefinitionUdiDeviceIdentifierComponent setJurisdiction(String value) { 618 if (this.jurisdiction == null) 619 this.jurisdiction = new UriType(); 620 this.jurisdiction.setValue(value); 621 return this; 622 } 623 624 /** 625 * @return {@link #marketDistribution} (Indicates where and when the device is available on the market.) 626 */ 627 public List<UdiDeviceIdentifierMarketDistributionComponent> getMarketDistribution() { 628 if (this.marketDistribution == null) 629 this.marketDistribution = new ArrayList<UdiDeviceIdentifierMarketDistributionComponent>(); 630 return this.marketDistribution; 631 } 632 633 /** 634 * @return Returns a reference to <code>this</code> for easy method chaining 635 */ 636 public DeviceDefinitionUdiDeviceIdentifierComponent setMarketDistribution(List<UdiDeviceIdentifierMarketDistributionComponent> theMarketDistribution) { 637 this.marketDistribution = theMarketDistribution; 638 return this; 639 } 640 641 public boolean hasMarketDistribution() { 642 if (this.marketDistribution == null) 643 return false; 644 for (UdiDeviceIdentifierMarketDistributionComponent item : this.marketDistribution) 645 if (!item.isEmpty()) 646 return true; 647 return false; 648 } 649 650 public UdiDeviceIdentifierMarketDistributionComponent addMarketDistribution() { //3 651 UdiDeviceIdentifierMarketDistributionComponent t = new UdiDeviceIdentifierMarketDistributionComponent(); 652 if (this.marketDistribution == null) 653 this.marketDistribution = new ArrayList<UdiDeviceIdentifierMarketDistributionComponent>(); 654 this.marketDistribution.add(t); 655 return t; 656 } 657 658 public DeviceDefinitionUdiDeviceIdentifierComponent addMarketDistribution(UdiDeviceIdentifierMarketDistributionComponent t) { //3 659 if (t == null) 660 return this; 661 if (this.marketDistribution == null) 662 this.marketDistribution = new ArrayList<UdiDeviceIdentifierMarketDistributionComponent>(); 663 this.marketDistribution.add(t); 664 return this; 665 } 666 667 /** 668 * @return The first repetition of repeating field {@link #marketDistribution}, creating it if it does not already exist {3} 669 */ 670 public UdiDeviceIdentifierMarketDistributionComponent getMarketDistributionFirstRep() { 671 if (getMarketDistribution().isEmpty()) { 672 addMarketDistribution(); 673 } 674 return getMarketDistribution().get(0); 675 } 676 677 protected void listChildren(List<Property> children) { 678 super.listChildren(children); 679 children.add(new Property("deviceIdentifier", "string", "The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdiction provided in the DeviceDefinition.udiDeviceIdentifier.", 0, 1, deviceIdentifier)); 680 children.add(new Property("issuer", "uri", "The organization that assigns the identifier algorithm.", 0, 1, issuer)); 681 children.add(new Property("jurisdiction", "uri", "The jurisdiction to which the deviceIdentifier applies.", 0, 1, jurisdiction)); 682 children.add(new Property("marketDistribution", "", "Indicates where and when the device is available on the market.", 0, java.lang.Integer.MAX_VALUE, marketDistribution)); 683 } 684 685 @Override 686 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 687 switch (_hash) { 688 case 1322005407: /*deviceIdentifier*/ return new Property("deviceIdentifier", "string", "The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdiction provided in the DeviceDefinition.udiDeviceIdentifier.", 0, 1, deviceIdentifier); 689 case -1179159879: /*issuer*/ return new Property("issuer", "uri", "The organization that assigns the identifier algorithm.", 0, 1, issuer); 690 case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "uri", "The jurisdiction to which the deviceIdentifier applies.", 0, 1, jurisdiction); 691 case 530037984: /*marketDistribution*/ return new Property("marketDistribution", "", "Indicates where and when the device is available on the market.", 0, java.lang.Integer.MAX_VALUE, marketDistribution); 692 default: return super.getNamedProperty(_hash, _name, _checkValid); 693 } 694 695 } 696 697 @Override 698 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 699 switch (hash) { 700 case 1322005407: /*deviceIdentifier*/ return this.deviceIdentifier == null ? new Base[0] : new Base[] {this.deviceIdentifier}; // StringType 701 case -1179159879: /*issuer*/ return this.issuer == null ? new Base[0] : new Base[] {this.issuer}; // UriType 702 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : new Base[] {this.jurisdiction}; // UriType 703 case 530037984: /*marketDistribution*/ return this.marketDistribution == null ? new Base[0] : this.marketDistribution.toArray(new Base[this.marketDistribution.size()]); // UdiDeviceIdentifierMarketDistributionComponent 704 default: return super.getProperty(hash, name, checkValid); 705 } 706 707 } 708 709 @Override 710 public Base setProperty(int hash, String name, Base value) throws FHIRException { 711 switch (hash) { 712 case 1322005407: // deviceIdentifier 713 this.deviceIdentifier = TypeConvertor.castToString(value); // StringType 714 return value; 715 case -1179159879: // issuer 716 this.issuer = TypeConvertor.castToUri(value); // UriType 717 return value; 718 case -507075711: // jurisdiction 719 this.jurisdiction = TypeConvertor.castToUri(value); // UriType 720 return value; 721 case 530037984: // marketDistribution 722 this.getMarketDistribution().add((UdiDeviceIdentifierMarketDistributionComponent) value); // UdiDeviceIdentifierMarketDistributionComponent 723 return value; 724 default: return super.setProperty(hash, name, value); 725 } 726 727 } 728 729 @Override 730 public Base setProperty(String name, Base value) throws FHIRException { 731 if (name.equals("deviceIdentifier")) { 732 this.deviceIdentifier = TypeConvertor.castToString(value); // StringType 733 } else if (name.equals("issuer")) { 734 this.issuer = TypeConvertor.castToUri(value); // UriType 735 } else if (name.equals("jurisdiction")) { 736 this.jurisdiction = TypeConvertor.castToUri(value); // UriType 737 } else if (name.equals("marketDistribution")) { 738 this.getMarketDistribution().add((UdiDeviceIdentifierMarketDistributionComponent) value); 739 } else 740 return super.setProperty(name, value); 741 return value; 742 } 743 744 @Override 745 public Base makeProperty(int hash, String name) throws FHIRException { 746 switch (hash) { 747 case 1322005407: return getDeviceIdentifierElement(); 748 case -1179159879: return getIssuerElement(); 749 case -507075711: return getJurisdictionElement(); 750 case 530037984: return addMarketDistribution(); 751 default: return super.makeProperty(hash, name); 752 } 753 754 } 755 756 @Override 757 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 758 switch (hash) { 759 case 1322005407: /*deviceIdentifier*/ return new String[] {"string"}; 760 case -1179159879: /*issuer*/ return new String[] {"uri"}; 761 case -507075711: /*jurisdiction*/ return new String[] {"uri"}; 762 case 530037984: /*marketDistribution*/ return new String[] {}; 763 default: return super.getTypesForProperty(hash, name); 764 } 765 766 } 767 768 @Override 769 public Base addChild(String name) throws FHIRException { 770 if (name.equals("deviceIdentifier")) { 771 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.udiDeviceIdentifier.deviceIdentifier"); 772 } 773 else if (name.equals("issuer")) { 774 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.udiDeviceIdentifier.issuer"); 775 } 776 else if (name.equals("jurisdiction")) { 777 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.udiDeviceIdentifier.jurisdiction"); 778 } 779 else if (name.equals("marketDistribution")) { 780 return addMarketDistribution(); 781 } 782 else 783 return super.addChild(name); 784 } 785 786 public DeviceDefinitionUdiDeviceIdentifierComponent copy() { 787 DeviceDefinitionUdiDeviceIdentifierComponent dst = new DeviceDefinitionUdiDeviceIdentifierComponent(); 788 copyValues(dst); 789 return dst; 790 } 791 792 public void copyValues(DeviceDefinitionUdiDeviceIdentifierComponent dst) { 793 super.copyValues(dst); 794 dst.deviceIdentifier = deviceIdentifier == null ? null : deviceIdentifier.copy(); 795 dst.issuer = issuer == null ? null : issuer.copy(); 796 dst.jurisdiction = jurisdiction == null ? null : jurisdiction.copy(); 797 if (marketDistribution != null) { 798 dst.marketDistribution = new ArrayList<UdiDeviceIdentifierMarketDistributionComponent>(); 799 for (UdiDeviceIdentifierMarketDistributionComponent i : marketDistribution) 800 dst.marketDistribution.add(i.copy()); 801 }; 802 } 803 804 @Override 805 public boolean equalsDeep(Base other_) { 806 if (!super.equalsDeep(other_)) 807 return false; 808 if (!(other_ instanceof DeviceDefinitionUdiDeviceIdentifierComponent)) 809 return false; 810 DeviceDefinitionUdiDeviceIdentifierComponent o = (DeviceDefinitionUdiDeviceIdentifierComponent) other_; 811 return compareDeep(deviceIdentifier, o.deviceIdentifier, true) && compareDeep(issuer, o.issuer, true) 812 && compareDeep(jurisdiction, o.jurisdiction, true) && compareDeep(marketDistribution, o.marketDistribution, true) 813 ; 814 } 815 816 @Override 817 public boolean equalsShallow(Base other_) { 818 if (!super.equalsShallow(other_)) 819 return false; 820 if (!(other_ instanceof DeviceDefinitionUdiDeviceIdentifierComponent)) 821 return false; 822 DeviceDefinitionUdiDeviceIdentifierComponent o = (DeviceDefinitionUdiDeviceIdentifierComponent) other_; 823 return compareValues(deviceIdentifier, o.deviceIdentifier, true) && compareValues(issuer, o.issuer, true) 824 && compareValues(jurisdiction, o.jurisdiction, true); 825 } 826 827 public boolean isEmpty() { 828 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(deviceIdentifier, issuer, jurisdiction 829 , marketDistribution); 830 } 831 832 public String fhirType() { 833 return "DeviceDefinition.udiDeviceIdentifier"; 834 835 } 836 837 } 838 839 @Block() 840 public static class UdiDeviceIdentifierMarketDistributionComponent extends BackboneElement implements IBaseBackboneElement { 841 /** 842 * Begin and end dates for the commercial distribution of the device. 843 */ 844 @Child(name = "marketPeriod", type = {Period.class}, order=1, min=1, max=1, modifier=false, summary=false) 845 @Description(shortDefinition="Begin and end dates for the commercial distribution of the device", formalDefinition="Begin and end dates for the commercial distribution of the device." ) 846 protected Period marketPeriod; 847 848 /** 849 * National state or territory to which the marketDistribution recers, typically where the device is commercialized. 850 */ 851 @Child(name = "subJurisdiction", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) 852 @Description(shortDefinition="National state or territory where the device is commercialized", formalDefinition="National state or territory to which the marketDistribution recers, typically where the device is commercialized." ) 853 protected UriType subJurisdiction; 854 855 private static final long serialVersionUID = -1459036847L; 856 857 /** 858 * Constructor 859 */ 860 public UdiDeviceIdentifierMarketDistributionComponent() { 861 super(); 862 } 863 864 /** 865 * Constructor 866 */ 867 public UdiDeviceIdentifierMarketDistributionComponent(Period marketPeriod, String subJurisdiction) { 868 super(); 869 this.setMarketPeriod(marketPeriod); 870 this.setSubJurisdiction(subJurisdiction); 871 } 872 873 /** 874 * @return {@link #marketPeriod} (Begin and end dates for the commercial distribution of the device.) 875 */ 876 public Period getMarketPeriod() { 877 if (this.marketPeriod == null) 878 if (Configuration.errorOnAutoCreate()) 879 throw new Error("Attempt to auto-create UdiDeviceIdentifierMarketDistributionComponent.marketPeriod"); 880 else if (Configuration.doAutoCreate()) 881 this.marketPeriod = new Period(); // cc 882 return this.marketPeriod; 883 } 884 885 public boolean hasMarketPeriod() { 886 return this.marketPeriod != null && !this.marketPeriod.isEmpty(); 887 } 888 889 /** 890 * @param value {@link #marketPeriod} (Begin and end dates for the commercial distribution of the device.) 891 */ 892 public UdiDeviceIdentifierMarketDistributionComponent setMarketPeriod(Period value) { 893 this.marketPeriod = value; 894 return this; 895 } 896 897 /** 898 * @return {@link #subJurisdiction} (National state or territory to which the marketDistribution recers, typically where the device is commercialized.). This is the underlying object with id, value and extensions. The accessor "getSubJurisdiction" gives direct access to the value 899 */ 900 public UriType getSubJurisdictionElement() { 901 if (this.subJurisdiction == null) 902 if (Configuration.errorOnAutoCreate()) 903 throw new Error("Attempt to auto-create UdiDeviceIdentifierMarketDistributionComponent.subJurisdiction"); 904 else if (Configuration.doAutoCreate()) 905 this.subJurisdiction = new UriType(); // bb 906 return this.subJurisdiction; 907 } 908 909 public boolean hasSubJurisdictionElement() { 910 return this.subJurisdiction != null && !this.subJurisdiction.isEmpty(); 911 } 912 913 public boolean hasSubJurisdiction() { 914 return this.subJurisdiction != null && !this.subJurisdiction.isEmpty(); 915 } 916 917 /** 918 * @param value {@link #subJurisdiction} (National state or territory to which the marketDistribution recers, typically where the device is commercialized.). This is the underlying object with id, value and extensions. The accessor "getSubJurisdiction" gives direct access to the value 919 */ 920 public UdiDeviceIdentifierMarketDistributionComponent setSubJurisdictionElement(UriType value) { 921 this.subJurisdiction = value; 922 return this; 923 } 924 925 /** 926 * @return National state or territory to which the marketDistribution recers, typically where the device is commercialized. 927 */ 928 public String getSubJurisdiction() { 929 return this.subJurisdiction == null ? null : this.subJurisdiction.getValue(); 930 } 931 932 /** 933 * @param value National state or territory to which the marketDistribution recers, typically where the device is commercialized. 934 */ 935 public UdiDeviceIdentifierMarketDistributionComponent setSubJurisdiction(String value) { 936 if (this.subJurisdiction == null) 937 this.subJurisdiction = new UriType(); 938 this.subJurisdiction.setValue(value); 939 return this; 940 } 941 942 protected void listChildren(List<Property> children) { 943 super.listChildren(children); 944 children.add(new Property("marketPeriod", "Period", "Begin and end dates for the commercial distribution of the device.", 0, 1, marketPeriod)); 945 children.add(new Property("subJurisdiction", "uri", "National state or territory to which the marketDistribution recers, typically where the device is commercialized.", 0, 1, subJurisdiction)); 946 } 947 948 @Override 949 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 950 switch (_hash) { 951 case -183772899: /*marketPeriod*/ return new Property("marketPeriod", "Period", "Begin and end dates for the commercial distribution of the device.", 0, 1, marketPeriod); 952 case -777497119: /*subJurisdiction*/ return new Property("subJurisdiction", "uri", "National state or territory to which the marketDistribution recers, typically where the device is commercialized.", 0, 1, subJurisdiction); 953 default: return super.getNamedProperty(_hash, _name, _checkValid); 954 } 955 956 } 957 958 @Override 959 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 960 switch (hash) { 961 case -183772899: /*marketPeriod*/ return this.marketPeriod == null ? new Base[0] : new Base[] {this.marketPeriod}; // Period 962 case -777497119: /*subJurisdiction*/ return this.subJurisdiction == null ? new Base[0] : new Base[] {this.subJurisdiction}; // UriType 963 default: return super.getProperty(hash, name, checkValid); 964 } 965 966 } 967 968 @Override 969 public Base setProperty(int hash, String name, Base value) throws FHIRException { 970 switch (hash) { 971 case -183772899: // marketPeriod 972 this.marketPeriod = TypeConvertor.castToPeriod(value); // Period 973 return value; 974 case -777497119: // subJurisdiction 975 this.subJurisdiction = TypeConvertor.castToUri(value); // UriType 976 return value; 977 default: return super.setProperty(hash, name, value); 978 } 979 980 } 981 982 @Override 983 public Base setProperty(String name, Base value) throws FHIRException { 984 if (name.equals("marketPeriod")) { 985 this.marketPeriod = TypeConvertor.castToPeriod(value); // Period 986 } else if (name.equals("subJurisdiction")) { 987 this.subJurisdiction = TypeConvertor.castToUri(value); // UriType 988 } else 989 return super.setProperty(name, value); 990 return value; 991 } 992 993 @Override 994 public Base makeProperty(int hash, String name) throws FHIRException { 995 switch (hash) { 996 case -183772899: return getMarketPeriod(); 997 case -777497119: return getSubJurisdictionElement(); 998 default: return super.makeProperty(hash, name); 999 } 1000 1001 } 1002 1003 @Override 1004 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1005 switch (hash) { 1006 case -183772899: /*marketPeriod*/ return new String[] {"Period"}; 1007 case -777497119: /*subJurisdiction*/ return new String[] {"uri"}; 1008 default: return super.getTypesForProperty(hash, name); 1009 } 1010 1011 } 1012 1013 @Override 1014 public Base addChild(String name) throws FHIRException { 1015 if (name.equals("marketPeriod")) { 1016 this.marketPeriod = new Period(); 1017 return this.marketPeriod; 1018 } 1019 else if (name.equals("subJurisdiction")) { 1020 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.udiDeviceIdentifier.marketDistribution.subJurisdiction"); 1021 } 1022 else 1023 return super.addChild(name); 1024 } 1025 1026 public UdiDeviceIdentifierMarketDistributionComponent copy() { 1027 UdiDeviceIdentifierMarketDistributionComponent dst = new UdiDeviceIdentifierMarketDistributionComponent(); 1028 copyValues(dst); 1029 return dst; 1030 } 1031 1032 public void copyValues(UdiDeviceIdentifierMarketDistributionComponent dst) { 1033 super.copyValues(dst); 1034 dst.marketPeriod = marketPeriod == null ? null : marketPeriod.copy(); 1035 dst.subJurisdiction = subJurisdiction == null ? null : subJurisdiction.copy(); 1036 } 1037 1038 @Override 1039 public boolean equalsDeep(Base other_) { 1040 if (!super.equalsDeep(other_)) 1041 return false; 1042 if (!(other_ instanceof UdiDeviceIdentifierMarketDistributionComponent)) 1043 return false; 1044 UdiDeviceIdentifierMarketDistributionComponent o = (UdiDeviceIdentifierMarketDistributionComponent) other_; 1045 return compareDeep(marketPeriod, o.marketPeriod, true) && compareDeep(subJurisdiction, o.subJurisdiction, true) 1046 ; 1047 } 1048 1049 @Override 1050 public boolean equalsShallow(Base other_) { 1051 if (!super.equalsShallow(other_)) 1052 return false; 1053 if (!(other_ instanceof UdiDeviceIdentifierMarketDistributionComponent)) 1054 return false; 1055 UdiDeviceIdentifierMarketDistributionComponent o = (UdiDeviceIdentifierMarketDistributionComponent) other_; 1056 return compareValues(subJurisdiction, o.subJurisdiction, true); 1057 } 1058 1059 public boolean isEmpty() { 1060 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(marketPeriod, subJurisdiction 1061 ); 1062 } 1063 1064 public String fhirType() { 1065 return "DeviceDefinition.udiDeviceIdentifier.marketDistribution"; 1066 1067 } 1068 1069 } 1070 1071 @Block() 1072 public static class DeviceDefinitionRegulatoryIdentifierComponent extends BackboneElement implements IBaseBackboneElement { 1073 /** 1074 * The type of identifier itself. 1075 */ 1076 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1077 @Description(shortDefinition="basic | master | license", formalDefinition="The type of identifier itself." ) 1078 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/devicedefinition-regulatory-identifier-type") 1079 protected Enumeration<DeviceDefinitionRegulatoryIdentifierType> type; 1080 1081 /** 1082 * The identifier itself. 1083 */ 1084 @Child(name = "deviceIdentifier", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 1085 @Description(shortDefinition="The identifier itself", formalDefinition="The identifier itself." ) 1086 protected StringType deviceIdentifier; 1087 1088 /** 1089 * The organization that issued this identifier. 1090 */ 1091 @Child(name = "issuer", type = {UriType.class}, order=3, min=1, max=1, modifier=false, summary=false) 1092 @Description(shortDefinition="The organization that issued this identifier", formalDefinition="The organization that issued this identifier." ) 1093 protected UriType issuer; 1094 1095 /** 1096 * The jurisdiction to which the deviceIdentifier applies. 1097 */ 1098 @Child(name = "jurisdiction", type = {UriType.class}, order=4, min=1, max=1, modifier=false, summary=false) 1099 @Description(shortDefinition="The jurisdiction to which the deviceIdentifier applies", formalDefinition="The jurisdiction to which the deviceIdentifier applies." ) 1100 protected UriType jurisdiction; 1101 1102 private static final long serialVersionUID = 1438058623L; 1103 1104 /** 1105 * Constructor 1106 */ 1107 public DeviceDefinitionRegulatoryIdentifierComponent() { 1108 super(); 1109 } 1110 1111 /** 1112 * Constructor 1113 */ 1114 public DeviceDefinitionRegulatoryIdentifierComponent(DeviceDefinitionRegulatoryIdentifierType type, String deviceIdentifier, String issuer, String jurisdiction) { 1115 super(); 1116 this.setType(type); 1117 this.setDeviceIdentifier(deviceIdentifier); 1118 this.setIssuer(issuer); 1119 this.setJurisdiction(jurisdiction); 1120 } 1121 1122 /** 1123 * @return {@link #type} (The type of identifier itself.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1124 */ 1125 public Enumeration<DeviceDefinitionRegulatoryIdentifierType> getTypeElement() { 1126 if (this.type == null) 1127 if (Configuration.errorOnAutoCreate()) 1128 throw new Error("Attempt to auto-create DeviceDefinitionRegulatoryIdentifierComponent.type"); 1129 else if (Configuration.doAutoCreate()) 1130 this.type = new Enumeration<DeviceDefinitionRegulatoryIdentifierType>(new DeviceDefinitionRegulatoryIdentifierTypeEnumFactory()); // bb 1131 return this.type; 1132 } 1133 1134 public boolean hasTypeElement() { 1135 return this.type != null && !this.type.isEmpty(); 1136 } 1137 1138 public boolean hasType() { 1139 return this.type != null && !this.type.isEmpty(); 1140 } 1141 1142 /** 1143 * @param value {@link #type} (The type of identifier itself.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1144 */ 1145 public DeviceDefinitionRegulatoryIdentifierComponent setTypeElement(Enumeration<DeviceDefinitionRegulatoryIdentifierType> value) { 1146 this.type = value; 1147 return this; 1148 } 1149 1150 /** 1151 * @return The type of identifier itself. 1152 */ 1153 public DeviceDefinitionRegulatoryIdentifierType getType() { 1154 return this.type == null ? null : this.type.getValue(); 1155 } 1156 1157 /** 1158 * @param value The type of identifier itself. 1159 */ 1160 public DeviceDefinitionRegulatoryIdentifierComponent setType(DeviceDefinitionRegulatoryIdentifierType value) { 1161 if (this.type == null) 1162 this.type = new Enumeration<DeviceDefinitionRegulatoryIdentifierType>(new DeviceDefinitionRegulatoryIdentifierTypeEnumFactory()); 1163 this.type.setValue(value); 1164 return this; 1165 } 1166 1167 /** 1168 * @return {@link #deviceIdentifier} (The identifier itself.). This is the underlying object with id, value and extensions. The accessor "getDeviceIdentifier" gives direct access to the value 1169 */ 1170 public StringType getDeviceIdentifierElement() { 1171 if (this.deviceIdentifier == null) 1172 if (Configuration.errorOnAutoCreate()) 1173 throw new Error("Attempt to auto-create DeviceDefinitionRegulatoryIdentifierComponent.deviceIdentifier"); 1174 else if (Configuration.doAutoCreate()) 1175 this.deviceIdentifier = new StringType(); // bb 1176 return this.deviceIdentifier; 1177 } 1178 1179 public boolean hasDeviceIdentifierElement() { 1180 return this.deviceIdentifier != null && !this.deviceIdentifier.isEmpty(); 1181 } 1182 1183 public boolean hasDeviceIdentifier() { 1184 return this.deviceIdentifier != null && !this.deviceIdentifier.isEmpty(); 1185 } 1186 1187 /** 1188 * @param value {@link #deviceIdentifier} (The identifier itself.). This is the underlying object with id, value and extensions. The accessor "getDeviceIdentifier" gives direct access to the value 1189 */ 1190 public DeviceDefinitionRegulatoryIdentifierComponent setDeviceIdentifierElement(StringType value) { 1191 this.deviceIdentifier = value; 1192 return this; 1193 } 1194 1195 /** 1196 * @return The identifier itself. 1197 */ 1198 public String getDeviceIdentifier() { 1199 return this.deviceIdentifier == null ? null : this.deviceIdentifier.getValue(); 1200 } 1201 1202 /** 1203 * @param value The identifier itself. 1204 */ 1205 public DeviceDefinitionRegulatoryIdentifierComponent setDeviceIdentifier(String value) { 1206 if (this.deviceIdentifier == null) 1207 this.deviceIdentifier = new StringType(); 1208 this.deviceIdentifier.setValue(value); 1209 return this; 1210 } 1211 1212 /** 1213 * @return {@link #issuer} (The organization that issued this identifier.). This is the underlying object with id, value and extensions. The accessor "getIssuer" gives direct access to the value 1214 */ 1215 public UriType getIssuerElement() { 1216 if (this.issuer == null) 1217 if (Configuration.errorOnAutoCreate()) 1218 throw new Error("Attempt to auto-create DeviceDefinitionRegulatoryIdentifierComponent.issuer"); 1219 else if (Configuration.doAutoCreate()) 1220 this.issuer = new UriType(); // bb 1221 return this.issuer; 1222 } 1223 1224 public boolean hasIssuerElement() { 1225 return this.issuer != null && !this.issuer.isEmpty(); 1226 } 1227 1228 public boolean hasIssuer() { 1229 return this.issuer != null && !this.issuer.isEmpty(); 1230 } 1231 1232 /** 1233 * @param value {@link #issuer} (The organization that issued this identifier.). This is the underlying object with id, value and extensions. The accessor "getIssuer" gives direct access to the value 1234 */ 1235 public DeviceDefinitionRegulatoryIdentifierComponent setIssuerElement(UriType value) { 1236 this.issuer = value; 1237 return this; 1238 } 1239 1240 /** 1241 * @return The organization that issued this identifier. 1242 */ 1243 public String getIssuer() { 1244 return this.issuer == null ? null : this.issuer.getValue(); 1245 } 1246 1247 /** 1248 * @param value The organization that issued this identifier. 1249 */ 1250 public DeviceDefinitionRegulatoryIdentifierComponent setIssuer(String value) { 1251 if (this.issuer == null) 1252 this.issuer = new UriType(); 1253 this.issuer.setValue(value); 1254 return this; 1255 } 1256 1257 /** 1258 * @return {@link #jurisdiction} (The jurisdiction to which the deviceIdentifier applies.). This is the underlying object with id, value and extensions. The accessor "getJurisdiction" gives direct access to the value 1259 */ 1260 public UriType getJurisdictionElement() { 1261 if (this.jurisdiction == null) 1262 if (Configuration.errorOnAutoCreate()) 1263 throw new Error("Attempt to auto-create DeviceDefinitionRegulatoryIdentifierComponent.jurisdiction"); 1264 else if (Configuration.doAutoCreate()) 1265 this.jurisdiction = new UriType(); // bb 1266 return this.jurisdiction; 1267 } 1268 1269 public boolean hasJurisdictionElement() { 1270 return this.jurisdiction != null && !this.jurisdiction.isEmpty(); 1271 } 1272 1273 public boolean hasJurisdiction() { 1274 return this.jurisdiction != null && !this.jurisdiction.isEmpty(); 1275 } 1276 1277 /** 1278 * @param value {@link #jurisdiction} (The jurisdiction to which the deviceIdentifier applies.). This is the underlying object with id, value and extensions. The accessor "getJurisdiction" gives direct access to the value 1279 */ 1280 public DeviceDefinitionRegulatoryIdentifierComponent setJurisdictionElement(UriType value) { 1281 this.jurisdiction = value; 1282 return this; 1283 } 1284 1285 /** 1286 * @return The jurisdiction to which the deviceIdentifier applies. 1287 */ 1288 public String getJurisdiction() { 1289 return this.jurisdiction == null ? null : this.jurisdiction.getValue(); 1290 } 1291 1292 /** 1293 * @param value The jurisdiction to which the deviceIdentifier applies. 1294 */ 1295 public DeviceDefinitionRegulatoryIdentifierComponent setJurisdiction(String value) { 1296 if (this.jurisdiction == null) 1297 this.jurisdiction = new UriType(); 1298 this.jurisdiction.setValue(value); 1299 return this; 1300 } 1301 1302 protected void listChildren(List<Property> children) { 1303 super.listChildren(children); 1304 children.add(new Property("type", "code", "The type of identifier itself.", 0, 1, type)); 1305 children.add(new Property("deviceIdentifier", "string", "The identifier itself.", 0, 1, deviceIdentifier)); 1306 children.add(new Property("issuer", "uri", "The organization that issued this identifier.", 0, 1, issuer)); 1307 children.add(new Property("jurisdiction", "uri", "The jurisdiction to which the deviceIdentifier applies.", 0, 1, jurisdiction)); 1308 } 1309 1310 @Override 1311 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1312 switch (_hash) { 1313 case 3575610: /*type*/ return new Property("type", "code", "The type of identifier itself.", 0, 1, type); 1314 case 1322005407: /*deviceIdentifier*/ return new Property("deviceIdentifier", "string", "The identifier itself.", 0, 1, deviceIdentifier); 1315 case -1179159879: /*issuer*/ return new Property("issuer", "uri", "The organization that issued this identifier.", 0, 1, issuer); 1316 case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "uri", "The jurisdiction to which the deviceIdentifier applies.", 0, 1, jurisdiction); 1317 default: return super.getNamedProperty(_hash, _name, _checkValid); 1318 } 1319 1320 } 1321 1322 @Override 1323 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1324 switch (hash) { 1325 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<DeviceDefinitionRegulatoryIdentifierType> 1326 case 1322005407: /*deviceIdentifier*/ return this.deviceIdentifier == null ? new Base[0] : new Base[] {this.deviceIdentifier}; // StringType 1327 case -1179159879: /*issuer*/ return this.issuer == null ? new Base[0] : new Base[] {this.issuer}; // UriType 1328 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : new Base[] {this.jurisdiction}; // UriType 1329 default: return super.getProperty(hash, name, checkValid); 1330 } 1331 1332 } 1333 1334 @Override 1335 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1336 switch (hash) { 1337 case 3575610: // type 1338 value = new DeviceDefinitionRegulatoryIdentifierTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1339 this.type = (Enumeration) value; // Enumeration<DeviceDefinitionRegulatoryIdentifierType> 1340 return value; 1341 case 1322005407: // deviceIdentifier 1342 this.deviceIdentifier = TypeConvertor.castToString(value); // StringType 1343 return value; 1344 case -1179159879: // issuer 1345 this.issuer = TypeConvertor.castToUri(value); // UriType 1346 return value; 1347 case -507075711: // jurisdiction 1348 this.jurisdiction = TypeConvertor.castToUri(value); // UriType 1349 return value; 1350 default: return super.setProperty(hash, name, value); 1351 } 1352 1353 } 1354 1355 @Override 1356 public Base setProperty(String name, Base value) throws FHIRException { 1357 if (name.equals("type")) { 1358 value = new DeviceDefinitionRegulatoryIdentifierTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1359 this.type = (Enumeration) value; // Enumeration<DeviceDefinitionRegulatoryIdentifierType> 1360 } else if (name.equals("deviceIdentifier")) { 1361 this.deviceIdentifier = TypeConvertor.castToString(value); // StringType 1362 } else if (name.equals("issuer")) { 1363 this.issuer = TypeConvertor.castToUri(value); // UriType 1364 } else if (name.equals("jurisdiction")) { 1365 this.jurisdiction = TypeConvertor.castToUri(value); // UriType 1366 } else 1367 return super.setProperty(name, value); 1368 return value; 1369 } 1370 1371 @Override 1372 public Base makeProperty(int hash, String name) throws FHIRException { 1373 switch (hash) { 1374 case 3575610: return getTypeElement(); 1375 case 1322005407: return getDeviceIdentifierElement(); 1376 case -1179159879: return getIssuerElement(); 1377 case -507075711: return getJurisdictionElement(); 1378 default: return super.makeProperty(hash, name); 1379 } 1380 1381 } 1382 1383 @Override 1384 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1385 switch (hash) { 1386 case 3575610: /*type*/ return new String[] {"code"}; 1387 case 1322005407: /*deviceIdentifier*/ return new String[] {"string"}; 1388 case -1179159879: /*issuer*/ return new String[] {"uri"}; 1389 case -507075711: /*jurisdiction*/ return new String[] {"uri"}; 1390 default: return super.getTypesForProperty(hash, name); 1391 } 1392 1393 } 1394 1395 @Override 1396 public Base addChild(String name) throws FHIRException { 1397 if (name.equals("type")) { 1398 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.regulatoryIdentifier.type"); 1399 } 1400 else if (name.equals("deviceIdentifier")) { 1401 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.regulatoryIdentifier.deviceIdentifier"); 1402 } 1403 else if (name.equals("issuer")) { 1404 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.regulatoryIdentifier.issuer"); 1405 } 1406 else if (name.equals("jurisdiction")) { 1407 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.regulatoryIdentifier.jurisdiction"); 1408 } 1409 else 1410 return super.addChild(name); 1411 } 1412 1413 public DeviceDefinitionRegulatoryIdentifierComponent copy() { 1414 DeviceDefinitionRegulatoryIdentifierComponent dst = new DeviceDefinitionRegulatoryIdentifierComponent(); 1415 copyValues(dst); 1416 return dst; 1417 } 1418 1419 public void copyValues(DeviceDefinitionRegulatoryIdentifierComponent dst) { 1420 super.copyValues(dst); 1421 dst.type = type == null ? null : type.copy(); 1422 dst.deviceIdentifier = deviceIdentifier == null ? null : deviceIdentifier.copy(); 1423 dst.issuer = issuer == null ? null : issuer.copy(); 1424 dst.jurisdiction = jurisdiction == null ? null : jurisdiction.copy(); 1425 } 1426 1427 @Override 1428 public boolean equalsDeep(Base other_) { 1429 if (!super.equalsDeep(other_)) 1430 return false; 1431 if (!(other_ instanceof DeviceDefinitionRegulatoryIdentifierComponent)) 1432 return false; 1433 DeviceDefinitionRegulatoryIdentifierComponent o = (DeviceDefinitionRegulatoryIdentifierComponent) other_; 1434 return compareDeep(type, o.type, true) && compareDeep(deviceIdentifier, o.deviceIdentifier, true) 1435 && compareDeep(issuer, o.issuer, true) && compareDeep(jurisdiction, o.jurisdiction, true); 1436 } 1437 1438 @Override 1439 public boolean equalsShallow(Base other_) { 1440 if (!super.equalsShallow(other_)) 1441 return false; 1442 if (!(other_ instanceof DeviceDefinitionRegulatoryIdentifierComponent)) 1443 return false; 1444 DeviceDefinitionRegulatoryIdentifierComponent o = (DeviceDefinitionRegulatoryIdentifierComponent) other_; 1445 return compareValues(type, o.type, true) && compareValues(deviceIdentifier, o.deviceIdentifier, true) 1446 && compareValues(issuer, o.issuer, true) && compareValues(jurisdiction, o.jurisdiction, true); 1447 } 1448 1449 public boolean isEmpty() { 1450 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, deviceIdentifier, issuer 1451 , jurisdiction); 1452 } 1453 1454 public String fhirType() { 1455 return "DeviceDefinition.regulatoryIdentifier"; 1456 1457 } 1458 1459 } 1460 1461 @Block() 1462 public static class DeviceDefinitionDeviceNameComponent extends BackboneElement implements IBaseBackboneElement { 1463 /** 1464 * A human-friendly name that is used to refer to the device - depending on the type, it can be the brand name, the common name or alias, or other. 1465 */ 1466 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1467 @Description(shortDefinition="A name that is used to refer to the device", formalDefinition="A human-friendly name that is used to refer to the device - depending on the type, it can be the brand name, the common name or alias, or other." ) 1468 protected StringType name; 1469 1470 /** 1471 * The type of deviceName. 1472RegisteredName | UserFriendlyName | PatientReportedName. 1473 */ 1474 @Child(name = "type", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true) 1475 @Description(shortDefinition="registered-name | user-friendly-name | patient-reported-name", formalDefinition="The type of deviceName.\nRegisteredName | UserFriendlyName | PatientReportedName." ) 1476 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-nametype") 1477 protected Enumeration<DeviceNameType> type; 1478 1479 private static final long serialVersionUID = 918983440L; 1480 1481 /** 1482 * Constructor 1483 */ 1484 public DeviceDefinitionDeviceNameComponent() { 1485 super(); 1486 } 1487 1488 /** 1489 * Constructor 1490 */ 1491 public DeviceDefinitionDeviceNameComponent(String name, DeviceNameType type) { 1492 super(); 1493 this.setName(name); 1494 this.setType(type); 1495 } 1496 1497 /** 1498 * @return {@link #name} (A human-friendly name that is used to refer to the device - depending on the type, it can be the brand name, the common name or alias, or other.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1499 */ 1500 public StringType getNameElement() { 1501 if (this.name == null) 1502 if (Configuration.errorOnAutoCreate()) 1503 throw new Error("Attempt to auto-create DeviceDefinitionDeviceNameComponent.name"); 1504 else if (Configuration.doAutoCreate()) 1505 this.name = new StringType(); // bb 1506 return this.name; 1507 } 1508 1509 public boolean hasNameElement() { 1510 return this.name != null && !this.name.isEmpty(); 1511 } 1512 1513 public boolean hasName() { 1514 return this.name != null && !this.name.isEmpty(); 1515 } 1516 1517 /** 1518 * @param value {@link #name} (A human-friendly name that is used to refer to the device - depending on the type, it can be the brand name, the common name or alias, or other.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1519 */ 1520 public DeviceDefinitionDeviceNameComponent setNameElement(StringType value) { 1521 this.name = value; 1522 return this; 1523 } 1524 1525 /** 1526 * @return A human-friendly name that is used to refer to the device - depending on the type, it can be the brand name, the common name or alias, or other. 1527 */ 1528 public String getName() { 1529 return this.name == null ? null : this.name.getValue(); 1530 } 1531 1532 /** 1533 * @param value A human-friendly name that is used to refer to the device - depending on the type, it can be the brand name, the common name or alias, or other. 1534 */ 1535 public DeviceDefinitionDeviceNameComponent setName(String value) { 1536 if (this.name == null) 1537 this.name = new StringType(); 1538 this.name.setValue(value); 1539 return this; 1540 } 1541 1542 /** 1543 * @return {@link #type} (The type of deviceName. 1544RegisteredName | UserFriendlyName | PatientReportedName.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1545 */ 1546 public Enumeration<DeviceNameType> getTypeElement() { 1547 if (this.type == null) 1548 if (Configuration.errorOnAutoCreate()) 1549 throw new Error("Attempt to auto-create DeviceDefinitionDeviceNameComponent.type"); 1550 else if (Configuration.doAutoCreate()) 1551 this.type = new Enumeration<DeviceNameType>(new DeviceNameTypeEnumFactory()); // bb 1552 return this.type; 1553 } 1554 1555 public boolean hasTypeElement() { 1556 return this.type != null && !this.type.isEmpty(); 1557 } 1558 1559 public boolean hasType() { 1560 return this.type != null && !this.type.isEmpty(); 1561 } 1562 1563 /** 1564 * @param value {@link #type} (The type of deviceName. 1565RegisteredName | UserFriendlyName | PatientReportedName.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1566 */ 1567 public DeviceDefinitionDeviceNameComponent setTypeElement(Enumeration<DeviceNameType> value) { 1568 this.type = value; 1569 return this; 1570 } 1571 1572 /** 1573 * @return The type of deviceName. 1574RegisteredName | UserFriendlyName | PatientReportedName. 1575 */ 1576 public DeviceNameType getType() { 1577 return this.type == null ? null : this.type.getValue(); 1578 } 1579 1580 /** 1581 * @param value The type of deviceName. 1582RegisteredName | UserFriendlyName | PatientReportedName. 1583 */ 1584 public DeviceDefinitionDeviceNameComponent setType(DeviceNameType value) { 1585 if (this.type == null) 1586 this.type = new Enumeration<DeviceNameType>(new DeviceNameTypeEnumFactory()); 1587 this.type.setValue(value); 1588 return this; 1589 } 1590 1591 protected void listChildren(List<Property> children) { 1592 super.listChildren(children); 1593 children.add(new Property("name", "string", "A human-friendly name that is used to refer to the device - depending on the type, it can be the brand name, the common name or alias, or other.", 0, 1, name)); 1594 children.add(new Property("type", "code", "The type of deviceName.\nRegisteredName | UserFriendlyName | PatientReportedName.", 0, 1, type)); 1595 } 1596 1597 @Override 1598 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1599 switch (_hash) { 1600 case 3373707: /*name*/ return new Property("name", "string", "A human-friendly name that is used to refer to the device - depending on the type, it can be the brand name, the common name or alias, or other.", 0, 1, name); 1601 case 3575610: /*type*/ return new Property("type", "code", "The type of deviceName.\nRegisteredName | UserFriendlyName | PatientReportedName.", 0, 1, type); 1602 default: return super.getNamedProperty(_hash, _name, _checkValid); 1603 } 1604 1605 } 1606 1607 @Override 1608 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1609 switch (hash) { 1610 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1611 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<DeviceNameType> 1612 default: return super.getProperty(hash, name, checkValid); 1613 } 1614 1615 } 1616 1617 @Override 1618 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1619 switch (hash) { 1620 case 3373707: // name 1621 this.name = TypeConvertor.castToString(value); // StringType 1622 return value; 1623 case 3575610: // type 1624 value = new DeviceNameTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1625 this.type = (Enumeration) value; // Enumeration<DeviceNameType> 1626 return value; 1627 default: return super.setProperty(hash, name, value); 1628 } 1629 1630 } 1631 1632 @Override 1633 public Base setProperty(String name, Base value) throws FHIRException { 1634 if (name.equals("name")) { 1635 this.name = TypeConvertor.castToString(value); // StringType 1636 } else if (name.equals("type")) { 1637 value = new DeviceNameTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1638 this.type = (Enumeration) value; // Enumeration<DeviceNameType> 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 3373707: return getNameElement(); 1648 case 3575610: return getTypeElement(); 1649 default: return super.makeProperty(hash, name); 1650 } 1651 1652 } 1653 1654 @Override 1655 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1656 switch (hash) { 1657 case 3373707: /*name*/ return new String[] {"string"}; 1658 case 3575610: /*type*/ return new String[] {"code"}; 1659 default: return super.getTypesForProperty(hash, name); 1660 } 1661 1662 } 1663 1664 @Override 1665 public Base addChild(String name) throws FHIRException { 1666 if (name.equals("name")) { 1667 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.deviceName.name"); 1668 } 1669 else if (name.equals("type")) { 1670 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.deviceName.type"); 1671 } 1672 else 1673 return super.addChild(name); 1674 } 1675 1676 public DeviceDefinitionDeviceNameComponent copy() { 1677 DeviceDefinitionDeviceNameComponent dst = new DeviceDefinitionDeviceNameComponent(); 1678 copyValues(dst); 1679 return dst; 1680 } 1681 1682 public void copyValues(DeviceDefinitionDeviceNameComponent dst) { 1683 super.copyValues(dst); 1684 dst.name = name == null ? null : name.copy(); 1685 dst.type = type == null ? null : type.copy(); 1686 } 1687 1688 @Override 1689 public boolean equalsDeep(Base other_) { 1690 if (!super.equalsDeep(other_)) 1691 return false; 1692 if (!(other_ instanceof DeviceDefinitionDeviceNameComponent)) 1693 return false; 1694 DeviceDefinitionDeviceNameComponent o = (DeviceDefinitionDeviceNameComponent) other_; 1695 return compareDeep(name, o.name, true) && compareDeep(type, o.type, true); 1696 } 1697 1698 @Override 1699 public boolean equalsShallow(Base other_) { 1700 if (!super.equalsShallow(other_)) 1701 return false; 1702 if (!(other_ instanceof DeviceDefinitionDeviceNameComponent)) 1703 return false; 1704 DeviceDefinitionDeviceNameComponent o = (DeviceDefinitionDeviceNameComponent) other_; 1705 return compareValues(name, o.name, true) && compareValues(type, o.type, true); 1706 } 1707 1708 public boolean isEmpty() { 1709 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, type); 1710 } 1711 1712 public String fhirType() { 1713 return "DeviceDefinition.deviceName"; 1714 1715 } 1716 1717 } 1718 1719 @Block() 1720 public static class DeviceDefinitionClassificationComponent extends BackboneElement implements IBaseBackboneElement { 1721 /** 1722 * A classification or risk class of the device model. 1723 */ 1724 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 1725 @Description(shortDefinition="A classification or risk class of the device model", formalDefinition="A classification or risk class of the device model." ) 1726 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-type") 1727 protected CodeableConcept type; 1728 1729 /** 1730 * Further information qualifying this classification of the device model. 1731 */ 1732 @Child(name = "justification", type = {RelatedArtifact.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1733 @Description(shortDefinition="Further information qualifying this classification of the device model", formalDefinition="Further information qualifying this classification of the device model." ) 1734 protected List<RelatedArtifact> justification; 1735 1736 private static final long serialVersionUID = -1343788026L; 1737 1738 /** 1739 * Constructor 1740 */ 1741 public DeviceDefinitionClassificationComponent() { 1742 super(); 1743 } 1744 1745 /** 1746 * Constructor 1747 */ 1748 public DeviceDefinitionClassificationComponent(CodeableConcept type) { 1749 super(); 1750 this.setType(type); 1751 } 1752 1753 /** 1754 * @return {@link #type} (A classification or risk class of the device model.) 1755 */ 1756 public CodeableConcept getType() { 1757 if (this.type == null) 1758 if (Configuration.errorOnAutoCreate()) 1759 throw new Error("Attempt to auto-create DeviceDefinitionClassificationComponent.type"); 1760 else if (Configuration.doAutoCreate()) 1761 this.type = new CodeableConcept(); // cc 1762 return this.type; 1763 } 1764 1765 public boolean hasType() { 1766 return this.type != null && !this.type.isEmpty(); 1767 } 1768 1769 /** 1770 * @param value {@link #type} (A classification or risk class of the device model.) 1771 */ 1772 public DeviceDefinitionClassificationComponent setType(CodeableConcept value) { 1773 this.type = value; 1774 return this; 1775 } 1776 1777 /** 1778 * @return {@link #justification} (Further information qualifying this classification of the device model.) 1779 */ 1780 public List<RelatedArtifact> getJustification() { 1781 if (this.justification == null) 1782 this.justification = new ArrayList<RelatedArtifact>(); 1783 return this.justification; 1784 } 1785 1786 /** 1787 * @return Returns a reference to <code>this</code> for easy method chaining 1788 */ 1789 public DeviceDefinitionClassificationComponent setJustification(List<RelatedArtifact> theJustification) { 1790 this.justification = theJustification; 1791 return this; 1792 } 1793 1794 public boolean hasJustification() { 1795 if (this.justification == null) 1796 return false; 1797 for (RelatedArtifact item : this.justification) 1798 if (!item.isEmpty()) 1799 return true; 1800 return false; 1801 } 1802 1803 public RelatedArtifact addJustification() { //3 1804 RelatedArtifact t = new RelatedArtifact(); 1805 if (this.justification == null) 1806 this.justification = new ArrayList<RelatedArtifact>(); 1807 this.justification.add(t); 1808 return t; 1809 } 1810 1811 public DeviceDefinitionClassificationComponent addJustification(RelatedArtifact t) { //3 1812 if (t == null) 1813 return this; 1814 if (this.justification == null) 1815 this.justification = new ArrayList<RelatedArtifact>(); 1816 this.justification.add(t); 1817 return this; 1818 } 1819 1820 /** 1821 * @return The first repetition of repeating field {@link #justification}, creating it if it does not already exist {3} 1822 */ 1823 public RelatedArtifact getJustificationFirstRep() { 1824 if (getJustification().isEmpty()) { 1825 addJustification(); 1826 } 1827 return getJustification().get(0); 1828 } 1829 1830 protected void listChildren(List<Property> children) { 1831 super.listChildren(children); 1832 children.add(new Property("type", "CodeableConcept", "A classification or risk class of the device model.", 0, 1, type)); 1833 children.add(new Property("justification", "RelatedArtifact", "Further information qualifying this classification of the device model.", 0, java.lang.Integer.MAX_VALUE, justification)); 1834 } 1835 1836 @Override 1837 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1838 switch (_hash) { 1839 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "A classification or risk class of the device model.", 0, 1, type); 1840 case 1864993522: /*justification*/ return new Property("justification", "RelatedArtifact", "Further information qualifying this classification of the device model.", 0, java.lang.Integer.MAX_VALUE, justification); 1841 default: return super.getNamedProperty(_hash, _name, _checkValid); 1842 } 1843 1844 } 1845 1846 @Override 1847 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1848 switch (hash) { 1849 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1850 case 1864993522: /*justification*/ return this.justification == null ? new Base[0] : this.justification.toArray(new Base[this.justification.size()]); // RelatedArtifact 1851 default: return super.getProperty(hash, name, checkValid); 1852 } 1853 1854 } 1855 1856 @Override 1857 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1858 switch (hash) { 1859 case 3575610: // type 1860 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1861 return value; 1862 case 1864993522: // justification 1863 this.getJustification().add(TypeConvertor.castToRelatedArtifact(value)); // RelatedArtifact 1864 return value; 1865 default: return super.setProperty(hash, name, value); 1866 } 1867 1868 } 1869 1870 @Override 1871 public Base setProperty(String name, Base value) throws FHIRException { 1872 if (name.equals("type")) { 1873 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1874 } else if (name.equals("justification")) { 1875 this.getJustification().add(TypeConvertor.castToRelatedArtifact(value)); 1876 } else 1877 return super.setProperty(name, value); 1878 return value; 1879 } 1880 1881 @Override 1882 public Base makeProperty(int hash, String name) throws FHIRException { 1883 switch (hash) { 1884 case 3575610: return getType(); 1885 case 1864993522: return addJustification(); 1886 default: return super.makeProperty(hash, name); 1887 } 1888 1889 } 1890 1891 @Override 1892 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1893 switch (hash) { 1894 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1895 case 1864993522: /*justification*/ return new String[] {"RelatedArtifact"}; 1896 default: return super.getTypesForProperty(hash, name); 1897 } 1898 1899 } 1900 1901 @Override 1902 public Base addChild(String name) throws FHIRException { 1903 if (name.equals("type")) { 1904 this.type = new CodeableConcept(); 1905 return this.type; 1906 } 1907 else if (name.equals("justification")) { 1908 return addJustification(); 1909 } 1910 else 1911 return super.addChild(name); 1912 } 1913 1914 public DeviceDefinitionClassificationComponent copy() { 1915 DeviceDefinitionClassificationComponent dst = new DeviceDefinitionClassificationComponent(); 1916 copyValues(dst); 1917 return dst; 1918 } 1919 1920 public void copyValues(DeviceDefinitionClassificationComponent dst) { 1921 super.copyValues(dst); 1922 dst.type = type == null ? null : type.copy(); 1923 if (justification != null) { 1924 dst.justification = new ArrayList<RelatedArtifact>(); 1925 for (RelatedArtifact i : justification) 1926 dst.justification.add(i.copy()); 1927 }; 1928 } 1929 1930 @Override 1931 public boolean equalsDeep(Base other_) { 1932 if (!super.equalsDeep(other_)) 1933 return false; 1934 if (!(other_ instanceof DeviceDefinitionClassificationComponent)) 1935 return false; 1936 DeviceDefinitionClassificationComponent o = (DeviceDefinitionClassificationComponent) other_; 1937 return compareDeep(type, o.type, true) && compareDeep(justification, o.justification, true); 1938 } 1939 1940 @Override 1941 public boolean equalsShallow(Base other_) { 1942 if (!super.equalsShallow(other_)) 1943 return false; 1944 if (!(other_ instanceof DeviceDefinitionClassificationComponent)) 1945 return false; 1946 DeviceDefinitionClassificationComponent o = (DeviceDefinitionClassificationComponent) other_; 1947 return true; 1948 } 1949 1950 public boolean isEmpty() { 1951 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, justification); 1952 } 1953 1954 public String fhirType() { 1955 return "DeviceDefinition.classification"; 1956 1957 } 1958 1959 } 1960 1961 @Block() 1962 public static class DeviceDefinitionConformsToComponent extends BackboneElement implements IBaseBackboneElement { 1963 /** 1964 * Describes the type of the standard, specification, or formal guidance. 1965 */ 1966 @Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 1967 @Description(shortDefinition="Describes the common type of the standard, specification, or formal guidance", formalDefinition="Describes the type of the standard, specification, or formal guidance." ) 1968 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-specification-category") 1969 protected CodeableConcept category; 1970 1971 /** 1972 * Code that identifies the specific standard, specification, protocol, formal guidance, regulation, legislation, or certification scheme to which the device adheres. 1973 */ 1974 @Child(name = "specification", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true) 1975 @Description(shortDefinition="Identifies the standard, specification, or formal guidance that the device adheres to the Device Specification type", formalDefinition="Code that identifies the specific standard, specification, protocol, formal guidance, regulation, legislation, or certification scheme to which the device adheres." ) 1976 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-specification-type") 1977 protected CodeableConcept specification; 1978 1979 /** 1980 * Identifies the specific form or variant of the standard, specification, or formal guidance. This may be a 'version number', release, document edition, publication year, or other label. 1981 */ 1982 @Child(name = "version", type = {StringType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1983 @Description(shortDefinition="The specific form or variant of the standard, specification or formal guidance", formalDefinition="Identifies the specific form or variant of the standard, specification, or formal guidance. This may be a 'version number', release, document edition, publication year, or other label." ) 1984 protected List<StringType> version; 1985 1986 /** 1987 * Standard, regulation, certification, or guidance website, document, or other publication, or similar, supporting the conformance. 1988 */ 1989 @Child(name = "source", type = {RelatedArtifact.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1990 @Description(shortDefinition="Standard, regulation, certification, or guidance website, document, or other publication, or similar, supporting the conformance", formalDefinition="Standard, regulation, certification, or guidance website, document, or other publication, or similar, supporting the conformance." ) 1991 protected List<RelatedArtifact> source; 1992 1993 private static final long serialVersionUID = -370906560L; 1994 1995 /** 1996 * Constructor 1997 */ 1998 public DeviceDefinitionConformsToComponent() { 1999 super(); 2000 } 2001 2002 /** 2003 * Constructor 2004 */ 2005 public DeviceDefinitionConformsToComponent(CodeableConcept specification) { 2006 super(); 2007 this.setSpecification(specification); 2008 } 2009 2010 /** 2011 * @return {@link #category} (Describes the type of the standard, specification, or formal guidance.) 2012 */ 2013 public CodeableConcept getCategory() { 2014 if (this.category == null) 2015 if (Configuration.errorOnAutoCreate()) 2016 throw new Error("Attempt to auto-create DeviceDefinitionConformsToComponent.category"); 2017 else if (Configuration.doAutoCreate()) 2018 this.category = new CodeableConcept(); // cc 2019 return this.category; 2020 } 2021 2022 public boolean hasCategory() { 2023 return this.category != null && !this.category.isEmpty(); 2024 } 2025 2026 /** 2027 * @param value {@link #category} (Describes the type of the standard, specification, or formal guidance.) 2028 */ 2029 public DeviceDefinitionConformsToComponent setCategory(CodeableConcept value) { 2030 this.category = value; 2031 return this; 2032 } 2033 2034 /** 2035 * @return {@link #specification} (Code that identifies the specific standard, specification, protocol, formal guidance, regulation, legislation, or certification scheme to which the device adheres.) 2036 */ 2037 public CodeableConcept getSpecification() { 2038 if (this.specification == null) 2039 if (Configuration.errorOnAutoCreate()) 2040 throw new Error("Attempt to auto-create DeviceDefinitionConformsToComponent.specification"); 2041 else if (Configuration.doAutoCreate()) 2042 this.specification = new CodeableConcept(); // cc 2043 return this.specification; 2044 } 2045 2046 public boolean hasSpecification() { 2047 return this.specification != null && !this.specification.isEmpty(); 2048 } 2049 2050 /** 2051 * @param value {@link #specification} (Code that identifies the specific standard, specification, protocol, formal guidance, regulation, legislation, or certification scheme to which the device adheres.) 2052 */ 2053 public DeviceDefinitionConformsToComponent setSpecification(CodeableConcept value) { 2054 this.specification = value; 2055 return this; 2056 } 2057 2058 /** 2059 * @return {@link #version} (Identifies the specific form or variant of the standard, specification, or formal guidance. This may be a 'version number', release, document edition, publication year, or other label.) 2060 */ 2061 public List<StringType> getVersion() { 2062 if (this.version == null) 2063 this.version = new ArrayList<StringType>(); 2064 return this.version; 2065 } 2066 2067 /** 2068 * @return Returns a reference to <code>this</code> for easy method chaining 2069 */ 2070 public DeviceDefinitionConformsToComponent setVersion(List<StringType> theVersion) { 2071 this.version = theVersion; 2072 return this; 2073 } 2074 2075 public boolean hasVersion() { 2076 if (this.version == null) 2077 return false; 2078 for (StringType item : this.version) 2079 if (!item.isEmpty()) 2080 return true; 2081 return false; 2082 } 2083 2084 /** 2085 * @return {@link #version} (Identifies the specific form or variant of the standard, specification, or formal guidance. This may be a 'version number', release, document edition, publication year, or other label.) 2086 */ 2087 public StringType addVersionElement() {//2 2088 StringType t = new StringType(); 2089 if (this.version == null) 2090 this.version = new ArrayList<StringType>(); 2091 this.version.add(t); 2092 return t; 2093 } 2094 2095 /** 2096 * @param value {@link #version} (Identifies the specific form or variant of the standard, specification, or formal guidance. This may be a 'version number', release, document edition, publication year, or other label.) 2097 */ 2098 public DeviceDefinitionConformsToComponent addVersion(String value) { //1 2099 StringType t = new StringType(); 2100 t.setValue(value); 2101 if (this.version == null) 2102 this.version = new ArrayList<StringType>(); 2103 this.version.add(t); 2104 return this; 2105 } 2106 2107 /** 2108 * @param value {@link #version} (Identifies the specific form or variant of the standard, specification, or formal guidance. This may be a 'version number', release, document edition, publication year, or other label.) 2109 */ 2110 public boolean hasVersion(String value) { 2111 if (this.version == null) 2112 return false; 2113 for (StringType v : this.version) 2114 if (v.getValue().equals(value)) // string 2115 return true; 2116 return false; 2117 } 2118 2119 /** 2120 * @return {@link #source} (Standard, regulation, certification, or guidance website, document, or other publication, or similar, supporting the conformance.) 2121 */ 2122 public List<RelatedArtifact> getSource() { 2123 if (this.source == null) 2124 this.source = new ArrayList<RelatedArtifact>(); 2125 return this.source; 2126 } 2127 2128 /** 2129 * @return Returns a reference to <code>this</code> for easy method chaining 2130 */ 2131 public DeviceDefinitionConformsToComponent setSource(List<RelatedArtifact> theSource) { 2132 this.source = theSource; 2133 return this; 2134 } 2135 2136 public boolean hasSource() { 2137 if (this.source == null) 2138 return false; 2139 for (RelatedArtifact item : this.source) 2140 if (!item.isEmpty()) 2141 return true; 2142 return false; 2143 } 2144 2145 public RelatedArtifact addSource() { //3 2146 RelatedArtifact t = new RelatedArtifact(); 2147 if (this.source == null) 2148 this.source = new ArrayList<RelatedArtifact>(); 2149 this.source.add(t); 2150 return t; 2151 } 2152 2153 public DeviceDefinitionConformsToComponent addSource(RelatedArtifact t) { //3 2154 if (t == null) 2155 return this; 2156 if (this.source == null) 2157 this.source = new ArrayList<RelatedArtifact>(); 2158 this.source.add(t); 2159 return this; 2160 } 2161 2162 /** 2163 * @return The first repetition of repeating field {@link #source}, creating it if it does not already exist {3} 2164 */ 2165 public RelatedArtifact getSourceFirstRep() { 2166 if (getSource().isEmpty()) { 2167 addSource(); 2168 } 2169 return getSource().get(0); 2170 } 2171 2172 protected void listChildren(List<Property> children) { 2173 super.listChildren(children); 2174 children.add(new Property("category", "CodeableConcept", "Describes the type of the standard, specification, or formal guidance.", 0, 1, category)); 2175 children.add(new Property("specification", "CodeableConcept", "Code that identifies the specific standard, specification, protocol, formal guidance, regulation, legislation, or certification scheme to which the device adheres.", 0, 1, specification)); 2176 children.add(new Property("version", "string", "Identifies the specific form or variant of the standard, specification, or formal guidance. This may be a 'version number', release, document edition, publication year, or other label.", 0, java.lang.Integer.MAX_VALUE, version)); 2177 children.add(new Property("source", "RelatedArtifact", "Standard, regulation, certification, or guidance website, document, or other publication, or similar, supporting the conformance.", 0, java.lang.Integer.MAX_VALUE, source)); 2178 } 2179 2180 @Override 2181 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2182 switch (_hash) { 2183 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Describes the type of the standard, specification, or formal guidance.", 0, 1, category); 2184 case 1307197699: /*specification*/ return new Property("specification", "CodeableConcept", "Code that identifies the specific standard, specification, protocol, formal guidance, regulation, legislation, or certification scheme to which the device adheres.", 0, 1, specification); 2185 case 351608024: /*version*/ return new Property("version", "string", "Identifies the specific form or variant of the standard, specification, or formal guidance. This may be a 'version number', release, document edition, publication year, or other label.", 0, java.lang.Integer.MAX_VALUE, version); 2186 case -896505829: /*source*/ return new Property("source", "RelatedArtifact", "Standard, regulation, certification, or guidance website, document, or other publication, or similar, supporting the conformance.", 0, java.lang.Integer.MAX_VALUE, source); 2187 default: return super.getNamedProperty(_hash, _name, _checkValid); 2188 } 2189 2190 } 2191 2192 @Override 2193 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2194 switch (hash) { 2195 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 2196 case 1307197699: /*specification*/ return this.specification == null ? new Base[0] : new Base[] {this.specification}; // CodeableConcept 2197 case 351608024: /*version*/ return this.version == null ? new Base[0] : this.version.toArray(new Base[this.version.size()]); // StringType 2198 case -896505829: /*source*/ return this.source == null ? new Base[0] : this.source.toArray(new Base[this.source.size()]); // RelatedArtifact 2199 default: return super.getProperty(hash, name, checkValid); 2200 } 2201 2202 } 2203 2204 @Override 2205 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2206 switch (hash) { 2207 case 50511102: // category 2208 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2209 return value; 2210 case 1307197699: // specification 2211 this.specification = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2212 return value; 2213 case 351608024: // version 2214 this.getVersion().add(TypeConvertor.castToString(value)); // StringType 2215 return value; 2216 case -896505829: // source 2217 this.getSource().add(TypeConvertor.castToRelatedArtifact(value)); // RelatedArtifact 2218 return value; 2219 default: return super.setProperty(hash, name, value); 2220 } 2221 2222 } 2223 2224 @Override 2225 public Base setProperty(String name, Base value) throws FHIRException { 2226 if (name.equals("category")) { 2227 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2228 } else if (name.equals("specification")) { 2229 this.specification = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2230 } else if (name.equals("version")) { 2231 this.getVersion().add(TypeConvertor.castToString(value)); 2232 } else if (name.equals("source")) { 2233 this.getSource().add(TypeConvertor.castToRelatedArtifact(value)); 2234 } else 2235 return super.setProperty(name, value); 2236 return value; 2237 } 2238 2239 @Override 2240 public Base makeProperty(int hash, String name) throws FHIRException { 2241 switch (hash) { 2242 case 50511102: return getCategory(); 2243 case 1307197699: return getSpecification(); 2244 case 351608024: return addVersionElement(); 2245 case -896505829: return addSource(); 2246 default: return super.makeProperty(hash, name); 2247 } 2248 2249 } 2250 2251 @Override 2252 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2253 switch (hash) { 2254 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 2255 case 1307197699: /*specification*/ return new String[] {"CodeableConcept"}; 2256 case 351608024: /*version*/ return new String[] {"string"}; 2257 case -896505829: /*source*/ return new String[] {"RelatedArtifact"}; 2258 default: return super.getTypesForProperty(hash, name); 2259 } 2260 2261 } 2262 2263 @Override 2264 public Base addChild(String name) throws FHIRException { 2265 if (name.equals("category")) { 2266 this.category = new CodeableConcept(); 2267 return this.category; 2268 } 2269 else if (name.equals("specification")) { 2270 this.specification = new CodeableConcept(); 2271 return this.specification; 2272 } 2273 else if (name.equals("version")) { 2274 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.conformsTo.version"); 2275 } 2276 else if (name.equals("source")) { 2277 return addSource(); 2278 } 2279 else 2280 return super.addChild(name); 2281 } 2282 2283 public DeviceDefinitionConformsToComponent copy() { 2284 DeviceDefinitionConformsToComponent dst = new DeviceDefinitionConformsToComponent(); 2285 copyValues(dst); 2286 return dst; 2287 } 2288 2289 public void copyValues(DeviceDefinitionConformsToComponent dst) { 2290 super.copyValues(dst); 2291 dst.category = category == null ? null : category.copy(); 2292 dst.specification = specification == null ? null : specification.copy(); 2293 if (version != null) { 2294 dst.version = new ArrayList<StringType>(); 2295 for (StringType i : version) 2296 dst.version.add(i.copy()); 2297 }; 2298 if (source != null) { 2299 dst.source = new ArrayList<RelatedArtifact>(); 2300 for (RelatedArtifact i : source) 2301 dst.source.add(i.copy()); 2302 }; 2303 } 2304 2305 @Override 2306 public boolean equalsDeep(Base other_) { 2307 if (!super.equalsDeep(other_)) 2308 return false; 2309 if (!(other_ instanceof DeviceDefinitionConformsToComponent)) 2310 return false; 2311 DeviceDefinitionConformsToComponent o = (DeviceDefinitionConformsToComponent) other_; 2312 return compareDeep(category, o.category, true) && compareDeep(specification, o.specification, true) 2313 && compareDeep(version, o.version, true) && compareDeep(source, o.source, true); 2314 } 2315 2316 @Override 2317 public boolean equalsShallow(Base other_) { 2318 if (!super.equalsShallow(other_)) 2319 return false; 2320 if (!(other_ instanceof DeviceDefinitionConformsToComponent)) 2321 return false; 2322 DeviceDefinitionConformsToComponent o = (DeviceDefinitionConformsToComponent) other_; 2323 return compareValues(version, o.version, true); 2324 } 2325 2326 public boolean isEmpty() { 2327 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, specification, version 2328 , source); 2329 } 2330 2331 public String fhirType() { 2332 return "DeviceDefinition.conformsTo"; 2333 2334 } 2335 2336 } 2337 2338 @Block() 2339 public static class DeviceDefinitionHasPartComponent extends BackboneElement implements IBaseBackboneElement { 2340 /** 2341 * Reference to the device that is part of the current device. 2342 */ 2343 @Child(name = "reference", type = {DeviceDefinition.class}, order=1, min=1, max=1, modifier=false, summary=true) 2344 @Description(shortDefinition="Reference to the part", formalDefinition="Reference to the device that is part of the current device." ) 2345 protected Reference reference; 2346 2347 /** 2348 * Number of instances of the component device in the current device. 2349 */ 2350 @Child(name = "count", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2351 @Description(shortDefinition="Number of occurrences of the part", formalDefinition="Number of instances of the component device in the current device." ) 2352 protected IntegerType count; 2353 2354 private static final long serialVersionUID = -1166127369L; 2355 2356 /** 2357 * Constructor 2358 */ 2359 public DeviceDefinitionHasPartComponent() { 2360 super(); 2361 } 2362 2363 /** 2364 * Constructor 2365 */ 2366 public DeviceDefinitionHasPartComponent(Reference reference) { 2367 super(); 2368 this.setReference(reference); 2369 } 2370 2371 /** 2372 * @return {@link #reference} (Reference to the device that is part of the current device.) 2373 */ 2374 public Reference getReference() { 2375 if (this.reference == null) 2376 if (Configuration.errorOnAutoCreate()) 2377 throw new Error("Attempt to auto-create DeviceDefinitionHasPartComponent.reference"); 2378 else if (Configuration.doAutoCreate()) 2379 this.reference = new Reference(); // cc 2380 return this.reference; 2381 } 2382 2383 public boolean hasReference() { 2384 return this.reference != null && !this.reference.isEmpty(); 2385 } 2386 2387 /** 2388 * @param value {@link #reference} (Reference to the device that is part of the current device.) 2389 */ 2390 public DeviceDefinitionHasPartComponent setReference(Reference value) { 2391 this.reference = value; 2392 return this; 2393 } 2394 2395 /** 2396 * @return {@link #count} (Number of instances of the component device in the current device.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value 2397 */ 2398 public IntegerType getCountElement() { 2399 if (this.count == null) 2400 if (Configuration.errorOnAutoCreate()) 2401 throw new Error("Attempt to auto-create DeviceDefinitionHasPartComponent.count"); 2402 else if (Configuration.doAutoCreate()) 2403 this.count = new IntegerType(); // bb 2404 return this.count; 2405 } 2406 2407 public boolean hasCountElement() { 2408 return this.count != null && !this.count.isEmpty(); 2409 } 2410 2411 public boolean hasCount() { 2412 return this.count != null && !this.count.isEmpty(); 2413 } 2414 2415 /** 2416 * @param value {@link #count} (Number of instances of the component device in the current device.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value 2417 */ 2418 public DeviceDefinitionHasPartComponent setCountElement(IntegerType value) { 2419 this.count = value; 2420 return this; 2421 } 2422 2423 /** 2424 * @return Number of instances of the component device in the current device. 2425 */ 2426 public int getCount() { 2427 return this.count == null || this.count.isEmpty() ? 0 : this.count.getValue(); 2428 } 2429 2430 /** 2431 * @param value Number of instances of the component device in the current device. 2432 */ 2433 public DeviceDefinitionHasPartComponent setCount(int value) { 2434 if (this.count == null) 2435 this.count = new IntegerType(); 2436 this.count.setValue(value); 2437 return this; 2438 } 2439 2440 protected void listChildren(List<Property> children) { 2441 super.listChildren(children); 2442 children.add(new Property("reference", "Reference(DeviceDefinition)", "Reference to the device that is part of the current device.", 0, 1, reference)); 2443 children.add(new Property("count", "integer", "Number of instances of the component device in the current device.", 0, 1, count)); 2444 } 2445 2446 @Override 2447 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2448 switch (_hash) { 2449 case -925155509: /*reference*/ return new Property("reference", "Reference(DeviceDefinition)", "Reference to the device that is part of the current device.", 0, 1, reference); 2450 case 94851343: /*count*/ return new Property("count", "integer", "Number of instances of the component device in the current device.", 0, 1, count); 2451 default: return super.getNamedProperty(_hash, _name, _checkValid); 2452 } 2453 2454 } 2455 2456 @Override 2457 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2458 switch (hash) { 2459 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference 2460 case 94851343: /*count*/ return this.count == null ? new Base[0] : new Base[] {this.count}; // IntegerType 2461 default: return super.getProperty(hash, name, checkValid); 2462 } 2463 2464 } 2465 2466 @Override 2467 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2468 switch (hash) { 2469 case -925155509: // reference 2470 this.reference = TypeConvertor.castToReference(value); // Reference 2471 return value; 2472 case 94851343: // count 2473 this.count = TypeConvertor.castToInteger(value); // IntegerType 2474 return value; 2475 default: return super.setProperty(hash, name, value); 2476 } 2477 2478 } 2479 2480 @Override 2481 public Base setProperty(String name, Base value) throws FHIRException { 2482 if (name.equals("reference")) { 2483 this.reference = TypeConvertor.castToReference(value); // Reference 2484 } else if (name.equals("count")) { 2485 this.count = TypeConvertor.castToInteger(value); // IntegerType 2486 } else 2487 return super.setProperty(name, value); 2488 return value; 2489 } 2490 2491 @Override 2492 public Base makeProperty(int hash, String name) throws FHIRException { 2493 switch (hash) { 2494 case -925155509: return getReference(); 2495 case 94851343: return getCountElement(); 2496 default: return super.makeProperty(hash, name); 2497 } 2498 2499 } 2500 2501 @Override 2502 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2503 switch (hash) { 2504 case -925155509: /*reference*/ return new String[] {"Reference"}; 2505 case 94851343: /*count*/ return new String[] {"integer"}; 2506 default: return super.getTypesForProperty(hash, name); 2507 } 2508 2509 } 2510 2511 @Override 2512 public Base addChild(String name) throws FHIRException { 2513 if (name.equals("reference")) { 2514 this.reference = new Reference(); 2515 return this.reference; 2516 } 2517 else if (name.equals("count")) { 2518 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.hasPart.count"); 2519 } 2520 else 2521 return super.addChild(name); 2522 } 2523 2524 public DeviceDefinitionHasPartComponent copy() { 2525 DeviceDefinitionHasPartComponent dst = new DeviceDefinitionHasPartComponent(); 2526 copyValues(dst); 2527 return dst; 2528 } 2529 2530 public void copyValues(DeviceDefinitionHasPartComponent dst) { 2531 super.copyValues(dst); 2532 dst.reference = reference == null ? null : reference.copy(); 2533 dst.count = count == null ? null : count.copy(); 2534 } 2535 2536 @Override 2537 public boolean equalsDeep(Base other_) { 2538 if (!super.equalsDeep(other_)) 2539 return false; 2540 if (!(other_ instanceof DeviceDefinitionHasPartComponent)) 2541 return false; 2542 DeviceDefinitionHasPartComponent o = (DeviceDefinitionHasPartComponent) other_; 2543 return compareDeep(reference, o.reference, true) && compareDeep(count, o.count, true); 2544 } 2545 2546 @Override 2547 public boolean equalsShallow(Base other_) { 2548 if (!super.equalsShallow(other_)) 2549 return false; 2550 if (!(other_ instanceof DeviceDefinitionHasPartComponent)) 2551 return false; 2552 DeviceDefinitionHasPartComponent o = (DeviceDefinitionHasPartComponent) other_; 2553 return compareValues(count, o.count, true); 2554 } 2555 2556 public boolean isEmpty() { 2557 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(reference, count); 2558 } 2559 2560 public String fhirType() { 2561 return "DeviceDefinition.hasPart"; 2562 2563 } 2564 2565 } 2566 2567 @Block() 2568 public static class DeviceDefinitionPackagingComponent extends BackboneElement implements IBaseBackboneElement { 2569 /** 2570 * The business identifier of the packaged medication. 2571 */ 2572 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) 2573 @Description(shortDefinition="Business identifier of the packaged medication", formalDefinition="The business identifier of the packaged medication." ) 2574 protected Identifier identifier; 2575 2576 /** 2577 * A code that defines the specific type of packaging. 2578 */ 2579 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 2580 @Description(shortDefinition="A code that defines the specific type of packaging", formalDefinition="A code that defines the specific type of packaging." ) 2581 protected CodeableConcept type; 2582 2583 /** 2584 * The number of items contained in the package (devices or sub-packages). 2585 */ 2586 @Child(name = "count", type = {IntegerType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2587 @Description(shortDefinition="The number of items contained in the package (devices or sub-packages)", formalDefinition="The number of items contained in the package (devices or sub-packages)." ) 2588 protected IntegerType count; 2589 2590 /** 2591 * An organization that distributes the packaged device. 2592 */ 2593 @Child(name = "distributor", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2594 @Description(shortDefinition="An organization that distributes the packaged device", formalDefinition="An organization that distributes the packaged device." ) 2595 protected List<PackagingDistributorComponent> distributor; 2596 2597 /** 2598 * Unique Device Identifier (UDI) Barcode string on the packaging. 2599 */ 2600 @Child(name = "udiDeviceIdentifier", type = {DeviceDefinitionUdiDeviceIdentifierComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2601 @Description(shortDefinition="Unique Device Identifier (UDI) Barcode string on the packaging", formalDefinition="Unique Device Identifier (UDI) Barcode string on the packaging." ) 2602 protected List<DeviceDefinitionUdiDeviceIdentifierComponent> udiDeviceIdentifier; 2603 2604 /** 2605 * Allows packages within packages. 2606 */ 2607 @Child(name = "packaging", type = {DeviceDefinitionPackagingComponent.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2608 @Description(shortDefinition="Allows packages within packages", formalDefinition="Allows packages within packages." ) 2609 protected List<DeviceDefinitionPackagingComponent> packaging; 2610 2611 private static final long serialVersionUID = 1022373074L; 2612 2613 /** 2614 * Constructor 2615 */ 2616 public DeviceDefinitionPackagingComponent() { 2617 super(); 2618 } 2619 2620 /** 2621 * @return {@link #identifier} (The business identifier of the packaged medication.) 2622 */ 2623 public Identifier getIdentifier() { 2624 if (this.identifier == null) 2625 if (Configuration.errorOnAutoCreate()) 2626 throw new Error("Attempt to auto-create DeviceDefinitionPackagingComponent.identifier"); 2627 else if (Configuration.doAutoCreate()) 2628 this.identifier = new Identifier(); // cc 2629 return this.identifier; 2630 } 2631 2632 public boolean hasIdentifier() { 2633 return this.identifier != null && !this.identifier.isEmpty(); 2634 } 2635 2636 /** 2637 * @param value {@link #identifier} (The business identifier of the packaged medication.) 2638 */ 2639 public DeviceDefinitionPackagingComponent setIdentifier(Identifier value) { 2640 this.identifier = value; 2641 return this; 2642 } 2643 2644 /** 2645 * @return {@link #type} (A code that defines the specific type of packaging.) 2646 */ 2647 public CodeableConcept getType() { 2648 if (this.type == null) 2649 if (Configuration.errorOnAutoCreate()) 2650 throw new Error("Attempt to auto-create DeviceDefinitionPackagingComponent.type"); 2651 else if (Configuration.doAutoCreate()) 2652 this.type = new CodeableConcept(); // cc 2653 return this.type; 2654 } 2655 2656 public boolean hasType() { 2657 return this.type != null && !this.type.isEmpty(); 2658 } 2659 2660 /** 2661 * @param value {@link #type} (A code that defines the specific type of packaging.) 2662 */ 2663 public DeviceDefinitionPackagingComponent setType(CodeableConcept value) { 2664 this.type = value; 2665 return this; 2666 } 2667 2668 /** 2669 * @return {@link #count} (The number of items contained in the package (devices or sub-packages).). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value 2670 */ 2671 public IntegerType getCountElement() { 2672 if (this.count == null) 2673 if (Configuration.errorOnAutoCreate()) 2674 throw new Error("Attempt to auto-create DeviceDefinitionPackagingComponent.count"); 2675 else if (Configuration.doAutoCreate()) 2676 this.count = new IntegerType(); // bb 2677 return this.count; 2678 } 2679 2680 public boolean hasCountElement() { 2681 return this.count != null && !this.count.isEmpty(); 2682 } 2683 2684 public boolean hasCount() { 2685 return this.count != null && !this.count.isEmpty(); 2686 } 2687 2688 /** 2689 * @param value {@link #count} (The number of items contained in the package (devices or sub-packages).). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value 2690 */ 2691 public DeviceDefinitionPackagingComponent setCountElement(IntegerType value) { 2692 this.count = value; 2693 return this; 2694 } 2695 2696 /** 2697 * @return The number of items contained in the package (devices or sub-packages). 2698 */ 2699 public int getCount() { 2700 return this.count == null || this.count.isEmpty() ? 0 : this.count.getValue(); 2701 } 2702 2703 /** 2704 * @param value The number of items contained in the package (devices or sub-packages). 2705 */ 2706 public DeviceDefinitionPackagingComponent setCount(int value) { 2707 if (this.count == null) 2708 this.count = new IntegerType(); 2709 this.count.setValue(value); 2710 return this; 2711 } 2712 2713 /** 2714 * @return {@link #distributor} (An organization that distributes the packaged device.) 2715 */ 2716 public List<PackagingDistributorComponent> getDistributor() { 2717 if (this.distributor == null) 2718 this.distributor = new ArrayList<PackagingDistributorComponent>(); 2719 return this.distributor; 2720 } 2721 2722 /** 2723 * @return Returns a reference to <code>this</code> for easy method chaining 2724 */ 2725 public DeviceDefinitionPackagingComponent setDistributor(List<PackagingDistributorComponent> theDistributor) { 2726 this.distributor = theDistributor; 2727 return this; 2728 } 2729 2730 public boolean hasDistributor() { 2731 if (this.distributor == null) 2732 return false; 2733 for (PackagingDistributorComponent item : this.distributor) 2734 if (!item.isEmpty()) 2735 return true; 2736 return false; 2737 } 2738 2739 public PackagingDistributorComponent addDistributor() { //3 2740 PackagingDistributorComponent t = new PackagingDistributorComponent(); 2741 if (this.distributor == null) 2742 this.distributor = new ArrayList<PackagingDistributorComponent>(); 2743 this.distributor.add(t); 2744 return t; 2745 } 2746 2747 public DeviceDefinitionPackagingComponent addDistributor(PackagingDistributorComponent t) { //3 2748 if (t == null) 2749 return this; 2750 if (this.distributor == null) 2751 this.distributor = new ArrayList<PackagingDistributorComponent>(); 2752 this.distributor.add(t); 2753 return this; 2754 } 2755 2756 /** 2757 * @return The first repetition of repeating field {@link #distributor}, creating it if it does not already exist {3} 2758 */ 2759 public PackagingDistributorComponent getDistributorFirstRep() { 2760 if (getDistributor().isEmpty()) { 2761 addDistributor(); 2762 } 2763 return getDistributor().get(0); 2764 } 2765 2766 /** 2767 * @return {@link #udiDeviceIdentifier} (Unique Device Identifier (UDI) Barcode string on the packaging.) 2768 */ 2769 public List<DeviceDefinitionUdiDeviceIdentifierComponent> getUdiDeviceIdentifier() { 2770 if (this.udiDeviceIdentifier == null) 2771 this.udiDeviceIdentifier = new ArrayList<DeviceDefinitionUdiDeviceIdentifierComponent>(); 2772 return this.udiDeviceIdentifier; 2773 } 2774 2775 /** 2776 * @return Returns a reference to <code>this</code> for easy method chaining 2777 */ 2778 public DeviceDefinitionPackagingComponent setUdiDeviceIdentifier(List<DeviceDefinitionUdiDeviceIdentifierComponent> theUdiDeviceIdentifier) { 2779 this.udiDeviceIdentifier = theUdiDeviceIdentifier; 2780 return this; 2781 } 2782 2783 public boolean hasUdiDeviceIdentifier() { 2784 if (this.udiDeviceIdentifier == null) 2785 return false; 2786 for (DeviceDefinitionUdiDeviceIdentifierComponent item : this.udiDeviceIdentifier) 2787 if (!item.isEmpty()) 2788 return true; 2789 return false; 2790 } 2791 2792 public DeviceDefinitionUdiDeviceIdentifierComponent addUdiDeviceIdentifier() { //3 2793 DeviceDefinitionUdiDeviceIdentifierComponent t = new DeviceDefinitionUdiDeviceIdentifierComponent(); 2794 if (this.udiDeviceIdentifier == null) 2795 this.udiDeviceIdentifier = new ArrayList<DeviceDefinitionUdiDeviceIdentifierComponent>(); 2796 this.udiDeviceIdentifier.add(t); 2797 return t; 2798 } 2799 2800 public DeviceDefinitionPackagingComponent addUdiDeviceIdentifier(DeviceDefinitionUdiDeviceIdentifierComponent t) { //3 2801 if (t == null) 2802 return this; 2803 if (this.udiDeviceIdentifier == null) 2804 this.udiDeviceIdentifier = new ArrayList<DeviceDefinitionUdiDeviceIdentifierComponent>(); 2805 this.udiDeviceIdentifier.add(t); 2806 return this; 2807 } 2808 2809 /** 2810 * @return The first repetition of repeating field {@link #udiDeviceIdentifier}, creating it if it does not already exist {3} 2811 */ 2812 public DeviceDefinitionUdiDeviceIdentifierComponent getUdiDeviceIdentifierFirstRep() { 2813 if (getUdiDeviceIdentifier().isEmpty()) { 2814 addUdiDeviceIdentifier(); 2815 } 2816 return getUdiDeviceIdentifier().get(0); 2817 } 2818 2819 /** 2820 * @return {@link #packaging} (Allows packages within packages.) 2821 */ 2822 public List<DeviceDefinitionPackagingComponent> getPackaging() { 2823 if (this.packaging == null) 2824 this.packaging = new ArrayList<DeviceDefinitionPackagingComponent>(); 2825 return this.packaging; 2826 } 2827 2828 /** 2829 * @return Returns a reference to <code>this</code> for easy method chaining 2830 */ 2831 public DeviceDefinitionPackagingComponent setPackaging(List<DeviceDefinitionPackagingComponent> thePackaging) { 2832 this.packaging = thePackaging; 2833 return this; 2834 } 2835 2836 public boolean hasPackaging() { 2837 if (this.packaging == null) 2838 return false; 2839 for (DeviceDefinitionPackagingComponent item : this.packaging) 2840 if (!item.isEmpty()) 2841 return true; 2842 return false; 2843 } 2844 2845 public DeviceDefinitionPackagingComponent addPackaging() { //3 2846 DeviceDefinitionPackagingComponent t = new DeviceDefinitionPackagingComponent(); 2847 if (this.packaging == null) 2848 this.packaging = new ArrayList<DeviceDefinitionPackagingComponent>(); 2849 this.packaging.add(t); 2850 return t; 2851 } 2852 2853 public DeviceDefinitionPackagingComponent addPackaging(DeviceDefinitionPackagingComponent t) { //3 2854 if (t == null) 2855 return this; 2856 if (this.packaging == null) 2857 this.packaging = new ArrayList<DeviceDefinitionPackagingComponent>(); 2858 this.packaging.add(t); 2859 return this; 2860 } 2861 2862 /** 2863 * @return The first repetition of repeating field {@link #packaging}, creating it if it does not already exist {3} 2864 */ 2865 public DeviceDefinitionPackagingComponent getPackagingFirstRep() { 2866 if (getPackaging().isEmpty()) { 2867 addPackaging(); 2868 } 2869 return getPackaging().get(0); 2870 } 2871 2872 protected void listChildren(List<Property> children) { 2873 super.listChildren(children); 2874 children.add(new Property("identifier", "Identifier", "The business identifier of the packaged medication.", 0, 1, identifier)); 2875 children.add(new Property("type", "CodeableConcept", "A code that defines the specific type of packaging.", 0, 1, type)); 2876 children.add(new Property("count", "integer", "The number of items contained in the package (devices or sub-packages).", 0, 1, count)); 2877 children.add(new Property("distributor", "", "An organization that distributes the packaged device.", 0, java.lang.Integer.MAX_VALUE, distributor)); 2878 children.add(new Property("udiDeviceIdentifier", "@DeviceDefinition.udiDeviceIdentifier", "Unique Device Identifier (UDI) Barcode string on the packaging.", 0, java.lang.Integer.MAX_VALUE, udiDeviceIdentifier)); 2879 children.add(new Property("packaging", "@DeviceDefinition.packaging", "Allows packages within packages.", 0, java.lang.Integer.MAX_VALUE, packaging)); 2880 } 2881 2882 @Override 2883 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2884 switch (_hash) { 2885 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "The business identifier of the packaged medication.", 0, 1, identifier); 2886 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "A code that defines the specific type of packaging.", 0, 1, type); 2887 case 94851343: /*count*/ return new Property("count", "integer", "The number of items contained in the package (devices or sub-packages).", 0, 1, count); 2888 case 1334482919: /*distributor*/ return new Property("distributor", "", "An organization that distributes the packaged device.", 0, java.lang.Integer.MAX_VALUE, distributor); 2889 case -99121287: /*udiDeviceIdentifier*/ return new Property("udiDeviceIdentifier", "@DeviceDefinition.udiDeviceIdentifier", "Unique Device Identifier (UDI) Barcode string on the packaging.", 0, java.lang.Integer.MAX_VALUE, udiDeviceIdentifier); 2890 case 1802065795: /*packaging*/ return new Property("packaging", "@DeviceDefinition.packaging", "Allows packages within packages.", 0, java.lang.Integer.MAX_VALUE, packaging); 2891 default: return super.getNamedProperty(_hash, _name, _checkValid); 2892 } 2893 2894 } 2895 2896 @Override 2897 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2898 switch (hash) { 2899 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 2900 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 2901 case 94851343: /*count*/ return this.count == null ? new Base[0] : new Base[] {this.count}; // IntegerType 2902 case 1334482919: /*distributor*/ return this.distributor == null ? new Base[0] : this.distributor.toArray(new Base[this.distributor.size()]); // PackagingDistributorComponent 2903 case -99121287: /*udiDeviceIdentifier*/ return this.udiDeviceIdentifier == null ? new Base[0] : this.udiDeviceIdentifier.toArray(new Base[this.udiDeviceIdentifier.size()]); // DeviceDefinitionUdiDeviceIdentifierComponent 2904 case 1802065795: /*packaging*/ return this.packaging == null ? new Base[0] : this.packaging.toArray(new Base[this.packaging.size()]); // DeviceDefinitionPackagingComponent 2905 default: return super.getProperty(hash, name, checkValid); 2906 } 2907 2908 } 2909 2910 @Override 2911 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2912 switch (hash) { 2913 case -1618432855: // identifier 2914 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 2915 return value; 2916 case 3575610: // type 2917 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2918 return value; 2919 case 94851343: // count 2920 this.count = TypeConvertor.castToInteger(value); // IntegerType 2921 return value; 2922 case 1334482919: // distributor 2923 this.getDistributor().add((PackagingDistributorComponent) value); // PackagingDistributorComponent 2924 return value; 2925 case -99121287: // udiDeviceIdentifier 2926 this.getUdiDeviceIdentifier().add((DeviceDefinitionUdiDeviceIdentifierComponent) value); // DeviceDefinitionUdiDeviceIdentifierComponent 2927 return value; 2928 case 1802065795: // packaging 2929 this.getPackaging().add((DeviceDefinitionPackagingComponent) value); // DeviceDefinitionPackagingComponent 2930 return value; 2931 default: return super.setProperty(hash, name, value); 2932 } 2933 2934 } 2935 2936 @Override 2937 public Base setProperty(String name, Base value) throws FHIRException { 2938 if (name.equals("identifier")) { 2939 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 2940 } else if (name.equals("type")) { 2941 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2942 } else if (name.equals("count")) { 2943 this.count = TypeConvertor.castToInteger(value); // IntegerType 2944 } else if (name.equals("distributor")) { 2945 this.getDistributor().add((PackagingDistributorComponent) value); 2946 } else if (name.equals("udiDeviceIdentifier")) { 2947 this.getUdiDeviceIdentifier().add((DeviceDefinitionUdiDeviceIdentifierComponent) value); 2948 } else if (name.equals("packaging")) { 2949 this.getPackaging().add((DeviceDefinitionPackagingComponent) value); 2950 } else 2951 return super.setProperty(name, value); 2952 return value; 2953 } 2954 2955 @Override 2956 public Base makeProperty(int hash, String name) throws FHIRException { 2957 switch (hash) { 2958 case -1618432855: return getIdentifier(); 2959 case 3575610: return getType(); 2960 case 94851343: return getCountElement(); 2961 case 1334482919: return addDistributor(); 2962 case -99121287: return addUdiDeviceIdentifier(); 2963 case 1802065795: return addPackaging(); 2964 default: return super.makeProperty(hash, name); 2965 } 2966 2967 } 2968 2969 @Override 2970 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2971 switch (hash) { 2972 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2973 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 2974 case 94851343: /*count*/ return new String[] {"integer"}; 2975 case 1334482919: /*distributor*/ return new String[] {}; 2976 case -99121287: /*udiDeviceIdentifier*/ return new String[] {"@DeviceDefinition.udiDeviceIdentifier"}; 2977 case 1802065795: /*packaging*/ return new String[] {"@DeviceDefinition.packaging"}; 2978 default: return super.getTypesForProperty(hash, name); 2979 } 2980 2981 } 2982 2983 @Override 2984 public Base addChild(String name) throws FHIRException { 2985 if (name.equals("identifier")) { 2986 this.identifier = new Identifier(); 2987 return this.identifier; 2988 } 2989 else if (name.equals("type")) { 2990 this.type = new CodeableConcept(); 2991 return this.type; 2992 } 2993 else if (name.equals("count")) { 2994 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.packaging.count"); 2995 } 2996 else if (name.equals("distributor")) { 2997 return addDistributor(); 2998 } 2999 else if (name.equals("udiDeviceIdentifier")) { 3000 return addUdiDeviceIdentifier(); 3001 } 3002 else if (name.equals("packaging")) { 3003 return addPackaging(); 3004 } 3005 else 3006 return super.addChild(name); 3007 } 3008 3009 public DeviceDefinitionPackagingComponent copy() { 3010 DeviceDefinitionPackagingComponent dst = new DeviceDefinitionPackagingComponent(); 3011 copyValues(dst); 3012 return dst; 3013 } 3014 3015 public void copyValues(DeviceDefinitionPackagingComponent dst) { 3016 super.copyValues(dst); 3017 dst.identifier = identifier == null ? null : identifier.copy(); 3018 dst.type = type == null ? null : type.copy(); 3019 dst.count = count == null ? null : count.copy(); 3020 if (distributor != null) { 3021 dst.distributor = new ArrayList<PackagingDistributorComponent>(); 3022 for (PackagingDistributorComponent i : distributor) 3023 dst.distributor.add(i.copy()); 3024 }; 3025 if (udiDeviceIdentifier != null) { 3026 dst.udiDeviceIdentifier = new ArrayList<DeviceDefinitionUdiDeviceIdentifierComponent>(); 3027 for (DeviceDefinitionUdiDeviceIdentifierComponent i : udiDeviceIdentifier) 3028 dst.udiDeviceIdentifier.add(i.copy()); 3029 }; 3030 if (packaging != null) { 3031 dst.packaging = new ArrayList<DeviceDefinitionPackagingComponent>(); 3032 for (DeviceDefinitionPackagingComponent i : packaging) 3033 dst.packaging.add(i.copy()); 3034 }; 3035 } 3036 3037 @Override 3038 public boolean equalsDeep(Base other_) { 3039 if (!super.equalsDeep(other_)) 3040 return false; 3041 if (!(other_ instanceof DeviceDefinitionPackagingComponent)) 3042 return false; 3043 DeviceDefinitionPackagingComponent o = (DeviceDefinitionPackagingComponent) other_; 3044 return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(count, o.count, true) 3045 && compareDeep(distributor, o.distributor, true) && compareDeep(udiDeviceIdentifier, o.udiDeviceIdentifier, true) 3046 && compareDeep(packaging, o.packaging, true); 3047 } 3048 3049 @Override 3050 public boolean equalsShallow(Base other_) { 3051 if (!super.equalsShallow(other_)) 3052 return false; 3053 if (!(other_ instanceof DeviceDefinitionPackagingComponent)) 3054 return false; 3055 DeviceDefinitionPackagingComponent o = (DeviceDefinitionPackagingComponent) other_; 3056 return compareValues(count, o.count, true); 3057 } 3058 3059 public boolean isEmpty() { 3060 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, count 3061 , distributor, udiDeviceIdentifier, packaging); 3062 } 3063 3064 public String fhirType() { 3065 return "DeviceDefinition.packaging"; 3066 3067 } 3068 3069 } 3070 3071 @Block() 3072 public static class PackagingDistributorComponent extends BackboneElement implements IBaseBackboneElement { 3073 /** 3074 * Distributor's human-readable name. 3075 */ 3076 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 3077 @Description(shortDefinition="Distributor's human-readable name", formalDefinition="Distributor's human-readable name." ) 3078 protected StringType name; 3079 3080 /** 3081 * Distributor as an Organization resource. 3082 */ 3083 @Child(name = "organizationReference", type = {Organization.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3084 @Description(shortDefinition="Distributor as an Organization resource", formalDefinition="Distributor as an Organization resource." ) 3085 protected List<Reference> organizationReference; 3086 3087 private static final long serialVersionUID = 1587433419L; 3088 3089 /** 3090 * Constructor 3091 */ 3092 public PackagingDistributorComponent() { 3093 super(); 3094 } 3095 3096 /** 3097 * @return {@link #name} (Distributor's human-readable name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 3098 */ 3099 public StringType getNameElement() { 3100 if (this.name == null) 3101 if (Configuration.errorOnAutoCreate()) 3102 throw new Error("Attempt to auto-create PackagingDistributorComponent.name"); 3103 else if (Configuration.doAutoCreate()) 3104 this.name = new StringType(); // bb 3105 return this.name; 3106 } 3107 3108 public boolean hasNameElement() { 3109 return this.name != null && !this.name.isEmpty(); 3110 } 3111 3112 public boolean hasName() { 3113 return this.name != null && !this.name.isEmpty(); 3114 } 3115 3116 /** 3117 * @param value {@link #name} (Distributor's human-readable name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 3118 */ 3119 public PackagingDistributorComponent setNameElement(StringType value) { 3120 this.name = value; 3121 return this; 3122 } 3123 3124 /** 3125 * @return Distributor's human-readable name. 3126 */ 3127 public String getName() { 3128 return this.name == null ? null : this.name.getValue(); 3129 } 3130 3131 /** 3132 * @param value Distributor's human-readable name. 3133 */ 3134 public PackagingDistributorComponent setName(String value) { 3135 if (Utilities.noString(value)) 3136 this.name = null; 3137 else { 3138 if (this.name == null) 3139 this.name = new StringType(); 3140 this.name.setValue(value); 3141 } 3142 return this; 3143 } 3144 3145 /** 3146 * @return {@link #organizationReference} (Distributor as an Organization resource.) 3147 */ 3148 public List<Reference> getOrganizationReference() { 3149 if (this.organizationReference == null) 3150 this.organizationReference = new ArrayList<Reference>(); 3151 return this.organizationReference; 3152 } 3153 3154 /** 3155 * @return Returns a reference to <code>this</code> for easy method chaining 3156 */ 3157 public PackagingDistributorComponent setOrganizationReference(List<Reference> theOrganizationReference) { 3158 this.organizationReference = theOrganizationReference; 3159 return this; 3160 } 3161 3162 public boolean hasOrganizationReference() { 3163 if (this.organizationReference == null) 3164 return false; 3165 for (Reference item : this.organizationReference) 3166 if (!item.isEmpty()) 3167 return true; 3168 return false; 3169 } 3170 3171 public Reference addOrganizationReference() { //3 3172 Reference t = new Reference(); 3173 if (this.organizationReference == null) 3174 this.organizationReference = new ArrayList<Reference>(); 3175 this.organizationReference.add(t); 3176 return t; 3177 } 3178 3179 public PackagingDistributorComponent addOrganizationReference(Reference t) { //3 3180 if (t == null) 3181 return this; 3182 if (this.organizationReference == null) 3183 this.organizationReference = new ArrayList<Reference>(); 3184 this.organizationReference.add(t); 3185 return this; 3186 } 3187 3188 /** 3189 * @return The first repetition of repeating field {@link #organizationReference}, creating it if it does not already exist {3} 3190 */ 3191 public Reference getOrganizationReferenceFirstRep() { 3192 if (getOrganizationReference().isEmpty()) { 3193 addOrganizationReference(); 3194 } 3195 return getOrganizationReference().get(0); 3196 } 3197 3198 protected void listChildren(List<Property> children) { 3199 super.listChildren(children); 3200 children.add(new Property("name", "string", "Distributor's human-readable name.", 0, 1, name)); 3201 children.add(new Property("organizationReference", "Reference(Organization)", "Distributor as an Organization resource.", 0, java.lang.Integer.MAX_VALUE, organizationReference)); 3202 } 3203 3204 @Override 3205 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3206 switch (_hash) { 3207 case 3373707: /*name*/ return new Property("name", "string", "Distributor's human-readable name.", 0, 1, name); 3208 case 1860475736: /*organizationReference*/ return new Property("organizationReference", "Reference(Organization)", "Distributor as an Organization resource.", 0, java.lang.Integer.MAX_VALUE, organizationReference); 3209 default: return super.getNamedProperty(_hash, _name, _checkValid); 3210 } 3211 3212 } 3213 3214 @Override 3215 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3216 switch (hash) { 3217 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 3218 case 1860475736: /*organizationReference*/ return this.organizationReference == null ? new Base[0] : this.organizationReference.toArray(new Base[this.organizationReference.size()]); // Reference 3219 default: return super.getProperty(hash, name, checkValid); 3220 } 3221 3222 } 3223 3224 @Override 3225 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3226 switch (hash) { 3227 case 3373707: // name 3228 this.name = TypeConvertor.castToString(value); // StringType 3229 return value; 3230 case 1860475736: // organizationReference 3231 this.getOrganizationReference().add(TypeConvertor.castToReference(value)); // Reference 3232 return value; 3233 default: return super.setProperty(hash, name, value); 3234 } 3235 3236 } 3237 3238 @Override 3239 public Base setProperty(String name, Base value) throws FHIRException { 3240 if (name.equals("name")) { 3241 this.name = TypeConvertor.castToString(value); // StringType 3242 } else if (name.equals("organizationReference")) { 3243 this.getOrganizationReference().add(TypeConvertor.castToReference(value)); 3244 } else 3245 return super.setProperty(name, value); 3246 return value; 3247 } 3248 3249 @Override 3250 public Base makeProperty(int hash, String name) throws FHIRException { 3251 switch (hash) { 3252 case 3373707: return getNameElement(); 3253 case 1860475736: return addOrganizationReference(); 3254 default: return super.makeProperty(hash, name); 3255 } 3256 3257 } 3258 3259 @Override 3260 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3261 switch (hash) { 3262 case 3373707: /*name*/ return new String[] {"string"}; 3263 case 1860475736: /*organizationReference*/ return new String[] {"Reference"}; 3264 default: return super.getTypesForProperty(hash, name); 3265 } 3266 3267 } 3268 3269 @Override 3270 public Base addChild(String name) throws FHIRException { 3271 if (name.equals("name")) { 3272 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.packaging.distributor.name"); 3273 } 3274 else if (name.equals("organizationReference")) { 3275 return addOrganizationReference(); 3276 } 3277 else 3278 return super.addChild(name); 3279 } 3280 3281 public PackagingDistributorComponent copy() { 3282 PackagingDistributorComponent dst = new PackagingDistributorComponent(); 3283 copyValues(dst); 3284 return dst; 3285 } 3286 3287 public void copyValues(PackagingDistributorComponent dst) { 3288 super.copyValues(dst); 3289 dst.name = name == null ? null : name.copy(); 3290 if (organizationReference != null) { 3291 dst.organizationReference = new ArrayList<Reference>(); 3292 for (Reference i : organizationReference) 3293 dst.organizationReference.add(i.copy()); 3294 }; 3295 } 3296 3297 @Override 3298 public boolean equalsDeep(Base other_) { 3299 if (!super.equalsDeep(other_)) 3300 return false; 3301 if (!(other_ instanceof PackagingDistributorComponent)) 3302 return false; 3303 PackagingDistributorComponent o = (PackagingDistributorComponent) other_; 3304 return compareDeep(name, o.name, true) && compareDeep(organizationReference, o.organizationReference, true) 3305 ; 3306 } 3307 3308 @Override 3309 public boolean equalsShallow(Base other_) { 3310 if (!super.equalsShallow(other_)) 3311 return false; 3312 if (!(other_ instanceof PackagingDistributorComponent)) 3313 return false; 3314 PackagingDistributorComponent o = (PackagingDistributorComponent) other_; 3315 return compareValues(name, o.name, true); 3316 } 3317 3318 public boolean isEmpty() { 3319 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, organizationReference 3320 ); 3321 } 3322 3323 public String fhirType() { 3324 return "DeviceDefinition.packaging.distributor"; 3325 3326 } 3327 3328 } 3329 3330 @Block() 3331 public static class DeviceDefinitionVersionComponent extends BackboneElement implements IBaseBackboneElement { 3332 /** 3333 * The type of the device version, e.g. manufacturer, approved, internal. 3334 */ 3335 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 3336 @Description(shortDefinition="The type of the device version, e.g. manufacturer, approved, internal", formalDefinition="The type of the device version, e.g. manufacturer, approved, internal." ) 3337 protected CodeableConcept type; 3338 3339 /** 3340 * The hardware or software module of the device to which the version applies. 3341 */ 3342 @Child(name = "component", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=false) 3343 @Description(shortDefinition="The hardware or software module of the device to which the version applies", formalDefinition="The hardware or software module of the device to which the version applies." ) 3344 protected Identifier component; 3345 3346 /** 3347 * The version text. 3348 */ 3349 @Child(name = "value", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=false) 3350 @Description(shortDefinition="The version text", formalDefinition="The version text." ) 3351 protected StringType value; 3352 3353 private static final long serialVersionUID = 645214295L; 3354 3355 /** 3356 * Constructor 3357 */ 3358 public DeviceDefinitionVersionComponent() { 3359 super(); 3360 } 3361 3362 /** 3363 * Constructor 3364 */ 3365 public DeviceDefinitionVersionComponent(String value) { 3366 super(); 3367 this.setValue(value); 3368 } 3369 3370 /** 3371 * @return {@link #type} (The type of the device version, e.g. manufacturer, approved, internal.) 3372 */ 3373 public CodeableConcept getType() { 3374 if (this.type == null) 3375 if (Configuration.errorOnAutoCreate()) 3376 throw new Error("Attempt to auto-create DeviceDefinitionVersionComponent.type"); 3377 else if (Configuration.doAutoCreate()) 3378 this.type = new CodeableConcept(); // cc 3379 return this.type; 3380 } 3381 3382 public boolean hasType() { 3383 return this.type != null && !this.type.isEmpty(); 3384 } 3385 3386 /** 3387 * @param value {@link #type} (The type of the device version, e.g. manufacturer, approved, internal.) 3388 */ 3389 public DeviceDefinitionVersionComponent setType(CodeableConcept value) { 3390 this.type = value; 3391 return this; 3392 } 3393 3394 /** 3395 * @return {@link #component} (The hardware or software module of the device to which the version applies.) 3396 */ 3397 public Identifier getComponent() { 3398 if (this.component == null) 3399 if (Configuration.errorOnAutoCreate()) 3400 throw new Error("Attempt to auto-create DeviceDefinitionVersionComponent.component"); 3401 else if (Configuration.doAutoCreate()) 3402 this.component = new Identifier(); // cc 3403 return this.component; 3404 } 3405 3406 public boolean hasComponent() { 3407 return this.component != null && !this.component.isEmpty(); 3408 } 3409 3410 /** 3411 * @param value {@link #component} (The hardware or software module of the device to which the version applies.) 3412 */ 3413 public DeviceDefinitionVersionComponent setComponent(Identifier value) { 3414 this.component = value; 3415 return this; 3416 } 3417 3418 /** 3419 * @return {@link #value} (The version text.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 3420 */ 3421 public StringType getValueElement() { 3422 if (this.value == null) 3423 if (Configuration.errorOnAutoCreate()) 3424 throw new Error("Attempt to auto-create DeviceDefinitionVersionComponent.value"); 3425 else if (Configuration.doAutoCreate()) 3426 this.value = new StringType(); // bb 3427 return this.value; 3428 } 3429 3430 public boolean hasValueElement() { 3431 return this.value != null && !this.value.isEmpty(); 3432 } 3433 3434 public boolean hasValue() { 3435 return this.value != null && !this.value.isEmpty(); 3436 } 3437 3438 /** 3439 * @param value {@link #value} (The version text.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 3440 */ 3441 public DeviceDefinitionVersionComponent setValueElement(StringType value) { 3442 this.value = value; 3443 return this; 3444 } 3445 3446 /** 3447 * @return The version text. 3448 */ 3449 public String getValue() { 3450 return this.value == null ? null : this.value.getValue(); 3451 } 3452 3453 /** 3454 * @param value The version text. 3455 */ 3456 public DeviceDefinitionVersionComponent setValue(String value) { 3457 if (this.value == null) 3458 this.value = new StringType(); 3459 this.value.setValue(value); 3460 return this; 3461 } 3462 3463 protected void listChildren(List<Property> children) { 3464 super.listChildren(children); 3465 children.add(new Property("type", "CodeableConcept", "The type of the device version, e.g. manufacturer, approved, internal.", 0, 1, type)); 3466 children.add(new Property("component", "Identifier", "The hardware or software module of the device to which the version applies.", 0, 1, component)); 3467 children.add(new Property("value", "string", "The version text.", 0, 1, value)); 3468 } 3469 3470 @Override 3471 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3472 switch (_hash) { 3473 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type of the device version, e.g. manufacturer, approved, internal.", 0, 1, type); 3474 case -1399907075: /*component*/ return new Property("component", "Identifier", "The hardware or software module of the device to which the version applies.", 0, 1, component); 3475 case 111972721: /*value*/ return new Property("value", "string", "The version text.", 0, 1, value); 3476 default: return super.getNamedProperty(_hash, _name, _checkValid); 3477 } 3478 3479 } 3480 3481 @Override 3482 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3483 switch (hash) { 3484 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3485 case -1399907075: /*component*/ return this.component == null ? new Base[0] : new Base[] {this.component}; // Identifier 3486 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 3487 default: return super.getProperty(hash, name, checkValid); 3488 } 3489 3490 } 3491 3492 @Override 3493 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3494 switch (hash) { 3495 case 3575610: // type 3496 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3497 return value; 3498 case -1399907075: // component 3499 this.component = TypeConvertor.castToIdentifier(value); // Identifier 3500 return value; 3501 case 111972721: // value 3502 this.value = TypeConvertor.castToString(value); // StringType 3503 return value; 3504 default: return super.setProperty(hash, name, value); 3505 } 3506 3507 } 3508 3509 @Override 3510 public Base setProperty(String name, Base value) throws FHIRException { 3511 if (name.equals("type")) { 3512 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3513 } else if (name.equals("component")) { 3514 this.component = TypeConvertor.castToIdentifier(value); // Identifier 3515 } else if (name.equals("value")) { 3516 this.value = TypeConvertor.castToString(value); // StringType 3517 } else 3518 return super.setProperty(name, value); 3519 return value; 3520 } 3521 3522 @Override 3523 public Base makeProperty(int hash, String name) throws FHIRException { 3524 switch (hash) { 3525 case 3575610: return getType(); 3526 case -1399907075: return getComponent(); 3527 case 111972721: return getValueElement(); 3528 default: return super.makeProperty(hash, name); 3529 } 3530 3531 } 3532 3533 @Override 3534 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3535 switch (hash) { 3536 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 3537 case -1399907075: /*component*/ return new String[] {"Identifier"}; 3538 case 111972721: /*value*/ return new String[] {"string"}; 3539 default: return super.getTypesForProperty(hash, name); 3540 } 3541 3542 } 3543 3544 @Override 3545 public Base addChild(String name) throws FHIRException { 3546 if (name.equals("type")) { 3547 this.type = new CodeableConcept(); 3548 return this.type; 3549 } 3550 else if (name.equals("component")) { 3551 this.component = new Identifier(); 3552 return this.component; 3553 } 3554 else if (name.equals("value")) { 3555 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.version.value"); 3556 } 3557 else 3558 return super.addChild(name); 3559 } 3560 3561 public DeviceDefinitionVersionComponent copy() { 3562 DeviceDefinitionVersionComponent dst = new DeviceDefinitionVersionComponent(); 3563 copyValues(dst); 3564 return dst; 3565 } 3566 3567 public void copyValues(DeviceDefinitionVersionComponent dst) { 3568 super.copyValues(dst); 3569 dst.type = type == null ? null : type.copy(); 3570 dst.component = component == null ? null : component.copy(); 3571 dst.value = value == null ? null : value.copy(); 3572 } 3573 3574 @Override 3575 public boolean equalsDeep(Base other_) { 3576 if (!super.equalsDeep(other_)) 3577 return false; 3578 if (!(other_ instanceof DeviceDefinitionVersionComponent)) 3579 return false; 3580 DeviceDefinitionVersionComponent o = (DeviceDefinitionVersionComponent) other_; 3581 return compareDeep(type, o.type, true) && compareDeep(component, o.component, true) && compareDeep(value, o.value, true) 3582 ; 3583 } 3584 3585 @Override 3586 public boolean equalsShallow(Base other_) { 3587 if (!super.equalsShallow(other_)) 3588 return false; 3589 if (!(other_ instanceof DeviceDefinitionVersionComponent)) 3590 return false; 3591 DeviceDefinitionVersionComponent o = (DeviceDefinitionVersionComponent) other_; 3592 return compareValues(value, o.value, true); 3593 } 3594 3595 public boolean isEmpty() { 3596 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, component, value); 3597 } 3598 3599 public String fhirType() { 3600 return "DeviceDefinition.version"; 3601 3602 } 3603 3604 } 3605 3606 @Block() 3607 public static class DeviceDefinitionPropertyComponent extends BackboneElement implements IBaseBackboneElement { 3608 /** 3609 * Code that specifies the property such as a resolution or color being represented. 3610 */ 3611 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 3612 @Description(shortDefinition="Code that specifies the property being represented", formalDefinition="Code that specifies the property such as a resolution or color being represented." ) 3613 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-property-type") 3614 protected CodeableConcept type; 3615 3616 /** 3617 * The value of the property specified by the associated property.type code. 3618 */ 3619 @Child(name = "value", type = {Quantity.class, CodeableConcept.class, StringType.class, BooleanType.class, IntegerType.class, Range.class, Attachment.class}, order=2, min=1, max=1, modifier=false, summary=false) 3620 @Description(shortDefinition="Value of the property", formalDefinition="The value of the property specified by the associated property.type code." ) 3621 protected DataType value; 3622 3623 private static final long serialVersionUID = -1659186716L; 3624 3625 /** 3626 * Constructor 3627 */ 3628 public DeviceDefinitionPropertyComponent() { 3629 super(); 3630 } 3631 3632 /** 3633 * Constructor 3634 */ 3635 public DeviceDefinitionPropertyComponent(CodeableConcept type, DataType value) { 3636 super(); 3637 this.setType(type); 3638 this.setValue(value); 3639 } 3640 3641 /** 3642 * @return {@link #type} (Code that specifies the property such as a resolution or color being represented.) 3643 */ 3644 public CodeableConcept getType() { 3645 if (this.type == null) 3646 if (Configuration.errorOnAutoCreate()) 3647 throw new Error("Attempt to auto-create DeviceDefinitionPropertyComponent.type"); 3648 else if (Configuration.doAutoCreate()) 3649 this.type = new CodeableConcept(); // cc 3650 return this.type; 3651 } 3652 3653 public boolean hasType() { 3654 return this.type != null && !this.type.isEmpty(); 3655 } 3656 3657 /** 3658 * @param value {@link #type} (Code that specifies the property such as a resolution or color being represented.) 3659 */ 3660 public DeviceDefinitionPropertyComponent setType(CodeableConcept value) { 3661 this.type = value; 3662 return this; 3663 } 3664 3665 /** 3666 * @return {@link #value} (The value of the property specified by the associated property.type code.) 3667 */ 3668 public DataType getValue() { 3669 return this.value; 3670 } 3671 3672 /** 3673 * @return {@link #value} (The value of the property specified by the associated property.type code.) 3674 */ 3675 public Quantity getValueQuantity() throws FHIRException { 3676 if (this.value == null) 3677 this.value = new Quantity(); 3678 if (!(this.value instanceof Quantity)) 3679 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 3680 return (Quantity) this.value; 3681 } 3682 3683 public boolean hasValueQuantity() { 3684 return this != null && this.value instanceof Quantity; 3685 } 3686 3687 /** 3688 * @return {@link #value} (The value of the property specified by the associated property.type code.) 3689 */ 3690 public CodeableConcept getValueCodeableConcept() throws FHIRException { 3691 if (this.value == null) 3692 this.value = new CodeableConcept(); 3693 if (!(this.value instanceof CodeableConcept)) 3694 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered"); 3695 return (CodeableConcept) this.value; 3696 } 3697 3698 public boolean hasValueCodeableConcept() { 3699 return this != null && this.value instanceof CodeableConcept; 3700 } 3701 3702 /** 3703 * @return {@link #value} (The value of the property specified by the associated property.type code.) 3704 */ 3705 public StringType getValueStringType() throws FHIRException { 3706 if (this.value == null) 3707 this.value = new StringType(); 3708 if (!(this.value instanceof StringType)) 3709 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 3710 return (StringType) this.value; 3711 } 3712 3713 public boolean hasValueStringType() { 3714 return this != null && this.value instanceof StringType; 3715 } 3716 3717 /** 3718 * @return {@link #value} (The value of the property specified by the associated property.type code.) 3719 */ 3720 public BooleanType getValueBooleanType() throws FHIRException { 3721 if (this.value == null) 3722 this.value = new BooleanType(); 3723 if (!(this.value instanceof BooleanType)) 3724 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 3725 return (BooleanType) this.value; 3726 } 3727 3728 public boolean hasValueBooleanType() { 3729 return this != null && this.value instanceof BooleanType; 3730 } 3731 3732 /** 3733 * @return {@link #value} (The value of the property specified by the associated property.type code.) 3734 */ 3735 public IntegerType getValueIntegerType() throws FHIRException { 3736 if (this.value == null) 3737 this.value = new IntegerType(); 3738 if (!(this.value instanceof IntegerType)) 3739 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); 3740 return (IntegerType) this.value; 3741 } 3742 3743 public boolean hasValueIntegerType() { 3744 return this != null && this.value instanceof IntegerType; 3745 } 3746 3747 /** 3748 * @return {@link #value} (The value of the property specified by the associated property.type code.) 3749 */ 3750 public Range getValueRange() throws FHIRException { 3751 if (this.value == null) 3752 this.value = new Range(); 3753 if (!(this.value instanceof Range)) 3754 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered"); 3755 return (Range) this.value; 3756 } 3757 3758 public boolean hasValueRange() { 3759 return this != null && this.value instanceof Range; 3760 } 3761 3762 /** 3763 * @return {@link #value} (The value of the property specified by the associated property.type code.) 3764 */ 3765 public Attachment getValueAttachment() throws FHIRException { 3766 if (this.value == null) 3767 this.value = new Attachment(); 3768 if (!(this.value instanceof Attachment)) 3769 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); 3770 return (Attachment) this.value; 3771 } 3772 3773 public boolean hasValueAttachment() { 3774 return this != null && this.value instanceof Attachment; 3775 } 3776 3777 public boolean hasValue() { 3778 return this.value != null && !this.value.isEmpty(); 3779 } 3780 3781 /** 3782 * @param value {@link #value} (The value of the property specified by the associated property.type code.) 3783 */ 3784 public DeviceDefinitionPropertyComponent setValue(DataType value) { 3785 if (value != null && !(value instanceof Quantity || value instanceof CodeableConcept || value instanceof StringType || value instanceof BooleanType || value instanceof IntegerType || value instanceof Range || value instanceof Attachment)) 3786 throw new FHIRException("Not the right type for DeviceDefinition.property.value[x]: "+value.fhirType()); 3787 this.value = value; 3788 return this; 3789 } 3790 3791 protected void listChildren(List<Property> children) { 3792 super.listChildren(children); 3793 children.add(new Property("type", "CodeableConcept", "Code that specifies the property such as a resolution or color being represented.", 0, 1, type)); 3794 children.add(new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Attachment", "The value of the property specified by the associated property.type code.", 0, 1, value)); 3795 } 3796 3797 @Override 3798 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3799 switch (_hash) { 3800 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Code that specifies the property such as a resolution or color being represented.", 0, 1, type); 3801 case -1410166417: /*value[x]*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Attachment", "The value of the property specified by the associated property.type code.", 0, 1, value); 3802 case 111972721: /*value*/ return new Property("value[x]", "Quantity|CodeableConcept|string|boolean|integer|Range|Attachment", "The value of the property specified by the associated property.type code.", 0, 1, value); 3803 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity", "The value of the property specified by the associated property.type code.", 0, 1, value); 3804 case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "CodeableConcept", "The value of the property specified by the associated property.type code.", 0, 1, value); 3805 case -1424603934: /*valueString*/ return new Property("value[x]", "string", "The value of the property specified by the associated property.type code.", 0, 1, value); 3806 case 733421943: /*valueBoolean*/ return new Property("value[x]", "boolean", "The value of the property specified by the associated property.type code.", 0, 1, value); 3807 case -1668204915: /*valueInteger*/ return new Property("value[x]", "integer", "The value of the property specified by the associated property.type code.", 0, 1, value); 3808 case 2030761548: /*valueRange*/ return new Property("value[x]", "Range", "The value of the property specified by the associated property.type code.", 0, 1, value); 3809 case -475566732: /*valueAttachment*/ return new Property("value[x]", "Attachment", "The value of the property specified by the associated property.type code.", 0, 1, value); 3810 default: return super.getNamedProperty(_hash, _name, _checkValid); 3811 } 3812 3813 } 3814 3815 @Override 3816 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3817 switch (hash) { 3818 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3819 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType 3820 default: return super.getProperty(hash, name, checkValid); 3821 } 3822 3823 } 3824 3825 @Override 3826 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3827 switch (hash) { 3828 case 3575610: // type 3829 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3830 return value; 3831 case 111972721: // value 3832 this.value = TypeConvertor.castToType(value); // DataType 3833 return value; 3834 default: return super.setProperty(hash, name, value); 3835 } 3836 3837 } 3838 3839 @Override 3840 public Base setProperty(String name, Base value) throws FHIRException { 3841 if (name.equals("type")) { 3842 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3843 } else if (name.equals("value[x]")) { 3844 this.value = TypeConvertor.castToType(value); // DataType 3845 } else 3846 return super.setProperty(name, value); 3847 return value; 3848 } 3849 3850 @Override 3851 public Base makeProperty(int hash, String name) throws FHIRException { 3852 switch (hash) { 3853 case 3575610: return getType(); 3854 case -1410166417: return getValue(); 3855 case 111972721: return getValue(); 3856 default: return super.makeProperty(hash, name); 3857 } 3858 3859 } 3860 3861 @Override 3862 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3863 switch (hash) { 3864 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 3865 case 111972721: /*value*/ return new String[] {"Quantity", "CodeableConcept", "string", "boolean", "integer", "Range", "Attachment"}; 3866 default: return super.getTypesForProperty(hash, name); 3867 } 3868 3869 } 3870 3871 @Override 3872 public Base addChild(String name) throws FHIRException { 3873 if (name.equals("type")) { 3874 this.type = new CodeableConcept(); 3875 return this.type; 3876 } 3877 else if (name.equals("valueQuantity")) { 3878 this.value = new Quantity(); 3879 return this.value; 3880 } 3881 else if (name.equals("valueCodeableConcept")) { 3882 this.value = new CodeableConcept(); 3883 return this.value; 3884 } 3885 else if (name.equals("valueString")) { 3886 this.value = new StringType(); 3887 return this.value; 3888 } 3889 else if (name.equals("valueBoolean")) { 3890 this.value = new BooleanType(); 3891 return this.value; 3892 } 3893 else if (name.equals("valueInteger")) { 3894 this.value = new IntegerType(); 3895 return this.value; 3896 } 3897 else if (name.equals("valueRange")) { 3898 this.value = new Range(); 3899 return this.value; 3900 } 3901 else if (name.equals("valueAttachment")) { 3902 this.value = new Attachment(); 3903 return this.value; 3904 } 3905 else 3906 return super.addChild(name); 3907 } 3908 3909 public DeviceDefinitionPropertyComponent copy() { 3910 DeviceDefinitionPropertyComponent dst = new DeviceDefinitionPropertyComponent(); 3911 copyValues(dst); 3912 return dst; 3913 } 3914 3915 public void copyValues(DeviceDefinitionPropertyComponent dst) { 3916 super.copyValues(dst); 3917 dst.type = type == null ? null : type.copy(); 3918 dst.value = value == null ? null : value.copy(); 3919 } 3920 3921 @Override 3922 public boolean equalsDeep(Base other_) { 3923 if (!super.equalsDeep(other_)) 3924 return false; 3925 if (!(other_ instanceof DeviceDefinitionPropertyComponent)) 3926 return false; 3927 DeviceDefinitionPropertyComponent o = (DeviceDefinitionPropertyComponent) other_; 3928 return compareDeep(type, o.type, true) && compareDeep(value, o.value, true); 3929 } 3930 3931 @Override 3932 public boolean equalsShallow(Base other_) { 3933 if (!super.equalsShallow(other_)) 3934 return false; 3935 if (!(other_ instanceof DeviceDefinitionPropertyComponent)) 3936 return false; 3937 DeviceDefinitionPropertyComponent o = (DeviceDefinitionPropertyComponent) other_; 3938 return true; 3939 } 3940 3941 public boolean isEmpty() { 3942 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value); 3943 } 3944 3945 public String fhirType() { 3946 return "DeviceDefinition.property"; 3947 3948 } 3949 3950 } 3951 3952 @Block() 3953 public static class DeviceDefinitionLinkComponent extends BackboneElement implements IBaseBackboneElement { 3954 /** 3955 * The type indicates the relationship of the related device to the device instance. 3956 */ 3957 @Child(name = "relation", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) 3958 @Description(shortDefinition="The type indicates the relationship of the related device to the device instance", formalDefinition="The type indicates the relationship of the related device to the device instance." ) 3959 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/devicedefinition-relationtype") 3960 protected Coding relation; 3961 3962 /** 3963 * A reference to the linked device. 3964 */ 3965 @Child(name = "relatedDevice", type = {CodeableReference.class}, order=2, min=1, max=1, modifier=false, summary=false) 3966 @Description(shortDefinition="A reference to the linked device", formalDefinition="A reference to the linked device." ) 3967 protected CodeableReference relatedDevice; 3968 3969 private static final long serialVersionUID = 627614461L; 3970 3971 /** 3972 * Constructor 3973 */ 3974 public DeviceDefinitionLinkComponent() { 3975 super(); 3976 } 3977 3978 /** 3979 * Constructor 3980 */ 3981 public DeviceDefinitionLinkComponent(Coding relation, CodeableReference relatedDevice) { 3982 super(); 3983 this.setRelation(relation); 3984 this.setRelatedDevice(relatedDevice); 3985 } 3986 3987 /** 3988 * @return {@link #relation} (The type indicates the relationship of the related device to the device instance.) 3989 */ 3990 public Coding getRelation() { 3991 if (this.relation == null) 3992 if (Configuration.errorOnAutoCreate()) 3993 throw new Error("Attempt to auto-create DeviceDefinitionLinkComponent.relation"); 3994 else if (Configuration.doAutoCreate()) 3995 this.relation = new Coding(); // cc 3996 return this.relation; 3997 } 3998 3999 public boolean hasRelation() { 4000 return this.relation != null && !this.relation.isEmpty(); 4001 } 4002 4003 /** 4004 * @param value {@link #relation} (The type indicates the relationship of the related device to the device instance.) 4005 */ 4006 public DeviceDefinitionLinkComponent setRelation(Coding value) { 4007 this.relation = value; 4008 return this; 4009 } 4010 4011 /** 4012 * @return {@link #relatedDevice} (A reference to the linked device.) 4013 */ 4014 public CodeableReference getRelatedDevice() { 4015 if (this.relatedDevice == null) 4016 if (Configuration.errorOnAutoCreate()) 4017 throw new Error("Attempt to auto-create DeviceDefinitionLinkComponent.relatedDevice"); 4018 else if (Configuration.doAutoCreate()) 4019 this.relatedDevice = new CodeableReference(); // cc 4020 return this.relatedDevice; 4021 } 4022 4023 public boolean hasRelatedDevice() { 4024 return this.relatedDevice != null && !this.relatedDevice.isEmpty(); 4025 } 4026 4027 /** 4028 * @param value {@link #relatedDevice} (A reference to the linked device.) 4029 */ 4030 public DeviceDefinitionLinkComponent setRelatedDevice(CodeableReference value) { 4031 this.relatedDevice = value; 4032 return this; 4033 } 4034 4035 protected void listChildren(List<Property> children) { 4036 super.listChildren(children); 4037 children.add(new Property("relation", "Coding", "The type indicates the relationship of the related device to the device instance.", 0, 1, relation)); 4038 children.add(new Property("relatedDevice", "CodeableReference(DeviceDefinition)", "A reference to the linked device.", 0, 1, relatedDevice)); 4039 } 4040 4041 @Override 4042 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4043 switch (_hash) { 4044 case -554436100: /*relation*/ return new Property("relation", "Coding", "The type indicates the relationship of the related device to the device instance.", 0, 1, relation); 4045 case -296314271: /*relatedDevice*/ return new Property("relatedDevice", "CodeableReference(DeviceDefinition)", "A reference to the linked device.", 0, 1, relatedDevice); 4046 default: return super.getNamedProperty(_hash, _name, _checkValid); 4047 } 4048 4049 } 4050 4051 @Override 4052 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4053 switch (hash) { 4054 case -554436100: /*relation*/ return this.relation == null ? new Base[0] : new Base[] {this.relation}; // Coding 4055 case -296314271: /*relatedDevice*/ return this.relatedDevice == null ? new Base[0] : new Base[] {this.relatedDevice}; // CodeableReference 4056 default: return super.getProperty(hash, name, checkValid); 4057 } 4058 4059 } 4060 4061 @Override 4062 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4063 switch (hash) { 4064 case -554436100: // relation 4065 this.relation = TypeConvertor.castToCoding(value); // Coding 4066 return value; 4067 case -296314271: // relatedDevice 4068 this.relatedDevice = TypeConvertor.castToCodeableReference(value); // CodeableReference 4069 return value; 4070 default: return super.setProperty(hash, name, value); 4071 } 4072 4073 } 4074 4075 @Override 4076 public Base setProperty(String name, Base value) throws FHIRException { 4077 if (name.equals("relation")) { 4078 this.relation = TypeConvertor.castToCoding(value); // Coding 4079 } else if (name.equals("relatedDevice")) { 4080 this.relatedDevice = TypeConvertor.castToCodeableReference(value); // CodeableReference 4081 } else 4082 return super.setProperty(name, value); 4083 return value; 4084 } 4085 4086 @Override 4087 public Base makeProperty(int hash, String name) throws FHIRException { 4088 switch (hash) { 4089 case -554436100: return getRelation(); 4090 case -296314271: return getRelatedDevice(); 4091 default: return super.makeProperty(hash, name); 4092 } 4093 4094 } 4095 4096 @Override 4097 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4098 switch (hash) { 4099 case -554436100: /*relation*/ return new String[] {"Coding"}; 4100 case -296314271: /*relatedDevice*/ return new String[] {"CodeableReference"}; 4101 default: return super.getTypesForProperty(hash, name); 4102 } 4103 4104 } 4105 4106 @Override 4107 public Base addChild(String name) throws FHIRException { 4108 if (name.equals("relation")) { 4109 this.relation = new Coding(); 4110 return this.relation; 4111 } 4112 else if (name.equals("relatedDevice")) { 4113 this.relatedDevice = new CodeableReference(); 4114 return this.relatedDevice; 4115 } 4116 else 4117 return super.addChild(name); 4118 } 4119 4120 public DeviceDefinitionLinkComponent copy() { 4121 DeviceDefinitionLinkComponent dst = new DeviceDefinitionLinkComponent(); 4122 copyValues(dst); 4123 return dst; 4124 } 4125 4126 public void copyValues(DeviceDefinitionLinkComponent dst) { 4127 super.copyValues(dst); 4128 dst.relation = relation == null ? null : relation.copy(); 4129 dst.relatedDevice = relatedDevice == null ? null : relatedDevice.copy(); 4130 } 4131 4132 @Override 4133 public boolean equalsDeep(Base other_) { 4134 if (!super.equalsDeep(other_)) 4135 return false; 4136 if (!(other_ instanceof DeviceDefinitionLinkComponent)) 4137 return false; 4138 DeviceDefinitionLinkComponent o = (DeviceDefinitionLinkComponent) other_; 4139 return compareDeep(relation, o.relation, true) && compareDeep(relatedDevice, o.relatedDevice, true) 4140 ; 4141 } 4142 4143 @Override 4144 public boolean equalsShallow(Base other_) { 4145 if (!super.equalsShallow(other_)) 4146 return false; 4147 if (!(other_ instanceof DeviceDefinitionLinkComponent)) 4148 return false; 4149 DeviceDefinitionLinkComponent o = (DeviceDefinitionLinkComponent) other_; 4150 return true; 4151 } 4152 4153 public boolean isEmpty() { 4154 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(relation, relatedDevice); 4155 } 4156 4157 public String fhirType() { 4158 return "DeviceDefinition.link"; 4159 4160 } 4161 4162 } 4163 4164 @Block() 4165 public static class DeviceDefinitionMaterialComponent extends BackboneElement implements IBaseBackboneElement { 4166 /** 4167 * A substance that the device contains, may contain, or is made of - for example latex - to be used to determine patient compatibility. This is not intended to represent the composition of the device, only the clinically relevant materials. 4168 */ 4169 @Child(name = "substance", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 4170 @Description(shortDefinition="A relevant substance that the device contains, may contain, or is made of", formalDefinition="A substance that the device contains, may contain, or is made of - for example latex - to be used to determine patient compatibility. This is not intended to represent the composition of the device, only the clinically relevant materials." ) 4171 protected CodeableConcept substance; 4172 4173 /** 4174 * Indicates an alternative material of the device. 4175 */ 4176 @Child(name = "alternate", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 4177 @Description(shortDefinition="Indicates an alternative material of the device", formalDefinition="Indicates an alternative material of the device." ) 4178 protected BooleanType alternate; 4179 4180 /** 4181 * Whether the substance is a known or suspected allergen. 4182 */ 4183 @Child(name = "allergenicIndicator", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) 4184 @Description(shortDefinition="Whether the substance is a known or suspected allergen", formalDefinition="Whether the substance is a known or suspected allergen." ) 4185 protected BooleanType allergenicIndicator; 4186 4187 private static final long serialVersionUID = 1232736508L; 4188 4189 /** 4190 * Constructor 4191 */ 4192 public DeviceDefinitionMaterialComponent() { 4193 super(); 4194 } 4195 4196 /** 4197 * Constructor 4198 */ 4199 public DeviceDefinitionMaterialComponent(CodeableConcept substance) { 4200 super(); 4201 this.setSubstance(substance); 4202 } 4203 4204 /** 4205 * @return {@link #substance} (A substance that the device contains, may contain, or is made of - for example latex - to be used to determine patient compatibility. This is not intended to represent the composition of the device, only the clinically relevant materials.) 4206 */ 4207 public CodeableConcept getSubstance() { 4208 if (this.substance == null) 4209 if (Configuration.errorOnAutoCreate()) 4210 throw new Error("Attempt to auto-create DeviceDefinitionMaterialComponent.substance"); 4211 else if (Configuration.doAutoCreate()) 4212 this.substance = new CodeableConcept(); // cc 4213 return this.substance; 4214 } 4215 4216 public boolean hasSubstance() { 4217 return this.substance != null && !this.substance.isEmpty(); 4218 } 4219 4220 /** 4221 * @param value {@link #substance} (A substance that the device contains, may contain, or is made of - for example latex - to be used to determine patient compatibility. This is not intended to represent the composition of the device, only the clinically relevant materials.) 4222 */ 4223 public DeviceDefinitionMaterialComponent setSubstance(CodeableConcept value) { 4224 this.substance = value; 4225 return this; 4226 } 4227 4228 /** 4229 * @return {@link #alternate} (Indicates an alternative material of the device.). This is the underlying object with id, value and extensions. The accessor "getAlternate" gives direct access to the value 4230 */ 4231 public BooleanType getAlternateElement() { 4232 if (this.alternate == null) 4233 if (Configuration.errorOnAutoCreate()) 4234 throw new Error("Attempt to auto-create DeviceDefinitionMaterialComponent.alternate"); 4235 else if (Configuration.doAutoCreate()) 4236 this.alternate = new BooleanType(); // bb 4237 return this.alternate; 4238 } 4239 4240 public boolean hasAlternateElement() { 4241 return this.alternate != null && !this.alternate.isEmpty(); 4242 } 4243 4244 public boolean hasAlternate() { 4245 return this.alternate != null && !this.alternate.isEmpty(); 4246 } 4247 4248 /** 4249 * @param value {@link #alternate} (Indicates an alternative material of the device.). This is the underlying object with id, value and extensions. The accessor "getAlternate" gives direct access to the value 4250 */ 4251 public DeviceDefinitionMaterialComponent setAlternateElement(BooleanType value) { 4252 this.alternate = value; 4253 return this; 4254 } 4255 4256 /** 4257 * @return Indicates an alternative material of the device. 4258 */ 4259 public boolean getAlternate() { 4260 return this.alternate == null || this.alternate.isEmpty() ? false : this.alternate.getValue(); 4261 } 4262 4263 /** 4264 * @param value Indicates an alternative material of the device. 4265 */ 4266 public DeviceDefinitionMaterialComponent setAlternate(boolean value) { 4267 if (this.alternate == null) 4268 this.alternate = new BooleanType(); 4269 this.alternate.setValue(value); 4270 return this; 4271 } 4272 4273 /** 4274 * @return {@link #allergenicIndicator} (Whether the substance is a known or suspected allergen.). This is the underlying object with id, value and extensions. The accessor "getAllergenicIndicator" gives direct access to the value 4275 */ 4276 public BooleanType getAllergenicIndicatorElement() { 4277 if (this.allergenicIndicator == null) 4278 if (Configuration.errorOnAutoCreate()) 4279 throw new Error("Attempt to auto-create DeviceDefinitionMaterialComponent.allergenicIndicator"); 4280 else if (Configuration.doAutoCreate()) 4281 this.allergenicIndicator = new BooleanType(); // bb 4282 return this.allergenicIndicator; 4283 } 4284 4285 public boolean hasAllergenicIndicatorElement() { 4286 return this.allergenicIndicator != null && !this.allergenicIndicator.isEmpty(); 4287 } 4288 4289 public boolean hasAllergenicIndicator() { 4290 return this.allergenicIndicator != null && !this.allergenicIndicator.isEmpty(); 4291 } 4292 4293 /** 4294 * @param value {@link #allergenicIndicator} (Whether the substance is a known or suspected allergen.). This is the underlying object with id, value and extensions. The accessor "getAllergenicIndicator" gives direct access to the value 4295 */ 4296 public DeviceDefinitionMaterialComponent setAllergenicIndicatorElement(BooleanType value) { 4297 this.allergenicIndicator = value; 4298 return this; 4299 } 4300 4301 /** 4302 * @return Whether the substance is a known or suspected allergen. 4303 */ 4304 public boolean getAllergenicIndicator() { 4305 return this.allergenicIndicator == null || this.allergenicIndicator.isEmpty() ? false : this.allergenicIndicator.getValue(); 4306 } 4307 4308 /** 4309 * @param value Whether the substance is a known or suspected allergen. 4310 */ 4311 public DeviceDefinitionMaterialComponent setAllergenicIndicator(boolean value) { 4312 if (this.allergenicIndicator == null) 4313 this.allergenicIndicator = new BooleanType(); 4314 this.allergenicIndicator.setValue(value); 4315 return this; 4316 } 4317 4318 protected void listChildren(List<Property> children) { 4319 super.listChildren(children); 4320 children.add(new Property("substance", "CodeableConcept", "A substance that the device contains, may contain, or is made of - for example latex - to be used to determine patient compatibility. This is not intended to represent the composition of the device, only the clinically relevant materials.", 0, 1, substance)); 4321 children.add(new Property("alternate", "boolean", "Indicates an alternative material of the device.", 0, 1, alternate)); 4322 children.add(new Property("allergenicIndicator", "boolean", "Whether the substance is a known or suspected allergen.", 0, 1, allergenicIndicator)); 4323 } 4324 4325 @Override 4326 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4327 switch (_hash) { 4328 case 530040176: /*substance*/ return new Property("substance", "CodeableConcept", "A substance that the device contains, may contain, or is made of - for example latex - to be used to determine patient compatibility. This is not intended to represent the composition of the device, only the clinically relevant materials.", 0, 1, substance); 4329 case -1408024454: /*alternate*/ return new Property("alternate", "boolean", "Indicates an alternative material of the device.", 0, 1, alternate); 4330 case 75406931: /*allergenicIndicator*/ return new Property("allergenicIndicator", "boolean", "Whether the substance is a known or suspected allergen.", 0, 1, allergenicIndicator); 4331 default: return super.getNamedProperty(_hash, _name, _checkValid); 4332 } 4333 4334 } 4335 4336 @Override 4337 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4338 switch (hash) { 4339 case 530040176: /*substance*/ return this.substance == null ? new Base[0] : new Base[] {this.substance}; // CodeableConcept 4340 case -1408024454: /*alternate*/ return this.alternate == null ? new Base[0] : new Base[] {this.alternate}; // BooleanType 4341 case 75406931: /*allergenicIndicator*/ return this.allergenicIndicator == null ? new Base[0] : new Base[] {this.allergenicIndicator}; // BooleanType 4342 default: return super.getProperty(hash, name, checkValid); 4343 } 4344 4345 } 4346 4347 @Override 4348 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4349 switch (hash) { 4350 case 530040176: // substance 4351 this.substance = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 4352 return value; 4353 case -1408024454: // alternate 4354 this.alternate = TypeConvertor.castToBoolean(value); // BooleanType 4355 return value; 4356 case 75406931: // allergenicIndicator 4357 this.allergenicIndicator = TypeConvertor.castToBoolean(value); // BooleanType 4358 return value; 4359 default: return super.setProperty(hash, name, value); 4360 } 4361 4362 } 4363 4364 @Override 4365 public Base setProperty(String name, Base value) throws FHIRException { 4366 if (name.equals("substance")) { 4367 this.substance = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 4368 } else if (name.equals("alternate")) { 4369 this.alternate = TypeConvertor.castToBoolean(value); // BooleanType 4370 } else if (name.equals("allergenicIndicator")) { 4371 this.allergenicIndicator = TypeConvertor.castToBoolean(value); // BooleanType 4372 } else 4373 return super.setProperty(name, value); 4374 return value; 4375 } 4376 4377 @Override 4378 public Base makeProperty(int hash, String name) throws FHIRException { 4379 switch (hash) { 4380 case 530040176: return getSubstance(); 4381 case -1408024454: return getAlternateElement(); 4382 case 75406931: return getAllergenicIndicatorElement(); 4383 default: return super.makeProperty(hash, name); 4384 } 4385 4386 } 4387 4388 @Override 4389 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4390 switch (hash) { 4391 case 530040176: /*substance*/ return new String[] {"CodeableConcept"}; 4392 case -1408024454: /*alternate*/ return new String[] {"boolean"}; 4393 case 75406931: /*allergenicIndicator*/ return new String[] {"boolean"}; 4394 default: return super.getTypesForProperty(hash, name); 4395 } 4396 4397 } 4398 4399 @Override 4400 public Base addChild(String name) throws FHIRException { 4401 if (name.equals("substance")) { 4402 this.substance = new CodeableConcept(); 4403 return this.substance; 4404 } 4405 else if (name.equals("alternate")) { 4406 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.material.alternate"); 4407 } 4408 else if (name.equals("allergenicIndicator")) { 4409 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.material.allergenicIndicator"); 4410 } 4411 else 4412 return super.addChild(name); 4413 } 4414 4415 public DeviceDefinitionMaterialComponent copy() { 4416 DeviceDefinitionMaterialComponent dst = new DeviceDefinitionMaterialComponent(); 4417 copyValues(dst); 4418 return dst; 4419 } 4420 4421 public void copyValues(DeviceDefinitionMaterialComponent dst) { 4422 super.copyValues(dst); 4423 dst.substance = substance == null ? null : substance.copy(); 4424 dst.alternate = alternate == null ? null : alternate.copy(); 4425 dst.allergenicIndicator = allergenicIndicator == null ? null : allergenicIndicator.copy(); 4426 } 4427 4428 @Override 4429 public boolean equalsDeep(Base other_) { 4430 if (!super.equalsDeep(other_)) 4431 return false; 4432 if (!(other_ instanceof DeviceDefinitionMaterialComponent)) 4433 return false; 4434 DeviceDefinitionMaterialComponent o = (DeviceDefinitionMaterialComponent) other_; 4435 return compareDeep(substance, o.substance, true) && compareDeep(alternate, o.alternate, true) && compareDeep(allergenicIndicator, o.allergenicIndicator, true) 4436 ; 4437 } 4438 4439 @Override 4440 public boolean equalsShallow(Base other_) { 4441 if (!super.equalsShallow(other_)) 4442 return false; 4443 if (!(other_ instanceof DeviceDefinitionMaterialComponent)) 4444 return false; 4445 DeviceDefinitionMaterialComponent o = (DeviceDefinitionMaterialComponent) other_; 4446 return compareValues(alternate, o.alternate, true) && compareValues(allergenicIndicator, o.allergenicIndicator, true) 4447 ; 4448 } 4449 4450 public boolean isEmpty() { 4451 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(substance, alternate, allergenicIndicator 4452 ); 4453 } 4454 4455 public String fhirType() { 4456 return "DeviceDefinition.material"; 4457 4458 } 4459 4460 } 4461 4462 @Block() 4463 public static class DeviceDefinitionGuidelineComponent extends BackboneElement implements IBaseBackboneElement { 4464 /** 4465 * The circumstances that form the setting for using the device. 4466 */ 4467 @Child(name = "useContext", type = {UsageContext.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4468 @Description(shortDefinition="The circumstances that form the setting for using the device", formalDefinition="The circumstances that form the setting for using the device." ) 4469 protected List<UsageContext> useContext; 4470 4471 /** 4472 * Detailed written and visual directions for the user on how to use the device. 4473 */ 4474 @Child(name = "usageInstruction", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false) 4475 @Description(shortDefinition="Detailed written and visual directions for the user on how to use the device", formalDefinition="Detailed written and visual directions for the user on how to use the device." ) 4476 protected MarkdownType usageInstruction; 4477 4478 /** 4479 * A source of information or reference for this guideline. 4480 */ 4481 @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4482 @Description(shortDefinition="A source of information or reference for this guideline", formalDefinition="A source of information or reference for this guideline." ) 4483 protected List<RelatedArtifact> relatedArtifact; 4484 4485 /** 4486 * A clinical condition for which the device was designed to be used. 4487 */ 4488 @Child(name = "indication", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4489 @Description(shortDefinition="A clinical condition for which the device was designed to be used", formalDefinition="A clinical condition for which the device was designed to be used." ) 4490 protected List<CodeableConcept> indication; 4491 4492 /** 4493 * A specific situation when a device should not be used because it may cause harm. 4494 */ 4495 @Child(name = "contraindication", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4496 @Description(shortDefinition="A specific situation when a device should not be used because it may cause harm", formalDefinition="A specific situation when a device should not be used because it may cause harm." ) 4497 protected List<CodeableConcept> contraindication; 4498 4499 /** 4500 * Specific hazard alert information that a user needs to know before using the device. 4501 */ 4502 @Child(name = "warning", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4503 @Description(shortDefinition="Specific hazard alert information that a user needs to know before using the device", formalDefinition="Specific hazard alert information that a user needs to know before using the device." ) 4504 protected List<CodeableConcept> warning; 4505 4506 /** 4507 * A description of the general purpose or medical use of the device or its function. 4508 */ 4509 @Child(name = "intendedUse", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) 4510 @Description(shortDefinition="A description of the general purpose or medical use of the device or its function", formalDefinition="A description of the general purpose or medical use of the device or its function." ) 4511 protected StringType intendedUse; 4512 4513 private static final long serialVersionUID = -1323961659L; 4514 4515 /** 4516 * Constructor 4517 */ 4518 public DeviceDefinitionGuidelineComponent() { 4519 super(); 4520 } 4521 4522 /** 4523 * @return {@link #useContext} (The circumstances that form the setting for using the device.) 4524 */ 4525 public List<UsageContext> getUseContext() { 4526 if (this.useContext == null) 4527 this.useContext = new ArrayList<UsageContext>(); 4528 return this.useContext; 4529 } 4530 4531 /** 4532 * @return Returns a reference to <code>this</code> for easy method chaining 4533 */ 4534 public DeviceDefinitionGuidelineComponent setUseContext(List<UsageContext> theUseContext) { 4535 this.useContext = theUseContext; 4536 return this; 4537 } 4538 4539 public boolean hasUseContext() { 4540 if (this.useContext == null) 4541 return false; 4542 for (UsageContext item : this.useContext) 4543 if (!item.isEmpty()) 4544 return true; 4545 return false; 4546 } 4547 4548 public UsageContext addUseContext() { //3 4549 UsageContext t = new UsageContext(); 4550 if (this.useContext == null) 4551 this.useContext = new ArrayList<UsageContext>(); 4552 this.useContext.add(t); 4553 return t; 4554 } 4555 4556 public DeviceDefinitionGuidelineComponent addUseContext(UsageContext t) { //3 4557 if (t == null) 4558 return this; 4559 if (this.useContext == null) 4560 this.useContext = new ArrayList<UsageContext>(); 4561 this.useContext.add(t); 4562 return this; 4563 } 4564 4565 /** 4566 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3} 4567 */ 4568 public UsageContext getUseContextFirstRep() { 4569 if (getUseContext().isEmpty()) { 4570 addUseContext(); 4571 } 4572 return getUseContext().get(0); 4573 } 4574 4575 /** 4576 * @return {@link #usageInstruction} (Detailed written and visual directions for the user on how to use the device.). This is the underlying object with id, value and extensions. The accessor "getUsageInstruction" gives direct access to the value 4577 */ 4578 public MarkdownType getUsageInstructionElement() { 4579 if (this.usageInstruction == null) 4580 if (Configuration.errorOnAutoCreate()) 4581 throw new Error("Attempt to auto-create DeviceDefinitionGuidelineComponent.usageInstruction"); 4582 else if (Configuration.doAutoCreate()) 4583 this.usageInstruction = new MarkdownType(); // bb 4584 return this.usageInstruction; 4585 } 4586 4587 public boolean hasUsageInstructionElement() { 4588 return this.usageInstruction != null && !this.usageInstruction.isEmpty(); 4589 } 4590 4591 public boolean hasUsageInstruction() { 4592 return this.usageInstruction != null && !this.usageInstruction.isEmpty(); 4593 } 4594 4595 /** 4596 * @param value {@link #usageInstruction} (Detailed written and visual directions for the user on how to use the device.). This is the underlying object with id, value and extensions. The accessor "getUsageInstruction" gives direct access to the value 4597 */ 4598 public DeviceDefinitionGuidelineComponent setUsageInstructionElement(MarkdownType value) { 4599 this.usageInstruction = value; 4600 return this; 4601 } 4602 4603 /** 4604 * @return Detailed written and visual directions for the user on how to use the device. 4605 */ 4606 public String getUsageInstruction() { 4607 return this.usageInstruction == null ? null : this.usageInstruction.getValue(); 4608 } 4609 4610 /** 4611 * @param value Detailed written and visual directions for the user on how to use the device. 4612 */ 4613 public DeviceDefinitionGuidelineComponent setUsageInstruction(String value) { 4614 if (Utilities.noString(value)) 4615 this.usageInstruction = null; 4616 else { 4617 if (this.usageInstruction == null) 4618 this.usageInstruction = new MarkdownType(); 4619 this.usageInstruction.setValue(value); 4620 } 4621 return this; 4622 } 4623 4624 /** 4625 * @return {@link #relatedArtifact} (A source of information or reference for this guideline.) 4626 */ 4627 public List<RelatedArtifact> getRelatedArtifact() { 4628 if (this.relatedArtifact == null) 4629 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 4630 return this.relatedArtifact; 4631 } 4632 4633 /** 4634 * @return Returns a reference to <code>this</code> for easy method chaining 4635 */ 4636 public DeviceDefinitionGuidelineComponent setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 4637 this.relatedArtifact = theRelatedArtifact; 4638 return this; 4639 } 4640 4641 public boolean hasRelatedArtifact() { 4642 if (this.relatedArtifact == null) 4643 return false; 4644 for (RelatedArtifact item : this.relatedArtifact) 4645 if (!item.isEmpty()) 4646 return true; 4647 return false; 4648 } 4649 4650 public RelatedArtifact addRelatedArtifact() { //3 4651 RelatedArtifact t = new RelatedArtifact(); 4652 if (this.relatedArtifact == null) 4653 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 4654 this.relatedArtifact.add(t); 4655 return t; 4656 } 4657 4658 public DeviceDefinitionGuidelineComponent addRelatedArtifact(RelatedArtifact t) { //3 4659 if (t == null) 4660 return this; 4661 if (this.relatedArtifact == null) 4662 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 4663 this.relatedArtifact.add(t); 4664 return this; 4665 } 4666 4667 /** 4668 * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist {3} 4669 */ 4670 public RelatedArtifact getRelatedArtifactFirstRep() { 4671 if (getRelatedArtifact().isEmpty()) { 4672 addRelatedArtifact(); 4673 } 4674 return getRelatedArtifact().get(0); 4675 } 4676 4677 /** 4678 * @return {@link #indication} (A clinical condition for which the device was designed to be used.) 4679 */ 4680 public List<CodeableConcept> getIndication() { 4681 if (this.indication == null) 4682 this.indication = new ArrayList<CodeableConcept>(); 4683 return this.indication; 4684 } 4685 4686 /** 4687 * @return Returns a reference to <code>this</code> for easy method chaining 4688 */ 4689 public DeviceDefinitionGuidelineComponent setIndication(List<CodeableConcept> theIndication) { 4690 this.indication = theIndication; 4691 return this; 4692 } 4693 4694 public boolean hasIndication() { 4695 if (this.indication == null) 4696 return false; 4697 for (CodeableConcept item : this.indication) 4698 if (!item.isEmpty()) 4699 return true; 4700 return false; 4701 } 4702 4703 public CodeableConcept addIndication() { //3 4704 CodeableConcept t = new CodeableConcept(); 4705 if (this.indication == null) 4706 this.indication = new ArrayList<CodeableConcept>(); 4707 this.indication.add(t); 4708 return t; 4709 } 4710 4711 public DeviceDefinitionGuidelineComponent addIndication(CodeableConcept t) { //3 4712 if (t == null) 4713 return this; 4714 if (this.indication == null) 4715 this.indication = new ArrayList<CodeableConcept>(); 4716 this.indication.add(t); 4717 return this; 4718 } 4719 4720 /** 4721 * @return The first repetition of repeating field {@link #indication}, creating it if it does not already exist {3} 4722 */ 4723 public CodeableConcept getIndicationFirstRep() { 4724 if (getIndication().isEmpty()) { 4725 addIndication(); 4726 } 4727 return getIndication().get(0); 4728 } 4729 4730 /** 4731 * @return {@link #contraindication} (A specific situation when a device should not be used because it may cause harm.) 4732 */ 4733 public List<CodeableConcept> getContraindication() { 4734 if (this.contraindication == null) 4735 this.contraindication = new ArrayList<CodeableConcept>(); 4736 return this.contraindication; 4737 } 4738 4739 /** 4740 * @return Returns a reference to <code>this</code> for easy method chaining 4741 */ 4742 public DeviceDefinitionGuidelineComponent setContraindication(List<CodeableConcept> theContraindication) { 4743 this.contraindication = theContraindication; 4744 return this; 4745 } 4746 4747 public boolean hasContraindication() { 4748 if (this.contraindication == null) 4749 return false; 4750 for (CodeableConcept item : this.contraindication) 4751 if (!item.isEmpty()) 4752 return true; 4753 return false; 4754 } 4755 4756 public CodeableConcept addContraindication() { //3 4757 CodeableConcept t = new CodeableConcept(); 4758 if (this.contraindication == null) 4759 this.contraindication = new ArrayList<CodeableConcept>(); 4760 this.contraindication.add(t); 4761 return t; 4762 } 4763 4764 public DeviceDefinitionGuidelineComponent addContraindication(CodeableConcept t) { //3 4765 if (t == null) 4766 return this; 4767 if (this.contraindication == null) 4768 this.contraindication = new ArrayList<CodeableConcept>(); 4769 this.contraindication.add(t); 4770 return this; 4771 } 4772 4773 /** 4774 * @return The first repetition of repeating field {@link #contraindication}, creating it if it does not already exist {3} 4775 */ 4776 public CodeableConcept getContraindicationFirstRep() { 4777 if (getContraindication().isEmpty()) { 4778 addContraindication(); 4779 } 4780 return getContraindication().get(0); 4781 } 4782 4783 /** 4784 * @return {@link #warning} (Specific hazard alert information that a user needs to know before using the device.) 4785 */ 4786 public List<CodeableConcept> getWarning() { 4787 if (this.warning == null) 4788 this.warning = new ArrayList<CodeableConcept>(); 4789 return this.warning; 4790 } 4791 4792 /** 4793 * @return Returns a reference to <code>this</code> for easy method chaining 4794 */ 4795 public DeviceDefinitionGuidelineComponent setWarning(List<CodeableConcept> theWarning) { 4796 this.warning = theWarning; 4797 return this; 4798 } 4799 4800 public boolean hasWarning() { 4801 if (this.warning == null) 4802 return false; 4803 for (CodeableConcept item : this.warning) 4804 if (!item.isEmpty()) 4805 return true; 4806 return false; 4807 } 4808 4809 public CodeableConcept addWarning() { //3 4810 CodeableConcept t = new CodeableConcept(); 4811 if (this.warning == null) 4812 this.warning = new ArrayList<CodeableConcept>(); 4813 this.warning.add(t); 4814 return t; 4815 } 4816 4817 public DeviceDefinitionGuidelineComponent addWarning(CodeableConcept t) { //3 4818 if (t == null) 4819 return this; 4820 if (this.warning == null) 4821 this.warning = new ArrayList<CodeableConcept>(); 4822 this.warning.add(t); 4823 return this; 4824 } 4825 4826 /** 4827 * @return The first repetition of repeating field {@link #warning}, creating it if it does not already exist {3} 4828 */ 4829 public CodeableConcept getWarningFirstRep() { 4830 if (getWarning().isEmpty()) { 4831 addWarning(); 4832 } 4833 return getWarning().get(0); 4834 } 4835 4836 /** 4837 * @return {@link #intendedUse} (A description of the general purpose or medical use of the device or its function.). This is the underlying object with id, value and extensions. The accessor "getIntendedUse" gives direct access to the value 4838 */ 4839 public StringType getIntendedUseElement() { 4840 if (this.intendedUse == null) 4841 if (Configuration.errorOnAutoCreate()) 4842 throw new Error("Attempt to auto-create DeviceDefinitionGuidelineComponent.intendedUse"); 4843 else if (Configuration.doAutoCreate()) 4844 this.intendedUse = new StringType(); // bb 4845 return this.intendedUse; 4846 } 4847 4848 public boolean hasIntendedUseElement() { 4849 return this.intendedUse != null && !this.intendedUse.isEmpty(); 4850 } 4851 4852 public boolean hasIntendedUse() { 4853 return this.intendedUse != null && !this.intendedUse.isEmpty(); 4854 } 4855 4856 /** 4857 * @param value {@link #intendedUse} (A description of the general purpose or medical use of the device or its function.). This is the underlying object with id, value and extensions. The accessor "getIntendedUse" gives direct access to the value 4858 */ 4859 public DeviceDefinitionGuidelineComponent setIntendedUseElement(StringType value) { 4860 this.intendedUse = value; 4861 return this; 4862 } 4863 4864 /** 4865 * @return A description of the general purpose or medical use of the device or its function. 4866 */ 4867 public String getIntendedUse() { 4868 return this.intendedUse == null ? null : this.intendedUse.getValue(); 4869 } 4870 4871 /** 4872 * @param value A description of the general purpose or medical use of the device or its function. 4873 */ 4874 public DeviceDefinitionGuidelineComponent setIntendedUse(String value) { 4875 if (Utilities.noString(value)) 4876 this.intendedUse = null; 4877 else { 4878 if (this.intendedUse == null) 4879 this.intendedUse = new StringType(); 4880 this.intendedUse.setValue(value); 4881 } 4882 return this; 4883 } 4884 4885 protected void listChildren(List<Property> children) { 4886 super.listChildren(children); 4887 children.add(new Property("useContext", "UsageContext", "The circumstances that form the setting for using the device.", 0, java.lang.Integer.MAX_VALUE, useContext)); 4888 children.add(new Property("usageInstruction", "markdown", "Detailed written and visual directions for the user on how to use the device.", 0, 1, usageInstruction)); 4889 children.add(new Property("relatedArtifact", "RelatedArtifact", "A source of information or reference for this guideline.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact)); 4890 children.add(new Property("indication", "CodeableConcept", "A clinical condition for which the device was designed to be used.", 0, java.lang.Integer.MAX_VALUE, indication)); 4891 children.add(new Property("contraindication", "CodeableConcept", "A specific situation when a device should not be used because it may cause harm.", 0, java.lang.Integer.MAX_VALUE, contraindication)); 4892 children.add(new Property("warning", "CodeableConcept", "Specific hazard alert information that a user needs to know before using the device.", 0, java.lang.Integer.MAX_VALUE, warning)); 4893 children.add(new Property("intendedUse", "string", "A description of the general purpose or medical use of the device or its function.", 0, 1, intendedUse)); 4894 } 4895 4896 @Override 4897 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4898 switch (_hash) { 4899 case -669707736: /*useContext*/ return new Property("useContext", "UsageContext", "The circumstances that form the setting for using the device.", 0, java.lang.Integer.MAX_VALUE, useContext); 4900 case 2138372141: /*usageInstruction*/ return new Property("usageInstruction", "markdown", "Detailed written and visual directions for the user on how to use the device.", 0, 1, usageInstruction); 4901 case 666807069: /*relatedArtifact*/ return new Property("relatedArtifact", "RelatedArtifact", "A source of information or reference for this guideline.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact); 4902 case -597168804: /*indication*/ return new Property("indication", "CodeableConcept", "A clinical condition for which the device was designed to be used.", 0, java.lang.Integer.MAX_VALUE, indication); 4903 case 107135229: /*contraindication*/ return new Property("contraindication", "CodeableConcept", "A specific situation when a device should not be used because it may cause harm.", 0, java.lang.Integer.MAX_VALUE, contraindication); 4904 case 1124446108: /*warning*/ return new Property("warning", "CodeableConcept", "Specific hazard alert information that a user needs to know before using the device.", 0, java.lang.Integer.MAX_VALUE, warning); 4905 case -1618671268: /*intendedUse*/ return new Property("intendedUse", "string", "A description of the general purpose or medical use of the device or its function.", 0, 1, intendedUse); 4906 default: return super.getNamedProperty(_hash, _name, _checkValid); 4907 } 4908 4909 } 4910 4911 @Override 4912 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4913 switch (hash) { 4914 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 4915 case 2138372141: /*usageInstruction*/ return this.usageInstruction == null ? new Base[0] : new Base[] {this.usageInstruction}; // MarkdownType 4916 case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact 4917 case -597168804: /*indication*/ return this.indication == null ? new Base[0] : this.indication.toArray(new Base[this.indication.size()]); // CodeableConcept 4918 case 107135229: /*contraindication*/ return this.contraindication == null ? new Base[0] : this.contraindication.toArray(new Base[this.contraindication.size()]); // CodeableConcept 4919 case 1124446108: /*warning*/ return this.warning == null ? new Base[0] : this.warning.toArray(new Base[this.warning.size()]); // CodeableConcept 4920 case -1618671268: /*intendedUse*/ return this.intendedUse == null ? new Base[0] : new Base[] {this.intendedUse}; // StringType 4921 default: return super.getProperty(hash, name, checkValid); 4922 } 4923 4924 } 4925 4926 @Override 4927 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4928 switch (hash) { 4929 case -669707736: // useContext 4930 this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext 4931 return value; 4932 case 2138372141: // usageInstruction 4933 this.usageInstruction = TypeConvertor.castToMarkdown(value); // MarkdownType 4934 return value; 4935 case 666807069: // relatedArtifact 4936 this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value)); // RelatedArtifact 4937 return value; 4938 case -597168804: // indication 4939 this.getIndication().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 4940 return value; 4941 case 107135229: // contraindication 4942 this.getContraindication().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 4943 return value; 4944 case 1124446108: // warning 4945 this.getWarning().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 4946 return value; 4947 case -1618671268: // intendedUse 4948 this.intendedUse = TypeConvertor.castToString(value); // StringType 4949 return value; 4950 default: return super.setProperty(hash, name, value); 4951 } 4952 4953 } 4954 4955 @Override 4956 public Base setProperty(String name, Base value) throws FHIRException { 4957 if (name.equals("useContext")) { 4958 this.getUseContext().add(TypeConvertor.castToUsageContext(value)); 4959 } else if (name.equals("usageInstruction")) { 4960 this.usageInstruction = TypeConvertor.castToMarkdown(value); // MarkdownType 4961 } else if (name.equals("relatedArtifact")) { 4962 this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value)); 4963 } else if (name.equals("indication")) { 4964 this.getIndication().add(TypeConvertor.castToCodeableConcept(value)); 4965 } else if (name.equals("contraindication")) { 4966 this.getContraindication().add(TypeConvertor.castToCodeableConcept(value)); 4967 } else if (name.equals("warning")) { 4968 this.getWarning().add(TypeConvertor.castToCodeableConcept(value)); 4969 } else if (name.equals("intendedUse")) { 4970 this.intendedUse = TypeConvertor.castToString(value); // StringType 4971 } else 4972 return super.setProperty(name, value); 4973 return value; 4974 } 4975 4976 @Override 4977 public Base makeProperty(int hash, String name) throws FHIRException { 4978 switch (hash) { 4979 case -669707736: return addUseContext(); 4980 case 2138372141: return getUsageInstructionElement(); 4981 case 666807069: return addRelatedArtifact(); 4982 case -597168804: return addIndication(); 4983 case 107135229: return addContraindication(); 4984 case 1124446108: return addWarning(); 4985 case -1618671268: return getIntendedUseElement(); 4986 default: return super.makeProperty(hash, name); 4987 } 4988 4989 } 4990 4991 @Override 4992 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4993 switch (hash) { 4994 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 4995 case 2138372141: /*usageInstruction*/ return new String[] {"markdown"}; 4996 case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"}; 4997 case -597168804: /*indication*/ return new String[] {"CodeableConcept"}; 4998 case 107135229: /*contraindication*/ return new String[] {"CodeableConcept"}; 4999 case 1124446108: /*warning*/ return new String[] {"CodeableConcept"}; 5000 case -1618671268: /*intendedUse*/ return new String[] {"string"}; 5001 default: return super.getTypesForProperty(hash, name); 5002 } 5003 5004 } 5005 5006 @Override 5007 public Base addChild(String name) throws FHIRException { 5008 if (name.equals("useContext")) { 5009 return addUseContext(); 5010 } 5011 else if (name.equals("usageInstruction")) { 5012 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.guideline.usageInstruction"); 5013 } 5014 else if (name.equals("relatedArtifact")) { 5015 return addRelatedArtifact(); 5016 } 5017 else if (name.equals("indication")) { 5018 return addIndication(); 5019 } 5020 else if (name.equals("contraindication")) { 5021 return addContraindication(); 5022 } 5023 else if (name.equals("warning")) { 5024 return addWarning(); 5025 } 5026 else if (name.equals("intendedUse")) { 5027 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.guideline.intendedUse"); 5028 } 5029 else 5030 return super.addChild(name); 5031 } 5032 5033 public DeviceDefinitionGuidelineComponent copy() { 5034 DeviceDefinitionGuidelineComponent dst = new DeviceDefinitionGuidelineComponent(); 5035 copyValues(dst); 5036 return dst; 5037 } 5038 5039 public void copyValues(DeviceDefinitionGuidelineComponent dst) { 5040 super.copyValues(dst); 5041 if (useContext != null) { 5042 dst.useContext = new ArrayList<UsageContext>(); 5043 for (UsageContext i : useContext) 5044 dst.useContext.add(i.copy()); 5045 }; 5046 dst.usageInstruction = usageInstruction == null ? null : usageInstruction.copy(); 5047 if (relatedArtifact != null) { 5048 dst.relatedArtifact = new ArrayList<RelatedArtifact>(); 5049 for (RelatedArtifact i : relatedArtifact) 5050 dst.relatedArtifact.add(i.copy()); 5051 }; 5052 if (indication != null) { 5053 dst.indication = new ArrayList<CodeableConcept>(); 5054 for (CodeableConcept i : indication) 5055 dst.indication.add(i.copy()); 5056 }; 5057 if (contraindication != null) { 5058 dst.contraindication = new ArrayList<CodeableConcept>(); 5059 for (CodeableConcept i : contraindication) 5060 dst.contraindication.add(i.copy()); 5061 }; 5062 if (warning != null) { 5063 dst.warning = new ArrayList<CodeableConcept>(); 5064 for (CodeableConcept i : warning) 5065 dst.warning.add(i.copy()); 5066 }; 5067 dst.intendedUse = intendedUse == null ? null : intendedUse.copy(); 5068 } 5069 5070 @Override 5071 public boolean equalsDeep(Base other_) { 5072 if (!super.equalsDeep(other_)) 5073 return false; 5074 if (!(other_ instanceof DeviceDefinitionGuidelineComponent)) 5075 return false; 5076 DeviceDefinitionGuidelineComponent o = (DeviceDefinitionGuidelineComponent) other_; 5077 return compareDeep(useContext, o.useContext, true) && compareDeep(usageInstruction, o.usageInstruction, true) 5078 && compareDeep(relatedArtifact, o.relatedArtifact, true) && compareDeep(indication, o.indication, true) 5079 && compareDeep(contraindication, o.contraindication, true) && compareDeep(warning, o.warning, true) 5080 && compareDeep(intendedUse, o.intendedUse, true); 5081 } 5082 5083 @Override 5084 public boolean equalsShallow(Base other_) { 5085 if (!super.equalsShallow(other_)) 5086 return false; 5087 if (!(other_ instanceof DeviceDefinitionGuidelineComponent)) 5088 return false; 5089 DeviceDefinitionGuidelineComponent o = (DeviceDefinitionGuidelineComponent) other_; 5090 return compareValues(usageInstruction, o.usageInstruction, true) && compareValues(intendedUse, o.intendedUse, true) 5091 ; 5092 } 5093 5094 public boolean isEmpty() { 5095 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(useContext, usageInstruction 5096 , relatedArtifact, indication, contraindication, warning, intendedUse); 5097 } 5098 5099 public String fhirType() { 5100 return "DeviceDefinition.guideline"; 5101 5102 } 5103 5104 } 5105 5106 @Block() 5107 public static class DeviceDefinitionCorrectiveActionComponent extends BackboneElement implements IBaseBackboneElement { 5108 /** 5109 * Whether the last corrective action known for this device was a recall. 5110 */ 5111 @Child(name = "recall", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=false) 5112 @Description(shortDefinition="Whether the corrective action was a recall", formalDefinition="Whether the last corrective action known for this device was a recall." ) 5113 protected BooleanType recall; 5114 5115 /** 5116 * The scope of the corrective action - whether the action targeted all units of a given device model, or only a specific set of batches identified by lot numbers, or individually identified devices identified by the serial name. 5117 */ 5118 @Child(name = "scope", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 5119 @Description(shortDefinition="model | lot-numbers | serial-numbers", formalDefinition="The scope of the corrective action - whether the action targeted all units of a given device model, or only a specific set of batches identified by lot numbers, or individually identified devices identified by the serial name." ) 5120 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-correctiveactionscope") 5121 protected Enumeration<DeviceCorrectiveActionScope> scope; 5122 5123 /** 5124 * Start and end dates of the corrective action. 5125 */ 5126 @Child(name = "period", type = {Period.class}, order=3, min=1, max=1, modifier=false, summary=false) 5127 @Description(shortDefinition="Start and end dates of the corrective action", formalDefinition="Start and end dates of the corrective action." ) 5128 protected Period period; 5129 5130 private static final long serialVersionUID = -1936691252L; 5131 5132 /** 5133 * Constructor 5134 */ 5135 public DeviceDefinitionCorrectiveActionComponent() { 5136 super(); 5137 } 5138 5139 /** 5140 * Constructor 5141 */ 5142 public DeviceDefinitionCorrectiveActionComponent(boolean recall, Period period) { 5143 super(); 5144 this.setRecall(recall); 5145 this.setPeriod(period); 5146 } 5147 5148 /** 5149 * @return {@link #recall} (Whether the last corrective action known for this device was a recall.). This is the underlying object with id, value and extensions. The accessor "getRecall" gives direct access to the value 5150 */ 5151 public BooleanType getRecallElement() { 5152 if (this.recall == null) 5153 if (Configuration.errorOnAutoCreate()) 5154 throw new Error("Attempt to auto-create DeviceDefinitionCorrectiveActionComponent.recall"); 5155 else if (Configuration.doAutoCreate()) 5156 this.recall = new BooleanType(); // bb 5157 return this.recall; 5158 } 5159 5160 public boolean hasRecallElement() { 5161 return this.recall != null && !this.recall.isEmpty(); 5162 } 5163 5164 public boolean hasRecall() { 5165 return this.recall != null && !this.recall.isEmpty(); 5166 } 5167 5168 /** 5169 * @param value {@link #recall} (Whether the last corrective action known for this device was a recall.). This is the underlying object with id, value and extensions. The accessor "getRecall" gives direct access to the value 5170 */ 5171 public DeviceDefinitionCorrectiveActionComponent setRecallElement(BooleanType value) { 5172 this.recall = value; 5173 return this; 5174 } 5175 5176 /** 5177 * @return Whether the last corrective action known for this device was a recall. 5178 */ 5179 public boolean getRecall() { 5180 return this.recall == null || this.recall.isEmpty() ? false : this.recall.getValue(); 5181 } 5182 5183 /** 5184 * @param value Whether the last corrective action known for this device was a recall. 5185 */ 5186 public DeviceDefinitionCorrectiveActionComponent setRecall(boolean value) { 5187 if (this.recall == null) 5188 this.recall = new BooleanType(); 5189 this.recall.setValue(value); 5190 return this; 5191 } 5192 5193 /** 5194 * @return {@link #scope} (The scope of the corrective action - whether the action targeted all units of a given device model, or only a specific set of batches identified by lot numbers, or individually identified devices identified by the serial name.). This is the underlying object with id, value and extensions. The accessor "getScope" gives direct access to the value 5195 */ 5196 public Enumeration<DeviceCorrectiveActionScope> getScopeElement() { 5197 if (this.scope == null) 5198 if (Configuration.errorOnAutoCreate()) 5199 throw new Error("Attempt to auto-create DeviceDefinitionCorrectiveActionComponent.scope"); 5200 else if (Configuration.doAutoCreate()) 5201 this.scope = new Enumeration<DeviceCorrectiveActionScope>(new DeviceCorrectiveActionScopeEnumFactory()); // bb 5202 return this.scope; 5203 } 5204 5205 public boolean hasScopeElement() { 5206 return this.scope != null && !this.scope.isEmpty(); 5207 } 5208 5209 public boolean hasScope() { 5210 return this.scope != null && !this.scope.isEmpty(); 5211 } 5212 5213 /** 5214 * @param value {@link #scope} (The scope of the corrective action - whether the action targeted all units of a given device model, or only a specific set of batches identified by lot numbers, or individually identified devices identified by the serial name.). This is the underlying object with id, value and extensions. The accessor "getScope" gives direct access to the value 5215 */ 5216 public DeviceDefinitionCorrectiveActionComponent setScopeElement(Enumeration<DeviceCorrectiveActionScope> value) { 5217 this.scope = value; 5218 return this; 5219 } 5220 5221 /** 5222 * @return The scope of the corrective action - whether the action targeted all units of a given device model, or only a specific set of batches identified by lot numbers, or individually identified devices identified by the serial name. 5223 */ 5224 public DeviceCorrectiveActionScope getScope() { 5225 return this.scope == null ? null : this.scope.getValue(); 5226 } 5227 5228 /** 5229 * @param value The scope of the corrective action - whether the action targeted all units of a given device model, or only a specific set of batches identified by lot numbers, or individually identified devices identified by the serial name. 5230 */ 5231 public DeviceDefinitionCorrectiveActionComponent setScope(DeviceCorrectiveActionScope value) { 5232 if (value == null) 5233 this.scope = null; 5234 else { 5235 if (this.scope == null) 5236 this.scope = new Enumeration<DeviceCorrectiveActionScope>(new DeviceCorrectiveActionScopeEnumFactory()); 5237 this.scope.setValue(value); 5238 } 5239 return this; 5240 } 5241 5242 /** 5243 * @return {@link #period} (Start and end dates of the corrective action.) 5244 */ 5245 public Period getPeriod() { 5246 if (this.period == null) 5247 if (Configuration.errorOnAutoCreate()) 5248 throw new Error("Attempt to auto-create DeviceDefinitionCorrectiveActionComponent.period"); 5249 else if (Configuration.doAutoCreate()) 5250 this.period = new Period(); // cc 5251 return this.period; 5252 } 5253 5254 public boolean hasPeriod() { 5255 return this.period != null && !this.period.isEmpty(); 5256 } 5257 5258 /** 5259 * @param value {@link #period} (Start and end dates of the corrective action.) 5260 */ 5261 public DeviceDefinitionCorrectiveActionComponent setPeriod(Period value) { 5262 this.period = value; 5263 return this; 5264 } 5265 5266 protected void listChildren(List<Property> children) { 5267 super.listChildren(children); 5268 children.add(new Property("recall", "boolean", "Whether the last corrective action known for this device was a recall.", 0, 1, recall)); 5269 children.add(new Property("scope", "code", "The scope of the corrective action - whether the action targeted all units of a given device model, or only a specific set of batches identified by lot numbers, or individually identified devices identified by the serial name.", 0, 1, scope)); 5270 children.add(new Property("period", "Period", "Start and end dates of the corrective action.", 0, 1, period)); 5271 } 5272 5273 @Override 5274 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5275 switch (_hash) { 5276 case -934922479: /*recall*/ return new Property("recall", "boolean", "Whether the last corrective action known for this device was a recall.", 0, 1, recall); 5277 case 109264468: /*scope*/ return new Property("scope", "code", "The scope of the corrective action - whether the action targeted all units of a given device model, or only a specific set of batches identified by lot numbers, or individually identified devices identified by the serial name.", 0, 1, scope); 5278 case -991726143: /*period*/ return new Property("period", "Period", "Start and end dates of the corrective action.", 0, 1, period); 5279 default: return super.getNamedProperty(_hash, _name, _checkValid); 5280 } 5281 5282 } 5283 5284 @Override 5285 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5286 switch (hash) { 5287 case -934922479: /*recall*/ return this.recall == null ? new Base[0] : new Base[] {this.recall}; // BooleanType 5288 case 109264468: /*scope*/ return this.scope == null ? new Base[0] : new Base[] {this.scope}; // Enumeration<DeviceCorrectiveActionScope> 5289 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 5290 default: return super.getProperty(hash, name, checkValid); 5291 } 5292 5293 } 5294 5295 @Override 5296 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5297 switch (hash) { 5298 case -934922479: // recall 5299 this.recall = TypeConvertor.castToBoolean(value); // BooleanType 5300 return value; 5301 case 109264468: // scope 5302 value = new DeviceCorrectiveActionScopeEnumFactory().fromType(TypeConvertor.castToCode(value)); 5303 this.scope = (Enumeration) value; // Enumeration<DeviceCorrectiveActionScope> 5304 return value; 5305 case -991726143: // period 5306 this.period = TypeConvertor.castToPeriod(value); // Period 5307 return value; 5308 default: return super.setProperty(hash, name, value); 5309 } 5310 5311 } 5312 5313 @Override 5314 public Base setProperty(String name, Base value) throws FHIRException { 5315 if (name.equals("recall")) { 5316 this.recall = TypeConvertor.castToBoolean(value); // BooleanType 5317 } else if (name.equals("scope")) { 5318 value = new DeviceCorrectiveActionScopeEnumFactory().fromType(TypeConvertor.castToCode(value)); 5319 this.scope = (Enumeration) value; // Enumeration<DeviceCorrectiveActionScope> 5320 } else if (name.equals("period")) { 5321 this.period = TypeConvertor.castToPeriod(value); // Period 5322 } else 5323 return super.setProperty(name, value); 5324 return value; 5325 } 5326 5327 @Override 5328 public Base makeProperty(int hash, String name) throws FHIRException { 5329 switch (hash) { 5330 case -934922479: return getRecallElement(); 5331 case 109264468: return getScopeElement(); 5332 case -991726143: return getPeriod(); 5333 default: return super.makeProperty(hash, name); 5334 } 5335 5336 } 5337 5338 @Override 5339 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5340 switch (hash) { 5341 case -934922479: /*recall*/ return new String[] {"boolean"}; 5342 case 109264468: /*scope*/ return new String[] {"code"}; 5343 case -991726143: /*period*/ return new String[] {"Period"}; 5344 default: return super.getTypesForProperty(hash, name); 5345 } 5346 5347 } 5348 5349 @Override 5350 public Base addChild(String name) throws FHIRException { 5351 if (name.equals("recall")) { 5352 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.correctiveAction.recall"); 5353 } 5354 else if (name.equals("scope")) { 5355 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.correctiveAction.scope"); 5356 } 5357 else if (name.equals("period")) { 5358 this.period = new Period(); 5359 return this.period; 5360 } 5361 else 5362 return super.addChild(name); 5363 } 5364 5365 public DeviceDefinitionCorrectiveActionComponent copy() { 5366 DeviceDefinitionCorrectiveActionComponent dst = new DeviceDefinitionCorrectiveActionComponent(); 5367 copyValues(dst); 5368 return dst; 5369 } 5370 5371 public void copyValues(DeviceDefinitionCorrectiveActionComponent dst) { 5372 super.copyValues(dst); 5373 dst.recall = recall == null ? null : recall.copy(); 5374 dst.scope = scope == null ? null : scope.copy(); 5375 dst.period = period == null ? null : period.copy(); 5376 } 5377 5378 @Override 5379 public boolean equalsDeep(Base other_) { 5380 if (!super.equalsDeep(other_)) 5381 return false; 5382 if (!(other_ instanceof DeviceDefinitionCorrectiveActionComponent)) 5383 return false; 5384 DeviceDefinitionCorrectiveActionComponent o = (DeviceDefinitionCorrectiveActionComponent) other_; 5385 return compareDeep(recall, o.recall, true) && compareDeep(scope, o.scope, true) && compareDeep(period, o.period, true) 5386 ; 5387 } 5388 5389 @Override 5390 public boolean equalsShallow(Base other_) { 5391 if (!super.equalsShallow(other_)) 5392 return false; 5393 if (!(other_ instanceof DeviceDefinitionCorrectiveActionComponent)) 5394 return false; 5395 DeviceDefinitionCorrectiveActionComponent o = (DeviceDefinitionCorrectiveActionComponent) other_; 5396 return compareValues(recall, o.recall, true) && compareValues(scope, o.scope, true); 5397 } 5398 5399 public boolean isEmpty() { 5400 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(recall, scope, period); 5401 } 5402 5403 public String fhirType() { 5404 return "DeviceDefinition.correctiveAction"; 5405 5406 } 5407 5408 } 5409 5410 @Block() 5411 public static class DeviceDefinitionChargeItemComponent extends BackboneElement implements IBaseBackboneElement { 5412 /** 5413 * The code or reference for the charge item. 5414 */ 5415 @Child(name = "chargeItemCode", type = {CodeableReference.class}, order=1, min=1, max=1, modifier=false, summary=false) 5416 @Description(shortDefinition="The code or reference for the charge item", formalDefinition="The code or reference for the charge item." ) 5417 protected CodeableReference chargeItemCode; 5418 5419 /** 5420 * Coefficient applicable to the billing code. 5421 */ 5422 @Child(name = "count", type = {Quantity.class}, order=2, min=1, max=1, modifier=false, summary=false) 5423 @Description(shortDefinition="Coefficient applicable to the billing code", formalDefinition="Coefficient applicable to the billing code." ) 5424 protected Quantity count; 5425 5426 /** 5427 * A specific time period in which this charge item applies. 5428 */ 5429 @Child(name = "effectivePeriod", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=false) 5430 @Description(shortDefinition="A specific time period in which this charge item applies", formalDefinition="A specific time period in which this charge item applies." ) 5431 protected Period effectivePeriod; 5432 5433 /** 5434 * The context to which this charge item applies. 5435 */ 5436 @Child(name = "useContext", type = {UsageContext.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5437 @Description(shortDefinition="The context to which this charge item applies", formalDefinition="The context to which this charge item applies." ) 5438 protected List<UsageContext> useContext; 5439 5440 private static final long serialVersionUID = 1312166907L; 5441 5442 /** 5443 * Constructor 5444 */ 5445 public DeviceDefinitionChargeItemComponent() { 5446 super(); 5447 } 5448 5449 /** 5450 * Constructor 5451 */ 5452 public DeviceDefinitionChargeItemComponent(CodeableReference chargeItemCode, Quantity count) { 5453 super(); 5454 this.setChargeItemCode(chargeItemCode); 5455 this.setCount(count); 5456 } 5457 5458 /** 5459 * @return {@link #chargeItemCode} (The code or reference for the charge item.) 5460 */ 5461 public CodeableReference getChargeItemCode() { 5462 if (this.chargeItemCode == null) 5463 if (Configuration.errorOnAutoCreate()) 5464 throw new Error("Attempt to auto-create DeviceDefinitionChargeItemComponent.chargeItemCode"); 5465 else if (Configuration.doAutoCreate()) 5466 this.chargeItemCode = new CodeableReference(); // cc 5467 return this.chargeItemCode; 5468 } 5469 5470 public boolean hasChargeItemCode() { 5471 return this.chargeItemCode != null && !this.chargeItemCode.isEmpty(); 5472 } 5473 5474 /** 5475 * @param value {@link #chargeItemCode} (The code or reference for the charge item.) 5476 */ 5477 public DeviceDefinitionChargeItemComponent setChargeItemCode(CodeableReference value) { 5478 this.chargeItemCode = value; 5479 return this; 5480 } 5481 5482 /** 5483 * @return {@link #count} (Coefficient applicable to the billing code.) 5484 */ 5485 public Quantity getCount() { 5486 if (this.count == null) 5487 if (Configuration.errorOnAutoCreate()) 5488 throw new Error("Attempt to auto-create DeviceDefinitionChargeItemComponent.count"); 5489 else if (Configuration.doAutoCreate()) 5490 this.count = new Quantity(); // cc 5491 return this.count; 5492 } 5493 5494 public boolean hasCount() { 5495 return this.count != null && !this.count.isEmpty(); 5496 } 5497 5498 /** 5499 * @param value {@link #count} (Coefficient applicable to the billing code.) 5500 */ 5501 public DeviceDefinitionChargeItemComponent setCount(Quantity value) { 5502 this.count = value; 5503 return this; 5504 } 5505 5506 /** 5507 * @return {@link #effectivePeriod} (A specific time period in which this charge item applies.) 5508 */ 5509 public Period getEffectivePeriod() { 5510 if (this.effectivePeriod == null) 5511 if (Configuration.errorOnAutoCreate()) 5512 throw new Error("Attempt to auto-create DeviceDefinitionChargeItemComponent.effectivePeriod"); 5513 else if (Configuration.doAutoCreate()) 5514 this.effectivePeriod = new Period(); // cc 5515 return this.effectivePeriod; 5516 } 5517 5518 public boolean hasEffectivePeriod() { 5519 return this.effectivePeriod != null && !this.effectivePeriod.isEmpty(); 5520 } 5521 5522 /** 5523 * @param value {@link #effectivePeriod} (A specific time period in which this charge item applies.) 5524 */ 5525 public DeviceDefinitionChargeItemComponent setEffectivePeriod(Period value) { 5526 this.effectivePeriod = value; 5527 return this; 5528 } 5529 5530 /** 5531 * @return {@link #useContext} (The context to which this charge item applies.) 5532 */ 5533 public List<UsageContext> getUseContext() { 5534 if (this.useContext == null) 5535 this.useContext = new ArrayList<UsageContext>(); 5536 return this.useContext; 5537 } 5538 5539 /** 5540 * @return Returns a reference to <code>this</code> for easy method chaining 5541 */ 5542 public DeviceDefinitionChargeItemComponent setUseContext(List<UsageContext> theUseContext) { 5543 this.useContext = theUseContext; 5544 return this; 5545 } 5546 5547 public boolean hasUseContext() { 5548 if (this.useContext == null) 5549 return false; 5550 for (UsageContext item : this.useContext) 5551 if (!item.isEmpty()) 5552 return true; 5553 return false; 5554 } 5555 5556 public UsageContext addUseContext() { //3 5557 UsageContext t = new UsageContext(); 5558 if (this.useContext == null) 5559 this.useContext = new ArrayList<UsageContext>(); 5560 this.useContext.add(t); 5561 return t; 5562 } 5563 5564 public DeviceDefinitionChargeItemComponent addUseContext(UsageContext t) { //3 5565 if (t == null) 5566 return this; 5567 if (this.useContext == null) 5568 this.useContext = new ArrayList<UsageContext>(); 5569 this.useContext.add(t); 5570 return this; 5571 } 5572 5573 /** 5574 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3} 5575 */ 5576 public UsageContext getUseContextFirstRep() { 5577 if (getUseContext().isEmpty()) { 5578 addUseContext(); 5579 } 5580 return getUseContext().get(0); 5581 } 5582 5583 protected void listChildren(List<Property> children) { 5584 super.listChildren(children); 5585 children.add(new Property("chargeItemCode", "CodeableReference(ChargeItemDefinition)", "The code or reference for the charge item.", 0, 1, chargeItemCode)); 5586 children.add(new Property("count", "Quantity", "Coefficient applicable to the billing code.", 0, 1, count)); 5587 children.add(new Property("effectivePeriod", "Period", "A specific time period in which this charge item applies.", 0, 1, effectivePeriod)); 5588 children.add(new Property("useContext", "UsageContext", "The context to which this charge item applies.", 0, java.lang.Integer.MAX_VALUE, useContext)); 5589 } 5590 5591 @Override 5592 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5593 switch (_hash) { 5594 case -2001375628: /*chargeItemCode*/ return new Property("chargeItemCode", "CodeableReference(ChargeItemDefinition)", "The code or reference for the charge item.", 0, 1, chargeItemCode); 5595 case 94851343: /*count*/ return new Property("count", "Quantity", "Coefficient applicable to the billing code.", 0, 1, count); 5596 case -403934648: /*effectivePeriod*/ return new Property("effectivePeriod", "Period", "A specific time period in which this charge item applies.", 0, 1, effectivePeriod); 5597 case -669707736: /*useContext*/ return new Property("useContext", "UsageContext", "The context to which this charge item applies.", 0, java.lang.Integer.MAX_VALUE, useContext); 5598 default: return super.getNamedProperty(_hash, _name, _checkValid); 5599 } 5600 5601 } 5602 5603 @Override 5604 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5605 switch (hash) { 5606 case -2001375628: /*chargeItemCode*/ return this.chargeItemCode == null ? new Base[0] : new Base[] {this.chargeItemCode}; // CodeableReference 5607 case 94851343: /*count*/ return this.count == null ? new Base[0] : new Base[] {this.count}; // Quantity 5608 case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period 5609 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 5610 default: return super.getProperty(hash, name, checkValid); 5611 } 5612 5613 } 5614 5615 @Override 5616 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5617 switch (hash) { 5618 case -2001375628: // chargeItemCode 5619 this.chargeItemCode = TypeConvertor.castToCodeableReference(value); // CodeableReference 5620 return value; 5621 case 94851343: // count 5622 this.count = TypeConvertor.castToQuantity(value); // Quantity 5623 return value; 5624 case -403934648: // effectivePeriod 5625 this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period 5626 return value; 5627 case -669707736: // useContext 5628 this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext 5629 return value; 5630 default: return super.setProperty(hash, name, value); 5631 } 5632 5633 } 5634 5635 @Override 5636 public Base setProperty(String name, Base value) throws FHIRException { 5637 if (name.equals("chargeItemCode")) { 5638 this.chargeItemCode = TypeConvertor.castToCodeableReference(value); // CodeableReference 5639 } else if (name.equals("count")) { 5640 this.count = TypeConvertor.castToQuantity(value); // Quantity 5641 } else if (name.equals("effectivePeriod")) { 5642 this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period 5643 } else if (name.equals("useContext")) { 5644 this.getUseContext().add(TypeConvertor.castToUsageContext(value)); 5645 } else 5646 return super.setProperty(name, value); 5647 return value; 5648 } 5649 5650 @Override 5651 public Base makeProperty(int hash, String name) throws FHIRException { 5652 switch (hash) { 5653 case -2001375628: return getChargeItemCode(); 5654 case 94851343: return getCount(); 5655 case -403934648: return getEffectivePeriod(); 5656 case -669707736: return addUseContext(); 5657 default: return super.makeProperty(hash, name); 5658 } 5659 5660 } 5661 5662 @Override 5663 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5664 switch (hash) { 5665 case -2001375628: /*chargeItemCode*/ return new String[] {"CodeableReference"}; 5666 case 94851343: /*count*/ return new String[] {"Quantity"}; 5667 case -403934648: /*effectivePeriod*/ return new String[] {"Period"}; 5668 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 5669 default: return super.getTypesForProperty(hash, name); 5670 } 5671 5672 } 5673 5674 @Override 5675 public Base addChild(String name) throws FHIRException { 5676 if (name.equals("chargeItemCode")) { 5677 this.chargeItemCode = new CodeableReference(); 5678 return this.chargeItemCode; 5679 } 5680 else if (name.equals("count")) { 5681 this.count = new Quantity(); 5682 return this.count; 5683 } 5684 else if (name.equals("effectivePeriod")) { 5685 this.effectivePeriod = new Period(); 5686 return this.effectivePeriod; 5687 } 5688 else if (name.equals("useContext")) { 5689 return addUseContext(); 5690 } 5691 else 5692 return super.addChild(name); 5693 } 5694 5695 public DeviceDefinitionChargeItemComponent copy() { 5696 DeviceDefinitionChargeItemComponent dst = new DeviceDefinitionChargeItemComponent(); 5697 copyValues(dst); 5698 return dst; 5699 } 5700 5701 public void copyValues(DeviceDefinitionChargeItemComponent dst) { 5702 super.copyValues(dst); 5703 dst.chargeItemCode = chargeItemCode == null ? null : chargeItemCode.copy(); 5704 dst.count = count == null ? null : count.copy(); 5705 dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy(); 5706 if (useContext != null) { 5707 dst.useContext = new ArrayList<UsageContext>(); 5708 for (UsageContext i : useContext) 5709 dst.useContext.add(i.copy()); 5710 }; 5711 } 5712 5713 @Override 5714 public boolean equalsDeep(Base other_) { 5715 if (!super.equalsDeep(other_)) 5716 return false; 5717 if (!(other_ instanceof DeviceDefinitionChargeItemComponent)) 5718 return false; 5719 DeviceDefinitionChargeItemComponent o = (DeviceDefinitionChargeItemComponent) other_; 5720 return compareDeep(chargeItemCode, o.chargeItemCode, true) && compareDeep(count, o.count, true) 5721 && compareDeep(effectivePeriod, o.effectivePeriod, true) && compareDeep(useContext, o.useContext, true) 5722 ; 5723 } 5724 5725 @Override 5726 public boolean equalsShallow(Base other_) { 5727 if (!super.equalsShallow(other_)) 5728 return false; 5729 if (!(other_ instanceof DeviceDefinitionChargeItemComponent)) 5730 return false; 5731 DeviceDefinitionChargeItemComponent o = (DeviceDefinitionChargeItemComponent) other_; 5732 return true; 5733 } 5734 5735 public boolean isEmpty() { 5736 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(chargeItemCode, count, effectivePeriod 5737 , useContext); 5738 } 5739 5740 public String fhirType() { 5741 return "DeviceDefinition.chargeItem"; 5742 5743 } 5744 5745 } 5746 5747 /** 5748 * Additional information to describe the device. 5749 */ 5750 @Child(name = "description", type = {MarkdownType.class}, order=0, min=0, max=1, modifier=false, summary=false) 5751 @Description(shortDefinition="Additional information to describe the device", formalDefinition="Additional information to describe the device." ) 5752 protected MarkdownType description; 5753 5754 /** 5755 * Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID. The identifier is typically valued if the udiDeviceIdentifier, partNumber or modelNumber is not valued and represents a different type of identifier. However, it is permissible to still include those identifiers in DeviceDefinition.identifier with the appropriate identifier.type. 5756 */ 5757 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5758 @Description(shortDefinition="Instance identifier", formalDefinition="Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID. The identifier is typically valued if the udiDeviceIdentifier, partNumber or modelNumber is not valued and represents a different type of identifier. However, it is permissible to still include those identifiers in DeviceDefinition.identifier with the appropriate identifier.type." ) 5759 protected List<Identifier> identifier; 5760 5761 /** 5762 * Unique device identifier (UDI) assigned to device label or package. Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold. 5763 */ 5764 @Child(name = "udiDeviceIdentifier", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5765 @Description(shortDefinition="Unique Device Identifier (UDI) Barcode string", formalDefinition="Unique device identifier (UDI) assigned to device label or package. Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold." ) 5766 protected List<DeviceDefinitionUdiDeviceIdentifierComponent> udiDeviceIdentifier; 5767 5768 /** 5769 * Identifier associated with the regulatory documentation (certificates, technical documentation, post-market surveillance documentation and reports) of a set of device models sharing the same intended purpose, risk class and essential design and manufacturing characteristics. One example is the Basic UDI-DI in Europe. 5770 */ 5771 @Child(name = "regulatoryIdentifier", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5772 @Description(shortDefinition="Regulatory identifier(s) associated with this device", formalDefinition="Identifier associated with the regulatory documentation (certificates, technical documentation, post-market surveillance documentation and reports) of a set of device models sharing the same intended purpose, risk class and essential design and manufacturing characteristics. One example is the Basic UDI-DI in Europe." ) 5773 protected List<DeviceDefinitionRegulatoryIdentifierComponent> regulatoryIdentifier; 5774 5775 /** 5776 * The part number or catalog number of the device. 5777 */ 5778 @Child(name = "partNumber", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 5779 @Description(shortDefinition="The part number or catalog number of the device", formalDefinition="The part number or catalog number of the device." ) 5780 protected StringType partNumber; 5781 5782 /** 5783 * A name of the manufacturer or legal representative e.g. labeler. Whether this is the actual manufacturer or the labeler or responsible depends on implementation and jurisdiction. 5784 */ 5785 @Child(name = "manufacturer", type = {Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) 5786 @Description(shortDefinition="Name of device manufacturer", formalDefinition="A name of the manufacturer or legal representative e.g. labeler. Whether this is the actual manufacturer or the labeler or responsible depends on implementation and jurisdiction." ) 5787 protected Reference manufacturer; 5788 5789 /** 5790 * The name or names of the device as given by the manufacturer. 5791 */ 5792 @Child(name = "deviceName", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5793 @Description(shortDefinition="The name or names of the device as given by the manufacturer", formalDefinition="The name or names of the device as given by the manufacturer." ) 5794 protected List<DeviceDefinitionDeviceNameComponent> deviceName; 5795 5796 /** 5797 * The model number for the device for example as defined by the manufacturer or labeler, or other agency. 5798 */ 5799 @Child(name = "modelNumber", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) 5800 @Description(shortDefinition="The catalog or model number for the device for example as defined by the manufacturer", formalDefinition="The model number for the device for example as defined by the manufacturer or labeler, or other agency." ) 5801 protected StringType modelNumber; 5802 5803 /** 5804 * What kind of device or device system this is. 5805 */ 5806 @Child(name = "classification", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5807 @Description(shortDefinition="What kind of device or device system this is", formalDefinition="What kind of device or device system this is." ) 5808 protected List<DeviceDefinitionClassificationComponent> classification; 5809 5810 /** 5811 * Identifies the standards, specifications, or formal guidances for the capabilities supported by the device. The device may be certified as conformant to these specifications e.g., communication, performance, process, measurement, or specialization standards. 5812 */ 5813 @Child(name = "conformsTo", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5814 @Description(shortDefinition="Identifies the standards, specifications, or formal guidances for the capabilities supported by the device", formalDefinition="Identifies the standards, specifications, or formal guidances for the capabilities supported by the device. The device may be certified as conformant to these specifications e.g., communication, performance, process, measurement, or specialization standards." ) 5815 protected List<DeviceDefinitionConformsToComponent> conformsTo; 5816 5817 /** 5818 * A device that is part (for example a component) of the present device. 5819 */ 5820 @Child(name = "hasPart", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5821 @Description(shortDefinition="A device, part of the current one", formalDefinition="A device that is part (for example a component) of the present device." ) 5822 protected List<DeviceDefinitionHasPartComponent> hasPart; 5823 5824 /** 5825 * Information about the packaging of the device, i.e. how the device is packaged. 5826 */ 5827 @Child(name = "packaging", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5828 @Description(shortDefinition="Information about the packaging of the device, i.e. how the device is packaged", formalDefinition="Information about the packaging of the device, i.e. how the device is packaged." ) 5829 protected List<DeviceDefinitionPackagingComponent> packaging; 5830 5831 /** 5832 * The version of the device or software. 5833 */ 5834 @Child(name = "version", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5835 @Description(shortDefinition="The version of the device or software", formalDefinition="The version of the device or software." ) 5836 protected List<DeviceDefinitionVersionComponent> version; 5837 5838 /** 5839 * Safety characteristics of the device. 5840 */ 5841 @Child(name = "safety", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5842 @Description(shortDefinition="Safety characteristics of the device", formalDefinition="Safety characteristics of the device." ) 5843 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-safety") 5844 protected List<CodeableConcept> safety; 5845 5846 /** 5847 * Shelf Life and storage information. 5848 */ 5849 @Child(name = "shelfLifeStorage", type = {ProductShelfLife.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5850 @Description(shortDefinition="Shelf Life and storage information", formalDefinition="Shelf Life and storage information." ) 5851 protected List<ProductShelfLife> shelfLifeStorage; 5852 5853 /** 5854 * Language code for the human-readable text strings produced by the device (all supported). 5855 */ 5856 @Child(name = "languageCode", type = {CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5857 @Description(shortDefinition="Language code for the human-readable text strings produced by the device (all supported)", formalDefinition="Language code for the human-readable text strings produced by the device (all supported)." ) 5858 protected List<CodeableConcept> languageCode; 5859 5860 /** 5861 * Static or essentially fixed characteristics or features of this kind of device that are otherwise not captured in more specific attributes, e.g., time or timing attributes, resolution, accuracy, and physical attributes. 5862 */ 5863 @Child(name = "property", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5864 @Description(shortDefinition="Inherent, essentially fixed, characteristics of this kind of device, e.g., time properties, size, etc", formalDefinition="Static or essentially fixed characteristics or features of this kind of device that are otherwise not captured in more specific attributes, e.g., time or timing attributes, resolution, accuracy, and physical attributes." ) 5865 protected List<DeviceDefinitionPropertyComponent> property; 5866 5867 /** 5868 * An organization that is responsible for the provision and ongoing maintenance of the device. 5869 */ 5870 @Child(name = "owner", type = {Organization.class}, order=17, min=0, max=1, modifier=false, summary=false) 5871 @Description(shortDefinition="Organization responsible for device", formalDefinition="An organization that is responsible for the provision and ongoing maintenance of the device." ) 5872 protected Reference owner; 5873 5874 /** 5875 * Contact details for an organization or a particular human that is responsible for the device. 5876 */ 5877 @Child(name = "contact", type = {ContactPoint.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5878 @Description(shortDefinition="Details for human/organization for support", formalDefinition="Contact details for an organization or a particular human that is responsible for the device." ) 5879 protected List<ContactPoint> contact; 5880 5881 /** 5882 * An associated device, attached to, used with, communicating with or linking a previous or new device model to the focal device. 5883 */ 5884 @Child(name = "link", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5885 @Description(shortDefinition="An associated device, attached to, used with, communicating with or linking a previous or new device model to the focal device", formalDefinition="An associated device, attached to, used with, communicating with or linking a previous or new device model to the focal device." ) 5886 protected List<DeviceDefinitionLinkComponent> link; 5887 5888 /** 5889 * Descriptive information, usage information or implantation information that is not captured in an existing element. 5890 */ 5891 @Child(name = "note", type = {Annotation.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5892 @Description(shortDefinition="Device notes and comments", formalDefinition="Descriptive information, usage information or implantation information that is not captured in an existing element." ) 5893 protected List<Annotation> note; 5894 5895 /** 5896 * A substance used to create the material(s) of which the device is made. 5897 */ 5898 @Child(name = "material", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5899 @Description(shortDefinition="A substance used to create the material(s) of which the device is made", formalDefinition="A substance used to create the material(s) of which the device is made." ) 5900 protected List<DeviceDefinitionMaterialComponent> material; 5901 5902 /** 5903 * Indicates the production identifier(s) that are expected to appear in the UDI carrier on the device label. 5904 */ 5905 @Child(name = "productionIdentifierInUDI", type = {CodeType.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5906 @Description(shortDefinition="lot-number | manufactured-date | serial-number | expiration-date | biological-source | software-version", formalDefinition="Indicates the production identifier(s) that are expected to appear in the UDI carrier on the device label." ) 5907 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-productidentifierinudi") 5908 protected List<Enumeration<DeviceProductionIdentifierInUDI>> productionIdentifierInUDI; 5909 5910 /** 5911 * Information aimed at providing directions for the usage of this model of device. 5912 */ 5913 @Child(name = "guideline", type = {}, order=23, min=0, max=1, modifier=false, summary=false) 5914 @Description(shortDefinition="Information aimed at providing directions for the usage of this model of device", formalDefinition="Information aimed at providing directions for the usage of this model of device." ) 5915 protected DeviceDefinitionGuidelineComponent guideline; 5916 5917 /** 5918 * Tracking of latest field safety corrective action. 5919 */ 5920 @Child(name = "correctiveAction", type = {}, order=24, min=0, max=1, modifier=false, summary=false) 5921 @Description(shortDefinition="Tracking of latest field safety corrective action", formalDefinition="Tracking of latest field safety corrective action." ) 5922 protected DeviceDefinitionCorrectiveActionComponent correctiveAction; 5923 5924 /** 5925 * Billing code or reference associated with the device. 5926 */ 5927 @Child(name = "chargeItem", type = {}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5928 @Description(shortDefinition="Billing code or reference associated with the device", formalDefinition="Billing code or reference associated with the device." ) 5929 protected List<DeviceDefinitionChargeItemComponent> chargeItem; 5930 5931 private static final long serialVersionUID = -260935704L; 5932 5933 /** 5934 * Constructor 5935 */ 5936 public DeviceDefinition() { 5937 super(); 5938 } 5939 5940 /** 5941 * @return {@link #description} (Additional information to describe the device.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 5942 */ 5943 public MarkdownType getDescriptionElement() { 5944 if (this.description == null) 5945 if (Configuration.errorOnAutoCreate()) 5946 throw new Error("Attempt to auto-create DeviceDefinition.description"); 5947 else if (Configuration.doAutoCreate()) 5948 this.description = new MarkdownType(); // bb 5949 return this.description; 5950 } 5951 5952 public boolean hasDescriptionElement() { 5953 return this.description != null && !this.description.isEmpty(); 5954 } 5955 5956 public boolean hasDescription() { 5957 return this.description != null && !this.description.isEmpty(); 5958 } 5959 5960 /** 5961 * @param value {@link #description} (Additional information to describe the device.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 5962 */ 5963 public DeviceDefinition setDescriptionElement(MarkdownType value) { 5964 this.description = value; 5965 return this; 5966 } 5967 5968 /** 5969 * @return Additional information to describe the device. 5970 */ 5971 public String getDescription() { 5972 return this.description == null ? null : this.description.getValue(); 5973 } 5974 5975 /** 5976 * @param value Additional information to describe the device. 5977 */ 5978 public DeviceDefinition setDescription(String value) { 5979 if (Utilities.noString(value)) 5980 this.description = null; 5981 else { 5982 if (this.description == null) 5983 this.description = new MarkdownType(); 5984 this.description.setValue(value); 5985 } 5986 return this; 5987 } 5988 5989 /** 5990 * @return {@link #identifier} (Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID. The identifier is typically valued if the udiDeviceIdentifier, partNumber or modelNumber is not valued and represents a different type of identifier. However, it is permissible to still include those identifiers in DeviceDefinition.identifier with the appropriate identifier.type.) 5991 */ 5992 public List<Identifier> getIdentifier() { 5993 if (this.identifier == null) 5994 this.identifier = new ArrayList<Identifier>(); 5995 return this.identifier; 5996 } 5997 5998 /** 5999 * @return Returns a reference to <code>this</code> for easy method chaining 6000 */ 6001 public DeviceDefinition setIdentifier(List<Identifier> theIdentifier) { 6002 this.identifier = theIdentifier; 6003 return this; 6004 } 6005 6006 public boolean hasIdentifier() { 6007 if (this.identifier == null) 6008 return false; 6009 for (Identifier item : this.identifier) 6010 if (!item.isEmpty()) 6011 return true; 6012 return false; 6013 } 6014 6015 public Identifier addIdentifier() { //3 6016 Identifier t = new Identifier(); 6017 if (this.identifier == null) 6018 this.identifier = new ArrayList<Identifier>(); 6019 this.identifier.add(t); 6020 return t; 6021 } 6022 6023 public DeviceDefinition addIdentifier(Identifier t) { //3 6024 if (t == null) 6025 return this; 6026 if (this.identifier == null) 6027 this.identifier = new ArrayList<Identifier>(); 6028 this.identifier.add(t); 6029 return this; 6030 } 6031 6032 /** 6033 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 6034 */ 6035 public Identifier getIdentifierFirstRep() { 6036 if (getIdentifier().isEmpty()) { 6037 addIdentifier(); 6038 } 6039 return getIdentifier().get(0); 6040 } 6041 6042 /** 6043 * @return {@link #udiDeviceIdentifier} (Unique device identifier (UDI) assigned to device label or package. Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold.) 6044 */ 6045 public List<DeviceDefinitionUdiDeviceIdentifierComponent> getUdiDeviceIdentifier() { 6046 if (this.udiDeviceIdentifier == null) 6047 this.udiDeviceIdentifier = new ArrayList<DeviceDefinitionUdiDeviceIdentifierComponent>(); 6048 return this.udiDeviceIdentifier; 6049 } 6050 6051 /** 6052 * @return Returns a reference to <code>this</code> for easy method chaining 6053 */ 6054 public DeviceDefinition setUdiDeviceIdentifier(List<DeviceDefinitionUdiDeviceIdentifierComponent> theUdiDeviceIdentifier) { 6055 this.udiDeviceIdentifier = theUdiDeviceIdentifier; 6056 return this; 6057 } 6058 6059 public boolean hasUdiDeviceIdentifier() { 6060 if (this.udiDeviceIdentifier == null) 6061 return false; 6062 for (DeviceDefinitionUdiDeviceIdentifierComponent item : this.udiDeviceIdentifier) 6063 if (!item.isEmpty()) 6064 return true; 6065 return false; 6066 } 6067 6068 public DeviceDefinitionUdiDeviceIdentifierComponent addUdiDeviceIdentifier() { //3 6069 DeviceDefinitionUdiDeviceIdentifierComponent t = new DeviceDefinitionUdiDeviceIdentifierComponent(); 6070 if (this.udiDeviceIdentifier == null) 6071 this.udiDeviceIdentifier = new ArrayList<DeviceDefinitionUdiDeviceIdentifierComponent>(); 6072 this.udiDeviceIdentifier.add(t); 6073 return t; 6074 } 6075 6076 public DeviceDefinition addUdiDeviceIdentifier(DeviceDefinitionUdiDeviceIdentifierComponent t) { //3 6077 if (t == null) 6078 return this; 6079 if (this.udiDeviceIdentifier == null) 6080 this.udiDeviceIdentifier = new ArrayList<DeviceDefinitionUdiDeviceIdentifierComponent>(); 6081 this.udiDeviceIdentifier.add(t); 6082 return this; 6083 } 6084 6085 /** 6086 * @return The first repetition of repeating field {@link #udiDeviceIdentifier}, creating it if it does not already exist {3} 6087 */ 6088 public DeviceDefinitionUdiDeviceIdentifierComponent getUdiDeviceIdentifierFirstRep() { 6089 if (getUdiDeviceIdentifier().isEmpty()) { 6090 addUdiDeviceIdentifier(); 6091 } 6092 return getUdiDeviceIdentifier().get(0); 6093 } 6094 6095 /** 6096 * @return {@link #regulatoryIdentifier} (Identifier associated with the regulatory documentation (certificates, technical documentation, post-market surveillance documentation and reports) of a set of device models sharing the same intended purpose, risk class and essential design and manufacturing characteristics. One example is the Basic UDI-DI in Europe.) 6097 */ 6098 public List<DeviceDefinitionRegulatoryIdentifierComponent> getRegulatoryIdentifier() { 6099 if (this.regulatoryIdentifier == null) 6100 this.regulatoryIdentifier = new ArrayList<DeviceDefinitionRegulatoryIdentifierComponent>(); 6101 return this.regulatoryIdentifier; 6102 } 6103 6104 /** 6105 * @return Returns a reference to <code>this</code> for easy method chaining 6106 */ 6107 public DeviceDefinition setRegulatoryIdentifier(List<DeviceDefinitionRegulatoryIdentifierComponent> theRegulatoryIdentifier) { 6108 this.regulatoryIdentifier = theRegulatoryIdentifier; 6109 return this; 6110 } 6111 6112 public boolean hasRegulatoryIdentifier() { 6113 if (this.regulatoryIdentifier == null) 6114 return false; 6115 for (DeviceDefinitionRegulatoryIdentifierComponent item : this.regulatoryIdentifier) 6116 if (!item.isEmpty()) 6117 return true; 6118 return false; 6119 } 6120 6121 public DeviceDefinitionRegulatoryIdentifierComponent addRegulatoryIdentifier() { //3 6122 DeviceDefinitionRegulatoryIdentifierComponent t = new DeviceDefinitionRegulatoryIdentifierComponent(); 6123 if (this.regulatoryIdentifier == null) 6124 this.regulatoryIdentifier = new ArrayList<DeviceDefinitionRegulatoryIdentifierComponent>(); 6125 this.regulatoryIdentifier.add(t); 6126 return t; 6127 } 6128 6129 public DeviceDefinition addRegulatoryIdentifier(DeviceDefinitionRegulatoryIdentifierComponent t) { //3 6130 if (t == null) 6131 return this; 6132 if (this.regulatoryIdentifier == null) 6133 this.regulatoryIdentifier = new ArrayList<DeviceDefinitionRegulatoryIdentifierComponent>(); 6134 this.regulatoryIdentifier.add(t); 6135 return this; 6136 } 6137 6138 /** 6139 * @return The first repetition of repeating field {@link #regulatoryIdentifier}, creating it if it does not already exist {3} 6140 */ 6141 public DeviceDefinitionRegulatoryIdentifierComponent getRegulatoryIdentifierFirstRep() { 6142 if (getRegulatoryIdentifier().isEmpty()) { 6143 addRegulatoryIdentifier(); 6144 } 6145 return getRegulatoryIdentifier().get(0); 6146 } 6147 6148 /** 6149 * @return {@link #partNumber} (The part number or catalog number of the device.). This is the underlying object with id, value and extensions. The accessor "getPartNumber" gives direct access to the value 6150 */ 6151 public StringType getPartNumberElement() { 6152 if (this.partNumber == null) 6153 if (Configuration.errorOnAutoCreate()) 6154 throw new Error("Attempt to auto-create DeviceDefinition.partNumber"); 6155 else if (Configuration.doAutoCreate()) 6156 this.partNumber = new StringType(); // bb 6157 return this.partNumber; 6158 } 6159 6160 public boolean hasPartNumberElement() { 6161 return this.partNumber != null && !this.partNumber.isEmpty(); 6162 } 6163 6164 public boolean hasPartNumber() { 6165 return this.partNumber != null && !this.partNumber.isEmpty(); 6166 } 6167 6168 /** 6169 * @param value {@link #partNumber} (The part number or catalog number of the device.). This is the underlying object with id, value and extensions. The accessor "getPartNumber" gives direct access to the value 6170 */ 6171 public DeviceDefinition setPartNumberElement(StringType value) { 6172 this.partNumber = value; 6173 return this; 6174 } 6175 6176 /** 6177 * @return The part number or catalog number of the device. 6178 */ 6179 public String getPartNumber() { 6180 return this.partNumber == null ? null : this.partNumber.getValue(); 6181 } 6182 6183 /** 6184 * @param value The part number or catalog number of the device. 6185 */ 6186 public DeviceDefinition setPartNumber(String value) { 6187 if (Utilities.noString(value)) 6188 this.partNumber = null; 6189 else { 6190 if (this.partNumber == null) 6191 this.partNumber = new StringType(); 6192 this.partNumber.setValue(value); 6193 } 6194 return this; 6195 } 6196 6197 /** 6198 * @return {@link #manufacturer} (A name of the manufacturer or legal representative e.g. labeler. Whether this is the actual manufacturer or the labeler or responsible depends on implementation and jurisdiction.) 6199 */ 6200 public Reference getManufacturer() { 6201 if (this.manufacturer == null) 6202 if (Configuration.errorOnAutoCreate()) 6203 throw new Error("Attempt to auto-create DeviceDefinition.manufacturer"); 6204 else if (Configuration.doAutoCreate()) 6205 this.manufacturer = new Reference(); // cc 6206 return this.manufacturer; 6207 } 6208 6209 public boolean hasManufacturer() { 6210 return this.manufacturer != null && !this.manufacturer.isEmpty(); 6211 } 6212 6213 /** 6214 * @param value {@link #manufacturer} (A name of the manufacturer or legal representative e.g. labeler. Whether this is the actual manufacturer or the labeler or responsible depends on implementation and jurisdiction.) 6215 */ 6216 public DeviceDefinition setManufacturer(Reference value) { 6217 this.manufacturer = value; 6218 return this; 6219 } 6220 6221 /** 6222 * @return {@link #deviceName} (The name or names of the device as given by the manufacturer.) 6223 */ 6224 public List<DeviceDefinitionDeviceNameComponent> getDeviceName() { 6225 if (this.deviceName == null) 6226 this.deviceName = new ArrayList<DeviceDefinitionDeviceNameComponent>(); 6227 return this.deviceName; 6228 } 6229 6230 /** 6231 * @return Returns a reference to <code>this</code> for easy method chaining 6232 */ 6233 public DeviceDefinition setDeviceName(List<DeviceDefinitionDeviceNameComponent> theDeviceName) { 6234 this.deviceName = theDeviceName; 6235 return this; 6236 } 6237 6238 public boolean hasDeviceName() { 6239 if (this.deviceName == null) 6240 return false; 6241 for (DeviceDefinitionDeviceNameComponent item : this.deviceName) 6242 if (!item.isEmpty()) 6243 return true; 6244 return false; 6245 } 6246 6247 public DeviceDefinitionDeviceNameComponent addDeviceName() { //3 6248 DeviceDefinitionDeviceNameComponent t = new DeviceDefinitionDeviceNameComponent(); 6249 if (this.deviceName == null) 6250 this.deviceName = new ArrayList<DeviceDefinitionDeviceNameComponent>(); 6251 this.deviceName.add(t); 6252 return t; 6253 } 6254 6255 public DeviceDefinition addDeviceName(DeviceDefinitionDeviceNameComponent t) { //3 6256 if (t == null) 6257 return this; 6258 if (this.deviceName == null) 6259 this.deviceName = new ArrayList<DeviceDefinitionDeviceNameComponent>(); 6260 this.deviceName.add(t); 6261 return this; 6262 } 6263 6264 /** 6265 * @return The first repetition of repeating field {@link #deviceName}, creating it if it does not already exist {3} 6266 */ 6267 public DeviceDefinitionDeviceNameComponent getDeviceNameFirstRep() { 6268 if (getDeviceName().isEmpty()) { 6269 addDeviceName(); 6270 } 6271 return getDeviceName().get(0); 6272 } 6273 6274 /** 6275 * @return {@link #modelNumber} (The model number for the device for example as defined by the manufacturer or labeler, or other agency.). This is the underlying object with id, value and extensions. The accessor "getModelNumber" gives direct access to the value 6276 */ 6277 public StringType getModelNumberElement() { 6278 if (this.modelNumber == null) 6279 if (Configuration.errorOnAutoCreate()) 6280 throw new Error("Attempt to auto-create DeviceDefinition.modelNumber"); 6281 else if (Configuration.doAutoCreate()) 6282 this.modelNumber = new StringType(); // bb 6283 return this.modelNumber; 6284 } 6285 6286 public boolean hasModelNumberElement() { 6287 return this.modelNumber != null && !this.modelNumber.isEmpty(); 6288 } 6289 6290 public boolean hasModelNumber() { 6291 return this.modelNumber != null && !this.modelNumber.isEmpty(); 6292 } 6293 6294 /** 6295 * @param value {@link #modelNumber} (The model number for the device for example as defined by the manufacturer or labeler, or other agency.). This is the underlying object with id, value and extensions. The accessor "getModelNumber" gives direct access to the value 6296 */ 6297 public DeviceDefinition setModelNumberElement(StringType value) { 6298 this.modelNumber = value; 6299 return this; 6300 } 6301 6302 /** 6303 * @return The model number for the device for example as defined by the manufacturer or labeler, or other agency. 6304 */ 6305 public String getModelNumber() { 6306 return this.modelNumber == null ? null : this.modelNumber.getValue(); 6307 } 6308 6309 /** 6310 * @param value The model number for the device for example as defined by the manufacturer or labeler, or other agency. 6311 */ 6312 public DeviceDefinition setModelNumber(String value) { 6313 if (Utilities.noString(value)) 6314 this.modelNumber = null; 6315 else { 6316 if (this.modelNumber == null) 6317 this.modelNumber = new StringType(); 6318 this.modelNumber.setValue(value); 6319 } 6320 return this; 6321 } 6322 6323 /** 6324 * @return {@link #classification} (What kind of device or device system this is.) 6325 */ 6326 public List<DeviceDefinitionClassificationComponent> getClassification() { 6327 if (this.classification == null) 6328 this.classification = new ArrayList<DeviceDefinitionClassificationComponent>(); 6329 return this.classification; 6330 } 6331 6332 /** 6333 * @return Returns a reference to <code>this</code> for easy method chaining 6334 */ 6335 public DeviceDefinition setClassification(List<DeviceDefinitionClassificationComponent> theClassification) { 6336 this.classification = theClassification; 6337 return this; 6338 } 6339 6340 public boolean hasClassification() { 6341 if (this.classification == null) 6342 return false; 6343 for (DeviceDefinitionClassificationComponent item : this.classification) 6344 if (!item.isEmpty()) 6345 return true; 6346 return false; 6347 } 6348 6349 public DeviceDefinitionClassificationComponent addClassification() { //3 6350 DeviceDefinitionClassificationComponent t = new DeviceDefinitionClassificationComponent(); 6351 if (this.classification == null) 6352 this.classification = new ArrayList<DeviceDefinitionClassificationComponent>(); 6353 this.classification.add(t); 6354 return t; 6355 } 6356 6357 public DeviceDefinition addClassification(DeviceDefinitionClassificationComponent t) { //3 6358 if (t == null) 6359 return this; 6360 if (this.classification == null) 6361 this.classification = new ArrayList<DeviceDefinitionClassificationComponent>(); 6362 this.classification.add(t); 6363 return this; 6364 } 6365 6366 /** 6367 * @return The first repetition of repeating field {@link #classification}, creating it if it does not already exist {3} 6368 */ 6369 public DeviceDefinitionClassificationComponent getClassificationFirstRep() { 6370 if (getClassification().isEmpty()) { 6371 addClassification(); 6372 } 6373 return getClassification().get(0); 6374 } 6375 6376 /** 6377 * @return {@link #conformsTo} (Identifies the standards, specifications, or formal guidances for the capabilities supported by the device. The device may be certified as conformant to these specifications e.g., communication, performance, process, measurement, or specialization standards.) 6378 */ 6379 public List<DeviceDefinitionConformsToComponent> getConformsTo() { 6380 if (this.conformsTo == null) 6381 this.conformsTo = new ArrayList<DeviceDefinitionConformsToComponent>(); 6382 return this.conformsTo; 6383 } 6384 6385 /** 6386 * @return Returns a reference to <code>this</code> for easy method chaining 6387 */ 6388 public DeviceDefinition setConformsTo(List<DeviceDefinitionConformsToComponent> theConformsTo) { 6389 this.conformsTo = theConformsTo; 6390 return this; 6391 } 6392 6393 public boolean hasConformsTo() { 6394 if (this.conformsTo == null) 6395 return false; 6396 for (DeviceDefinitionConformsToComponent item : this.conformsTo) 6397 if (!item.isEmpty()) 6398 return true; 6399 return false; 6400 } 6401 6402 public DeviceDefinitionConformsToComponent addConformsTo() { //3 6403 DeviceDefinitionConformsToComponent t = new DeviceDefinitionConformsToComponent(); 6404 if (this.conformsTo == null) 6405 this.conformsTo = new ArrayList<DeviceDefinitionConformsToComponent>(); 6406 this.conformsTo.add(t); 6407 return t; 6408 } 6409 6410 public DeviceDefinition addConformsTo(DeviceDefinitionConformsToComponent t) { //3 6411 if (t == null) 6412 return this; 6413 if (this.conformsTo == null) 6414 this.conformsTo = new ArrayList<DeviceDefinitionConformsToComponent>(); 6415 this.conformsTo.add(t); 6416 return this; 6417 } 6418 6419 /** 6420 * @return The first repetition of repeating field {@link #conformsTo}, creating it if it does not already exist {3} 6421 */ 6422 public DeviceDefinitionConformsToComponent getConformsToFirstRep() { 6423 if (getConformsTo().isEmpty()) { 6424 addConformsTo(); 6425 } 6426 return getConformsTo().get(0); 6427 } 6428 6429 /** 6430 * @return {@link #hasPart} (A device that is part (for example a component) of the present device.) 6431 */ 6432 public List<DeviceDefinitionHasPartComponent> getHasPart() { 6433 if (this.hasPart == null) 6434 this.hasPart = new ArrayList<DeviceDefinitionHasPartComponent>(); 6435 return this.hasPart; 6436 } 6437 6438 /** 6439 * @return Returns a reference to <code>this</code> for easy method chaining 6440 */ 6441 public DeviceDefinition setHasPart(List<DeviceDefinitionHasPartComponent> theHasPart) { 6442 this.hasPart = theHasPart; 6443 return this; 6444 } 6445 6446 public boolean hasHasPart() { 6447 if (this.hasPart == null) 6448 return false; 6449 for (DeviceDefinitionHasPartComponent item : this.hasPart) 6450 if (!item.isEmpty()) 6451 return true; 6452 return false; 6453 } 6454 6455 public DeviceDefinitionHasPartComponent addHasPart() { //3 6456 DeviceDefinitionHasPartComponent t = new DeviceDefinitionHasPartComponent(); 6457 if (this.hasPart == null) 6458 this.hasPart = new ArrayList<DeviceDefinitionHasPartComponent>(); 6459 this.hasPart.add(t); 6460 return t; 6461 } 6462 6463 public DeviceDefinition addHasPart(DeviceDefinitionHasPartComponent t) { //3 6464 if (t == null) 6465 return this; 6466 if (this.hasPart == null) 6467 this.hasPart = new ArrayList<DeviceDefinitionHasPartComponent>(); 6468 this.hasPart.add(t); 6469 return this; 6470 } 6471 6472 /** 6473 * @return The first repetition of repeating field {@link #hasPart}, creating it if it does not already exist {3} 6474 */ 6475 public DeviceDefinitionHasPartComponent getHasPartFirstRep() { 6476 if (getHasPart().isEmpty()) { 6477 addHasPart(); 6478 } 6479 return getHasPart().get(0); 6480 } 6481 6482 /** 6483 * @return {@link #packaging} (Information about the packaging of the device, i.e. how the device is packaged.) 6484 */ 6485 public List<DeviceDefinitionPackagingComponent> getPackaging() { 6486 if (this.packaging == null) 6487 this.packaging = new ArrayList<DeviceDefinitionPackagingComponent>(); 6488 return this.packaging; 6489 } 6490 6491 /** 6492 * @return Returns a reference to <code>this</code> for easy method chaining 6493 */ 6494 public DeviceDefinition setPackaging(List<DeviceDefinitionPackagingComponent> thePackaging) { 6495 this.packaging = thePackaging; 6496 return this; 6497 } 6498 6499 public boolean hasPackaging() { 6500 if (this.packaging == null) 6501 return false; 6502 for (DeviceDefinitionPackagingComponent item : this.packaging) 6503 if (!item.isEmpty()) 6504 return true; 6505 return false; 6506 } 6507 6508 public DeviceDefinitionPackagingComponent addPackaging() { //3 6509 DeviceDefinitionPackagingComponent t = new DeviceDefinitionPackagingComponent(); 6510 if (this.packaging == null) 6511 this.packaging = new ArrayList<DeviceDefinitionPackagingComponent>(); 6512 this.packaging.add(t); 6513 return t; 6514 } 6515 6516 public DeviceDefinition addPackaging(DeviceDefinitionPackagingComponent t) { //3 6517 if (t == null) 6518 return this; 6519 if (this.packaging == null) 6520 this.packaging = new ArrayList<DeviceDefinitionPackagingComponent>(); 6521 this.packaging.add(t); 6522 return this; 6523 } 6524 6525 /** 6526 * @return The first repetition of repeating field {@link #packaging}, creating it if it does not already exist {3} 6527 */ 6528 public DeviceDefinitionPackagingComponent getPackagingFirstRep() { 6529 if (getPackaging().isEmpty()) { 6530 addPackaging(); 6531 } 6532 return getPackaging().get(0); 6533 } 6534 6535 /** 6536 * @return {@link #version} (The version of the device or software.) 6537 */ 6538 public List<DeviceDefinitionVersionComponent> getVersion() { 6539 if (this.version == null) 6540 this.version = new ArrayList<DeviceDefinitionVersionComponent>(); 6541 return this.version; 6542 } 6543 6544 /** 6545 * @return Returns a reference to <code>this</code> for easy method chaining 6546 */ 6547 public DeviceDefinition setVersion(List<DeviceDefinitionVersionComponent> theVersion) { 6548 this.version = theVersion; 6549 return this; 6550 } 6551 6552 public boolean hasVersion() { 6553 if (this.version == null) 6554 return false; 6555 for (DeviceDefinitionVersionComponent item : this.version) 6556 if (!item.isEmpty()) 6557 return true; 6558 return false; 6559 } 6560 6561 public DeviceDefinitionVersionComponent addVersion() { //3 6562 DeviceDefinitionVersionComponent t = new DeviceDefinitionVersionComponent(); 6563 if (this.version == null) 6564 this.version = new ArrayList<DeviceDefinitionVersionComponent>(); 6565 this.version.add(t); 6566 return t; 6567 } 6568 6569 public DeviceDefinition addVersion(DeviceDefinitionVersionComponent t) { //3 6570 if (t == null) 6571 return this; 6572 if (this.version == null) 6573 this.version = new ArrayList<DeviceDefinitionVersionComponent>(); 6574 this.version.add(t); 6575 return this; 6576 } 6577 6578 /** 6579 * @return The first repetition of repeating field {@link #version}, creating it if it does not already exist {3} 6580 */ 6581 public DeviceDefinitionVersionComponent getVersionFirstRep() { 6582 if (getVersion().isEmpty()) { 6583 addVersion(); 6584 } 6585 return getVersion().get(0); 6586 } 6587 6588 /** 6589 * @return {@link #safety} (Safety characteristics of the device.) 6590 */ 6591 public List<CodeableConcept> getSafety() { 6592 if (this.safety == null) 6593 this.safety = new ArrayList<CodeableConcept>(); 6594 return this.safety; 6595 } 6596 6597 /** 6598 * @return Returns a reference to <code>this</code> for easy method chaining 6599 */ 6600 public DeviceDefinition setSafety(List<CodeableConcept> theSafety) { 6601 this.safety = theSafety; 6602 return this; 6603 } 6604 6605 public boolean hasSafety() { 6606 if (this.safety == null) 6607 return false; 6608 for (CodeableConcept item : this.safety) 6609 if (!item.isEmpty()) 6610 return true; 6611 return false; 6612 } 6613 6614 public CodeableConcept addSafety() { //3 6615 CodeableConcept t = new CodeableConcept(); 6616 if (this.safety == null) 6617 this.safety = new ArrayList<CodeableConcept>(); 6618 this.safety.add(t); 6619 return t; 6620 } 6621 6622 public DeviceDefinition addSafety(CodeableConcept t) { //3 6623 if (t == null) 6624 return this; 6625 if (this.safety == null) 6626 this.safety = new ArrayList<CodeableConcept>(); 6627 this.safety.add(t); 6628 return this; 6629 } 6630 6631 /** 6632 * @return The first repetition of repeating field {@link #safety}, creating it if it does not already exist {3} 6633 */ 6634 public CodeableConcept getSafetyFirstRep() { 6635 if (getSafety().isEmpty()) { 6636 addSafety(); 6637 } 6638 return getSafety().get(0); 6639 } 6640 6641 /** 6642 * @return {@link #shelfLifeStorage} (Shelf Life and storage information.) 6643 */ 6644 public List<ProductShelfLife> getShelfLifeStorage() { 6645 if (this.shelfLifeStorage == null) 6646 this.shelfLifeStorage = new ArrayList<ProductShelfLife>(); 6647 return this.shelfLifeStorage; 6648 } 6649 6650 /** 6651 * @return Returns a reference to <code>this</code> for easy method chaining 6652 */ 6653 public DeviceDefinition setShelfLifeStorage(List<ProductShelfLife> theShelfLifeStorage) { 6654 this.shelfLifeStorage = theShelfLifeStorage; 6655 return this; 6656 } 6657 6658 public boolean hasShelfLifeStorage() { 6659 if (this.shelfLifeStorage == null) 6660 return false; 6661 for (ProductShelfLife item : this.shelfLifeStorage) 6662 if (!item.isEmpty()) 6663 return true; 6664 return false; 6665 } 6666 6667 public ProductShelfLife addShelfLifeStorage() { //3 6668 ProductShelfLife t = new ProductShelfLife(); 6669 if (this.shelfLifeStorage == null) 6670 this.shelfLifeStorage = new ArrayList<ProductShelfLife>(); 6671 this.shelfLifeStorage.add(t); 6672 return t; 6673 } 6674 6675 public DeviceDefinition addShelfLifeStorage(ProductShelfLife t) { //3 6676 if (t == null) 6677 return this; 6678 if (this.shelfLifeStorage == null) 6679 this.shelfLifeStorage = new ArrayList<ProductShelfLife>(); 6680 this.shelfLifeStorage.add(t); 6681 return this; 6682 } 6683 6684 /** 6685 * @return The first repetition of repeating field {@link #shelfLifeStorage}, creating it if it does not already exist {3} 6686 */ 6687 public ProductShelfLife getShelfLifeStorageFirstRep() { 6688 if (getShelfLifeStorage().isEmpty()) { 6689 addShelfLifeStorage(); 6690 } 6691 return getShelfLifeStorage().get(0); 6692 } 6693 6694 /** 6695 * @return {@link #languageCode} (Language code for the human-readable text strings produced by the device (all supported).) 6696 */ 6697 public List<CodeableConcept> getLanguageCode() { 6698 if (this.languageCode == null) 6699 this.languageCode = new ArrayList<CodeableConcept>(); 6700 return this.languageCode; 6701 } 6702 6703 /** 6704 * @return Returns a reference to <code>this</code> for easy method chaining 6705 */ 6706 public DeviceDefinition setLanguageCode(List<CodeableConcept> theLanguageCode) { 6707 this.languageCode = theLanguageCode; 6708 return this; 6709 } 6710 6711 public boolean hasLanguageCode() { 6712 if (this.languageCode == null) 6713 return false; 6714 for (CodeableConcept item : this.languageCode) 6715 if (!item.isEmpty()) 6716 return true; 6717 return false; 6718 } 6719 6720 public CodeableConcept addLanguageCode() { //3 6721 CodeableConcept t = new CodeableConcept(); 6722 if (this.languageCode == null) 6723 this.languageCode = new ArrayList<CodeableConcept>(); 6724 this.languageCode.add(t); 6725 return t; 6726 } 6727 6728 public DeviceDefinition addLanguageCode(CodeableConcept t) { //3 6729 if (t == null) 6730 return this; 6731 if (this.languageCode == null) 6732 this.languageCode = new ArrayList<CodeableConcept>(); 6733 this.languageCode.add(t); 6734 return this; 6735 } 6736 6737 /** 6738 * @return The first repetition of repeating field {@link #languageCode}, creating it if it does not already exist {3} 6739 */ 6740 public CodeableConcept getLanguageCodeFirstRep() { 6741 if (getLanguageCode().isEmpty()) { 6742 addLanguageCode(); 6743 } 6744 return getLanguageCode().get(0); 6745 } 6746 6747 /** 6748 * @return {@link #property} (Static or essentially fixed characteristics or features of this kind of device that are otherwise not captured in more specific attributes, e.g., time or timing attributes, resolution, accuracy, and physical attributes.) 6749 */ 6750 public List<DeviceDefinitionPropertyComponent> getProperty() { 6751 if (this.property == null) 6752 this.property = new ArrayList<DeviceDefinitionPropertyComponent>(); 6753 return this.property; 6754 } 6755 6756 /** 6757 * @return Returns a reference to <code>this</code> for easy method chaining 6758 */ 6759 public DeviceDefinition setProperty(List<DeviceDefinitionPropertyComponent> theProperty) { 6760 this.property = theProperty; 6761 return this; 6762 } 6763 6764 public boolean hasProperty() { 6765 if (this.property == null) 6766 return false; 6767 for (DeviceDefinitionPropertyComponent item : this.property) 6768 if (!item.isEmpty()) 6769 return true; 6770 return false; 6771 } 6772 6773 public DeviceDefinitionPropertyComponent addProperty() { //3 6774 DeviceDefinitionPropertyComponent t = new DeviceDefinitionPropertyComponent(); 6775 if (this.property == null) 6776 this.property = new ArrayList<DeviceDefinitionPropertyComponent>(); 6777 this.property.add(t); 6778 return t; 6779 } 6780 6781 public DeviceDefinition addProperty(DeviceDefinitionPropertyComponent t) { //3 6782 if (t == null) 6783 return this; 6784 if (this.property == null) 6785 this.property = new ArrayList<DeviceDefinitionPropertyComponent>(); 6786 this.property.add(t); 6787 return this; 6788 } 6789 6790 /** 6791 * @return The first repetition of repeating field {@link #property}, creating it if it does not already exist {3} 6792 */ 6793 public DeviceDefinitionPropertyComponent getPropertyFirstRep() { 6794 if (getProperty().isEmpty()) { 6795 addProperty(); 6796 } 6797 return getProperty().get(0); 6798 } 6799 6800 /** 6801 * @return {@link #owner} (An organization that is responsible for the provision and ongoing maintenance of the device.) 6802 */ 6803 public Reference getOwner() { 6804 if (this.owner == null) 6805 if (Configuration.errorOnAutoCreate()) 6806 throw new Error("Attempt to auto-create DeviceDefinition.owner"); 6807 else if (Configuration.doAutoCreate()) 6808 this.owner = new Reference(); // cc 6809 return this.owner; 6810 } 6811 6812 public boolean hasOwner() { 6813 return this.owner != null && !this.owner.isEmpty(); 6814 } 6815 6816 /** 6817 * @param value {@link #owner} (An organization that is responsible for the provision and ongoing maintenance of the device.) 6818 */ 6819 public DeviceDefinition setOwner(Reference value) { 6820 this.owner = value; 6821 return this; 6822 } 6823 6824 /** 6825 * @return {@link #contact} (Contact details for an organization or a particular human that is responsible for the device.) 6826 */ 6827 public List<ContactPoint> getContact() { 6828 if (this.contact == null) 6829 this.contact = new ArrayList<ContactPoint>(); 6830 return this.contact; 6831 } 6832 6833 /** 6834 * @return Returns a reference to <code>this</code> for easy method chaining 6835 */ 6836 public DeviceDefinition setContact(List<ContactPoint> theContact) { 6837 this.contact = theContact; 6838 return this; 6839 } 6840 6841 public boolean hasContact() { 6842 if (this.contact == null) 6843 return false; 6844 for (ContactPoint item : this.contact) 6845 if (!item.isEmpty()) 6846 return true; 6847 return false; 6848 } 6849 6850 public ContactPoint addContact() { //3 6851 ContactPoint t = new ContactPoint(); 6852 if (this.contact == null) 6853 this.contact = new ArrayList<ContactPoint>(); 6854 this.contact.add(t); 6855 return t; 6856 } 6857 6858 public DeviceDefinition addContact(ContactPoint t) { //3 6859 if (t == null) 6860 return this; 6861 if (this.contact == null) 6862 this.contact = new ArrayList<ContactPoint>(); 6863 this.contact.add(t); 6864 return this; 6865 } 6866 6867 /** 6868 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3} 6869 */ 6870 public ContactPoint getContactFirstRep() { 6871 if (getContact().isEmpty()) { 6872 addContact(); 6873 } 6874 return getContact().get(0); 6875 } 6876 6877 /** 6878 * @return {@link #link} (An associated device, attached to, used with, communicating with or linking a previous or new device model to the focal device.) 6879 */ 6880 public List<DeviceDefinitionLinkComponent> getLink() { 6881 if (this.link == null) 6882 this.link = new ArrayList<DeviceDefinitionLinkComponent>(); 6883 return this.link; 6884 } 6885 6886 /** 6887 * @return Returns a reference to <code>this</code> for easy method chaining 6888 */ 6889 public DeviceDefinition setLink(List<DeviceDefinitionLinkComponent> theLink) { 6890 this.link = theLink; 6891 return this; 6892 } 6893 6894 public boolean hasLink() { 6895 if (this.link == null) 6896 return false; 6897 for (DeviceDefinitionLinkComponent item : this.link) 6898 if (!item.isEmpty()) 6899 return true; 6900 return false; 6901 } 6902 6903 public DeviceDefinitionLinkComponent addLink() { //3 6904 DeviceDefinitionLinkComponent t = new DeviceDefinitionLinkComponent(); 6905 if (this.link == null) 6906 this.link = new ArrayList<DeviceDefinitionLinkComponent>(); 6907 this.link.add(t); 6908 return t; 6909 } 6910 6911 public DeviceDefinition addLink(DeviceDefinitionLinkComponent t) { //3 6912 if (t == null) 6913 return this; 6914 if (this.link == null) 6915 this.link = new ArrayList<DeviceDefinitionLinkComponent>(); 6916 this.link.add(t); 6917 return this; 6918 } 6919 6920 /** 6921 * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist {3} 6922 */ 6923 public DeviceDefinitionLinkComponent getLinkFirstRep() { 6924 if (getLink().isEmpty()) { 6925 addLink(); 6926 } 6927 return getLink().get(0); 6928 } 6929 6930 /** 6931 * @return {@link #note} (Descriptive information, usage information or implantation information that is not captured in an existing element.) 6932 */ 6933 public List<Annotation> getNote() { 6934 if (this.note == null) 6935 this.note = new ArrayList<Annotation>(); 6936 return this.note; 6937 } 6938 6939 /** 6940 * @return Returns a reference to <code>this</code> for easy method chaining 6941 */ 6942 public DeviceDefinition setNote(List<Annotation> theNote) { 6943 this.note = theNote; 6944 return this; 6945 } 6946 6947 public boolean hasNote() { 6948 if (this.note == null) 6949 return false; 6950 for (Annotation item : this.note) 6951 if (!item.isEmpty()) 6952 return true; 6953 return false; 6954 } 6955 6956 public Annotation addNote() { //3 6957 Annotation t = new Annotation(); 6958 if (this.note == null) 6959 this.note = new ArrayList<Annotation>(); 6960 this.note.add(t); 6961 return t; 6962 } 6963 6964 public DeviceDefinition addNote(Annotation t) { //3 6965 if (t == null) 6966 return this; 6967 if (this.note == null) 6968 this.note = new ArrayList<Annotation>(); 6969 this.note.add(t); 6970 return this; 6971 } 6972 6973 /** 6974 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} 6975 */ 6976 public Annotation getNoteFirstRep() { 6977 if (getNote().isEmpty()) { 6978 addNote(); 6979 } 6980 return getNote().get(0); 6981 } 6982 6983 /** 6984 * @return {@link #material} (A substance used to create the material(s) of which the device is made.) 6985 */ 6986 public List<DeviceDefinitionMaterialComponent> getMaterial() { 6987 if (this.material == null) 6988 this.material = new ArrayList<DeviceDefinitionMaterialComponent>(); 6989 return this.material; 6990 } 6991 6992 /** 6993 * @return Returns a reference to <code>this</code> for easy method chaining 6994 */ 6995 public DeviceDefinition setMaterial(List<DeviceDefinitionMaterialComponent> theMaterial) { 6996 this.material = theMaterial; 6997 return this; 6998 } 6999 7000 public boolean hasMaterial() { 7001 if (this.material == null) 7002 return false; 7003 for (DeviceDefinitionMaterialComponent item : this.material) 7004 if (!item.isEmpty()) 7005 return true; 7006 return false; 7007 } 7008 7009 public DeviceDefinitionMaterialComponent addMaterial() { //3 7010 DeviceDefinitionMaterialComponent t = new DeviceDefinitionMaterialComponent(); 7011 if (this.material == null) 7012 this.material = new ArrayList<DeviceDefinitionMaterialComponent>(); 7013 this.material.add(t); 7014 return t; 7015 } 7016 7017 public DeviceDefinition addMaterial(DeviceDefinitionMaterialComponent t) { //3 7018 if (t == null) 7019 return this; 7020 if (this.material == null) 7021 this.material = new ArrayList<DeviceDefinitionMaterialComponent>(); 7022 this.material.add(t); 7023 return this; 7024 } 7025 7026 /** 7027 * @return The first repetition of repeating field {@link #material}, creating it if it does not already exist {3} 7028 */ 7029 public DeviceDefinitionMaterialComponent getMaterialFirstRep() { 7030 if (getMaterial().isEmpty()) { 7031 addMaterial(); 7032 } 7033 return getMaterial().get(0); 7034 } 7035 7036 /** 7037 * @return {@link #productionIdentifierInUDI} (Indicates the production identifier(s) that are expected to appear in the UDI carrier on the device label.) 7038 */ 7039 public List<Enumeration<DeviceProductionIdentifierInUDI>> getProductionIdentifierInUDI() { 7040 if (this.productionIdentifierInUDI == null) 7041 this.productionIdentifierInUDI = new ArrayList<Enumeration<DeviceProductionIdentifierInUDI>>(); 7042 return this.productionIdentifierInUDI; 7043 } 7044 7045 /** 7046 * @return Returns a reference to <code>this</code> for easy method chaining 7047 */ 7048 public DeviceDefinition setProductionIdentifierInUDI(List<Enumeration<DeviceProductionIdentifierInUDI>> theProductionIdentifierInUDI) { 7049 this.productionIdentifierInUDI = theProductionIdentifierInUDI; 7050 return this; 7051 } 7052 7053 public boolean hasProductionIdentifierInUDI() { 7054 if (this.productionIdentifierInUDI == null) 7055 return false; 7056 for (Enumeration<DeviceProductionIdentifierInUDI> item : this.productionIdentifierInUDI) 7057 if (!item.isEmpty()) 7058 return true; 7059 return false; 7060 } 7061 7062 /** 7063 * @return {@link #productionIdentifierInUDI} (Indicates the production identifier(s) that are expected to appear in the UDI carrier on the device label.) 7064 */ 7065 public Enumeration<DeviceProductionIdentifierInUDI> addProductionIdentifierInUDIElement() {//2 7066 Enumeration<DeviceProductionIdentifierInUDI> t = new Enumeration<DeviceProductionIdentifierInUDI>(new DeviceProductionIdentifierInUDIEnumFactory()); 7067 if (this.productionIdentifierInUDI == null) 7068 this.productionIdentifierInUDI = new ArrayList<Enumeration<DeviceProductionIdentifierInUDI>>(); 7069 this.productionIdentifierInUDI.add(t); 7070 return t; 7071 } 7072 7073 /** 7074 * @param value {@link #productionIdentifierInUDI} (Indicates the production identifier(s) that are expected to appear in the UDI carrier on the device label.) 7075 */ 7076 public DeviceDefinition addProductionIdentifierInUDI(DeviceProductionIdentifierInUDI value) { //1 7077 Enumeration<DeviceProductionIdentifierInUDI> t = new Enumeration<DeviceProductionIdentifierInUDI>(new DeviceProductionIdentifierInUDIEnumFactory()); 7078 t.setValue(value); 7079 if (this.productionIdentifierInUDI == null) 7080 this.productionIdentifierInUDI = new ArrayList<Enumeration<DeviceProductionIdentifierInUDI>>(); 7081 this.productionIdentifierInUDI.add(t); 7082 return this; 7083 } 7084 7085 /** 7086 * @param value {@link #productionIdentifierInUDI} (Indicates the production identifier(s) that are expected to appear in the UDI carrier on the device label.) 7087 */ 7088 public boolean hasProductionIdentifierInUDI(DeviceProductionIdentifierInUDI value) { 7089 if (this.productionIdentifierInUDI == null) 7090 return false; 7091 for (Enumeration<DeviceProductionIdentifierInUDI> v : this.productionIdentifierInUDI) 7092 if (v.getValue().equals(value)) // code 7093 return true; 7094 return false; 7095 } 7096 7097 /** 7098 * @return {@link #guideline} (Information aimed at providing directions for the usage of this model of device.) 7099 */ 7100 public DeviceDefinitionGuidelineComponent getGuideline() { 7101 if (this.guideline == null) 7102 if (Configuration.errorOnAutoCreate()) 7103 throw new Error("Attempt to auto-create DeviceDefinition.guideline"); 7104 else if (Configuration.doAutoCreate()) 7105 this.guideline = new DeviceDefinitionGuidelineComponent(); // cc 7106 return this.guideline; 7107 } 7108 7109 public boolean hasGuideline() { 7110 return this.guideline != null && !this.guideline.isEmpty(); 7111 } 7112 7113 /** 7114 * @param value {@link #guideline} (Information aimed at providing directions for the usage of this model of device.) 7115 */ 7116 public DeviceDefinition setGuideline(DeviceDefinitionGuidelineComponent value) { 7117 this.guideline = value; 7118 return this; 7119 } 7120 7121 /** 7122 * @return {@link #correctiveAction} (Tracking of latest field safety corrective action.) 7123 */ 7124 public DeviceDefinitionCorrectiveActionComponent getCorrectiveAction() { 7125 if (this.correctiveAction == null) 7126 if (Configuration.errorOnAutoCreate()) 7127 throw new Error("Attempt to auto-create DeviceDefinition.correctiveAction"); 7128 else if (Configuration.doAutoCreate()) 7129 this.correctiveAction = new DeviceDefinitionCorrectiveActionComponent(); // cc 7130 return this.correctiveAction; 7131 } 7132 7133 public boolean hasCorrectiveAction() { 7134 return this.correctiveAction != null && !this.correctiveAction.isEmpty(); 7135 } 7136 7137 /** 7138 * @param value {@link #correctiveAction} (Tracking of latest field safety corrective action.) 7139 */ 7140 public DeviceDefinition setCorrectiveAction(DeviceDefinitionCorrectiveActionComponent value) { 7141 this.correctiveAction = value; 7142 return this; 7143 } 7144 7145 /** 7146 * @return {@link #chargeItem} (Billing code or reference associated with the device.) 7147 */ 7148 public List<DeviceDefinitionChargeItemComponent> getChargeItem() { 7149 if (this.chargeItem == null) 7150 this.chargeItem = new ArrayList<DeviceDefinitionChargeItemComponent>(); 7151 return this.chargeItem; 7152 } 7153 7154 /** 7155 * @return Returns a reference to <code>this</code> for easy method chaining 7156 */ 7157 public DeviceDefinition setChargeItem(List<DeviceDefinitionChargeItemComponent> theChargeItem) { 7158 this.chargeItem = theChargeItem; 7159 return this; 7160 } 7161 7162 public boolean hasChargeItem() { 7163 if (this.chargeItem == null) 7164 return false; 7165 for (DeviceDefinitionChargeItemComponent item : this.chargeItem) 7166 if (!item.isEmpty()) 7167 return true; 7168 return false; 7169 } 7170 7171 public DeviceDefinitionChargeItemComponent addChargeItem() { //3 7172 DeviceDefinitionChargeItemComponent t = new DeviceDefinitionChargeItemComponent(); 7173 if (this.chargeItem == null) 7174 this.chargeItem = new ArrayList<DeviceDefinitionChargeItemComponent>(); 7175 this.chargeItem.add(t); 7176 return t; 7177 } 7178 7179 public DeviceDefinition addChargeItem(DeviceDefinitionChargeItemComponent t) { //3 7180 if (t == null) 7181 return this; 7182 if (this.chargeItem == null) 7183 this.chargeItem = new ArrayList<DeviceDefinitionChargeItemComponent>(); 7184 this.chargeItem.add(t); 7185 return this; 7186 } 7187 7188 /** 7189 * @return The first repetition of repeating field {@link #chargeItem}, creating it if it does not already exist {3} 7190 */ 7191 public DeviceDefinitionChargeItemComponent getChargeItemFirstRep() { 7192 if (getChargeItem().isEmpty()) { 7193 addChargeItem(); 7194 } 7195 return getChargeItem().get(0); 7196 } 7197 7198 protected void listChildren(List<Property> children) { 7199 super.listChildren(children); 7200 children.add(new Property("description", "markdown", "Additional information to describe the device.", 0, 1, description)); 7201 children.add(new Property("identifier", "Identifier", "Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID. The identifier is typically valued if the udiDeviceIdentifier, partNumber or modelNumber is not valued and represents a different type of identifier. However, it is permissible to still include those identifiers in DeviceDefinition.identifier with the appropriate identifier.type.", 0, java.lang.Integer.MAX_VALUE, identifier)); 7202 children.add(new Property("udiDeviceIdentifier", "", "Unique device identifier (UDI) assigned to device label or package. Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold.", 0, java.lang.Integer.MAX_VALUE, udiDeviceIdentifier)); 7203 children.add(new Property("regulatoryIdentifier", "", "Identifier associated with the regulatory documentation (certificates, technical documentation, post-market surveillance documentation and reports) of a set of device models sharing the same intended purpose, risk class and essential design and manufacturing characteristics. One example is the Basic UDI-DI in Europe.", 0, java.lang.Integer.MAX_VALUE, regulatoryIdentifier)); 7204 children.add(new Property("partNumber", "string", "The part number or catalog number of the device.", 0, 1, partNumber)); 7205 children.add(new Property("manufacturer", "Reference(Organization)", "A name of the manufacturer or legal representative e.g. labeler. Whether this is the actual manufacturer or the labeler or responsible depends on implementation and jurisdiction.", 0, 1, manufacturer)); 7206 children.add(new Property("deviceName", "", "The name or names of the device as given by the manufacturer.", 0, java.lang.Integer.MAX_VALUE, deviceName)); 7207 children.add(new Property("modelNumber", "string", "The model number for the device for example as defined by the manufacturer or labeler, or other agency.", 0, 1, modelNumber)); 7208 children.add(new Property("classification", "", "What kind of device or device system this is.", 0, java.lang.Integer.MAX_VALUE, classification)); 7209 children.add(new Property("conformsTo", "", "Identifies the standards, specifications, or formal guidances for the capabilities supported by the device. The device may be certified as conformant to these specifications e.g., communication, performance, process, measurement, or specialization standards.", 0, java.lang.Integer.MAX_VALUE, conformsTo)); 7210 children.add(new Property("hasPart", "", "A device that is part (for example a component) of the present device.", 0, java.lang.Integer.MAX_VALUE, hasPart)); 7211 children.add(new Property("packaging", "", "Information about the packaging of the device, i.e. how the device is packaged.", 0, java.lang.Integer.MAX_VALUE, packaging)); 7212 children.add(new Property("version", "", "The version of the device or software.", 0, java.lang.Integer.MAX_VALUE, version)); 7213 children.add(new Property("safety", "CodeableConcept", "Safety characteristics of the device.", 0, java.lang.Integer.MAX_VALUE, safety)); 7214 children.add(new Property("shelfLifeStorage", "ProductShelfLife", "Shelf Life and storage information.", 0, java.lang.Integer.MAX_VALUE, shelfLifeStorage)); 7215 children.add(new Property("languageCode", "CodeableConcept", "Language code for the human-readable text strings produced by the device (all supported).", 0, java.lang.Integer.MAX_VALUE, languageCode)); 7216 children.add(new Property("property", "", "Static or essentially fixed characteristics or features of this kind of device that are otherwise not captured in more specific attributes, e.g., time or timing attributes, resolution, accuracy, and physical attributes.", 0, java.lang.Integer.MAX_VALUE, property)); 7217 children.add(new Property("owner", "Reference(Organization)", "An organization that is responsible for the provision and ongoing maintenance of the device.", 0, 1, owner)); 7218 children.add(new Property("contact", "ContactPoint", "Contact details for an organization or a particular human that is responsible for the device.", 0, java.lang.Integer.MAX_VALUE, contact)); 7219 children.add(new Property("link", "", "An associated device, attached to, used with, communicating with or linking a previous or new device model to the focal device.", 0, java.lang.Integer.MAX_VALUE, link)); 7220 children.add(new Property("note", "Annotation", "Descriptive information, usage information or implantation information that is not captured in an existing element.", 0, java.lang.Integer.MAX_VALUE, note)); 7221 children.add(new Property("material", "", "A substance used to create the material(s) of which the device is made.", 0, java.lang.Integer.MAX_VALUE, material)); 7222 children.add(new Property("productionIdentifierInUDI", "code", "Indicates the production identifier(s) that are expected to appear in the UDI carrier on the device label.", 0, java.lang.Integer.MAX_VALUE, productionIdentifierInUDI)); 7223 children.add(new Property("guideline", "", "Information aimed at providing directions for the usage of this model of device.", 0, 1, guideline)); 7224 children.add(new Property("correctiveAction", "", "Tracking of latest field safety corrective action.", 0, 1, correctiveAction)); 7225 children.add(new Property("chargeItem", "", "Billing code or reference associated with the device.", 0, java.lang.Integer.MAX_VALUE, chargeItem)); 7226 } 7227 7228 @Override 7229 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7230 switch (_hash) { 7231 case -1724546052: /*description*/ return new Property("description", "markdown", "Additional information to describe the device.", 0, 1, description); 7232 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID. The identifier is typically valued if the udiDeviceIdentifier, partNumber or modelNumber is not valued and represents a different type of identifier. However, it is permissible to still include those identifiers in DeviceDefinition.identifier with the appropriate identifier.type.", 0, java.lang.Integer.MAX_VALUE, identifier); 7233 case -99121287: /*udiDeviceIdentifier*/ return new Property("udiDeviceIdentifier", "", "Unique device identifier (UDI) assigned to device label or package. Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold.", 0, java.lang.Integer.MAX_VALUE, udiDeviceIdentifier); 7234 case 455683425: /*regulatoryIdentifier*/ return new Property("regulatoryIdentifier", "", "Identifier associated with the regulatory documentation (certificates, technical documentation, post-market surveillance documentation and reports) of a set of device models sharing the same intended purpose, risk class and essential design and manufacturing characteristics. One example is the Basic UDI-DI in Europe.", 0, java.lang.Integer.MAX_VALUE, regulatoryIdentifier); 7235 case -731502308: /*partNumber*/ return new Property("partNumber", "string", "The part number or catalog number of the device.", 0, 1, partNumber); 7236 case -1969347631: /*manufacturer*/ return new Property("manufacturer", "Reference(Organization)", "A name of the manufacturer or legal representative e.g. labeler. Whether this is the actual manufacturer or the labeler or responsible depends on implementation and jurisdiction.", 0, 1, manufacturer); 7237 case 780988929: /*deviceName*/ return new Property("deviceName", "", "The name or names of the device as given by the manufacturer.", 0, java.lang.Integer.MAX_VALUE, deviceName); 7238 case 346619858: /*modelNumber*/ return new Property("modelNumber", "string", "The model number for the device for example as defined by the manufacturer or labeler, or other agency.", 0, 1, modelNumber); 7239 case 382350310: /*classification*/ return new Property("classification", "", "What kind of device or device system this is.", 0, java.lang.Integer.MAX_VALUE, classification); 7240 case 1014198088: /*conformsTo*/ return new Property("conformsTo", "", "Identifies the standards, specifications, or formal guidances for the capabilities supported by the device. The device may be certified as conformant to these specifications e.g., communication, performance, process, measurement, or specialization standards.", 0, java.lang.Integer.MAX_VALUE, conformsTo); 7241 case 696815021: /*hasPart*/ return new Property("hasPart", "", "A device that is part (for example a component) of the present device.", 0, java.lang.Integer.MAX_VALUE, hasPart); 7242 case 1802065795: /*packaging*/ return new Property("packaging", "", "Information about the packaging of the device, i.e. how the device is packaged.", 0, java.lang.Integer.MAX_VALUE, packaging); 7243 case 351608024: /*version*/ return new Property("version", "", "The version of the device or software.", 0, java.lang.Integer.MAX_VALUE, version); 7244 case -909893934: /*safety*/ return new Property("safety", "CodeableConcept", "Safety characteristics of the device.", 0, java.lang.Integer.MAX_VALUE, safety); 7245 case 172049237: /*shelfLifeStorage*/ return new Property("shelfLifeStorage", "ProductShelfLife", "Shelf Life and storage information.", 0, java.lang.Integer.MAX_VALUE, shelfLifeStorage); 7246 case -2092349083: /*languageCode*/ return new Property("languageCode", "CodeableConcept", "Language code for the human-readable text strings produced by the device (all supported).", 0, java.lang.Integer.MAX_VALUE, languageCode); 7247 case -993141291: /*property*/ return new Property("property", "", "Static or essentially fixed characteristics or features of this kind of device that are otherwise not captured in more specific attributes, e.g., time or timing attributes, resolution, accuracy, and physical attributes.", 0, java.lang.Integer.MAX_VALUE, property); 7248 case 106164915: /*owner*/ return new Property("owner", "Reference(Organization)", "An organization that is responsible for the provision and ongoing maintenance of the device.", 0, 1, owner); 7249 case 951526432: /*contact*/ return new Property("contact", "ContactPoint", "Contact details for an organization or a particular human that is responsible for the device.", 0, java.lang.Integer.MAX_VALUE, contact); 7250 case 3321850: /*link*/ return new Property("link", "", "An associated device, attached to, used with, communicating with or linking a previous or new device model to the focal device.", 0, java.lang.Integer.MAX_VALUE, link); 7251 case 3387378: /*note*/ return new Property("note", "Annotation", "Descriptive information, usage information or implantation information that is not captured in an existing element.", 0, java.lang.Integer.MAX_VALUE, note); 7252 case 299066663: /*material*/ return new Property("material", "", "A substance used to create the material(s) of which the device is made.", 0, java.lang.Integer.MAX_VALUE, material); 7253 case 312405811: /*productionIdentifierInUDI*/ return new Property("productionIdentifierInUDI", "code", "Indicates the production identifier(s) that are expected to appear in the UDI carrier on the device label.", 0, java.lang.Integer.MAX_VALUE, productionIdentifierInUDI); 7254 case -2075718416: /*guideline*/ return new Property("guideline", "", "Information aimed at providing directions for the usage of this model of device.", 0, 1, guideline); 7255 case 1354575876: /*correctiveAction*/ return new Property("correctiveAction", "", "Tracking of latest field safety corrective action.", 0, 1, correctiveAction); 7256 case 1417779175: /*chargeItem*/ return new Property("chargeItem", "", "Billing code or reference associated with the device.", 0, java.lang.Integer.MAX_VALUE, chargeItem); 7257 default: return super.getNamedProperty(_hash, _name, _checkValid); 7258 } 7259 7260 } 7261 7262 @Override 7263 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7264 switch (hash) { 7265 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 7266 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 7267 case -99121287: /*udiDeviceIdentifier*/ return this.udiDeviceIdentifier == null ? new Base[0] : this.udiDeviceIdentifier.toArray(new Base[this.udiDeviceIdentifier.size()]); // DeviceDefinitionUdiDeviceIdentifierComponent 7268 case 455683425: /*regulatoryIdentifier*/ return this.regulatoryIdentifier == null ? new Base[0] : this.regulatoryIdentifier.toArray(new Base[this.regulatoryIdentifier.size()]); // DeviceDefinitionRegulatoryIdentifierComponent 7269 case -731502308: /*partNumber*/ return this.partNumber == null ? new Base[0] : new Base[] {this.partNumber}; // StringType 7270 case -1969347631: /*manufacturer*/ return this.manufacturer == null ? new Base[0] : new Base[] {this.manufacturer}; // Reference 7271 case 780988929: /*deviceName*/ return this.deviceName == null ? new Base[0] : this.deviceName.toArray(new Base[this.deviceName.size()]); // DeviceDefinitionDeviceNameComponent 7272 case 346619858: /*modelNumber*/ return this.modelNumber == null ? new Base[0] : new Base[] {this.modelNumber}; // StringType 7273 case 382350310: /*classification*/ return this.classification == null ? new Base[0] : this.classification.toArray(new Base[this.classification.size()]); // DeviceDefinitionClassificationComponent 7274 case 1014198088: /*conformsTo*/ return this.conformsTo == null ? new Base[0] : this.conformsTo.toArray(new Base[this.conformsTo.size()]); // DeviceDefinitionConformsToComponent 7275 case 696815021: /*hasPart*/ return this.hasPart == null ? new Base[0] : this.hasPart.toArray(new Base[this.hasPart.size()]); // DeviceDefinitionHasPartComponent 7276 case 1802065795: /*packaging*/ return this.packaging == null ? new Base[0] : this.packaging.toArray(new Base[this.packaging.size()]); // DeviceDefinitionPackagingComponent 7277 case 351608024: /*version*/ return this.version == null ? new Base[0] : this.version.toArray(new Base[this.version.size()]); // DeviceDefinitionVersionComponent 7278 case -909893934: /*safety*/ return this.safety == null ? new Base[0] : this.safety.toArray(new Base[this.safety.size()]); // CodeableConcept 7279 case 172049237: /*shelfLifeStorage*/ return this.shelfLifeStorage == null ? new Base[0] : this.shelfLifeStorage.toArray(new Base[this.shelfLifeStorage.size()]); // ProductShelfLife 7280 case -2092349083: /*languageCode*/ return this.languageCode == null ? new Base[0] : this.languageCode.toArray(new Base[this.languageCode.size()]); // CodeableConcept 7281 case -993141291: /*property*/ return this.property == null ? new Base[0] : this.property.toArray(new Base[this.property.size()]); // DeviceDefinitionPropertyComponent 7282 case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference 7283 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactPoint 7284 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // DeviceDefinitionLinkComponent 7285 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 7286 case 299066663: /*material*/ return this.material == null ? new Base[0] : this.material.toArray(new Base[this.material.size()]); // DeviceDefinitionMaterialComponent 7287 case 312405811: /*productionIdentifierInUDI*/ return this.productionIdentifierInUDI == null ? new Base[0] : this.productionIdentifierInUDI.toArray(new Base[this.productionIdentifierInUDI.size()]); // Enumeration<DeviceProductionIdentifierInUDI> 7288 case -2075718416: /*guideline*/ return this.guideline == null ? new Base[0] : new Base[] {this.guideline}; // DeviceDefinitionGuidelineComponent 7289 case 1354575876: /*correctiveAction*/ return this.correctiveAction == null ? new Base[0] : new Base[] {this.correctiveAction}; // DeviceDefinitionCorrectiveActionComponent 7290 case 1417779175: /*chargeItem*/ return this.chargeItem == null ? new Base[0] : this.chargeItem.toArray(new Base[this.chargeItem.size()]); // DeviceDefinitionChargeItemComponent 7291 default: return super.getProperty(hash, name, checkValid); 7292 } 7293 7294 } 7295 7296 @Override 7297 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7298 switch (hash) { 7299 case -1724546052: // description 7300 this.description = TypeConvertor.castToMarkdown(value); // MarkdownType 7301 return value; 7302 case -1618432855: // identifier 7303 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 7304 return value; 7305 case -99121287: // udiDeviceIdentifier 7306 this.getUdiDeviceIdentifier().add((DeviceDefinitionUdiDeviceIdentifierComponent) value); // DeviceDefinitionUdiDeviceIdentifierComponent 7307 return value; 7308 case 455683425: // regulatoryIdentifier 7309 this.getRegulatoryIdentifier().add((DeviceDefinitionRegulatoryIdentifierComponent) value); // DeviceDefinitionRegulatoryIdentifierComponent 7310 return value; 7311 case -731502308: // partNumber 7312 this.partNumber = TypeConvertor.castToString(value); // StringType 7313 return value; 7314 case -1969347631: // manufacturer 7315 this.manufacturer = TypeConvertor.castToReference(value); // Reference 7316 return value; 7317 case 780988929: // deviceName 7318 this.getDeviceName().add((DeviceDefinitionDeviceNameComponent) value); // DeviceDefinitionDeviceNameComponent 7319 return value; 7320 case 346619858: // modelNumber 7321 this.modelNumber = TypeConvertor.castToString(value); // StringType 7322 return value; 7323 case 382350310: // classification 7324 this.getClassification().add((DeviceDefinitionClassificationComponent) value); // DeviceDefinitionClassificationComponent 7325 return value; 7326 case 1014198088: // conformsTo 7327 this.getConformsTo().add((DeviceDefinitionConformsToComponent) value); // DeviceDefinitionConformsToComponent 7328 return value; 7329 case 696815021: // hasPart 7330 this.getHasPart().add((DeviceDefinitionHasPartComponent) value); // DeviceDefinitionHasPartComponent 7331 return value; 7332 case 1802065795: // packaging 7333 this.getPackaging().add((DeviceDefinitionPackagingComponent) value); // DeviceDefinitionPackagingComponent 7334 return value; 7335 case 351608024: // version 7336 this.getVersion().add((DeviceDefinitionVersionComponent) value); // DeviceDefinitionVersionComponent 7337 return value; 7338 case -909893934: // safety 7339 this.getSafety().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 7340 return value; 7341 case 172049237: // shelfLifeStorage 7342 this.getShelfLifeStorage().add(TypeConvertor.castToProductShelfLife(value)); // ProductShelfLife 7343 return value; 7344 case -2092349083: // languageCode 7345 this.getLanguageCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 7346 return value; 7347 case -993141291: // property 7348 this.getProperty().add((DeviceDefinitionPropertyComponent) value); // DeviceDefinitionPropertyComponent 7349 return value; 7350 case 106164915: // owner 7351 this.owner = TypeConvertor.castToReference(value); // Reference 7352 return value; 7353 case 951526432: // contact 7354 this.getContact().add(TypeConvertor.castToContactPoint(value)); // ContactPoint 7355 return value; 7356 case 3321850: // link 7357 this.getLink().add((DeviceDefinitionLinkComponent) value); // DeviceDefinitionLinkComponent 7358 return value; 7359 case 3387378: // note 7360 this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation 7361 return value; 7362 case 299066663: // material 7363 this.getMaterial().add((DeviceDefinitionMaterialComponent) value); // DeviceDefinitionMaterialComponent 7364 return value; 7365 case 312405811: // productionIdentifierInUDI 7366 value = new DeviceProductionIdentifierInUDIEnumFactory().fromType(TypeConvertor.castToCode(value)); 7367 this.getProductionIdentifierInUDI().add((Enumeration) value); // Enumeration<DeviceProductionIdentifierInUDI> 7368 return value; 7369 case -2075718416: // guideline 7370 this.guideline = (DeviceDefinitionGuidelineComponent) value; // DeviceDefinitionGuidelineComponent 7371 return value; 7372 case 1354575876: // correctiveAction 7373 this.correctiveAction = (DeviceDefinitionCorrectiveActionComponent) value; // DeviceDefinitionCorrectiveActionComponent 7374 return value; 7375 case 1417779175: // chargeItem 7376 this.getChargeItem().add((DeviceDefinitionChargeItemComponent) value); // DeviceDefinitionChargeItemComponent 7377 return value; 7378 default: return super.setProperty(hash, name, value); 7379 } 7380 7381 } 7382 7383 @Override 7384 public Base setProperty(String name, Base value) throws FHIRException { 7385 if (name.equals("description")) { 7386 this.description = TypeConvertor.castToMarkdown(value); // MarkdownType 7387 } else if (name.equals("identifier")) { 7388 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 7389 } else if (name.equals("udiDeviceIdentifier")) { 7390 this.getUdiDeviceIdentifier().add((DeviceDefinitionUdiDeviceIdentifierComponent) value); 7391 } else if (name.equals("regulatoryIdentifier")) { 7392 this.getRegulatoryIdentifier().add((DeviceDefinitionRegulatoryIdentifierComponent) value); 7393 } else if (name.equals("partNumber")) { 7394 this.partNumber = TypeConvertor.castToString(value); // StringType 7395 } else if (name.equals("manufacturer")) { 7396 this.manufacturer = TypeConvertor.castToReference(value); // Reference 7397 } else if (name.equals("deviceName")) { 7398 this.getDeviceName().add((DeviceDefinitionDeviceNameComponent) value); 7399 } else if (name.equals("modelNumber")) { 7400 this.modelNumber = TypeConvertor.castToString(value); // StringType 7401 } else if (name.equals("classification")) { 7402 this.getClassification().add((DeviceDefinitionClassificationComponent) value); 7403 } else if (name.equals("conformsTo")) { 7404 this.getConformsTo().add((DeviceDefinitionConformsToComponent) value); 7405 } else if (name.equals("hasPart")) { 7406 this.getHasPart().add((DeviceDefinitionHasPartComponent) value); 7407 } else if (name.equals("packaging")) { 7408 this.getPackaging().add((DeviceDefinitionPackagingComponent) value); 7409 } else if (name.equals("version")) { 7410 this.getVersion().add((DeviceDefinitionVersionComponent) value); 7411 } else if (name.equals("safety")) { 7412 this.getSafety().add(TypeConvertor.castToCodeableConcept(value)); 7413 } else if (name.equals("shelfLifeStorage")) { 7414 this.getShelfLifeStorage().add(TypeConvertor.castToProductShelfLife(value)); 7415 } else if (name.equals("languageCode")) { 7416 this.getLanguageCode().add(TypeConvertor.castToCodeableConcept(value)); 7417 } else if (name.equals("property")) { 7418 this.getProperty().add((DeviceDefinitionPropertyComponent) value); 7419 } else if (name.equals("owner")) { 7420 this.owner = TypeConvertor.castToReference(value); // Reference 7421 } else if (name.equals("contact")) { 7422 this.getContact().add(TypeConvertor.castToContactPoint(value)); 7423 } else if (name.equals("link")) { 7424 this.getLink().add((DeviceDefinitionLinkComponent) value); 7425 } else if (name.equals("note")) { 7426 this.getNote().add(TypeConvertor.castToAnnotation(value)); 7427 } else if (name.equals("material")) { 7428 this.getMaterial().add((DeviceDefinitionMaterialComponent) value); 7429 } else if (name.equals("productionIdentifierInUDI")) { 7430 value = new DeviceProductionIdentifierInUDIEnumFactory().fromType(TypeConvertor.castToCode(value)); 7431 this.getProductionIdentifierInUDI().add((Enumeration) value); 7432 } else if (name.equals("guideline")) { 7433 this.guideline = (DeviceDefinitionGuidelineComponent) value; // DeviceDefinitionGuidelineComponent 7434 } else if (name.equals("correctiveAction")) { 7435 this.correctiveAction = (DeviceDefinitionCorrectiveActionComponent) value; // DeviceDefinitionCorrectiveActionComponent 7436 } else if (name.equals("chargeItem")) { 7437 this.getChargeItem().add((DeviceDefinitionChargeItemComponent) value); 7438 } else 7439 return super.setProperty(name, value); 7440 return value; 7441 } 7442 7443 @Override 7444 public Base makeProperty(int hash, String name) throws FHIRException { 7445 switch (hash) { 7446 case -1724546052: return getDescriptionElement(); 7447 case -1618432855: return addIdentifier(); 7448 case -99121287: return addUdiDeviceIdentifier(); 7449 case 455683425: return addRegulatoryIdentifier(); 7450 case -731502308: return getPartNumberElement(); 7451 case -1969347631: return getManufacturer(); 7452 case 780988929: return addDeviceName(); 7453 case 346619858: return getModelNumberElement(); 7454 case 382350310: return addClassification(); 7455 case 1014198088: return addConformsTo(); 7456 case 696815021: return addHasPart(); 7457 case 1802065795: return addPackaging(); 7458 case 351608024: return addVersion(); 7459 case -909893934: return addSafety(); 7460 case 172049237: return addShelfLifeStorage(); 7461 case -2092349083: return addLanguageCode(); 7462 case -993141291: return addProperty(); 7463 case 106164915: return getOwner(); 7464 case 951526432: return addContact(); 7465 case 3321850: return addLink(); 7466 case 3387378: return addNote(); 7467 case 299066663: return addMaterial(); 7468 case 312405811: return addProductionIdentifierInUDIElement(); 7469 case -2075718416: return getGuideline(); 7470 case 1354575876: return getCorrectiveAction(); 7471 case 1417779175: return addChargeItem(); 7472 default: return super.makeProperty(hash, name); 7473 } 7474 7475 } 7476 7477 @Override 7478 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 7479 switch (hash) { 7480 case -1724546052: /*description*/ return new String[] {"markdown"}; 7481 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 7482 case -99121287: /*udiDeviceIdentifier*/ return new String[] {}; 7483 case 455683425: /*regulatoryIdentifier*/ return new String[] {}; 7484 case -731502308: /*partNumber*/ return new String[] {"string"}; 7485 case -1969347631: /*manufacturer*/ return new String[] {"Reference"}; 7486 case 780988929: /*deviceName*/ return new String[] {}; 7487 case 346619858: /*modelNumber*/ return new String[] {"string"}; 7488 case 382350310: /*classification*/ return new String[] {}; 7489 case 1014198088: /*conformsTo*/ return new String[] {}; 7490 case 696815021: /*hasPart*/ return new String[] {}; 7491 case 1802065795: /*packaging*/ return new String[] {}; 7492 case 351608024: /*version*/ return new String[] {}; 7493 case -909893934: /*safety*/ return new String[] {"CodeableConcept"}; 7494 case 172049237: /*shelfLifeStorage*/ return new String[] {"ProductShelfLife"}; 7495 case -2092349083: /*languageCode*/ return new String[] {"CodeableConcept"}; 7496 case -993141291: /*property*/ return new String[] {}; 7497 case 106164915: /*owner*/ return new String[] {"Reference"}; 7498 case 951526432: /*contact*/ return new String[] {"ContactPoint"}; 7499 case 3321850: /*link*/ return new String[] {}; 7500 case 3387378: /*note*/ return new String[] {"Annotation"}; 7501 case 299066663: /*material*/ return new String[] {}; 7502 case 312405811: /*productionIdentifierInUDI*/ return new String[] {"code"}; 7503 case -2075718416: /*guideline*/ return new String[] {}; 7504 case 1354575876: /*correctiveAction*/ return new String[] {}; 7505 case 1417779175: /*chargeItem*/ return new String[] {}; 7506 default: return super.getTypesForProperty(hash, name); 7507 } 7508 7509 } 7510 7511 @Override 7512 public Base addChild(String name) throws FHIRException { 7513 if (name.equals("description")) { 7514 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.description"); 7515 } 7516 else if (name.equals("identifier")) { 7517 return addIdentifier(); 7518 } 7519 else if (name.equals("udiDeviceIdentifier")) { 7520 return addUdiDeviceIdentifier(); 7521 } 7522 else if (name.equals("regulatoryIdentifier")) { 7523 return addRegulatoryIdentifier(); 7524 } 7525 else if (name.equals("partNumber")) { 7526 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.partNumber"); 7527 } 7528 else if (name.equals("manufacturer")) { 7529 this.manufacturer = new Reference(); 7530 return this.manufacturer; 7531 } 7532 else if (name.equals("deviceName")) { 7533 return addDeviceName(); 7534 } 7535 else if (name.equals("modelNumber")) { 7536 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.modelNumber"); 7537 } 7538 else if (name.equals("classification")) { 7539 return addClassification(); 7540 } 7541 else if (name.equals("conformsTo")) { 7542 return addConformsTo(); 7543 } 7544 else if (name.equals("hasPart")) { 7545 return addHasPart(); 7546 } 7547 else if (name.equals("packaging")) { 7548 return addPackaging(); 7549 } 7550 else if (name.equals("version")) { 7551 return addVersion(); 7552 } 7553 else if (name.equals("safety")) { 7554 return addSafety(); 7555 } 7556 else if (name.equals("shelfLifeStorage")) { 7557 return addShelfLifeStorage(); 7558 } 7559 else if (name.equals("languageCode")) { 7560 return addLanguageCode(); 7561 } 7562 else if (name.equals("property")) { 7563 return addProperty(); 7564 } 7565 else if (name.equals("owner")) { 7566 this.owner = new Reference(); 7567 return this.owner; 7568 } 7569 else if (name.equals("contact")) { 7570 return addContact(); 7571 } 7572 else if (name.equals("link")) { 7573 return addLink(); 7574 } 7575 else if (name.equals("note")) { 7576 return addNote(); 7577 } 7578 else if (name.equals("material")) { 7579 return addMaterial(); 7580 } 7581 else if (name.equals("productionIdentifierInUDI")) { 7582 throw new FHIRException("Cannot call addChild on a singleton property DeviceDefinition.productionIdentifierInUDI"); 7583 } 7584 else if (name.equals("guideline")) { 7585 this.guideline = new DeviceDefinitionGuidelineComponent(); 7586 return this.guideline; 7587 } 7588 else if (name.equals("correctiveAction")) { 7589 this.correctiveAction = new DeviceDefinitionCorrectiveActionComponent(); 7590 return this.correctiveAction; 7591 } 7592 else if (name.equals("chargeItem")) { 7593 return addChargeItem(); 7594 } 7595 else 7596 return super.addChild(name); 7597 } 7598 7599 public String fhirType() { 7600 return "DeviceDefinition"; 7601 7602 } 7603 7604 public DeviceDefinition copy() { 7605 DeviceDefinition dst = new DeviceDefinition(); 7606 copyValues(dst); 7607 return dst; 7608 } 7609 7610 public void copyValues(DeviceDefinition dst) { 7611 super.copyValues(dst); 7612 dst.description = description == null ? null : description.copy(); 7613 if (identifier != null) { 7614 dst.identifier = new ArrayList<Identifier>(); 7615 for (Identifier i : identifier) 7616 dst.identifier.add(i.copy()); 7617 }; 7618 if (udiDeviceIdentifier != null) { 7619 dst.udiDeviceIdentifier = new ArrayList<DeviceDefinitionUdiDeviceIdentifierComponent>(); 7620 for (DeviceDefinitionUdiDeviceIdentifierComponent i : udiDeviceIdentifier) 7621 dst.udiDeviceIdentifier.add(i.copy()); 7622 }; 7623 if (regulatoryIdentifier != null) { 7624 dst.regulatoryIdentifier = new ArrayList<DeviceDefinitionRegulatoryIdentifierComponent>(); 7625 for (DeviceDefinitionRegulatoryIdentifierComponent i : regulatoryIdentifier) 7626 dst.regulatoryIdentifier.add(i.copy()); 7627 }; 7628 dst.partNumber = partNumber == null ? null : partNumber.copy(); 7629 dst.manufacturer = manufacturer == null ? null : manufacturer.copy(); 7630 if (deviceName != null) { 7631 dst.deviceName = new ArrayList<DeviceDefinitionDeviceNameComponent>(); 7632 for (DeviceDefinitionDeviceNameComponent i : deviceName) 7633 dst.deviceName.add(i.copy()); 7634 }; 7635 dst.modelNumber = modelNumber == null ? null : modelNumber.copy(); 7636 if (classification != null) { 7637 dst.classification = new ArrayList<DeviceDefinitionClassificationComponent>(); 7638 for (DeviceDefinitionClassificationComponent i : classification) 7639 dst.classification.add(i.copy()); 7640 }; 7641 if (conformsTo != null) { 7642 dst.conformsTo = new ArrayList<DeviceDefinitionConformsToComponent>(); 7643 for (DeviceDefinitionConformsToComponent i : conformsTo) 7644 dst.conformsTo.add(i.copy()); 7645 }; 7646 if (hasPart != null) { 7647 dst.hasPart = new ArrayList<DeviceDefinitionHasPartComponent>(); 7648 for (DeviceDefinitionHasPartComponent i : hasPart) 7649 dst.hasPart.add(i.copy()); 7650 }; 7651 if (packaging != null) { 7652 dst.packaging = new ArrayList<DeviceDefinitionPackagingComponent>(); 7653 for (DeviceDefinitionPackagingComponent i : packaging) 7654 dst.packaging.add(i.copy()); 7655 }; 7656 if (version != null) { 7657 dst.version = new ArrayList<DeviceDefinitionVersionComponent>(); 7658 for (DeviceDefinitionVersionComponent i : version) 7659 dst.version.add(i.copy()); 7660 }; 7661 if (safety != null) { 7662 dst.safety = new ArrayList<CodeableConcept>(); 7663 for (CodeableConcept i : safety) 7664 dst.safety.add(i.copy()); 7665 }; 7666 if (shelfLifeStorage != null) { 7667 dst.shelfLifeStorage = new ArrayList<ProductShelfLife>(); 7668 for (ProductShelfLife i : shelfLifeStorage) 7669 dst.shelfLifeStorage.add(i.copy()); 7670 }; 7671 if (languageCode != null) { 7672 dst.languageCode = new ArrayList<CodeableConcept>(); 7673 for (CodeableConcept i : languageCode) 7674 dst.languageCode.add(i.copy()); 7675 }; 7676 if (property != null) { 7677 dst.property = new ArrayList<DeviceDefinitionPropertyComponent>(); 7678 for (DeviceDefinitionPropertyComponent i : property) 7679 dst.property.add(i.copy()); 7680 }; 7681 dst.owner = owner == null ? null : owner.copy(); 7682 if (contact != null) { 7683 dst.contact = new ArrayList<ContactPoint>(); 7684 for (ContactPoint i : contact) 7685 dst.contact.add(i.copy()); 7686 }; 7687 if (link != null) { 7688 dst.link = new ArrayList<DeviceDefinitionLinkComponent>(); 7689 for (DeviceDefinitionLinkComponent i : link) 7690 dst.link.add(i.copy()); 7691 }; 7692 if (note != null) { 7693 dst.note = new ArrayList<Annotation>(); 7694 for (Annotation i : note) 7695 dst.note.add(i.copy()); 7696 }; 7697 if (material != null) { 7698 dst.material = new ArrayList<DeviceDefinitionMaterialComponent>(); 7699 for (DeviceDefinitionMaterialComponent i : material) 7700 dst.material.add(i.copy()); 7701 }; 7702 if (productionIdentifierInUDI != null) { 7703 dst.productionIdentifierInUDI = new ArrayList<Enumeration<DeviceProductionIdentifierInUDI>>(); 7704 for (Enumeration<DeviceProductionIdentifierInUDI> i : productionIdentifierInUDI) 7705 dst.productionIdentifierInUDI.add(i.copy()); 7706 }; 7707 dst.guideline = guideline == null ? null : guideline.copy(); 7708 dst.correctiveAction = correctiveAction == null ? null : correctiveAction.copy(); 7709 if (chargeItem != null) { 7710 dst.chargeItem = new ArrayList<DeviceDefinitionChargeItemComponent>(); 7711 for (DeviceDefinitionChargeItemComponent i : chargeItem) 7712 dst.chargeItem.add(i.copy()); 7713 }; 7714 } 7715 7716 protected DeviceDefinition typedCopy() { 7717 return copy(); 7718 } 7719 7720 @Override 7721 public boolean equalsDeep(Base other_) { 7722 if (!super.equalsDeep(other_)) 7723 return false; 7724 if (!(other_ instanceof DeviceDefinition)) 7725 return false; 7726 DeviceDefinition o = (DeviceDefinition) other_; 7727 return compareDeep(description, o.description, true) && compareDeep(identifier, o.identifier, true) 7728 && compareDeep(udiDeviceIdentifier, o.udiDeviceIdentifier, true) && compareDeep(regulatoryIdentifier, o.regulatoryIdentifier, true) 7729 && compareDeep(partNumber, o.partNumber, true) && compareDeep(manufacturer, o.manufacturer, true) 7730 && compareDeep(deviceName, o.deviceName, true) && compareDeep(modelNumber, o.modelNumber, true) 7731 && compareDeep(classification, o.classification, true) && compareDeep(conformsTo, o.conformsTo, true) 7732 && compareDeep(hasPart, o.hasPart, true) && compareDeep(packaging, o.packaging, true) && compareDeep(version, o.version, true) 7733 && compareDeep(safety, o.safety, true) && compareDeep(shelfLifeStorage, o.shelfLifeStorage, true) 7734 && compareDeep(languageCode, o.languageCode, true) && compareDeep(property, o.property, true) && compareDeep(owner, o.owner, true) 7735 && compareDeep(contact, o.contact, true) && compareDeep(link, o.link, true) && compareDeep(note, o.note, true) 7736 && compareDeep(material, o.material, true) && compareDeep(productionIdentifierInUDI, o.productionIdentifierInUDI, true) 7737 && compareDeep(guideline, o.guideline, true) && compareDeep(correctiveAction, o.correctiveAction, true) 7738 && compareDeep(chargeItem, o.chargeItem, true); 7739 } 7740 7741 @Override 7742 public boolean equalsShallow(Base other_) { 7743 if (!super.equalsShallow(other_)) 7744 return false; 7745 if (!(other_ instanceof DeviceDefinition)) 7746 return false; 7747 DeviceDefinition o = (DeviceDefinition) other_; 7748 return compareValues(description, o.description, true) && compareValues(partNumber, o.partNumber, true) 7749 && compareValues(modelNumber, o.modelNumber, true) && compareValues(productionIdentifierInUDI, o.productionIdentifierInUDI, true) 7750 ; 7751 } 7752 7753 public boolean isEmpty() { 7754 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, identifier, udiDeviceIdentifier 7755 , regulatoryIdentifier, partNumber, manufacturer, deviceName, modelNumber, classification 7756 , conformsTo, hasPart, packaging, version, safety, shelfLifeStorage, languageCode 7757 , property, owner, contact, link, note, material, productionIdentifierInUDI, guideline 7758 , correctiveAction, chargeItem); 7759 } 7760 7761 @Override 7762 public ResourceType getResourceType() { 7763 return ResourceType.DeviceDefinition; 7764 } 7765 7766 /** 7767 * Search parameter: <b>device-name</b> 7768 * <p> 7769 * Description: <b>A server defined search that may match any of the string fields in DeviceDefinition.name or DeviceDefinition.classification.type - the latter to search for 'generic' devices.</b><br> 7770 * Type: <b>string</b><br> 7771 * Path: <b>DeviceDefinition.deviceName.name | DeviceDefinition.classification.type.coding.display | DeviceDefinition.classification.type.text</b><br> 7772 * </p> 7773 */ 7774 @SearchParamDefinition(name="device-name", path="DeviceDefinition.deviceName.name | DeviceDefinition.classification.type.coding.display | DeviceDefinition.classification.type.text", description="A server defined search that may match any of the string fields in DeviceDefinition.name or DeviceDefinition.classification.type - the latter to search for 'generic' devices.", type="string" ) 7775 public static final String SP_DEVICE_NAME = "device-name"; 7776 /** 7777 * <b>Fluent Client</b> search parameter constant for <b>device-name</b> 7778 * <p> 7779 * Description: <b>A server defined search that may match any of the string fields in DeviceDefinition.name or DeviceDefinition.classification.type - the latter to search for 'generic' devices.</b><br> 7780 * Type: <b>string</b><br> 7781 * Path: <b>DeviceDefinition.deviceName.name | DeviceDefinition.classification.type.coding.display | DeviceDefinition.classification.type.text</b><br> 7782 * </p> 7783 */ 7784 public static final ca.uhn.fhir.rest.gclient.StringClientParam DEVICE_NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DEVICE_NAME); 7785 7786 /** 7787 * Search parameter: <b>identifier</b> 7788 * <p> 7789 * Description: <b>The identifier of the component</b><br> 7790 * Type: <b>token</b><br> 7791 * Path: <b>DeviceDefinition.identifier</b><br> 7792 * </p> 7793 */ 7794 @SearchParamDefinition(name="identifier", path="DeviceDefinition.identifier", description="The identifier of the component", type="token" ) 7795 public static final String SP_IDENTIFIER = "identifier"; 7796 /** 7797 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 7798 * <p> 7799 * Description: <b>The identifier of the component</b><br> 7800 * Type: <b>token</b><br> 7801 * Path: <b>DeviceDefinition.identifier</b><br> 7802 * </p> 7803 */ 7804 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 7805 7806 /** 7807 * Search parameter: <b>manufacturer</b> 7808 * <p> 7809 * Description: <b>The manufacturer of the device</b><br> 7810 * Type: <b>reference</b><br> 7811 * Path: <b>DeviceDefinition.manufacturer</b><br> 7812 * </p> 7813 */ 7814 @SearchParamDefinition(name="manufacturer", path="DeviceDefinition.manufacturer", description="The manufacturer of the device", type="reference", target={Organization.class } ) 7815 public static final String SP_MANUFACTURER = "manufacturer"; 7816 /** 7817 * <b>Fluent Client</b> search parameter constant for <b>manufacturer</b> 7818 * <p> 7819 * Description: <b>The manufacturer of the device</b><br> 7820 * Type: <b>reference</b><br> 7821 * Path: <b>DeviceDefinition.manufacturer</b><br> 7822 * </p> 7823 */ 7824 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MANUFACTURER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MANUFACTURER); 7825 7826/** 7827 * Constant for fluent queries to be used to add include statements. Specifies 7828 * the path value of "<b>DeviceDefinition:manufacturer</b>". 7829 */ 7830 public static final ca.uhn.fhir.model.api.Include INCLUDE_MANUFACTURER = new ca.uhn.fhir.model.api.Include("DeviceDefinition:manufacturer").toLocked(); 7831 7832 /** 7833 * Search parameter: <b>organization</b> 7834 * <p> 7835 * Description: <b>The organization responsible for the device</b><br> 7836 * Type: <b>reference</b><br> 7837 * Path: <b>DeviceDefinition.owner</b><br> 7838 * </p> 7839 */ 7840 @SearchParamDefinition(name="organization", path="DeviceDefinition.owner", description="The organization responsible for the device", type="reference", target={Organization.class } ) 7841 public static final String SP_ORGANIZATION = "organization"; 7842 /** 7843 * <b>Fluent Client</b> search parameter constant for <b>organization</b> 7844 * <p> 7845 * Description: <b>The organization responsible for the device</b><br> 7846 * Type: <b>reference</b><br> 7847 * Path: <b>DeviceDefinition.owner</b><br> 7848 * </p> 7849 */ 7850 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); 7851 7852/** 7853 * Constant for fluent queries to be used to add include statements. Specifies 7854 * the path value of "<b>DeviceDefinition:organization</b>". 7855 */ 7856 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("DeviceDefinition:organization").toLocked(); 7857 7858 /** 7859 * Search parameter: <b>specification</b> 7860 * <p> 7861 * Description: <b>The specification that the device conforms to</b><br> 7862 * Type: <b>token</b><br> 7863 * Path: <b>DeviceDefinition.conformsTo.specification</b><br> 7864 * </p> 7865 */ 7866 @SearchParamDefinition(name="specification", path="DeviceDefinition.conformsTo.specification", description="The specification that the device conforms to", type="token" ) 7867 public static final String SP_SPECIFICATION = "specification"; 7868 /** 7869 * <b>Fluent Client</b> search parameter constant for <b>specification</b> 7870 * <p> 7871 * Description: <b>The specification that the device conforms to</b><br> 7872 * Type: <b>token</b><br> 7873 * Path: <b>DeviceDefinition.conformsTo.specification</b><br> 7874 * </p> 7875 */ 7876 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIFICATION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIFICATION); 7877 7878 /** 7879 * Search parameter: <b>type</b> 7880 * <p> 7881 * Description: <b>The device type</b><br> 7882 * Type: <b>token</b><br> 7883 * Path: <b>DeviceDefinition.conformsTo.category</b><br> 7884 * </p> 7885 */ 7886 @SearchParamDefinition(name="type", path="DeviceDefinition.conformsTo.category", description="The device type", type="token" ) 7887 public static final String SP_TYPE = "type"; 7888 /** 7889 * <b>Fluent Client</b> search parameter constant for <b>type</b> 7890 * <p> 7891 * Description: <b>The device type</b><br> 7892 * Type: <b>token</b><br> 7893 * Path: <b>DeviceDefinition.conformsTo.category</b><br> 7894 * </p> 7895 */ 7896 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 7897 7898 7899} 7900