001package org.hl7.fhir.r4.model; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r4 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023/* 024 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0 053import java.util.ArrayList; 054import java.util.List; 055 056import org.hl7.fhir.exceptions.FHIRException; 057import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 058import org.hl7.fhir.utilities.Utilities; 059 060import ca.uhn.fhir.model.api.annotation.Block; 061import ca.uhn.fhir.model.api.annotation.Child; 062import ca.uhn.fhir.model.api.annotation.Description; 063import ca.uhn.fhir.model.api.annotation.ResourceDef; 064import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 065/** 066 * The characteristics, operational status and capabilities of a medical-related component of a medical device. 067 */ 068@ResourceDef(name="DeviceDefinition", profile="http://hl7.org/fhir/StructureDefinition/DeviceDefinition") 069public class DeviceDefinition extends DomainResource { 070 071 public enum DeviceNameType { 072 /** 073 * UDI Label name. 074 */ 075 UDILABELNAME, 076 /** 077 * User Friendly name. 078 */ 079 USERFRIENDLYNAME, 080 /** 081 * Patient Reported name. 082 */ 083 PATIENTREPORTEDNAME, 084 /** 085 * Manufacturer name. 086 */ 087 MANUFACTURERNAME, 088 /** 089 * Model name. 090 */ 091 MODELNAME, 092 /** 093 * other. 094 */ 095 OTHER, 096 /** 097 * added to help the parsers with the generic types 098 */ 099 NULL; 100 public static DeviceNameType fromCode(String codeString) throws FHIRException { 101 if (codeString == null || "".equals(codeString)) 102 return null; 103 if ("udi-label-name".equals(codeString)) 104 return UDILABELNAME; 105 if ("user-friendly-name".equals(codeString)) 106 return USERFRIENDLYNAME; 107 if ("patient-reported-name".equals(codeString)) 108 return PATIENTREPORTEDNAME; 109 if ("manufacturer-name".equals(codeString)) 110 return MANUFACTURERNAME; 111 if ("model-name".equals(codeString)) 112 return MODELNAME; 113 if ("other".equals(codeString)) 114 return OTHER; 115 if (Configuration.isAcceptInvalidEnums()) 116 return null; 117 else 118 throw new FHIRException("Unknown DeviceNameType code '"+codeString+"'"); 119 } 120 public String toCode() { 121 switch (this) { 122 case UDILABELNAME: return "udi-label-name"; 123 case USERFRIENDLYNAME: return "user-friendly-name"; 124 case PATIENTREPORTEDNAME: return "patient-reported-name"; 125 case MANUFACTURERNAME: return "manufacturer-name"; 126 case MODELNAME: return "model-name"; 127 case OTHER: return "other"; 128 default: return "?"; 129 } 130 } 131 public String getSystem() { 132 switch (this) { 133 case UDILABELNAME: return "http://hl7.org/fhir/device-nametype"; 134 case USERFRIENDLYNAME: return "http://hl7.org/fhir/device-nametype"; 135 case PATIENTREPORTEDNAME: return "http://hl7.org/fhir/device-nametype"; 136 case MANUFACTURERNAME: return "http://hl7.org/fhir/device-nametype"; 137 case MODELNAME: return "http://hl7.org/fhir/device-nametype"; 138 case OTHER: return "http://hl7.org/fhir/device-nametype"; 139 default: return "?"; 140 } 141 } 142 public String getDefinition() { 143 switch (this) { 144 case UDILABELNAME: return "UDI Label name."; 145 case USERFRIENDLYNAME: return "User Friendly name."; 146 case PATIENTREPORTEDNAME: return "Patient Reported name."; 147 case MANUFACTURERNAME: return "Manufacturer name."; 148 case MODELNAME: return "Model name."; 149 case OTHER: return "other."; 150 default: return "?"; 151 } 152 } 153 public String getDisplay() { 154 switch (this) { 155 case UDILABELNAME: return "UDI Label name"; 156 case USERFRIENDLYNAME: return "User Friendly name"; 157 case PATIENTREPORTEDNAME: return "Patient Reported name"; 158 case MANUFACTURERNAME: return "Manufacturer name"; 159 case MODELNAME: return "Model name"; 160 case OTHER: return "other"; 161 default: return "?"; 162 } 163 } 164 } 165 166 public static class DeviceNameTypeEnumFactory implements EnumFactory<DeviceNameType> { 167 public DeviceNameType fromCode(String codeString) throws IllegalArgumentException { 168 if (codeString == null || "".equals(codeString)) 169 if (codeString == null || "".equals(codeString)) 170 return null; 171 if ("udi-label-name".equals(codeString)) 172 return DeviceNameType.UDILABELNAME; 173 if ("user-friendly-name".equals(codeString)) 174 return DeviceNameType.USERFRIENDLYNAME; 175 if ("patient-reported-name".equals(codeString)) 176 return DeviceNameType.PATIENTREPORTEDNAME; 177 if ("manufacturer-name".equals(codeString)) 178 return DeviceNameType.MANUFACTURERNAME; 179 if ("model-name".equals(codeString)) 180 return DeviceNameType.MODELNAME; 181 if ("other".equals(codeString)) 182 return DeviceNameType.OTHER; 183 throw new IllegalArgumentException("Unknown DeviceNameType code '"+codeString+"'"); 184 } 185 public Enumeration<DeviceNameType> fromType(Base code) throws FHIRException { 186 if (code == null) 187 return null; 188 if (code.isEmpty()) 189 return new Enumeration<DeviceNameType>(this); 190 String codeString = ((PrimitiveType) code).asStringValue(); 191 if (codeString == null || "".equals(codeString)) 192 return null; 193 if ("udi-label-name".equals(codeString)) 194 return new Enumeration<DeviceNameType>(this, DeviceNameType.UDILABELNAME); 195 if ("user-friendly-name".equals(codeString)) 196 return new Enumeration<DeviceNameType>(this, DeviceNameType.USERFRIENDLYNAME); 197 if ("patient-reported-name".equals(codeString)) 198 return new Enumeration<DeviceNameType>(this, DeviceNameType.PATIENTREPORTEDNAME); 199 if ("manufacturer-name".equals(codeString)) 200 return new Enumeration<DeviceNameType>(this, DeviceNameType.MANUFACTURERNAME); 201 if ("model-name".equals(codeString)) 202 return new Enumeration<DeviceNameType>(this, DeviceNameType.MODELNAME); 203 if ("other".equals(codeString)) 204 return new Enumeration<DeviceNameType>(this, DeviceNameType.OTHER); 205 throw new FHIRException("Unknown DeviceNameType code '"+codeString+"'"); 206 } 207 public String toCode(DeviceNameType code) { 208 if (code == DeviceNameType.UDILABELNAME) 209 return "udi-label-name"; 210 if (code == DeviceNameType.USERFRIENDLYNAME) 211 return "user-friendly-name"; 212 if (code == DeviceNameType.PATIENTREPORTEDNAME) 213 return "patient-reported-name"; 214 if (code == DeviceNameType.MANUFACTURERNAME) 215 return "manufacturer-name"; 216 if (code == DeviceNameType.MODELNAME) 217 return "model-name"; 218 if (code == DeviceNameType.OTHER) 219 return "other"; 220 return "?"; 221 } 222 public String toSystem(DeviceNameType code) { 223 return code.getSystem(); 224 } 225 } 226 227 @Block() 228 public static class DeviceDefinitionUdiDeviceIdentifierComponent extends BackboneElement implements IBaseBackboneElement { 229 /** 230 * The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier. 231 */ 232 @Child(name = "deviceIdentifier", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 233 @Description(shortDefinition="The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier", formalDefinition="The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier." ) 234 protected StringType deviceIdentifier; 235 236 /** 237 * The organization that assigns the identifier algorithm. 238 */ 239 @Child(name = "issuer", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) 240 @Description(shortDefinition="The organization that assigns the identifier algorithm", formalDefinition="The organization that assigns the identifier algorithm." ) 241 protected UriType issuer; 242 243 /** 244 * The jurisdiction to which the deviceIdentifier applies. 245 */ 246 @Child(name = "jurisdiction", type = {UriType.class}, order=3, min=1, max=1, modifier=false, summary=false) 247 @Description(shortDefinition="The jurisdiction to which the deviceIdentifier applies", formalDefinition="The jurisdiction to which the deviceIdentifier applies." ) 248 protected UriType jurisdiction; 249 250 private static final long serialVersionUID = -1577319218L; 251 252 /** 253 * Constructor 254 */ 255 public DeviceDefinitionUdiDeviceIdentifierComponent() { 256 super(); 257 } 258 259 /** 260 * Constructor 261 */ 262 public DeviceDefinitionUdiDeviceIdentifierComponent(StringType deviceIdentifier, UriType issuer, UriType jurisdiction) { 263 super(); 264 this.deviceIdentifier = deviceIdentifier; 265 this.issuer = issuer; 266 this.jurisdiction = jurisdiction; 267 } 268 269 /** 270 * @return {@link #deviceIdentifier} (The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier.). This is the underlying object with id, value and extensions. The accessor "getDeviceIdentifier" gives direct access to the value 271 */ 272 public StringType getDeviceIdentifierElement() { 273 if (this.deviceIdentifier == null) 274 if (Configuration.errorOnAutoCreate()) 275 throw new Error("Attempt to auto-create DeviceDefinitionUdiDeviceIdentifierComponent.deviceIdentifier"); 276 else if (Configuration.doAutoCreate()) 277 this.deviceIdentifier = new StringType(); // bb 278 return this.deviceIdentifier; 279 } 280 281 public boolean hasDeviceIdentifierElement() { 282 return this.deviceIdentifier != null && !this.deviceIdentifier.isEmpty(); 283 } 284 285 public boolean hasDeviceIdentifier() { 286 return this.deviceIdentifier != null && !this.deviceIdentifier.isEmpty(); 287 } 288 289 /** 290 * @param value {@link #deviceIdentifier} (The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier.). This is the underlying object with id, value and extensions. The accessor "getDeviceIdentifier" gives direct access to the value 291 */ 292 public DeviceDefinitionUdiDeviceIdentifierComponent setDeviceIdentifierElement(StringType value) { 293 this.deviceIdentifier = value; 294 return this; 295 } 296 297 /** 298 * @return The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier. 299 */ 300 public String getDeviceIdentifier() { 301 return this.deviceIdentifier == null ? null : this.deviceIdentifier.getValue(); 302 } 303 304 /** 305 * @param value The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier. 306 */ 307 public DeviceDefinitionUdiDeviceIdentifierComponent setDeviceIdentifier(String value) { 308 if (this.deviceIdentifier == null) 309 this.deviceIdentifier = new StringType(); 310 this.deviceIdentifier.setValue(value); 311 return this; 312 } 313 314 /** 315 * @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 316 */ 317 public UriType getIssuerElement() { 318 if (this.issuer == null) 319 if (Configuration.errorOnAutoCreate()) 320 throw new Error("Attempt to auto-create DeviceDefinitionUdiDeviceIdentifierComponent.issuer"); 321 else if (Configuration.doAutoCreate()) 322 this.issuer = new UriType(); // bb 323 return this.issuer; 324 } 325 326 public boolean hasIssuerElement() { 327 return this.issuer != null && !this.issuer.isEmpty(); 328 } 329 330 public boolean hasIssuer() { 331 return this.issuer != null && !this.issuer.isEmpty(); 332 } 333 334 /** 335 * @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 336 */ 337 public DeviceDefinitionUdiDeviceIdentifierComponent setIssuerElement(UriType value) { 338 this.issuer = value; 339 return this; 340 } 341 342 /** 343 * @return The organization that assigns the identifier algorithm. 344 */ 345 public String getIssuer() { 346 return this.issuer == null ? null : this.issuer.getValue(); 347 } 348 349 /** 350 * @param value The organization that assigns the identifier algorithm. 351 */ 352 public DeviceDefinitionUdiDeviceIdentifierComponent setIssuer(String value) { 353 if (this.issuer == null) 354 this.issuer = new UriType(); 355 this.issuer.setValue(value); 356 return this; 357 } 358 359 /** 360 * @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 361 */ 362 public UriType getJurisdictionElement() { 363 if (this.jurisdiction == null) 364 if (Configuration.errorOnAutoCreate()) 365 throw new Error("Attempt to auto-create DeviceDefinitionUdiDeviceIdentifierComponent.jurisdiction"); 366 else if (Configuration.doAutoCreate()) 367 this.jurisdiction = new UriType(); // bb 368 return this.jurisdiction; 369 } 370 371 public boolean hasJurisdictionElement() { 372 return this.jurisdiction != null && !this.jurisdiction.isEmpty(); 373 } 374 375 public boolean hasJurisdiction() { 376 return this.jurisdiction != null && !this.jurisdiction.isEmpty(); 377 } 378 379 /** 380 * @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 381 */ 382 public DeviceDefinitionUdiDeviceIdentifierComponent setJurisdictionElement(UriType value) { 383 this.jurisdiction = value; 384 return this; 385 } 386 387 /** 388 * @return The jurisdiction to which the deviceIdentifier applies. 389 */ 390 public String getJurisdiction() { 391 return this.jurisdiction == null ? null : this.jurisdiction.getValue(); 392 } 393 394 /** 395 * @param value The jurisdiction to which the deviceIdentifier applies. 396 */ 397 public DeviceDefinitionUdiDeviceIdentifierComponent setJurisdiction(String value) { 398 if (this.jurisdiction == null) 399 this.jurisdiction = new UriType(); 400 this.jurisdiction.setValue(value); 401 return this; 402 } 403 404 protected void listChildren(List<Property> children) { 405 super.listChildren(children); 406 children.add(new Property("deviceIdentifier", "string", "The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier.", 0, 1, deviceIdentifier)); 407 children.add(new Property("issuer", "uri", "The organization that assigns the identifier algorithm.", 0, 1, issuer)); 408 children.add(new Property("jurisdiction", "uri", "The jurisdiction to which the deviceIdentifier applies.", 0, 1, jurisdiction)); 409 } 410 411 @Override 412 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 413 switch (_hash) { 414 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 jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier.", 0, 1, deviceIdentifier); 415 case -1179159879: /*issuer*/ return new Property("issuer", "uri", "The organization that assigns the identifier algorithm.", 0, 1, issuer); 416 case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "uri", "The jurisdiction to which the deviceIdentifier applies.", 0, 1, jurisdiction); 417 default: return super.getNamedProperty(_hash, _name, _checkValid); 418 } 419 420 } 421 422 @Override 423 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 424 switch (hash) { 425 case 1322005407: /*deviceIdentifier*/ return this.deviceIdentifier == null ? new Base[0] : new Base[] {this.deviceIdentifier}; // StringType 426 case -1179159879: /*issuer*/ return this.issuer == null ? new Base[0] : new Base[] {this.issuer}; // UriType 427 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : new Base[] {this.jurisdiction}; // UriType 428 default: return super.getProperty(hash, name, checkValid); 429 } 430 431 } 432 433 @Override 434 public Base setProperty(int hash, String name, Base value) throws FHIRException { 435 switch (hash) { 436 case 1322005407: // deviceIdentifier 437 this.deviceIdentifier = castToString(value); // StringType 438 return value; 439 case -1179159879: // issuer 440 this.issuer = castToUri(value); // UriType 441 return value; 442 case -507075711: // jurisdiction 443 this.jurisdiction = castToUri(value); // UriType 444 return value; 445 default: return super.setProperty(hash, name, value); 446 } 447 448 } 449 450 @Override 451 public Base setProperty(String name, Base value) throws FHIRException { 452 if (name.equals("deviceIdentifier")) { 453 this.deviceIdentifier = castToString(value); // StringType 454 } else if (name.equals("issuer")) { 455 this.issuer = castToUri(value); // UriType 456 } else if (name.equals("jurisdiction")) { 457 this.jurisdiction = castToUri(value); // UriType 458 } else 459 return super.setProperty(name, value); 460 return value; 461 } 462 463 @Override 464 public Base makeProperty(int hash, String name) throws FHIRException { 465 switch (hash) { 466 case 1322005407: return getDeviceIdentifierElement(); 467 case -1179159879: return getIssuerElement(); 468 case -507075711: return getJurisdictionElement(); 469 default: return super.makeProperty(hash, name); 470 } 471 472 } 473 474 @Override 475 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 476 switch (hash) { 477 case 1322005407: /*deviceIdentifier*/ return new String[] {"string"}; 478 case -1179159879: /*issuer*/ return new String[] {"uri"}; 479 case -507075711: /*jurisdiction*/ return new String[] {"uri"}; 480 default: return super.getTypesForProperty(hash, name); 481 } 482 483 } 484 485 @Override 486 public Base addChild(String name) throws FHIRException { 487 if (name.equals("deviceIdentifier")) { 488 throw new FHIRException("Cannot call addChild on a primitive type DeviceDefinition.deviceIdentifier"); 489 } 490 else if (name.equals("issuer")) { 491 throw new FHIRException("Cannot call addChild on a primitive type DeviceDefinition.issuer"); 492 } 493 else if (name.equals("jurisdiction")) { 494 throw new FHIRException("Cannot call addChild on a primitive type DeviceDefinition.jurisdiction"); 495 } 496 else 497 return super.addChild(name); 498 } 499 500 public DeviceDefinitionUdiDeviceIdentifierComponent copy() { 501 DeviceDefinitionUdiDeviceIdentifierComponent dst = new DeviceDefinitionUdiDeviceIdentifierComponent(); 502 copyValues(dst); 503 dst.deviceIdentifier = deviceIdentifier == null ? null : deviceIdentifier.copy(); 504 dst.issuer = issuer == null ? null : issuer.copy(); 505 dst.jurisdiction = jurisdiction == null ? null : jurisdiction.copy(); 506 return dst; 507 } 508 509 @Override 510 public boolean equalsDeep(Base other_) { 511 if (!super.equalsDeep(other_)) 512 return false; 513 if (!(other_ instanceof DeviceDefinitionUdiDeviceIdentifierComponent)) 514 return false; 515 DeviceDefinitionUdiDeviceIdentifierComponent o = (DeviceDefinitionUdiDeviceIdentifierComponent) other_; 516 return compareDeep(deviceIdentifier, o.deviceIdentifier, true) && compareDeep(issuer, o.issuer, true) 517 && compareDeep(jurisdiction, o.jurisdiction, true); 518 } 519 520 @Override 521 public boolean equalsShallow(Base other_) { 522 if (!super.equalsShallow(other_)) 523 return false; 524 if (!(other_ instanceof DeviceDefinitionUdiDeviceIdentifierComponent)) 525 return false; 526 DeviceDefinitionUdiDeviceIdentifierComponent o = (DeviceDefinitionUdiDeviceIdentifierComponent) other_; 527 return compareValues(deviceIdentifier, o.deviceIdentifier, true) && compareValues(issuer, o.issuer, true) 528 && compareValues(jurisdiction, o.jurisdiction, true); 529 } 530 531 public boolean isEmpty() { 532 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(deviceIdentifier, issuer, jurisdiction 533 ); 534 } 535 536 public String fhirType() { 537 return "DeviceDefinition.udiDeviceIdentifier"; 538 539 } 540 541 } 542 543 @Block() 544 public static class DeviceDefinitionDeviceNameComponent extends BackboneElement implements IBaseBackboneElement { 545 /** 546 * The name of the device. 547 */ 548 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 549 @Description(shortDefinition="The name of the device", formalDefinition="The name of the device." ) 550 protected StringType name; 551 552 /** 553 * The type of deviceName. 554UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName. 555 */ 556 @Child(name = "type", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) 557 @Description(shortDefinition="udi-label-name | user-friendly-name | patient-reported-name | manufacturer-name | model-name | other", formalDefinition="The type of deviceName.\nUDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName." ) 558 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-nametype") 559 protected Enumeration<DeviceNameType> type; 560 561 private static final long serialVersionUID = 918983440L; 562 563 /** 564 * Constructor 565 */ 566 public DeviceDefinitionDeviceNameComponent() { 567 super(); 568 } 569 570 /** 571 * Constructor 572 */ 573 public DeviceDefinitionDeviceNameComponent(StringType name, Enumeration<DeviceNameType> type) { 574 super(); 575 this.name = name; 576 this.type = type; 577 } 578 579 /** 580 * @return {@link #name} (The name of the device.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 581 */ 582 public StringType getNameElement() { 583 if (this.name == null) 584 if (Configuration.errorOnAutoCreate()) 585 throw new Error("Attempt to auto-create DeviceDefinitionDeviceNameComponent.name"); 586 else if (Configuration.doAutoCreate()) 587 this.name = new StringType(); // bb 588 return this.name; 589 } 590 591 public boolean hasNameElement() { 592 return this.name != null && !this.name.isEmpty(); 593 } 594 595 public boolean hasName() { 596 return this.name != null && !this.name.isEmpty(); 597 } 598 599 /** 600 * @param value {@link #name} (The name of the device.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 601 */ 602 public DeviceDefinitionDeviceNameComponent setNameElement(StringType value) { 603 this.name = value; 604 return this; 605 } 606 607 /** 608 * @return The name of the device. 609 */ 610 public String getName() { 611 return this.name == null ? null : this.name.getValue(); 612 } 613 614 /** 615 * @param value The name of the device. 616 */ 617 public DeviceDefinitionDeviceNameComponent setName(String value) { 618 if (this.name == null) 619 this.name = new StringType(); 620 this.name.setValue(value); 621 return this; 622 } 623 624 /** 625 * @return {@link #type} (The type of deviceName. 626UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 627 */ 628 public Enumeration<DeviceNameType> getTypeElement() { 629 if (this.type == null) 630 if (Configuration.errorOnAutoCreate()) 631 throw new Error("Attempt to auto-create DeviceDefinitionDeviceNameComponent.type"); 632 else if (Configuration.doAutoCreate()) 633 this.type = new Enumeration<DeviceNameType>(new DeviceNameTypeEnumFactory()); // bb 634 return this.type; 635 } 636 637 public boolean hasTypeElement() { 638 return this.type != null && !this.type.isEmpty(); 639 } 640 641 public boolean hasType() { 642 return this.type != null && !this.type.isEmpty(); 643 } 644 645 /** 646 * @param value {@link #type} (The type of deviceName. 647UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 648 */ 649 public DeviceDefinitionDeviceNameComponent setTypeElement(Enumeration<DeviceNameType> value) { 650 this.type = value; 651 return this; 652 } 653 654 /** 655 * @return The type of deviceName. 656UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName. 657 */ 658 public DeviceNameType getType() { 659 return this.type == null ? null : this.type.getValue(); 660 } 661 662 /** 663 * @param value The type of deviceName. 664UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName. 665 */ 666 public DeviceDefinitionDeviceNameComponent setType(DeviceNameType value) { 667 if (this.type == null) 668 this.type = new Enumeration<DeviceNameType>(new DeviceNameTypeEnumFactory()); 669 this.type.setValue(value); 670 return this; 671 } 672 673 protected void listChildren(List<Property> children) { 674 super.listChildren(children); 675 children.add(new Property("name", "string", "The name of the device.", 0, 1, name)); 676 children.add(new Property("type", "code", "The type of deviceName.\nUDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.", 0, 1, type)); 677 } 678 679 @Override 680 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 681 switch (_hash) { 682 case 3373707: /*name*/ return new Property("name", "string", "The name of the device.", 0, 1, name); 683 case 3575610: /*type*/ return new Property("type", "code", "The type of deviceName.\nUDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.", 0, 1, type); 684 default: return super.getNamedProperty(_hash, _name, _checkValid); 685 } 686 687 } 688 689 @Override 690 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 691 switch (hash) { 692 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 693 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<DeviceNameType> 694 default: return super.getProperty(hash, name, checkValid); 695 } 696 697 } 698 699 @Override 700 public Base setProperty(int hash, String name, Base value) throws FHIRException { 701 switch (hash) { 702 case 3373707: // name 703 this.name = castToString(value); // StringType 704 return value; 705 case 3575610: // type 706 value = new DeviceNameTypeEnumFactory().fromType(castToCode(value)); 707 this.type = (Enumeration) value; // Enumeration<DeviceNameType> 708 return value; 709 default: return super.setProperty(hash, name, value); 710 } 711 712 } 713 714 @Override 715 public Base setProperty(String name, Base value) throws FHIRException { 716 if (name.equals("name")) { 717 this.name = castToString(value); // StringType 718 } else if (name.equals("type")) { 719 value = new DeviceNameTypeEnumFactory().fromType(castToCode(value)); 720 this.type = (Enumeration) value; // Enumeration<DeviceNameType> 721 } else 722 return super.setProperty(name, value); 723 return value; 724 } 725 726 @Override 727 public Base makeProperty(int hash, String name) throws FHIRException { 728 switch (hash) { 729 case 3373707: return getNameElement(); 730 case 3575610: return getTypeElement(); 731 default: return super.makeProperty(hash, name); 732 } 733 734 } 735 736 @Override 737 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 738 switch (hash) { 739 case 3373707: /*name*/ return new String[] {"string"}; 740 case 3575610: /*type*/ return new String[] {"code"}; 741 default: return super.getTypesForProperty(hash, name); 742 } 743 744 } 745 746 @Override 747 public Base addChild(String name) throws FHIRException { 748 if (name.equals("name")) { 749 throw new FHIRException("Cannot call addChild on a primitive type DeviceDefinition.name"); 750 } 751 else if (name.equals("type")) { 752 throw new FHIRException("Cannot call addChild on a primitive type DeviceDefinition.type"); 753 } 754 else 755 return super.addChild(name); 756 } 757 758 public DeviceDefinitionDeviceNameComponent copy() { 759 DeviceDefinitionDeviceNameComponent dst = new DeviceDefinitionDeviceNameComponent(); 760 copyValues(dst); 761 dst.name = name == null ? null : name.copy(); 762 dst.type = type == null ? null : type.copy(); 763 return dst; 764 } 765 766 @Override 767 public boolean equalsDeep(Base other_) { 768 if (!super.equalsDeep(other_)) 769 return false; 770 if (!(other_ instanceof DeviceDefinitionDeviceNameComponent)) 771 return false; 772 DeviceDefinitionDeviceNameComponent o = (DeviceDefinitionDeviceNameComponent) other_; 773 return compareDeep(name, o.name, true) && compareDeep(type, o.type, true); 774 } 775 776 @Override 777 public boolean equalsShallow(Base other_) { 778 if (!super.equalsShallow(other_)) 779 return false; 780 if (!(other_ instanceof DeviceDefinitionDeviceNameComponent)) 781 return false; 782 DeviceDefinitionDeviceNameComponent o = (DeviceDefinitionDeviceNameComponent) other_; 783 return compareValues(name, o.name, true) && compareValues(type, o.type, true); 784 } 785 786 public boolean isEmpty() { 787 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, type); 788 } 789 790 public String fhirType() { 791 return "DeviceDefinition.deviceName"; 792 793 } 794 795 } 796 797 @Block() 798 public static class DeviceDefinitionSpecializationComponent extends BackboneElement implements IBaseBackboneElement { 799 /** 800 * The standard that is used to operate and communicate. 801 */ 802 @Child(name = "systemType", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 803 @Description(shortDefinition="The standard that is used to operate and communicate", formalDefinition="The standard that is used to operate and communicate." ) 804 protected StringType systemType; 805 806 /** 807 * The version of the standard that is used to operate and communicate. 808 */ 809 @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 810 @Description(shortDefinition="The version of the standard that is used to operate and communicate", formalDefinition="The version of the standard that is used to operate and communicate." ) 811 protected StringType version; 812 813 private static final long serialVersionUID = -249304393L; 814 815 /** 816 * Constructor 817 */ 818 public DeviceDefinitionSpecializationComponent() { 819 super(); 820 } 821 822 /** 823 * Constructor 824 */ 825 public DeviceDefinitionSpecializationComponent(StringType systemType) { 826 super(); 827 this.systemType = systemType; 828 } 829 830 /** 831 * @return {@link #systemType} (The standard that is used to operate and communicate.). This is the underlying object with id, value and extensions. The accessor "getSystemType" gives direct access to the value 832 */ 833 public StringType getSystemTypeElement() { 834 if (this.systemType == null) 835 if (Configuration.errorOnAutoCreate()) 836 throw new Error("Attempt to auto-create DeviceDefinitionSpecializationComponent.systemType"); 837 else if (Configuration.doAutoCreate()) 838 this.systemType = new StringType(); // bb 839 return this.systemType; 840 } 841 842 public boolean hasSystemTypeElement() { 843 return this.systemType != null && !this.systemType.isEmpty(); 844 } 845 846 public boolean hasSystemType() { 847 return this.systemType != null && !this.systemType.isEmpty(); 848 } 849 850 /** 851 * @param value {@link #systemType} (The standard that is used to operate and communicate.). This is the underlying object with id, value and extensions. The accessor "getSystemType" gives direct access to the value 852 */ 853 public DeviceDefinitionSpecializationComponent setSystemTypeElement(StringType value) { 854 this.systemType = value; 855 return this; 856 } 857 858 /** 859 * @return The standard that is used to operate and communicate. 860 */ 861 public String getSystemType() { 862 return this.systemType == null ? null : this.systemType.getValue(); 863 } 864 865 /** 866 * @param value The standard that is used to operate and communicate. 867 */ 868 public DeviceDefinitionSpecializationComponent setSystemType(String value) { 869 if (this.systemType == null) 870 this.systemType = new StringType(); 871 this.systemType.setValue(value); 872 return this; 873 } 874 875 /** 876 * @return {@link #version} (The version of the standard that is used to operate and communicate.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 877 */ 878 public StringType getVersionElement() { 879 if (this.version == null) 880 if (Configuration.errorOnAutoCreate()) 881 throw new Error("Attempt to auto-create DeviceDefinitionSpecializationComponent.version"); 882 else if (Configuration.doAutoCreate()) 883 this.version = new StringType(); // bb 884 return this.version; 885 } 886 887 public boolean hasVersionElement() { 888 return this.version != null && !this.version.isEmpty(); 889 } 890 891 public boolean hasVersion() { 892 return this.version != null && !this.version.isEmpty(); 893 } 894 895 /** 896 * @param value {@link #version} (The version of the standard that is used to operate and communicate.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 897 */ 898 public DeviceDefinitionSpecializationComponent setVersionElement(StringType value) { 899 this.version = value; 900 return this; 901 } 902 903 /** 904 * @return The version of the standard that is used to operate and communicate. 905 */ 906 public String getVersion() { 907 return this.version == null ? null : this.version.getValue(); 908 } 909 910 /** 911 * @param value The version of the standard that is used to operate and communicate. 912 */ 913 public DeviceDefinitionSpecializationComponent setVersion(String value) { 914 if (Utilities.noString(value)) 915 this.version = null; 916 else { 917 if (this.version == null) 918 this.version = new StringType(); 919 this.version.setValue(value); 920 } 921 return this; 922 } 923 924 protected void listChildren(List<Property> children) { 925 super.listChildren(children); 926 children.add(new Property("systemType", "string", "The standard that is used to operate and communicate.", 0, 1, systemType)); 927 children.add(new Property("version", "string", "The version of the standard that is used to operate and communicate.", 0, 1, version)); 928 } 929 930 @Override 931 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 932 switch (_hash) { 933 case 642893321: /*systemType*/ return new Property("systemType", "string", "The standard that is used to operate and communicate.", 0, 1, systemType); 934 case 351608024: /*version*/ return new Property("version", "string", "The version of the standard that is used to operate and communicate.", 0, 1, version); 935 default: return super.getNamedProperty(_hash, _name, _checkValid); 936 } 937 938 } 939 940 @Override 941 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 942 switch (hash) { 943 case 642893321: /*systemType*/ return this.systemType == null ? new Base[0] : new Base[] {this.systemType}; // StringType 944 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 945 default: return super.getProperty(hash, name, checkValid); 946 } 947 948 } 949 950 @Override 951 public Base setProperty(int hash, String name, Base value) throws FHIRException { 952 switch (hash) { 953 case 642893321: // systemType 954 this.systemType = castToString(value); // StringType 955 return value; 956 case 351608024: // version 957 this.version = castToString(value); // StringType 958 return value; 959 default: return super.setProperty(hash, name, value); 960 } 961 962 } 963 964 @Override 965 public Base setProperty(String name, Base value) throws FHIRException { 966 if (name.equals("systemType")) { 967 this.systemType = castToString(value); // StringType 968 } else if (name.equals("version")) { 969 this.version = castToString(value); // StringType 970 } else 971 return super.setProperty(name, value); 972 return value; 973 } 974 975 @Override 976 public Base makeProperty(int hash, String name) throws FHIRException { 977 switch (hash) { 978 case 642893321: return getSystemTypeElement(); 979 case 351608024: return getVersionElement(); 980 default: return super.makeProperty(hash, name); 981 } 982 983 } 984 985 @Override 986 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 987 switch (hash) { 988 case 642893321: /*systemType*/ return new String[] {"string"}; 989 case 351608024: /*version*/ return new String[] {"string"}; 990 default: return super.getTypesForProperty(hash, name); 991 } 992 993 } 994 995 @Override 996 public Base addChild(String name) throws FHIRException { 997 if (name.equals("systemType")) { 998 throw new FHIRException("Cannot call addChild on a primitive type DeviceDefinition.systemType"); 999 } 1000 else if (name.equals("version")) { 1001 throw new FHIRException("Cannot call addChild on a primitive type DeviceDefinition.version"); 1002 } 1003 else 1004 return super.addChild(name); 1005 } 1006 1007 public DeviceDefinitionSpecializationComponent copy() { 1008 DeviceDefinitionSpecializationComponent dst = new DeviceDefinitionSpecializationComponent(); 1009 copyValues(dst); 1010 dst.systemType = systemType == null ? null : systemType.copy(); 1011 dst.version = version == null ? null : version.copy(); 1012 return dst; 1013 } 1014 1015 @Override 1016 public boolean equalsDeep(Base other_) { 1017 if (!super.equalsDeep(other_)) 1018 return false; 1019 if (!(other_ instanceof DeviceDefinitionSpecializationComponent)) 1020 return false; 1021 DeviceDefinitionSpecializationComponent o = (DeviceDefinitionSpecializationComponent) other_; 1022 return compareDeep(systemType, o.systemType, true) && compareDeep(version, o.version, true); 1023 } 1024 1025 @Override 1026 public boolean equalsShallow(Base other_) { 1027 if (!super.equalsShallow(other_)) 1028 return false; 1029 if (!(other_ instanceof DeviceDefinitionSpecializationComponent)) 1030 return false; 1031 DeviceDefinitionSpecializationComponent o = (DeviceDefinitionSpecializationComponent) other_; 1032 return compareValues(systemType, o.systemType, true) && compareValues(version, o.version, true); 1033 } 1034 1035 public boolean isEmpty() { 1036 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(systemType, version); 1037 } 1038 1039 public String fhirType() { 1040 return "DeviceDefinition.specialization"; 1041 1042 } 1043 1044 } 1045 1046 @Block() 1047 public static class DeviceDefinitionCapabilityComponent extends BackboneElement implements IBaseBackboneElement { 1048 /** 1049 * Type of capability. 1050 */ 1051 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 1052 @Description(shortDefinition="Type of capability", formalDefinition="Type of capability." ) 1053 protected CodeableConcept type; 1054 1055 /** 1056 * Description of capability. 1057 */ 1058 @Child(name = "description", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1059 @Description(shortDefinition="Description of capability", formalDefinition="Description of capability." ) 1060 protected List<CodeableConcept> description; 1061 1062 private static final long serialVersionUID = -192945344L; 1063 1064 /** 1065 * Constructor 1066 */ 1067 public DeviceDefinitionCapabilityComponent() { 1068 super(); 1069 } 1070 1071 /** 1072 * Constructor 1073 */ 1074 public DeviceDefinitionCapabilityComponent(CodeableConcept type) { 1075 super(); 1076 this.type = type; 1077 } 1078 1079 /** 1080 * @return {@link #type} (Type of capability.) 1081 */ 1082 public CodeableConcept getType() { 1083 if (this.type == null) 1084 if (Configuration.errorOnAutoCreate()) 1085 throw new Error("Attempt to auto-create DeviceDefinitionCapabilityComponent.type"); 1086 else if (Configuration.doAutoCreate()) 1087 this.type = new CodeableConcept(); // cc 1088 return this.type; 1089 } 1090 1091 public boolean hasType() { 1092 return this.type != null && !this.type.isEmpty(); 1093 } 1094 1095 /** 1096 * @param value {@link #type} (Type of capability.) 1097 */ 1098 public DeviceDefinitionCapabilityComponent setType(CodeableConcept value) { 1099 this.type = value; 1100 return this; 1101 } 1102 1103 /** 1104 * @return {@link #description} (Description of capability.) 1105 */ 1106 public List<CodeableConcept> getDescription() { 1107 if (this.description == null) 1108 this.description = new ArrayList<CodeableConcept>(); 1109 return this.description; 1110 } 1111 1112 /** 1113 * @return Returns a reference to <code>this</code> for easy method chaining 1114 */ 1115 public DeviceDefinitionCapabilityComponent setDescription(List<CodeableConcept> theDescription) { 1116 this.description = theDescription; 1117 return this; 1118 } 1119 1120 public boolean hasDescription() { 1121 if (this.description == null) 1122 return false; 1123 for (CodeableConcept item : this.description) 1124 if (!item.isEmpty()) 1125 return true; 1126 return false; 1127 } 1128 1129 public CodeableConcept addDescription() { //3 1130 CodeableConcept t = new CodeableConcept(); 1131 if (this.description == null) 1132 this.description = new ArrayList<CodeableConcept>(); 1133 this.description.add(t); 1134 return t; 1135 } 1136 1137 public DeviceDefinitionCapabilityComponent addDescription(CodeableConcept t) { //3 1138 if (t == null) 1139 return this; 1140 if (this.description == null) 1141 this.description = new ArrayList<CodeableConcept>(); 1142 this.description.add(t); 1143 return this; 1144 } 1145 1146 /** 1147 * @return The first repetition of repeating field {@link #description}, creating it if it does not already exist 1148 */ 1149 public CodeableConcept getDescriptionFirstRep() { 1150 if (getDescription().isEmpty()) { 1151 addDescription(); 1152 } 1153 return getDescription().get(0); 1154 } 1155 1156 protected void listChildren(List<Property> children) { 1157 super.listChildren(children); 1158 children.add(new Property("type", "CodeableConcept", "Type of capability.", 0, 1, type)); 1159 children.add(new Property("description", "CodeableConcept", "Description of capability.", 0, java.lang.Integer.MAX_VALUE, description)); 1160 } 1161 1162 @Override 1163 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1164 switch (_hash) { 1165 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Type of capability.", 0, 1, type); 1166 case -1724546052: /*description*/ return new Property("description", "CodeableConcept", "Description of capability.", 0, java.lang.Integer.MAX_VALUE, description); 1167 default: return super.getNamedProperty(_hash, _name, _checkValid); 1168 } 1169 1170 } 1171 1172 @Override 1173 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1174 switch (hash) { 1175 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1176 case -1724546052: /*description*/ return this.description == null ? new Base[0] : this.description.toArray(new Base[this.description.size()]); // CodeableConcept 1177 default: return super.getProperty(hash, name, checkValid); 1178 } 1179 1180 } 1181 1182 @Override 1183 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1184 switch (hash) { 1185 case 3575610: // type 1186 this.type = castToCodeableConcept(value); // CodeableConcept 1187 return value; 1188 case -1724546052: // description 1189 this.getDescription().add(castToCodeableConcept(value)); // CodeableConcept 1190 return value; 1191 default: return super.setProperty(hash, name, value); 1192 } 1193 1194 } 1195 1196 @Override 1197 public Base setProperty(String name, Base value) throws FHIRException { 1198 if (name.equals("type")) { 1199 this.type = castToCodeableConcept(value); // CodeableConcept 1200 } else if (name.equals("description")) { 1201 this.getDescription().add(castToCodeableConcept(value)); 1202 } else 1203 return super.setProperty(name, value); 1204 return value; 1205 } 1206 1207 @Override 1208 public Base makeProperty(int hash, String name) throws FHIRException { 1209 switch (hash) { 1210 case 3575610: return getType(); 1211 case -1724546052: return addDescription(); 1212 default: return super.makeProperty(hash, name); 1213 } 1214 1215 } 1216 1217 @Override 1218 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1219 switch (hash) { 1220 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1221 case -1724546052: /*description*/ return new String[] {"CodeableConcept"}; 1222 default: return super.getTypesForProperty(hash, name); 1223 } 1224 1225 } 1226 1227 @Override 1228 public Base addChild(String name) throws FHIRException { 1229 if (name.equals("type")) { 1230 this.type = new CodeableConcept(); 1231 return this.type; 1232 } 1233 else if (name.equals("description")) { 1234 return addDescription(); 1235 } 1236 else 1237 return super.addChild(name); 1238 } 1239 1240 public DeviceDefinitionCapabilityComponent copy() { 1241 DeviceDefinitionCapabilityComponent dst = new DeviceDefinitionCapabilityComponent(); 1242 copyValues(dst); 1243 dst.type = type == null ? null : type.copy(); 1244 if (description != null) { 1245 dst.description = new ArrayList<CodeableConcept>(); 1246 for (CodeableConcept i : description) 1247 dst.description.add(i.copy()); 1248 }; 1249 return dst; 1250 } 1251 1252 @Override 1253 public boolean equalsDeep(Base other_) { 1254 if (!super.equalsDeep(other_)) 1255 return false; 1256 if (!(other_ instanceof DeviceDefinitionCapabilityComponent)) 1257 return false; 1258 DeviceDefinitionCapabilityComponent o = (DeviceDefinitionCapabilityComponent) other_; 1259 return compareDeep(type, o.type, true) && compareDeep(description, o.description, true); 1260 } 1261 1262 @Override 1263 public boolean equalsShallow(Base other_) { 1264 if (!super.equalsShallow(other_)) 1265 return false; 1266 if (!(other_ instanceof DeviceDefinitionCapabilityComponent)) 1267 return false; 1268 DeviceDefinitionCapabilityComponent o = (DeviceDefinitionCapabilityComponent) other_; 1269 return true; 1270 } 1271 1272 public boolean isEmpty() { 1273 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, description); 1274 } 1275 1276 public String fhirType() { 1277 return "DeviceDefinition.capability"; 1278 1279 } 1280 1281 } 1282 1283 @Block() 1284 public static class DeviceDefinitionPropertyComponent extends BackboneElement implements IBaseBackboneElement { 1285 /** 1286 * Code that specifies the property DeviceDefinitionPropetyCode (Extensible). 1287 */ 1288 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 1289 @Description(shortDefinition="Code that specifies the property DeviceDefinitionPropetyCode (Extensible)", formalDefinition="Code that specifies the property DeviceDefinitionPropetyCode (Extensible)." ) 1290 protected CodeableConcept type; 1291 1292 /** 1293 * Property value as a quantity. 1294 */ 1295 @Child(name = "valueQuantity", type = {Quantity.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1296 @Description(shortDefinition="Property value as a quantity", formalDefinition="Property value as a quantity." ) 1297 protected List<Quantity> valueQuantity; 1298 1299 /** 1300 * Property value as a code, e.g., NTP4 (synced to NTP). 1301 */ 1302 @Child(name = "valueCode", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1303 @Description(shortDefinition="Property value as a code, e.g., NTP4 (synced to NTP)", formalDefinition="Property value as a code, e.g., NTP4 (synced to NTP)." ) 1304 protected List<CodeableConcept> valueCode; 1305 1306 private static final long serialVersionUID = 1512172633L; 1307 1308 /** 1309 * Constructor 1310 */ 1311 public DeviceDefinitionPropertyComponent() { 1312 super(); 1313 } 1314 1315 /** 1316 * Constructor 1317 */ 1318 public DeviceDefinitionPropertyComponent(CodeableConcept type) { 1319 super(); 1320 this.type = type; 1321 } 1322 1323 /** 1324 * @return {@link #type} (Code that specifies the property DeviceDefinitionPropetyCode (Extensible).) 1325 */ 1326 public CodeableConcept getType() { 1327 if (this.type == null) 1328 if (Configuration.errorOnAutoCreate()) 1329 throw new Error("Attempt to auto-create DeviceDefinitionPropertyComponent.type"); 1330 else if (Configuration.doAutoCreate()) 1331 this.type = new CodeableConcept(); // cc 1332 return this.type; 1333 } 1334 1335 public boolean hasType() { 1336 return this.type != null && !this.type.isEmpty(); 1337 } 1338 1339 /** 1340 * @param value {@link #type} (Code that specifies the property DeviceDefinitionPropetyCode (Extensible).) 1341 */ 1342 public DeviceDefinitionPropertyComponent setType(CodeableConcept value) { 1343 this.type = value; 1344 return this; 1345 } 1346 1347 /** 1348 * @return {@link #valueQuantity} (Property value as a quantity.) 1349 */ 1350 public List<Quantity> getValueQuantity() { 1351 if (this.valueQuantity == null) 1352 this.valueQuantity = new ArrayList<Quantity>(); 1353 return this.valueQuantity; 1354 } 1355 1356 /** 1357 * @return Returns a reference to <code>this</code> for easy method chaining 1358 */ 1359 public DeviceDefinitionPropertyComponent setValueQuantity(List<Quantity> theValueQuantity) { 1360 this.valueQuantity = theValueQuantity; 1361 return this; 1362 } 1363 1364 public boolean hasValueQuantity() { 1365 if (this.valueQuantity == null) 1366 return false; 1367 for (Quantity item : this.valueQuantity) 1368 if (!item.isEmpty()) 1369 return true; 1370 return false; 1371 } 1372 1373 public Quantity addValueQuantity() { //3 1374 Quantity t = new Quantity(); 1375 if (this.valueQuantity == null) 1376 this.valueQuantity = new ArrayList<Quantity>(); 1377 this.valueQuantity.add(t); 1378 return t; 1379 } 1380 1381 public DeviceDefinitionPropertyComponent addValueQuantity(Quantity t) { //3 1382 if (t == null) 1383 return this; 1384 if (this.valueQuantity == null) 1385 this.valueQuantity = new ArrayList<Quantity>(); 1386 this.valueQuantity.add(t); 1387 return this; 1388 } 1389 1390 /** 1391 * @return The first repetition of repeating field {@link #valueQuantity}, creating it if it does not already exist 1392 */ 1393 public Quantity getValueQuantityFirstRep() { 1394 if (getValueQuantity().isEmpty()) { 1395 addValueQuantity(); 1396 } 1397 return getValueQuantity().get(0); 1398 } 1399 1400 /** 1401 * @return {@link #valueCode} (Property value as a code, e.g., NTP4 (synced to NTP).) 1402 */ 1403 public List<CodeableConcept> getValueCode() { 1404 if (this.valueCode == null) 1405 this.valueCode = new ArrayList<CodeableConcept>(); 1406 return this.valueCode; 1407 } 1408 1409 /** 1410 * @return Returns a reference to <code>this</code> for easy method chaining 1411 */ 1412 public DeviceDefinitionPropertyComponent setValueCode(List<CodeableConcept> theValueCode) { 1413 this.valueCode = theValueCode; 1414 return this; 1415 } 1416 1417 public boolean hasValueCode() { 1418 if (this.valueCode == null) 1419 return false; 1420 for (CodeableConcept item : this.valueCode) 1421 if (!item.isEmpty()) 1422 return true; 1423 return false; 1424 } 1425 1426 public CodeableConcept addValueCode() { //3 1427 CodeableConcept t = new CodeableConcept(); 1428 if (this.valueCode == null) 1429 this.valueCode = new ArrayList<CodeableConcept>(); 1430 this.valueCode.add(t); 1431 return t; 1432 } 1433 1434 public DeviceDefinitionPropertyComponent addValueCode(CodeableConcept t) { //3 1435 if (t == null) 1436 return this; 1437 if (this.valueCode == null) 1438 this.valueCode = new ArrayList<CodeableConcept>(); 1439 this.valueCode.add(t); 1440 return this; 1441 } 1442 1443 /** 1444 * @return The first repetition of repeating field {@link #valueCode}, creating it if it does not already exist 1445 */ 1446 public CodeableConcept getValueCodeFirstRep() { 1447 if (getValueCode().isEmpty()) { 1448 addValueCode(); 1449 } 1450 return getValueCode().get(0); 1451 } 1452 1453 protected void listChildren(List<Property> children) { 1454 super.listChildren(children); 1455 children.add(new Property("type", "CodeableConcept", "Code that specifies the property DeviceDefinitionPropetyCode (Extensible).", 0, 1, type)); 1456 children.add(new Property("valueQuantity", "Quantity", "Property value as a quantity.", 0, java.lang.Integer.MAX_VALUE, valueQuantity)); 1457 children.add(new Property("valueCode", "CodeableConcept", "Property value as a code, e.g., NTP4 (synced to NTP).", 0, java.lang.Integer.MAX_VALUE, valueCode)); 1458 } 1459 1460 @Override 1461 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1462 switch (_hash) { 1463 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Code that specifies the property DeviceDefinitionPropetyCode (Extensible).", 0, 1, type); 1464 case -2029823716: /*valueQuantity*/ return new Property("valueQuantity", "Quantity", "Property value as a quantity.", 0, java.lang.Integer.MAX_VALUE, valueQuantity); 1465 case -766209282: /*valueCode*/ return new Property("valueCode", "CodeableConcept", "Property value as a code, e.g., NTP4 (synced to NTP).", 0, java.lang.Integer.MAX_VALUE, valueCode); 1466 default: return super.getNamedProperty(_hash, _name, _checkValid); 1467 } 1468 1469 } 1470 1471 @Override 1472 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1473 switch (hash) { 1474 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1475 case -2029823716: /*valueQuantity*/ return this.valueQuantity == null ? new Base[0] : this.valueQuantity.toArray(new Base[this.valueQuantity.size()]); // Quantity 1476 case -766209282: /*valueCode*/ return this.valueCode == null ? new Base[0] : this.valueCode.toArray(new Base[this.valueCode.size()]); // CodeableConcept 1477 default: return super.getProperty(hash, name, checkValid); 1478 } 1479 1480 } 1481 1482 @Override 1483 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1484 switch (hash) { 1485 case 3575610: // type 1486 this.type = castToCodeableConcept(value); // CodeableConcept 1487 return value; 1488 case -2029823716: // valueQuantity 1489 this.getValueQuantity().add(castToQuantity(value)); // Quantity 1490 return value; 1491 case -766209282: // valueCode 1492 this.getValueCode().add(castToCodeableConcept(value)); // CodeableConcept 1493 return value; 1494 default: return super.setProperty(hash, name, value); 1495 } 1496 1497 } 1498 1499 @Override 1500 public Base setProperty(String name, Base value) throws FHIRException { 1501 if (name.equals("type")) { 1502 this.type = castToCodeableConcept(value); // CodeableConcept 1503 } else if (name.equals("valueQuantity")) { 1504 this.getValueQuantity().add(castToQuantity(value)); 1505 } else if (name.equals("valueCode")) { 1506 this.getValueCode().add(castToCodeableConcept(value)); 1507 } else 1508 return super.setProperty(name, value); 1509 return value; 1510 } 1511 1512 @Override 1513 public Base makeProperty(int hash, String name) throws FHIRException { 1514 switch (hash) { 1515 case 3575610: return getType(); 1516 case -2029823716: return addValueQuantity(); 1517 case -766209282: return addValueCode(); 1518 default: return super.makeProperty(hash, name); 1519 } 1520 1521 } 1522 1523 @Override 1524 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1525 switch (hash) { 1526 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1527 case -2029823716: /*valueQuantity*/ return new String[] {"Quantity"}; 1528 case -766209282: /*valueCode*/ return new String[] {"CodeableConcept"}; 1529 default: return super.getTypesForProperty(hash, name); 1530 } 1531 1532 } 1533 1534 @Override 1535 public Base addChild(String name) throws FHIRException { 1536 if (name.equals("type")) { 1537 this.type = new CodeableConcept(); 1538 return this.type; 1539 } 1540 else if (name.equals("valueQuantity")) { 1541 return addValueQuantity(); 1542 } 1543 else if (name.equals("valueCode")) { 1544 return addValueCode(); 1545 } 1546 else 1547 return super.addChild(name); 1548 } 1549 1550 public DeviceDefinitionPropertyComponent copy() { 1551 DeviceDefinitionPropertyComponent dst = new DeviceDefinitionPropertyComponent(); 1552 copyValues(dst); 1553 dst.type = type == null ? null : type.copy(); 1554 if (valueQuantity != null) { 1555 dst.valueQuantity = new ArrayList<Quantity>(); 1556 for (Quantity i : valueQuantity) 1557 dst.valueQuantity.add(i.copy()); 1558 }; 1559 if (valueCode != null) { 1560 dst.valueCode = new ArrayList<CodeableConcept>(); 1561 for (CodeableConcept i : valueCode) 1562 dst.valueCode.add(i.copy()); 1563 }; 1564 return dst; 1565 } 1566 1567 @Override 1568 public boolean equalsDeep(Base other_) { 1569 if (!super.equalsDeep(other_)) 1570 return false; 1571 if (!(other_ instanceof DeviceDefinitionPropertyComponent)) 1572 return false; 1573 DeviceDefinitionPropertyComponent o = (DeviceDefinitionPropertyComponent) other_; 1574 return compareDeep(type, o.type, true) && compareDeep(valueQuantity, o.valueQuantity, true) && compareDeep(valueCode, o.valueCode, true) 1575 ; 1576 } 1577 1578 @Override 1579 public boolean equalsShallow(Base other_) { 1580 if (!super.equalsShallow(other_)) 1581 return false; 1582 if (!(other_ instanceof DeviceDefinitionPropertyComponent)) 1583 return false; 1584 DeviceDefinitionPropertyComponent o = (DeviceDefinitionPropertyComponent) other_; 1585 return true; 1586 } 1587 1588 public boolean isEmpty() { 1589 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, valueQuantity, valueCode 1590 ); 1591 } 1592 1593 public String fhirType() { 1594 return "DeviceDefinition.property"; 1595 1596 } 1597 1598 } 1599 1600 @Block() 1601 public static class DeviceDefinitionMaterialComponent extends BackboneElement implements IBaseBackboneElement { 1602 /** 1603 * The substance. 1604 */ 1605 @Child(name = "substance", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 1606 @Description(shortDefinition="The substance", formalDefinition="The substance." ) 1607 protected CodeableConcept substance; 1608 1609 /** 1610 * Indicates an alternative material of the device. 1611 */ 1612 @Child(name = "alternate", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1613 @Description(shortDefinition="Indicates an alternative material of the device", formalDefinition="Indicates an alternative material of the device." ) 1614 protected BooleanType alternate; 1615 1616 /** 1617 * Whether the substance is a known or suspected allergen. 1618 */ 1619 @Child(name = "allergenicIndicator", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1620 @Description(shortDefinition="Whether the substance is a known or suspected allergen", formalDefinition="Whether the substance is a known or suspected allergen." ) 1621 protected BooleanType allergenicIndicator; 1622 1623 private static final long serialVersionUID = 1232736508L; 1624 1625 /** 1626 * Constructor 1627 */ 1628 public DeviceDefinitionMaterialComponent() { 1629 super(); 1630 } 1631 1632 /** 1633 * Constructor 1634 */ 1635 public DeviceDefinitionMaterialComponent(CodeableConcept substance) { 1636 super(); 1637 this.substance = substance; 1638 } 1639 1640 /** 1641 * @return {@link #substance} (The substance.) 1642 */ 1643 public CodeableConcept getSubstance() { 1644 if (this.substance == null) 1645 if (Configuration.errorOnAutoCreate()) 1646 throw new Error("Attempt to auto-create DeviceDefinitionMaterialComponent.substance"); 1647 else if (Configuration.doAutoCreate()) 1648 this.substance = new CodeableConcept(); // cc 1649 return this.substance; 1650 } 1651 1652 public boolean hasSubstance() { 1653 return this.substance != null && !this.substance.isEmpty(); 1654 } 1655 1656 /** 1657 * @param value {@link #substance} (The substance.) 1658 */ 1659 public DeviceDefinitionMaterialComponent setSubstance(CodeableConcept value) { 1660 this.substance = value; 1661 return this; 1662 } 1663 1664 /** 1665 * @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 1666 */ 1667 public BooleanType getAlternateElement() { 1668 if (this.alternate == null) 1669 if (Configuration.errorOnAutoCreate()) 1670 throw new Error("Attempt to auto-create DeviceDefinitionMaterialComponent.alternate"); 1671 else if (Configuration.doAutoCreate()) 1672 this.alternate = new BooleanType(); // bb 1673 return this.alternate; 1674 } 1675 1676 public boolean hasAlternateElement() { 1677 return this.alternate != null && !this.alternate.isEmpty(); 1678 } 1679 1680 public boolean hasAlternate() { 1681 return this.alternate != null && !this.alternate.isEmpty(); 1682 } 1683 1684 /** 1685 * @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 1686 */ 1687 public DeviceDefinitionMaterialComponent setAlternateElement(BooleanType value) { 1688 this.alternate = value; 1689 return this; 1690 } 1691 1692 /** 1693 * @return Indicates an alternative material of the device. 1694 */ 1695 public boolean getAlternate() { 1696 return this.alternate == null || this.alternate.isEmpty() ? false : this.alternate.getValue(); 1697 } 1698 1699 /** 1700 * @param value Indicates an alternative material of the device. 1701 */ 1702 public DeviceDefinitionMaterialComponent setAlternate(boolean value) { 1703 if (this.alternate == null) 1704 this.alternate = new BooleanType(); 1705 this.alternate.setValue(value); 1706 return this; 1707 } 1708 1709 /** 1710 * @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 1711 */ 1712 public BooleanType getAllergenicIndicatorElement() { 1713 if (this.allergenicIndicator == null) 1714 if (Configuration.errorOnAutoCreate()) 1715 throw new Error("Attempt to auto-create DeviceDefinitionMaterialComponent.allergenicIndicator"); 1716 else if (Configuration.doAutoCreate()) 1717 this.allergenicIndicator = new BooleanType(); // bb 1718 return this.allergenicIndicator; 1719 } 1720 1721 public boolean hasAllergenicIndicatorElement() { 1722 return this.allergenicIndicator != null && !this.allergenicIndicator.isEmpty(); 1723 } 1724 1725 public boolean hasAllergenicIndicator() { 1726 return this.allergenicIndicator != null && !this.allergenicIndicator.isEmpty(); 1727 } 1728 1729 /** 1730 * @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 1731 */ 1732 public DeviceDefinitionMaterialComponent setAllergenicIndicatorElement(BooleanType value) { 1733 this.allergenicIndicator = value; 1734 return this; 1735 } 1736 1737 /** 1738 * @return Whether the substance is a known or suspected allergen. 1739 */ 1740 public boolean getAllergenicIndicator() { 1741 return this.allergenicIndicator == null || this.allergenicIndicator.isEmpty() ? false : this.allergenicIndicator.getValue(); 1742 } 1743 1744 /** 1745 * @param value Whether the substance is a known or suspected allergen. 1746 */ 1747 public DeviceDefinitionMaterialComponent setAllergenicIndicator(boolean value) { 1748 if (this.allergenicIndicator == null) 1749 this.allergenicIndicator = new BooleanType(); 1750 this.allergenicIndicator.setValue(value); 1751 return this; 1752 } 1753 1754 protected void listChildren(List<Property> children) { 1755 super.listChildren(children); 1756 children.add(new Property("substance", "CodeableConcept", "The substance.", 0, 1, substance)); 1757 children.add(new Property("alternate", "boolean", "Indicates an alternative material of the device.", 0, 1, alternate)); 1758 children.add(new Property("allergenicIndicator", "boolean", "Whether the substance is a known or suspected allergen.", 0, 1, allergenicIndicator)); 1759 } 1760 1761 @Override 1762 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1763 switch (_hash) { 1764 case 530040176: /*substance*/ return new Property("substance", "CodeableConcept", "The substance.", 0, 1, substance); 1765 case -1408024454: /*alternate*/ return new Property("alternate", "boolean", "Indicates an alternative material of the device.", 0, 1, alternate); 1766 case 75406931: /*allergenicIndicator*/ return new Property("allergenicIndicator", "boolean", "Whether the substance is a known or suspected allergen.", 0, 1, allergenicIndicator); 1767 default: return super.getNamedProperty(_hash, _name, _checkValid); 1768 } 1769 1770 } 1771 1772 @Override 1773 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1774 switch (hash) { 1775 case 530040176: /*substance*/ return this.substance == null ? new Base[0] : new Base[] {this.substance}; // CodeableConcept 1776 case -1408024454: /*alternate*/ return this.alternate == null ? new Base[0] : new Base[] {this.alternate}; // BooleanType 1777 case 75406931: /*allergenicIndicator*/ return this.allergenicIndicator == null ? new Base[0] : new Base[] {this.allergenicIndicator}; // BooleanType 1778 default: return super.getProperty(hash, name, checkValid); 1779 } 1780 1781 } 1782 1783 @Override 1784 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1785 switch (hash) { 1786 case 530040176: // substance 1787 this.substance = castToCodeableConcept(value); // CodeableConcept 1788 return value; 1789 case -1408024454: // alternate 1790 this.alternate = castToBoolean(value); // BooleanType 1791 return value; 1792 case 75406931: // allergenicIndicator 1793 this.allergenicIndicator = castToBoolean(value); // BooleanType 1794 return value; 1795 default: return super.setProperty(hash, name, value); 1796 } 1797 1798 } 1799 1800 @Override 1801 public Base setProperty(String name, Base value) throws FHIRException { 1802 if (name.equals("substance")) { 1803 this.substance = castToCodeableConcept(value); // CodeableConcept 1804 } else if (name.equals("alternate")) { 1805 this.alternate = castToBoolean(value); // BooleanType 1806 } else if (name.equals("allergenicIndicator")) { 1807 this.allergenicIndicator = castToBoolean(value); // BooleanType 1808 } else 1809 return super.setProperty(name, value); 1810 return value; 1811 } 1812 1813 @Override 1814 public Base makeProperty(int hash, String name) throws FHIRException { 1815 switch (hash) { 1816 case 530040176: return getSubstance(); 1817 case -1408024454: return getAlternateElement(); 1818 case 75406931: return getAllergenicIndicatorElement(); 1819 default: return super.makeProperty(hash, name); 1820 } 1821 1822 } 1823 1824 @Override 1825 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1826 switch (hash) { 1827 case 530040176: /*substance*/ return new String[] {"CodeableConcept"}; 1828 case -1408024454: /*alternate*/ return new String[] {"boolean"}; 1829 case 75406931: /*allergenicIndicator*/ return new String[] {"boolean"}; 1830 default: return super.getTypesForProperty(hash, name); 1831 } 1832 1833 } 1834 1835 @Override 1836 public Base addChild(String name) throws FHIRException { 1837 if (name.equals("substance")) { 1838 this.substance = new CodeableConcept(); 1839 return this.substance; 1840 } 1841 else if (name.equals("alternate")) { 1842 throw new FHIRException("Cannot call addChild on a primitive type DeviceDefinition.alternate"); 1843 } 1844 else if (name.equals("allergenicIndicator")) { 1845 throw new FHIRException("Cannot call addChild on a primitive type DeviceDefinition.allergenicIndicator"); 1846 } 1847 else 1848 return super.addChild(name); 1849 } 1850 1851 public DeviceDefinitionMaterialComponent copy() { 1852 DeviceDefinitionMaterialComponent dst = new DeviceDefinitionMaterialComponent(); 1853 copyValues(dst); 1854 dst.substance = substance == null ? null : substance.copy(); 1855 dst.alternate = alternate == null ? null : alternate.copy(); 1856 dst.allergenicIndicator = allergenicIndicator == null ? null : allergenicIndicator.copy(); 1857 return dst; 1858 } 1859 1860 @Override 1861 public boolean equalsDeep(Base other_) { 1862 if (!super.equalsDeep(other_)) 1863 return false; 1864 if (!(other_ instanceof DeviceDefinitionMaterialComponent)) 1865 return false; 1866 DeviceDefinitionMaterialComponent o = (DeviceDefinitionMaterialComponent) other_; 1867 return compareDeep(substance, o.substance, true) && compareDeep(alternate, o.alternate, true) && compareDeep(allergenicIndicator, o.allergenicIndicator, true) 1868 ; 1869 } 1870 1871 @Override 1872 public boolean equalsShallow(Base other_) { 1873 if (!super.equalsShallow(other_)) 1874 return false; 1875 if (!(other_ instanceof DeviceDefinitionMaterialComponent)) 1876 return false; 1877 DeviceDefinitionMaterialComponent o = (DeviceDefinitionMaterialComponent) other_; 1878 return compareValues(alternate, o.alternate, true) && compareValues(allergenicIndicator, o.allergenicIndicator, true) 1879 ; 1880 } 1881 1882 public boolean isEmpty() { 1883 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(substance, alternate, allergenicIndicator 1884 ); 1885 } 1886 1887 public String fhirType() { 1888 return "DeviceDefinition.material"; 1889 1890 } 1891 1892 } 1893 1894 /** 1895 * Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID. 1896 */ 1897 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1898 @Description(shortDefinition="Instance identifier", formalDefinition="Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID." ) 1899 protected List<Identifier> identifier; 1900 1901 /** 1902 * 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. 1903 */ 1904 @Child(name = "udiDeviceIdentifier", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1905 @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." ) 1906 protected List<DeviceDefinitionUdiDeviceIdentifierComponent> udiDeviceIdentifier; 1907 1908 /** 1909 * A name of the manufacturer. 1910 */ 1911 @Child(name = "manufacturer", type = {StringType.class, Organization.class}, order=2, min=0, max=1, modifier=false, summary=false) 1912 @Description(shortDefinition="Name of device manufacturer", formalDefinition="A name of the manufacturer." ) 1913 protected Type manufacturer; 1914 1915 /** 1916 * A name given to the device to identify it. 1917 */ 1918 @Child(name = "deviceName", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1919 @Description(shortDefinition="A name given to the device to identify it", formalDefinition="A name given to the device to identify it." ) 1920 protected List<DeviceDefinitionDeviceNameComponent> deviceName; 1921 1922 /** 1923 * The model number for the device. 1924 */ 1925 @Child(name = "modelNumber", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 1926 @Description(shortDefinition="The model number for the device", formalDefinition="The model number for the device." ) 1927 protected StringType modelNumber; 1928 1929 /** 1930 * What kind of device or device system this is. 1931 */ 1932 @Child(name = "type", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 1933 @Description(shortDefinition="What kind of device or device system this is", formalDefinition="What kind of device or device system this is." ) 1934 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-kind") 1935 protected CodeableConcept type; 1936 1937 /** 1938 * The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication. 1939 */ 1940 @Child(name = "specialization", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1941 @Description(shortDefinition="The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication", formalDefinition="The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication." ) 1942 protected List<DeviceDefinitionSpecializationComponent> specialization; 1943 1944 /** 1945 * The available versions of the device, e.g., software versions. 1946 */ 1947 @Child(name = "version", type = {StringType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1948 @Description(shortDefinition="Available versions", formalDefinition="The available versions of the device, e.g., software versions." ) 1949 protected List<StringType> version; 1950 1951 /** 1952 * Safety characteristics of the device. 1953 */ 1954 @Child(name = "safety", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1955 @Description(shortDefinition="Safety characteristics of the device", formalDefinition="Safety characteristics of the device." ) 1956 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-safety") 1957 protected List<CodeableConcept> safety; 1958 1959 /** 1960 * Shelf Life and storage information. 1961 */ 1962 @Child(name = "shelfLifeStorage", type = {ProductShelfLife.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1963 @Description(shortDefinition="Shelf Life and storage information", formalDefinition="Shelf Life and storage information." ) 1964 protected List<ProductShelfLife> shelfLifeStorage; 1965 1966 /** 1967 * Dimensions, color etc. 1968 */ 1969 @Child(name = "physicalCharacteristics", type = {ProdCharacteristic.class}, order=10, min=0, max=1, modifier=false, summary=false) 1970 @Description(shortDefinition="Dimensions, color etc.", formalDefinition="Dimensions, color etc." ) 1971 protected ProdCharacteristic physicalCharacteristics; 1972 1973 /** 1974 * Language code for the human-readable text strings produced by the device (all supported). 1975 */ 1976 @Child(name = "languageCode", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1977 @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)." ) 1978 protected List<CodeableConcept> languageCode; 1979 1980 /** 1981 * Device capabilities. 1982 */ 1983 @Child(name = "capability", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1984 @Description(shortDefinition="Device capabilities", formalDefinition="Device capabilities." ) 1985 protected List<DeviceDefinitionCapabilityComponent> capability; 1986 1987 /** 1988 * The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties. 1989 */ 1990 @Child(name = "property", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1991 @Description(shortDefinition="The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties", formalDefinition="The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties." ) 1992 protected List<DeviceDefinitionPropertyComponent> property; 1993 1994 /** 1995 * An organization that is responsible for the provision and ongoing maintenance of the device. 1996 */ 1997 @Child(name = "owner", type = {Organization.class}, order=14, min=0, max=1, modifier=false, summary=false) 1998 @Description(shortDefinition="Organization responsible for device", formalDefinition="An organization that is responsible for the provision and ongoing maintenance of the device." ) 1999 protected Reference owner; 2000 2001 /** 2002 * The actual object that is the target of the reference (An organization that is responsible for the provision and ongoing maintenance of the device.) 2003 */ 2004 protected Organization ownerTarget; 2005 2006 /** 2007 * Contact details for an organization or a particular human that is responsible for the device. 2008 */ 2009 @Child(name = "contact", type = {ContactPoint.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2010 @Description(shortDefinition="Details for human/organization for support", formalDefinition="Contact details for an organization or a particular human that is responsible for the device." ) 2011 protected List<ContactPoint> contact; 2012 2013 /** 2014 * A network address on which the device may be contacted directly. 2015 */ 2016 @Child(name = "url", type = {UriType.class}, order=16, min=0, max=1, modifier=false, summary=false) 2017 @Description(shortDefinition="Network address to contact device", formalDefinition="A network address on which the device may be contacted directly." ) 2018 protected UriType url; 2019 2020 /** 2021 * Access to on-line information about the device. 2022 */ 2023 @Child(name = "onlineInformation", type = {UriType.class}, order=17, min=0, max=1, modifier=false, summary=false) 2024 @Description(shortDefinition="Access to on-line information", formalDefinition="Access to on-line information about the device." ) 2025 protected UriType onlineInformation; 2026 2027 /** 2028 * Descriptive information, usage information or implantation information that is not captured in an existing element. 2029 */ 2030 @Child(name = "note", type = {Annotation.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2031 @Description(shortDefinition="Device notes and comments", formalDefinition="Descriptive information, usage information or implantation information that is not captured in an existing element." ) 2032 protected List<Annotation> note; 2033 2034 /** 2035 * The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product). 2036 */ 2037 @Child(name = "quantity", type = {Quantity.class}, order=19, min=0, max=1, modifier=false, summary=false) 2038 @Description(shortDefinition="The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product)", formalDefinition="The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product)." ) 2039 protected Quantity quantity; 2040 2041 /** 2042 * The parent device it can be part of. 2043 */ 2044 @Child(name = "parentDevice", type = {DeviceDefinition.class}, order=20, min=0, max=1, modifier=false, summary=true) 2045 @Description(shortDefinition="The parent device it can be part of", formalDefinition="The parent device it can be part of." ) 2046 protected Reference parentDevice; 2047 2048 /** 2049 * The actual object that is the target of the reference (The parent device it can be part of.) 2050 */ 2051 protected DeviceDefinition parentDeviceTarget; 2052 2053 /** 2054 * A substance used to create the material(s) of which the device is made. 2055 */ 2056 @Child(name = "material", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2057 @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." ) 2058 protected List<DeviceDefinitionMaterialComponent> material; 2059 2060 private static final long serialVersionUID = -2041532433L; 2061 2062 /** 2063 * Constructor 2064 */ 2065 public DeviceDefinition() { 2066 super(); 2067 } 2068 2069 /** 2070 * @return {@link #identifier} (Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID.) 2071 */ 2072 public List<Identifier> getIdentifier() { 2073 if (this.identifier == null) 2074 this.identifier = new ArrayList<Identifier>(); 2075 return this.identifier; 2076 } 2077 2078 /** 2079 * @return Returns a reference to <code>this</code> for easy method chaining 2080 */ 2081 public DeviceDefinition setIdentifier(List<Identifier> theIdentifier) { 2082 this.identifier = theIdentifier; 2083 return this; 2084 } 2085 2086 public boolean hasIdentifier() { 2087 if (this.identifier == null) 2088 return false; 2089 for (Identifier item : this.identifier) 2090 if (!item.isEmpty()) 2091 return true; 2092 return false; 2093 } 2094 2095 public Identifier addIdentifier() { //3 2096 Identifier t = new Identifier(); 2097 if (this.identifier == null) 2098 this.identifier = new ArrayList<Identifier>(); 2099 this.identifier.add(t); 2100 return t; 2101 } 2102 2103 public DeviceDefinition addIdentifier(Identifier t) { //3 2104 if (t == null) 2105 return this; 2106 if (this.identifier == null) 2107 this.identifier = new ArrayList<Identifier>(); 2108 this.identifier.add(t); 2109 return this; 2110 } 2111 2112 /** 2113 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 2114 */ 2115 public Identifier getIdentifierFirstRep() { 2116 if (getIdentifier().isEmpty()) { 2117 addIdentifier(); 2118 } 2119 return getIdentifier().get(0); 2120 } 2121 2122 /** 2123 * @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.) 2124 */ 2125 public List<DeviceDefinitionUdiDeviceIdentifierComponent> getUdiDeviceIdentifier() { 2126 if (this.udiDeviceIdentifier == null) 2127 this.udiDeviceIdentifier = new ArrayList<DeviceDefinitionUdiDeviceIdentifierComponent>(); 2128 return this.udiDeviceIdentifier; 2129 } 2130 2131 /** 2132 * @return Returns a reference to <code>this</code> for easy method chaining 2133 */ 2134 public DeviceDefinition setUdiDeviceIdentifier(List<DeviceDefinitionUdiDeviceIdentifierComponent> theUdiDeviceIdentifier) { 2135 this.udiDeviceIdentifier = theUdiDeviceIdentifier; 2136 return this; 2137 } 2138 2139 public boolean hasUdiDeviceIdentifier() { 2140 if (this.udiDeviceIdentifier == null) 2141 return false; 2142 for (DeviceDefinitionUdiDeviceIdentifierComponent item : this.udiDeviceIdentifier) 2143 if (!item.isEmpty()) 2144 return true; 2145 return false; 2146 } 2147 2148 public DeviceDefinitionUdiDeviceIdentifierComponent addUdiDeviceIdentifier() { //3 2149 DeviceDefinitionUdiDeviceIdentifierComponent t = new DeviceDefinitionUdiDeviceIdentifierComponent(); 2150 if (this.udiDeviceIdentifier == null) 2151 this.udiDeviceIdentifier = new ArrayList<DeviceDefinitionUdiDeviceIdentifierComponent>(); 2152 this.udiDeviceIdentifier.add(t); 2153 return t; 2154 } 2155 2156 public DeviceDefinition addUdiDeviceIdentifier(DeviceDefinitionUdiDeviceIdentifierComponent t) { //3 2157 if (t == null) 2158 return this; 2159 if (this.udiDeviceIdentifier == null) 2160 this.udiDeviceIdentifier = new ArrayList<DeviceDefinitionUdiDeviceIdentifierComponent>(); 2161 this.udiDeviceIdentifier.add(t); 2162 return this; 2163 } 2164 2165 /** 2166 * @return The first repetition of repeating field {@link #udiDeviceIdentifier}, creating it if it does not already exist 2167 */ 2168 public DeviceDefinitionUdiDeviceIdentifierComponent getUdiDeviceIdentifierFirstRep() { 2169 if (getUdiDeviceIdentifier().isEmpty()) { 2170 addUdiDeviceIdentifier(); 2171 } 2172 return getUdiDeviceIdentifier().get(0); 2173 } 2174 2175 /** 2176 * @return {@link #manufacturer} (A name of the manufacturer.) 2177 */ 2178 public Type getManufacturer() { 2179 return this.manufacturer; 2180 } 2181 2182 /** 2183 * @return {@link #manufacturer} (A name of the manufacturer.) 2184 */ 2185 public StringType getManufacturerStringType() throws FHIRException { 2186 if (this.manufacturer == null) 2187 this.manufacturer = new StringType(); 2188 if (!(this.manufacturer instanceof StringType)) 2189 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.manufacturer.getClass().getName()+" was encountered"); 2190 return (StringType) this.manufacturer; 2191 } 2192 2193 public boolean hasManufacturerStringType() { 2194 return this != null && this.manufacturer instanceof StringType; 2195 } 2196 2197 /** 2198 * @return {@link #manufacturer} (A name of the manufacturer.) 2199 */ 2200 public Reference getManufacturerReference() throws FHIRException { 2201 if (this.manufacturer == null) 2202 this.manufacturer = new Reference(); 2203 if (!(this.manufacturer instanceof Reference)) 2204 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.manufacturer.getClass().getName()+" was encountered"); 2205 return (Reference) this.manufacturer; 2206 } 2207 2208 public boolean hasManufacturerReference() { 2209 return this != null && this.manufacturer instanceof Reference; 2210 } 2211 2212 public boolean hasManufacturer() { 2213 return this.manufacturer != null && !this.manufacturer.isEmpty(); 2214 } 2215 2216 /** 2217 * @param value {@link #manufacturer} (A name of the manufacturer.) 2218 */ 2219 public DeviceDefinition setManufacturer(Type value) { 2220 if (value != null && !(value instanceof StringType || value instanceof Reference)) 2221 throw new Error("Not the right type for DeviceDefinition.manufacturer[x]: "+value.fhirType()); 2222 this.manufacturer = value; 2223 return this; 2224 } 2225 2226 /** 2227 * @return {@link #deviceName} (A name given to the device to identify it.) 2228 */ 2229 public List<DeviceDefinitionDeviceNameComponent> getDeviceName() { 2230 if (this.deviceName == null) 2231 this.deviceName = new ArrayList<DeviceDefinitionDeviceNameComponent>(); 2232 return this.deviceName; 2233 } 2234 2235 /** 2236 * @return Returns a reference to <code>this</code> for easy method chaining 2237 */ 2238 public DeviceDefinition setDeviceName(List<DeviceDefinitionDeviceNameComponent> theDeviceName) { 2239 this.deviceName = theDeviceName; 2240 return this; 2241 } 2242 2243 public boolean hasDeviceName() { 2244 if (this.deviceName == null) 2245 return false; 2246 for (DeviceDefinitionDeviceNameComponent item : this.deviceName) 2247 if (!item.isEmpty()) 2248 return true; 2249 return false; 2250 } 2251 2252 public DeviceDefinitionDeviceNameComponent addDeviceName() { //3 2253 DeviceDefinitionDeviceNameComponent t = new DeviceDefinitionDeviceNameComponent(); 2254 if (this.deviceName == null) 2255 this.deviceName = new ArrayList<DeviceDefinitionDeviceNameComponent>(); 2256 this.deviceName.add(t); 2257 return t; 2258 } 2259 2260 public DeviceDefinition addDeviceName(DeviceDefinitionDeviceNameComponent t) { //3 2261 if (t == null) 2262 return this; 2263 if (this.deviceName == null) 2264 this.deviceName = new ArrayList<DeviceDefinitionDeviceNameComponent>(); 2265 this.deviceName.add(t); 2266 return this; 2267 } 2268 2269 /** 2270 * @return The first repetition of repeating field {@link #deviceName}, creating it if it does not already exist 2271 */ 2272 public DeviceDefinitionDeviceNameComponent getDeviceNameFirstRep() { 2273 if (getDeviceName().isEmpty()) { 2274 addDeviceName(); 2275 } 2276 return getDeviceName().get(0); 2277 } 2278 2279 /** 2280 * @return {@link #modelNumber} (The model number for the device.). This is the underlying object with id, value and extensions. The accessor "getModelNumber" gives direct access to the value 2281 */ 2282 public StringType getModelNumberElement() { 2283 if (this.modelNumber == null) 2284 if (Configuration.errorOnAutoCreate()) 2285 throw new Error("Attempt to auto-create DeviceDefinition.modelNumber"); 2286 else if (Configuration.doAutoCreate()) 2287 this.modelNumber = new StringType(); // bb 2288 return this.modelNumber; 2289 } 2290 2291 public boolean hasModelNumberElement() { 2292 return this.modelNumber != null && !this.modelNumber.isEmpty(); 2293 } 2294 2295 public boolean hasModelNumber() { 2296 return this.modelNumber != null && !this.modelNumber.isEmpty(); 2297 } 2298 2299 /** 2300 * @param value {@link #modelNumber} (The model number for the device.). This is the underlying object with id, value and extensions. The accessor "getModelNumber" gives direct access to the value 2301 */ 2302 public DeviceDefinition setModelNumberElement(StringType value) { 2303 this.modelNumber = value; 2304 return this; 2305 } 2306 2307 /** 2308 * @return The model number for the device. 2309 */ 2310 public String getModelNumber() { 2311 return this.modelNumber == null ? null : this.modelNumber.getValue(); 2312 } 2313 2314 /** 2315 * @param value The model number for the device. 2316 */ 2317 public DeviceDefinition setModelNumber(String value) { 2318 if (Utilities.noString(value)) 2319 this.modelNumber = null; 2320 else { 2321 if (this.modelNumber == null) 2322 this.modelNumber = new StringType(); 2323 this.modelNumber.setValue(value); 2324 } 2325 return this; 2326 } 2327 2328 /** 2329 * @return {@link #type} (What kind of device or device system this is.) 2330 */ 2331 public CodeableConcept getType() { 2332 if (this.type == null) 2333 if (Configuration.errorOnAutoCreate()) 2334 throw new Error("Attempt to auto-create DeviceDefinition.type"); 2335 else if (Configuration.doAutoCreate()) 2336 this.type = new CodeableConcept(); // cc 2337 return this.type; 2338 } 2339 2340 public boolean hasType() { 2341 return this.type != null && !this.type.isEmpty(); 2342 } 2343 2344 /** 2345 * @param value {@link #type} (What kind of device or device system this is.) 2346 */ 2347 public DeviceDefinition setType(CodeableConcept value) { 2348 this.type = value; 2349 return this; 2350 } 2351 2352 /** 2353 * @return {@link #specialization} (The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication.) 2354 */ 2355 public List<DeviceDefinitionSpecializationComponent> getSpecialization() { 2356 if (this.specialization == null) 2357 this.specialization = new ArrayList<DeviceDefinitionSpecializationComponent>(); 2358 return this.specialization; 2359 } 2360 2361 /** 2362 * @return Returns a reference to <code>this</code> for easy method chaining 2363 */ 2364 public DeviceDefinition setSpecialization(List<DeviceDefinitionSpecializationComponent> theSpecialization) { 2365 this.specialization = theSpecialization; 2366 return this; 2367 } 2368 2369 public boolean hasSpecialization() { 2370 if (this.specialization == null) 2371 return false; 2372 for (DeviceDefinitionSpecializationComponent item : this.specialization) 2373 if (!item.isEmpty()) 2374 return true; 2375 return false; 2376 } 2377 2378 public DeviceDefinitionSpecializationComponent addSpecialization() { //3 2379 DeviceDefinitionSpecializationComponent t = new DeviceDefinitionSpecializationComponent(); 2380 if (this.specialization == null) 2381 this.specialization = new ArrayList<DeviceDefinitionSpecializationComponent>(); 2382 this.specialization.add(t); 2383 return t; 2384 } 2385 2386 public DeviceDefinition addSpecialization(DeviceDefinitionSpecializationComponent t) { //3 2387 if (t == null) 2388 return this; 2389 if (this.specialization == null) 2390 this.specialization = new ArrayList<DeviceDefinitionSpecializationComponent>(); 2391 this.specialization.add(t); 2392 return this; 2393 } 2394 2395 /** 2396 * @return The first repetition of repeating field {@link #specialization}, creating it if it does not already exist 2397 */ 2398 public DeviceDefinitionSpecializationComponent getSpecializationFirstRep() { 2399 if (getSpecialization().isEmpty()) { 2400 addSpecialization(); 2401 } 2402 return getSpecialization().get(0); 2403 } 2404 2405 /** 2406 * @return {@link #version} (The available versions of the device, e.g., software versions.) 2407 */ 2408 public List<StringType> getVersion() { 2409 if (this.version == null) 2410 this.version = new ArrayList<StringType>(); 2411 return this.version; 2412 } 2413 2414 /** 2415 * @return Returns a reference to <code>this</code> for easy method chaining 2416 */ 2417 public DeviceDefinition setVersion(List<StringType> theVersion) { 2418 this.version = theVersion; 2419 return this; 2420 } 2421 2422 public boolean hasVersion() { 2423 if (this.version == null) 2424 return false; 2425 for (StringType item : this.version) 2426 if (!item.isEmpty()) 2427 return true; 2428 return false; 2429 } 2430 2431 /** 2432 * @return {@link #version} (The available versions of the device, e.g., software versions.) 2433 */ 2434 public StringType addVersionElement() {//2 2435 StringType t = new StringType(); 2436 if (this.version == null) 2437 this.version = new ArrayList<StringType>(); 2438 this.version.add(t); 2439 return t; 2440 } 2441 2442 /** 2443 * @param value {@link #version} (The available versions of the device, e.g., software versions.) 2444 */ 2445 public DeviceDefinition addVersion(String value) { //1 2446 StringType t = new StringType(); 2447 t.setValue(value); 2448 if (this.version == null) 2449 this.version = new ArrayList<StringType>(); 2450 this.version.add(t); 2451 return this; 2452 } 2453 2454 /** 2455 * @param value {@link #version} (The available versions of the device, e.g., software versions.) 2456 */ 2457 public boolean hasVersion(String value) { 2458 if (this.version == null) 2459 return false; 2460 for (StringType v : this.version) 2461 if (v.getValue().equals(value)) // string 2462 return true; 2463 return false; 2464 } 2465 2466 /** 2467 * @return {@link #safety} (Safety characteristics of the device.) 2468 */ 2469 public List<CodeableConcept> getSafety() { 2470 if (this.safety == null) 2471 this.safety = new ArrayList<CodeableConcept>(); 2472 return this.safety; 2473 } 2474 2475 /** 2476 * @return Returns a reference to <code>this</code> for easy method chaining 2477 */ 2478 public DeviceDefinition setSafety(List<CodeableConcept> theSafety) { 2479 this.safety = theSafety; 2480 return this; 2481 } 2482 2483 public boolean hasSafety() { 2484 if (this.safety == null) 2485 return false; 2486 for (CodeableConcept item : this.safety) 2487 if (!item.isEmpty()) 2488 return true; 2489 return false; 2490 } 2491 2492 public CodeableConcept addSafety() { //3 2493 CodeableConcept t = new CodeableConcept(); 2494 if (this.safety == null) 2495 this.safety = new ArrayList<CodeableConcept>(); 2496 this.safety.add(t); 2497 return t; 2498 } 2499 2500 public DeviceDefinition addSafety(CodeableConcept t) { //3 2501 if (t == null) 2502 return this; 2503 if (this.safety == null) 2504 this.safety = new ArrayList<CodeableConcept>(); 2505 this.safety.add(t); 2506 return this; 2507 } 2508 2509 /** 2510 * @return The first repetition of repeating field {@link #safety}, creating it if it does not already exist 2511 */ 2512 public CodeableConcept getSafetyFirstRep() { 2513 if (getSafety().isEmpty()) { 2514 addSafety(); 2515 } 2516 return getSafety().get(0); 2517 } 2518 2519 /** 2520 * @return {@link #shelfLifeStorage} (Shelf Life and storage information.) 2521 */ 2522 public List<ProductShelfLife> getShelfLifeStorage() { 2523 if (this.shelfLifeStorage == null) 2524 this.shelfLifeStorage = new ArrayList<ProductShelfLife>(); 2525 return this.shelfLifeStorage; 2526 } 2527 2528 /** 2529 * @return Returns a reference to <code>this</code> for easy method chaining 2530 */ 2531 public DeviceDefinition setShelfLifeStorage(List<ProductShelfLife> theShelfLifeStorage) { 2532 this.shelfLifeStorage = theShelfLifeStorage; 2533 return this; 2534 } 2535 2536 public boolean hasShelfLifeStorage() { 2537 if (this.shelfLifeStorage == null) 2538 return false; 2539 for (ProductShelfLife item : this.shelfLifeStorage) 2540 if (!item.isEmpty()) 2541 return true; 2542 return false; 2543 } 2544 2545 public ProductShelfLife addShelfLifeStorage() { //3 2546 ProductShelfLife t = new ProductShelfLife(); 2547 if (this.shelfLifeStorage == null) 2548 this.shelfLifeStorage = new ArrayList<ProductShelfLife>(); 2549 this.shelfLifeStorage.add(t); 2550 return t; 2551 } 2552 2553 public DeviceDefinition addShelfLifeStorage(ProductShelfLife t) { //3 2554 if (t == null) 2555 return this; 2556 if (this.shelfLifeStorage == null) 2557 this.shelfLifeStorage = new ArrayList<ProductShelfLife>(); 2558 this.shelfLifeStorage.add(t); 2559 return this; 2560 } 2561 2562 /** 2563 * @return The first repetition of repeating field {@link #shelfLifeStorage}, creating it if it does not already exist 2564 */ 2565 public ProductShelfLife getShelfLifeStorageFirstRep() { 2566 if (getShelfLifeStorage().isEmpty()) { 2567 addShelfLifeStorage(); 2568 } 2569 return getShelfLifeStorage().get(0); 2570 } 2571 2572 /** 2573 * @return {@link #physicalCharacteristics} (Dimensions, color etc.) 2574 */ 2575 public ProdCharacteristic getPhysicalCharacteristics() { 2576 if (this.physicalCharacteristics == null) 2577 if (Configuration.errorOnAutoCreate()) 2578 throw new Error("Attempt to auto-create DeviceDefinition.physicalCharacteristics"); 2579 else if (Configuration.doAutoCreate()) 2580 this.physicalCharacteristics = new ProdCharacteristic(); // cc 2581 return this.physicalCharacteristics; 2582 } 2583 2584 public boolean hasPhysicalCharacteristics() { 2585 return this.physicalCharacteristics != null && !this.physicalCharacteristics.isEmpty(); 2586 } 2587 2588 /** 2589 * @param value {@link #physicalCharacteristics} (Dimensions, color etc.) 2590 */ 2591 public DeviceDefinition setPhysicalCharacteristics(ProdCharacteristic value) { 2592 this.physicalCharacteristics = value; 2593 return this; 2594 } 2595 2596 /** 2597 * @return {@link #languageCode} (Language code for the human-readable text strings produced by the device (all supported).) 2598 */ 2599 public List<CodeableConcept> getLanguageCode() { 2600 if (this.languageCode == null) 2601 this.languageCode = new ArrayList<CodeableConcept>(); 2602 return this.languageCode; 2603 } 2604 2605 /** 2606 * @return Returns a reference to <code>this</code> for easy method chaining 2607 */ 2608 public DeviceDefinition setLanguageCode(List<CodeableConcept> theLanguageCode) { 2609 this.languageCode = theLanguageCode; 2610 return this; 2611 } 2612 2613 public boolean hasLanguageCode() { 2614 if (this.languageCode == null) 2615 return false; 2616 for (CodeableConcept item : this.languageCode) 2617 if (!item.isEmpty()) 2618 return true; 2619 return false; 2620 } 2621 2622 public CodeableConcept addLanguageCode() { //3 2623 CodeableConcept t = new CodeableConcept(); 2624 if (this.languageCode == null) 2625 this.languageCode = new ArrayList<CodeableConcept>(); 2626 this.languageCode.add(t); 2627 return t; 2628 } 2629 2630 public DeviceDefinition addLanguageCode(CodeableConcept t) { //3 2631 if (t == null) 2632 return this; 2633 if (this.languageCode == null) 2634 this.languageCode = new ArrayList<CodeableConcept>(); 2635 this.languageCode.add(t); 2636 return this; 2637 } 2638 2639 /** 2640 * @return The first repetition of repeating field {@link #languageCode}, creating it if it does not already exist 2641 */ 2642 public CodeableConcept getLanguageCodeFirstRep() { 2643 if (getLanguageCode().isEmpty()) { 2644 addLanguageCode(); 2645 } 2646 return getLanguageCode().get(0); 2647 } 2648 2649 /** 2650 * @return {@link #capability} (Device capabilities.) 2651 */ 2652 public List<DeviceDefinitionCapabilityComponent> getCapability() { 2653 if (this.capability == null) 2654 this.capability = new ArrayList<DeviceDefinitionCapabilityComponent>(); 2655 return this.capability; 2656 } 2657 2658 /** 2659 * @return Returns a reference to <code>this</code> for easy method chaining 2660 */ 2661 public DeviceDefinition setCapability(List<DeviceDefinitionCapabilityComponent> theCapability) { 2662 this.capability = theCapability; 2663 return this; 2664 } 2665 2666 public boolean hasCapability() { 2667 if (this.capability == null) 2668 return false; 2669 for (DeviceDefinitionCapabilityComponent item : this.capability) 2670 if (!item.isEmpty()) 2671 return true; 2672 return false; 2673 } 2674 2675 public DeviceDefinitionCapabilityComponent addCapability() { //3 2676 DeviceDefinitionCapabilityComponent t = new DeviceDefinitionCapabilityComponent(); 2677 if (this.capability == null) 2678 this.capability = new ArrayList<DeviceDefinitionCapabilityComponent>(); 2679 this.capability.add(t); 2680 return t; 2681 } 2682 2683 public DeviceDefinition addCapability(DeviceDefinitionCapabilityComponent t) { //3 2684 if (t == null) 2685 return this; 2686 if (this.capability == null) 2687 this.capability = new ArrayList<DeviceDefinitionCapabilityComponent>(); 2688 this.capability.add(t); 2689 return this; 2690 } 2691 2692 /** 2693 * @return The first repetition of repeating field {@link #capability}, creating it if it does not already exist 2694 */ 2695 public DeviceDefinitionCapabilityComponent getCapabilityFirstRep() { 2696 if (getCapability().isEmpty()) { 2697 addCapability(); 2698 } 2699 return getCapability().get(0); 2700 } 2701 2702 /** 2703 * @return {@link #property} (The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.) 2704 */ 2705 public List<DeviceDefinitionPropertyComponent> getProperty() { 2706 if (this.property == null) 2707 this.property = new ArrayList<DeviceDefinitionPropertyComponent>(); 2708 return this.property; 2709 } 2710 2711 /** 2712 * @return Returns a reference to <code>this</code> for easy method chaining 2713 */ 2714 public DeviceDefinition setProperty(List<DeviceDefinitionPropertyComponent> theProperty) { 2715 this.property = theProperty; 2716 return this; 2717 } 2718 2719 public boolean hasProperty() { 2720 if (this.property == null) 2721 return false; 2722 for (DeviceDefinitionPropertyComponent item : this.property) 2723 if (!item.isEmpty()) 2724 return true; 2725 return false; 2726 } 2727 2728 public DeviceDefinitionPropertyComponent addProperty() { //3 2729 DeviceDefinitionPropertyComponent t = new DeviceDefinitionPropertyComponent(); 2730 if (this.property == null) 2731 this.property = new ArrayList<DeviceDefinitionPropertyComponent>(); 2732 this.property.add(t); 2733 return t; 2734 } 2735 2736 public DeviceDefinition addProperty(DeviceDefinitionPropertyComponent t) { //3 2737 if (t == null) 2738 return this; 2739 if (this.property == null) 2740 this.property = new ArrayList<DeviceDefinitionPropertyComponent>(); 2741 this.property.add(t); 2742 return this; 2743 } 2744 2745 /** 2746 * @return The first repetition of repeating field {@link #property}, creating it if it does not already exist 2747 */ 2748 public DeviceDefinitionPropertyComponent getPropertyFirstRep() { 2749 if (getProperty().isEmpty()) { 2750 addProperty(); 2751 } 2752 return getProperty().get(0); 2753 } 2754 2755 /** 2756 * @return {@link #owner} (An organization that is responsible for the provision and ongoing maintenance of the device.) 2757 */ 2758 public Reference getOwner() { 2759 if (this.owner == null) 2760 if (Configuration.errorOnAutoCreate()) 2761 throw new Error("Attempt to auto-create DeviceDefinition.owner"); 2762 else if (Configuration.doAutoCreate()) 2763 this.owner = new Reference(); // cc 2764 return this.owner; 2765 } 2766 2767 public boolean hasOwner() { 2768 return this.owner != null && !this.owner.isEmpty(); 2769 } 2770 2771 /** 2772 * @param value {@link #owner} (An organization that is responsible for the provision and ongoing maintenance of the device.) 2773 */ 2774 public DeviceDefinition setOwner(Reference value) { 2775 this.owner = value; 2776 return this; 2777 } 2778 2779 /** 2780 * @return {@link #owner} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (An organization that is responsible for the provision and ongoing maintenance of the device.) 2781 */ 2782 public Organization getOwnerTarget() { 2783 if (this.ownerTarget == null) 2784 if (Configuration.errorOnAutoCreate()) 2785 throw new Error("Attempt to auto-create DeviceDefinition.owner"); 2786 else if (Configuration.doAutoCreate()) 2787 this.ownerTarget = new Organization(); // aa 2788 return this.ownerTarget; 2789 } 2790 2791 /** 2792 * @param value {@link #owner} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (An organization that is responsible for the provision and ongoing maintenance of the device.) 2793 */ 2794 public DeviceDefinition setOwnerTarget(Organization value) { 2795 this.ownerTarget = value; 2796 return this; 2797 } 2798 2799 /** 2800 * @return {@link #contact} (Contact details for an organization or a particular human that is responsible for the device.) 2801 */ 2802 public List<ContactPoint> getContact() { 2803 if (this.contact == null) 2804 this.contact = new ArrayList<ContactPoint>(); 2805 return this.contact; 2806 } 2807 2808 /** 2809 * @return Returns a reference to <code>this</code> for easy method chaining 2810 */ 2811 public DeviceDefinition setContact(List<ContactPoint> theContact) { 2812 this.contact = theContact; 2813 return this; 2814 } 2815 2816 public boolean hasContact() { 2817 if (this.contact == null) 2818 return false; 2819 for (ContactPoint item : this.contact) 2820 if (!item.isEmpty()) 2821 return true; 2822 return false; 2823 } 2824 2825 public ContactPoint addContact() { //3 2826 ContactPoint t = new ContactPoint(); 2827 if (this.contact == null) 2828 this.contact = new ArrayList<ContactPoint>(); 2829 this.contact.add(t); 2830 return t; 2831 } 2832 2833 public DeviceDefinition addContact(ContactPoint t) { //3 2834 if (t == null) 2835 return this; 2836 if (this.contact == null) 2837 this.contact = new ArrayList<ContactPoint>(); 2838 this.contact.add(t); 2839 return this; 2840 } 2841 2842 /** 2843 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 2844 */ 2845 public ContactPoint getContactFirstRep() { 2846 if (getContact().isEmpty()) { 2847 addContact(); 2848 } 2849 return getContact().get(0); 2850 } 2851 2852 /** 2853 * @return {@link #url} (A network address on which the device may be contacted directly.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2854 */ 2855 public UriType getUrlElement() { 2856 if (this.url == null) 2857 if (Configuration.errorOnAutoCreate()) 2858 throw new Error("Attempt to auto-create DeviceDefinition.url"); 2859 else if (Configuration.doAutoCreate()) 2860 this.url = new UriType(); // bb 2861 return this.url; 2862 } 2863 2864 public boolean hasUrlElement() { 2865 return this.url != null && !this.url.isEmpty(); 2866 } 2867 2868 public boolean hasUrl() { 2869 return this.url != null && !this.url.isEmpty(); 2870 } 2871 2872 /** 2873 * @param value {@link #url} (A network address on which the device may be contacted directly.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2874 */ 2875 public DeviceDefinition setUrlElement(UriType value) { 2876 this.url = value; 2877 return this; 2878 } 2879 2880 /** 2881 * @return A network address on which the device may be contacted directly. 2882 */ 2883 public String getUrl() { 2884 return this.url == null ? null : this.url.getValue(); 2885 } 2886 2887 /** 2888 * @param value A network address on which the device may be contacted directly. 2889 */ 2890 public DeviceDefinition setUrl(String value) { 2891 if (Utilities.noString(value)) 2892 this.url = null; 2893 else { 2894 if (this.url == null) 2895 this.url = new UriType(); 2896 this.url.setValue(value); 2897 } 2898 return this; 2899 } 2900 2901 /** 2902 * @return {@link #onlineInformation} (Access to on-line information about the device.). This is the underlying object with id, value and extensions. The accessor "getOnlineInformation" gives direct access to the value 2903 */ 2904 public UriType getOnlineInformationElement() { 2905 if (this.onlineInformation == null) 2906 if (Configuration.errorOnAutoCreate()) 2907 throw new Error("Attempt to auto-create DeviceDefinition.onlineInformation"); 2908 else if (Configuration.doAutoCreate()) 2909 this.onlineInformation = new UriType(); // bb 2910 return this.onlineInformation; 2911 } 2912 2913 public boolean hasOnlineInformationElement() { 2914 return this.onlineInformation != null && !this.onlineInformation.isEmpty(); 2915 } 2916 2917 public boolean hasOnlineInformation() { 2918 return this.onlineInformation != null && !this.onlineInformation.isEmpty(); 2919 } 2920 2921 /** 2922 * @param value {@link #onlineInformation} (Access to on-line information about the device.). This is the underlying object with id, value and extensions. The accessor "getOnlineInformation" gives direct access to the value 2923 */ 2924 public DeviceDefinition setOnlineInformationElement(UriType value) { 2925 this.onlineInformation = value; 2926 return this; 2927 } 2928 2929 /** 2930 * @return Access to on-line information about the device. 2931 */ 2932 public String getOnlineInformation() { 2933 return this.onlineInformation == null ? null : this.onlineInformation.getValue(); 2934 } 2935 2936 /** 2937 * @param value Access to on-line information about the device. 2938 */ 2939 public DeviceDefinition setOnlineInformation(String value) { 2940 if (Utilities.noString(value)) 2941 this.onlineInformation = null; 2942 else { 2943 if (this.onlineInformation == null) 2944 this.onlineInformation = new UriType(); 2945 this.onlineInformation.setValue(value); 2946 } 2947 return this; 2948 } 2949 2950 /** 2951 * @return {@link #note} (Descriptive information, usage information or implantation information that is not captured in an existing element.) 2952 */ 2953 public List<Annotation> getNote() { 2954 if (this.note == null) 2955 this.note = new ArrayList<Annotation>(); 2956 return this.note; 2957 } 2958 2959 /** 2960 * @return Returns a reference to <code>this</code> for easy method chaining 2961 */ 2962 public DeviceDefinition setNote(List<Annotation> theNote) { 2963 this.note = theNote; 2964 return this; 2965 } 2966 2967 public boolean hasNote() { 2968 if (this.note == null) 2969 return false; 2970 for (Annotation item : this.note) 2971 if (!item.isEmpty()) 2972 return true; 2973 return false; 2974 } 2975 2976 public Annotation addNote() { //3 2977 Annotation t = new Annotation(); 2978 if (this.note == null) 2979 this.note = new ArrayList<Annotation>(); 2980 this.note.add(t); 2981 return t; 2982 } 2983 2984 public DeviceDefinition addNote(Annotation t) { //3 2985 if (t == null) 2986 return this; 2987 if (this.note == null) 2988 this.note = new ArrayList<Annotation>(); 2989 this.note.add(t); 2990 return this; 2991 } 2992 2993 /** 2994 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 2995 */ 2996 public Annotation getNoteFirstRep() { 2997 if (getNote().isEmpty()) { 2998 addNote(); 2999 } 3000 return getNote().get(0); 3001 } 3002 3003 /** 3004 * @return {@link #quantity} (The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product).) 3005 */ 3006 public Quantity getQuantity() { 3007 if (this.quantity == null) 3008 if (Configuration.errorOnAutoCreate()) 3009 throw new Error("Attempt to auto-create DeviceDefinition.quantity"); 3010 else if (Configuration.doAutoCreate()) 3011 this.quantity = new Quantity(); // cc 3012 return this.quantity; 3013 } 3014 3015 public boolean hasQuantity() { 3016 return this.quantity != null && !this.quantity.isEmpty(); 3017 } 3018 3019 /** 3020 * @param value {@link #quantity} (The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product).) 3021 */ 3022 public DeviceDefinition setQuantity(Quantity value) { 3023 this.quantity = value; 3024 return this; 3025 } 3026 3027 /** 3028 * @return {@link #parentDevice} (The parent device it can be part of.) 3029 */ 3030 public Reference getParentDevice() { 3031 if (this.parentDevice == null) 3032 if (Configuration.errorOnAutoCreate()) 3033 throw new Error("Attempt to auto-create DeviceDefinition.parentDevice"); 3034 else if (Configuration.doAutoCreate()) 3035 this.parentDevice = new Reference(); // cc 3036 return this.parentDevice; 3037 } 3038 3039 public boolean hasParentDevice() { 3040 return this.parentDevice != null && !this.parentDevice.isEmpty(); 3041 } 3042 3043 /** 3044 * @param value {@link #parentDevice} (The parent device it can be part of.) 3045 */ 3046 public DeviceDefinition setParentDevice(Reference value) { 3047 this.parentDevice = value; 3048 return this; 3049 } 3050 3051 /** 3052 * @return {@link #parentDevice} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The parent device it can be part of.) 3053 */ 3054 public DeviceDefinition getParentDeviceTarget() { 3055 if (this.parentDeviceTarget == null) 3056 if (Configuration.errorOnAutoCreate()) 3057 throw new Error("Attempt to auto-create DeviceDefinition.parentDevice"); 3058 else if (Configuration.doAutoCreate()) 3059 this.parentDeviceTarget = new DeviceDefinition(); // aa 3060 return this.parentDeviceTarget; 3061 } 3062 3063 /** 3064 * @param value {@link #parentDevice} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The parent device it can be part of.) 3065 */ 3066 public DeviceDefinition setParentDeviceTarget(DeviceDefinition value) { 3067 this.parentDeviceTarget = value; 3068 return this; 3069 } 3070 3071 /** 3072 * @return {@link #material} (A substance used to create the material(s) of which the device is made.) 3073 */ 3074 public List<DeviceDefinitionMaterialComponent> getMaterial() { 3075 if (this.material == null) 3076 this.material = new ArrayList<DeviceDefinitionMaterialComponent>(); 3077 return this.material; 3078 } 3079 3080 /** 3081 * @return Returns a reference to <code>this</code> for easy method chaining 3082 */ 3083 public DeviceDefinition setMaterial(List<DeviceDefinitionMaterialComponent> theMaterial) { 3084 this.material = theMaterial; 3085 return this; 3086 } 3087 3088 public boolean hasMaterial() { 3089 if (this.material == null) 3090 return false; 3091 for (DeviceDefinitionMaterialComponent item : this.material) 3092 if (!item.isEmpty()) 3093 return true; 3094 return false; 3095 } 3096 3097 public DeviceDefinitionMaterialComponent addMaterial() { //3 3098 DeviceDefinitionMaterialComponent t = new DeviceDefinitionMaterialComponent(); 3099 if (this.material == null) 3100 this.material = new ArrayList<DeviceDefinitionMaterialComponent>(); 3101 this.material.add(t); 3102 return t; 3103 } 3104 3105 public DeviceDefinition addMaterial(DeviceDefinitionMaterialComponent t) { //3 3106 if (t == null) 3107 return this; 3108 if (this.material == null) 3109 this.material = new ArrayList<DeviceDefinitionMaterialComponent>(); 3110 this.material.add(t); 3111 return this; 3112 } 3113 3114 /** 3115 * @return The first repetition of repeating field {@link #material}, creating it if it does not already exist 3116 */ 3117 public DeviceDefinitionMaterialComponent getMaterialFirstRep() { 3118 if (getMaterial().isEmpty()) { 3119 addMaterial(); 3120 } 3121 return getMaterial().get(0); 3122 } 3123 3124 protected void listChildren(List<Property> children) { 3125 super.listChildren(children); 3126 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.", 0, java.lang.Integer.MAX_VALUE, identifier)); 3127 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)); 3128 children.add(new Property("manufacturer[x]", "string|Reference(Organization)", "A name of the manufacturer.", 0, 1, manufacturer)); 3129 children.add(new Property("deviceName", "", "A name given to the device to identify it.", 0, java.lang.Integer.MAX_VALUE, deviceName)); 3130 children.add(new Property("modelNumber", "string", "The model number for the device.", 0, 1, modelNumber)); 3131 children.add(new Property("type", "CodeableConcept", "What kind of device or device system this is.", 0, 1, type)); 3132 children.add(new Property("specialization", "", "The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication.", 0, java.lang.Integer.MAX_VALUE, specialization)); 3133 children.add(new Property("version", "string", "The available versions of the device, e.g., software versions.", 0, java.lang.Integer.MAX_VALUE, version)); 3134 children.add(new Property("safety", "CodeableConcept", "Safety characteristics of the device.", 0, java.lang.Integer.MAX_VALUE, safety)); 3135 children.add(new Property("shelfLifeStorage", "ProductShelfLife", "Shelf Life and storage information.", 0, java.lang.Integer.MAX_VALUE, shelfLifeStorage)); 3136 children.add(new Property("physicalCharacteristics", "ProdCharacteristic", "Dimensions, color etc.", 0, 1, physicalCharacteristics)); 3137 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)); 3138 children.add(new Property("capability", "", "Device capabilities.", 0, java.lang.Integer.MAX_VALUE, capability)); 3139 children.add(new Property("property", "", "The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.", 0, java.lang.Integer.MAX_VALUE, property)); 3140 children.add(new Property("owner", "Reference(Organization)", "An organization that is responsible for the provision and ongoing maintenance of the device.", 0, 1, owner)); 3141 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)); 3142 children.add(new Property("url", "uri", "A network address on which the device may be contacted directly.", 0, 1, url)); 3143 children.add(new Property("onlineInformation", "uri", "Access to on-line information about the device.", 0, 1, onlineInformation)); 3144 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)); 3145 children.add(new Property("quantity", "Quantity", "The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product).", 0, 1, quantity)); 3146 children.add(new Property("parentDevice", "Reference(DeviceDefinition)", "The parent device it can be part of.", 0, 1, parentDevice)); 3147 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)); 3148 } 3149 3150 @Override 3151 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3152 switch (_hash) { 3153 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.", 0, java.lang.Integer.MAX_VALUE, identifier); 3154 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); 3155 case 418079503: /*manufacturer[x]*/ return new Property("manufacturer[x]", "string|Reference(Organization)", "A name of the manufacturer.", 0, 1, manufacturer); 3156 case -1969347631: /*manufacturer*/ return new Property("manufacturer[x]", "string|Reference(Organization)", "A name of the manufacturer.", 0, 1, manufacturer); 3157 case -630681790: /*manufacturerString*/ return new Property("manufacturer[x]", "string|Reference(Organization)", "A name of the manufacturer.", 0, 1, manufacturer); 3158 case 1104934522: /*manufacturerReference*/ return new Property("manufacturer[x]", "string|Reference(Organization)", "A name of the manufacturer.", 0, 1, manufacturer); 3159 case 780988929: /*deviceName*/ return new Property("deviceName", "", "A name given to the device to identify it.", 0, java.lang.Integer.MAX_VALUE, deviceName); 3160 case 346619858: /*modelNumber*/ return new Property("modelNumber", "string", "The model number for the device.", 0, 1, modelNumber); 3161 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "What kind of device or device system this is.", 0, 1, type); 3162 case 682815883: /*specialization*/ return new Property("specialization", "", "The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication.", 0, java.lang.Integer.MAX_VALUE, specialization); 3163 case 351608024: /*version*/ return new Property("version", "string", "The available versions of the device, e.g., software versions.", 0, java.lang.Integer.MAX_VALUE, version); 3164 case -909893934: /*safety*/ return new Property("safety", "CodeableConcept", "Safety characteristics of the device.", 0, java.lang.Integer.MAX_VALUE, safety); 3165 case 172049237: /*shelfLifeStorage*/ return new Property("shelfLifeStorage", "ProductShelfLife", "Shelf Life and storage information.", 0, java.lang.Integer.MAX_VALUE, shelfLifeStorage); 3166 case -1599676319: /*physicalCharacteristics*/ return new Property("physicalCharacteristics", "ProdCharacteristic", "Dimensions, color etc.", 0, 1, physicalCharacteristics); 3167 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); 3168 case -783669992: /*capability*/ return new Property("capability", "", "Device capabilities.", 0, java.lang.Integer.MAX_VALUE, capability); 3169 case -993141291: /*property*/ return new Property("property", "", "The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.", 0, java.lang.Integer.MAX_VALUE, property); 3170 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); 3171 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); 3172 case 116079: /*url*/ return new Property("url", "uri", "A network address on which the device may be contacted directly.", 0, 1, url); 3173 case -788511527: /*onlineInformation*/ return new Property("onlineInformation", "uri", "Access to on-line information about the device.", 0, 1, onlineInformation); 3174 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); 3175 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product).", 0, 1, quantity); 3176 case 620260256: /*parentDevice*/ return new Property("parentDevice", "Reference(DeviceDefinition)", "The parent device it can be part of.", 0, 1, parentDevice); 3177 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); 3178 default: return super.getNamedProperty(_hash, _name, _checkValid); 3179 } 3180 3181 } 3182 3183 @Override 3184 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3185 switch (hash) { 3186 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 3187 case -99121287: /*udiDeviceIdentifier*/ return this.udiDeviceIdentifier == null ? new Base[0] : this.udiDeviceIdentifier.toArray(new Base[this.udiDeviceIdentifier.size()]); // DeviceDefinitionUdiDeviceIdentifierComponent 3188 case -1969347631: /*manufacturer*/ return this.manufacturer == null ? new Base[0] : new Base[] {this.manufacturer}; // Type 3189 case 780988929: /*deviceName*/ return this.deviceName == null ? new Base[0] : this.deviceName.toArray(new Base[this.deviceName.size()]); // DeviceDefinitionDeviceNameComponent 3190 case 346619858: /*modelNumber*/ return this.modelNumber == null ? new Base[0] : new Base[] {this.modelNumber}; // StringType 3191 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3192 case 682815883: /*specialization*/ return this.specialization == null ? new Base[0] : this.specialization.toArray(new Base[this.specialization.size()]); // DeviceDefinitionSpecializationComponent 3193 case 351608024: /*version*/ return this.version == null ? new Base[0] : this.version.toArray(new Base[this.version.size()]); // StringType 3194 case -909893934: /*safety*/ return this.safety == null ? new Base[0] : this.safety.toArray(new Base[this.safety.size()]); // CodeableConcept 3195 case 172049237: /*shelfLifeStorage*/ return this.shelfLifeStorage == null ? new Base[0] : this.shelfLifeStorage.toArray(new Base[this.shelfLifeStorage.size()]); // ProductShelfLife 3196 case -1599676319: /*physicalCharacteristics*/ return this.physicalCharacteristics == null ? new Base[0] : new Base[] {this.physicalCharacteristics}; // ProdCharacteristic 3197 case -2092349083: /*languageCode*/ return this.languageCode == null ? new Base[0] : this.languageCode.toArray(new Base[this.languageCode.size()]); // CodeableConcept 3198 case -783669992: /*capability*/ return this.capability == null ? new Base[0] : this.capability.toArray(new Base[this.capability.size()]); // DeviceDefinitionCapabilityComponent 3199 case -993141291: /*property*/ return this.property == null ? new Base[0] : this.property.toArray(new Base[this.property.size()]); // DeviceDefinitionPropertyComponent 3200 case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference 3201 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactPoint 3202 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 3203 case -788511527: /*onlineInformation*/ return this.onlineInformation == null ? new Base[0] : new Base[] {this.onlineInformation}; // UriType 3204 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 3205 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 3206 case 620260256: /*parentDevice*/ return this.parentDevice == null ? new Base[0] : new Base[] {this.parentDevice}; // Reference 3207 case 299066663: /*material*/ return this.material == null ? new Base[0] : this.material.toArray(new Base[this.material.size()]); // DeviceDefinitionMaterialComponent 3208 default: return super.getProperty(hash, name, checkValid); 3209 } 3210 3211 } 3212 3213 @Override 3214 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3215 switch (hash) { 3216 case -1618432855: // identifier 3217 this.getIdentifier().add(castToIdentifier(value)); // Identifier 3218 return value; 3219 case -99121287: // udiDeviceIdentifier 3220 this.getUdiDeviceIdentifier().add((DeviceDefinitionUdiDeviceIdentifierComponent) value); // DeviceDefinitionUdiDeviceIdentifierComponent 3221 return value; 3222 case -1969347631: // manufacturer 3223 this.manufacturer = castToType(value); // Type 3224 return value; 3225 case 780988929: // deviceName 3226 this.getDeviceName().add((DeviceDefinitionDeviceNameComponent) value); // DeviceDefinitionDeviceNameComponent 3227 return value; 3228 case 346619858: // modelNumber 3229 this.modelNumber = castToString(value); // StringType 3230 return value; 3231 case 3575610: // type 3232 this.type = castToCodeableConcept(value); // CodeableConcept 3233 return value; 3234 case 682815883: // specialization 3235 this.getSpecialization().add((DeviceDefinitionSpecializationComponent) value); // DeviceDefinitionSpecializationComponent 3236 return value; 3237 case 351608024: // version 3238 this.getVersion().add(castToString(value)); // StringType 3239 return value; 3240 case -909893934: // safety 3241 this.getSafety().add(castToCodeableConcept(value)); // CodeableConcept 3242 return value; 3243 case 172049237: // shelfLifeStorage 3244 this.getShelfLifeStorage().add(castToProductShelfLife(value)); // ProductShelfLife 3245 return value; 3246 case -1599676319: // physicalCharacteristics 3247 this.physicalCharacteristics = castToProdCharacteristic(value); // ProdCharacteristic 3248 return value; 3249 case -2092349083: // languageCode 3250 this.getLanguageCode().add(castToCodeableConcept(value)); // CodeableConcept 3251 return value; 3252 case -783669992: // capability 3253 this.getCapability().add((DeviceDefinitionCapabilityComponent) value); // DeviceDefinitionCapabilityComponent 3254 return value; 3255 case -993141291: // property 3256 this.getProperty().add((DeviceDefinitionPropertyComponent) value); // DeviceDefinitionPropertyComponent 3257 return value; 3258 case 106164915: // owner 3259 this.owner = castToReference(value); // Reference 3260 return value; 3261 case 951526432: // contact 3262 this.getContact().add(castToContactPoint(value)); // ContactPoint 3263 return value; 3264 case 116079: // url 3265 this.url = castToUri(value); // UriType 3266 return value; 3267 case -788511527: // onlineInformation 3268 this.onlineInformation = castToUri(value); // UriType 3269 return value; 3270 case 3387378: // note 3271 this.getNote().add(castToAnnotation(value)); // Annotation 3272 return value; 3273 case -1285004149: // quantity 3274 this.quantity = castToQuantity(value); // Quantity 3275 return value; 3276 case 620260256: // parentDevice 3277 this.parentDevice = castToReference(value); // Reference 3278 return value; 3279 case 299066663: // material 3280 this.getMaterial().add((DeviceDefinitionMaterialComponent) value); // DeviceDefinitionMaterialComponent 3281 return value; 3282 default: return super.setProperty(hash, name, value); 3283 } 3284 3285 } 3286 3287 @Override 3288 public Base setProperty(String name, Base value) throws FHIRException { 3289 if (name.equals("identifier")) { 3290 this.getIdentifier().add(castToIdentifier(value)); 3291 } else if (name.equals("udiDeviceIdentifier")) { 3292 this.getUdiDeviceIdentifier().add((DeviceDefinitionUdiDeviceIdentifierComponent) value); 3293 } else if (name.equals("manufacturer[x]")) { 3294 this.manufacturer = castToType(value); // Type 3295 } else if (name.equals("deviceName")) { 3296 this.getDeviceName().add((DeviceDefinitionDeviceNameComponent) value); 3297 } else if (name.equals("modelNumber")) { 3298 this.modelNumber = castToString(value); // StringType 3299 } else if (name.equals("type")) { 3300 this.type = castToCodeableConcept(value); // CodeableConcept 3301 } else if (name.equals("specialization")) { 3302 this.getSpecialization().add((DeviceDefinitionSpecializationComponent) value); 3303 } else if (name.equals("version")) { 3304 this.getVersion().add(castToString(value)); 3305 } else if (name.equals("safety")) { 3306 this.getSafety().add(castToCodeableConcept(value)); 3307 } else if (name.equals("shelfLifeStorage")) { 3308 this.getShelfLifeStorage().add(castToProductShelfLife(value)); 3309 } else if (name.equals("physicalCharacteristics")) { 3310 this.physicalCharacteristics = castToProdCharacteristic(value); // ProdCharacteristic 3311 } else if (name.equals("languageCode")) { 3312 this.getLanguageCode().add(castToCodeableConcept(value)); 3313 } else if (name.equals("capability")) { 3314 this.getCapability().add((DeviceDefinitionCapabilityComponent) value); 3315 } else if (name.equals("property")) { 3316 this.getProperty().add((DeviceDefinitionPropertyComponent) value); 3317 } else if (name.equals("owner")) { 3318 this.owner = castToReference(value); // Reference 3319 } else if (name.equals("contact")) { 3320 this.getContact().add(castToContactPoint(value)); 3321 } else if (name.equals("url")) { 3322 this.url = castToUri(value); // UriType 3323 } else if (name.equals("onlineInformation")) { 3324 this.onlineInformation = castToUri(value); // UriType 3325 } else if (name.equals("note")) { 3326 this.getNote().add(castToAnnotation(value)); 3327 } else if (name.equals("quantity")) { 3328 this.quantity = castToQuantity(value); // Quantity 3329 } else if (name.equals("parentDevice")) { 3330 this.parentDevice = castToReference(value); // Reference 3331 } else if (name.equals("material")) { 3332 this.getMaterial().add((DeviceDefinitionMaterialComponent) value); 3333 } else 3334 return super.setProperty(name, value); 3335 return value; 3336 } 3337 3338 @Override 3339 public Base makeProperty(int hash, String name) throws FHIRException { 3340 switch (hash) { 3341 case -1618432855: return addIdentifier(); 3342 case -99121287: return addUdiDeviceIdentifier(); 3343 case 418079503: return getManufacturer(); 3344 case -1969347631: return getManufacturer(); 3345 case 780988929: return addDeviceName(); 3346 case 346619858: return getModelNumberElement(); 3347 case 3575610: return getType(); 3348 case 682815883: return addSpecialization(); 3349 case 351608024: return addVersionElement(); 3350 case -909893934: return addSafety(); 3351 case 172049237: return addShelfLifeStorage(); 3352 case -1599676319: return getPhysicalCharacteristics(); 3353 case -2092349083: return addLanguageCode(); 3354 case -783669992: return addCapability(); 3355 case -993141291: return addProperty(); 3356 case 106164915: return getOwner(); 3357 case 951526432: return addContact(); 3358 case 116079: return getUrlElement(); 3359 case -788511527: return getOnlineInformationElement(); 3360 case 3387378: return addNote(); 3361 case -1285004149: return getQuantity(); 3362 case 620260256: return getParentDevice(); 3363 case 299066663: return addMaterial(); 3364 default: return super.makeProperty(hash, name); 3365 } 3366 3367 } 3368 3369 @Override 3370 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3371 switch (hash) { 3372 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3373 case -99121287: /*udiDeviceIdentifier*/ return new String[] {}; 3374 case -1969347631: /*manufacturer*/ return new String[] {"string", "Reference"}; 3375 case 780988929: /*deviceName*/ return new String[] {}; 3376 case 346619858: /*modelNumber*/ return new String[] {"string"}; 3377 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 3378 case 682815883: /*specialization*/ return new String[] {}; 3379 case 351608024: /*version*/ return new String[] {"string"}; 3380 case -909893934: /*safety*/ return new String[] {"CodeableConcept"}; 3381 case 172049237: /*shelfLifeStorage*/ return new String[] {"ProductShelfLife"}; 3382 case -1599676319: /*physicalCharacteristics*/ return new String[] {"ProdCharacteristic"}; 3383 case -2092349083: /*languageCode*/ return new String[] {"CodeableConcept"}; 3384 case -783669992: /*capability*/ return new String[] {}; 3385 case -993141291: /*property*/ return new String[] {}; 3386 case 106164915: /*owner*/ return new String[] {"Reference"}; 3387 case 951526432: /*contact*/ return new String[] {"ContactPoint"}; 3388 case 116079: /*url*/ return new String[] {"uri"}; 3389 case -788511527: /*onlineInformation*/ return new String[] {"uri"}; 3390 case 3387378: /*note*/ return new String[] {"Annotation"}; 3391 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 3392 case 620260256: /*parentDevice*/ return new String[] {"Reference"}; 3393 case 299066663: /*material*/ return new String[] {}; 3394 default: return super.getTypesForProperty(hash, name); 3395 } 3396 3397 } 3398 3399 @Override 3400 public Base addChild(String name) throws FHIRException { 3401 if (name.equals("identifier")) { 3402 return addIdentifier(); 3403 } 3404 else if (name.equals("udiDeviceIdentifier")) { 3405 return addUdiDeviceIdentifier(); 3406 } 3407 else if (name.equals("manufacturerString")) { 3408 this.manufacturer = new StringType(); 3409 return this.manufacturer; 3410 } 3411 else if (name.equals("manufacturerReference")) { 3412 this.manufacturer = new Reference(); 3413 return this.manufacturer; 3414 } 3415 else if (name.equals("deviceName")) { 3416 return addDeviceName(); 3417 } 3418 else if (name.equals("modelNumber")) { 3419 throw new FHIRException("Cannot call addChild on a primitive type DeviceDefinition.modelNumber"); 3420 } 3421 else if (name.equals("type")) { 3422 this.type = new CodeableConcept(); 3423 return this.type; 3424 } 3425 else if (name.equals("specialization")) { 3426 return addSpecialization(); 3427 } 3428 else if (name.equals("version")) { 3429 throw new FHIRException("Cannot call addChild on a primitive type DeviceDefinition.version"); 3430 } 3431 else if (name.equals("safety")) { 3432 return addSafety(); 3433 } 3434 else if (name.equals("shelfLifeStorage")) { 3435 return addShelfLifeStorage(); 3436 } 3437 else if (name.equals("physicalCharacteristics")) { 3438 this.physicalCharacteristics = new ProdCharacteristic(); 3439 return this.physicalCharacteristics; 3440 } 3441 else if (name.equals("languageCode")) { 3442 return addLanguageCode(); 3443 } 3444 else if (name.equals("capability")) { 3445 return addCapability(); 3446 } 3447 else if (name.equals("property")) { 3448 return addProperty(); 3449 } 3450 else if (name.equals("owner")) { 3451 this.owner = new Reference(); 3452 return this.owner; 3453 } 3454 else if (name.equals("contact")) { 3455 return addContact(); 3456 } 3457 else if (name.equals("url")) { 3458 throw new FHIRException("Cannot call addChild on a primitive type DeviceDefinition.url"); 3459 } 3460 else if (name.equals("onlineInformation")) { 3461 throw new FHIRException("Cannot call addChild on a primitive type DeviceDefinition.onlineInformation"); 3462 } 3463 else if (name.equals("note")) { 3464 return addNote(); 3465 } 3466 else if (name.equals("quantity")) { 3467 this.quantity = new Quantity(); 3468 return this.quantity; 3469 } 3470 else if (name.equals("parentDevice")) { 3471 this.parentDevice = new Reference(); 3472 return this.parentDevice; 3473 } 3474 else if (name.equals("material")) { 3475 return addMaterial(); 3476 } 3477 else 3478 return super.addChild(name); 3479 } 3480 3481 public String fhirType() { 3482 return "DeviceDefinition"; 3483 3484 } 3485 3486 public DeviceDefinition copy() { 3487 DeviceDefinition dst = new DeviceDefinition(); 3488 copyValues(dst); 3489 if (identifier != null) { 3490 dst.identifier = new ArrayList<Identifier>(); 3491 for (Identifier i : identifier) 3492 dst.identifier.add(i.copy()); 3493 }; 3494 if (udiDeviceIdentifier != null) { 3495 dst.udiDeviceIdentifier = new ArrayList<DeviceDefinitionUdiDeviceIdentifierComponent>(); 3496 for (DeviceDefinitionUdiDeviceIdentifierComponent i : udiDeviceIdentifier) 3497 dst.udiDeviceIdentifier.add(i.copy()); 3498 }; 3499 dst.manufacturer = manufacturer == null ? null : manufacturer.copy(); 3500 if (deviceName != null) { 3501 dst.deviceName = new ArrayList<DeviceDefinitionDeviceNameComponent>(); 3502 for (DeviceDefinitionDeviceNameComponent i : deviceName) 3503 dst.deviceName.add(i.copy()); 3504 }; 3505 dst.modelNumber = modelNumber == null ? null : modelNumber.copy(); 3506 dst.type = type == null ? null : type.copy(); 3507 if (specialization != null) { 3508 dst.specialization = new ArrayList<DeviceDefinitionSpecializationComponent>(); 3509 for (DeviceDefinitionSpecializationComponent i : specialization) 3510 dst.specialization.add(i.copy()); 3511 }; 3512 if (version != null) { 3513 dst.version = new ArrayList<StringType>(); 3514 for (StringType i : version) 3515 dst.version.add(i.copy()); 3516 }; 3517 if (safety != null) { 3518 dst.safety = new ArrayList<CodeableConcept>(); 3519 for (CodeableConcept i : safety) 3520 dst.safety.add(i.copy()); 3521 }; 3522 if (shelfLifeStorage != null) { 3523 dst.shelfLifeStorage = new ArrayList<ProductShelfLife>(); 3524 for (ProductShelfLife i : shelfLifeStorage) 3525 dst.shelfLifeStorage.add(i.copy()); 3526 }; 3527 dst.physicalCharacteristics = physicalCharacteristics == null ? null : physicalCharacteristics.copy(); 3528 if (languageCode != null) { 3529 dst.languageCode = new ArrayList<CodeableConcept>(); 3530 for (CodeableConcept i : languageCode) 3531 dst.languageCode.add(i.copy()); 3532 }; 3533 if (capability != null) { 3534 dst.capability = new ArrayList<DeviceDefinitionCapabilityComponent>(); 3535 for (DeviceDefinitionCapabilityComponent i : capability) 3536 dst.capability.add(i.copy()); 3537 }; 3538 if (property != null) { 3539 dst.property = new ArrayList<DeviceDefinitionPropertyComponent>(); 3540 for (DeviceDefinitionPropertyComponent i : property) 3541 dst.property.add(i.copy()); 3542 }; 3543 dst.owner = owner == null ? null : owner.copy(); 3544 if (contact != null) { 3545 dst.contact = new ArrayList<ContactPoint>(); 3546 for (ContactPoint i : contact) 3547 dst.contact.add(i.copy()); 3548 }; 3549 dst.url = url == null ? null : url.copy(); 3550 dst.onlineInformation = onlineInformation == null ? null : onlineInformation.copy(); 3551 if (note != null) { 3552 dst.note = new ArrayList<Annotation>(); 3553 for (Annotation i : note) 3554 dst.note.add(i.copy()); 3555 }; 3556 dst.quantity = quantity == null ? null : quantity.copy(); 3557 dst.parentDevice = parentDevice == null ? null : parentDevice.copy(); 3558 if (material != null) { 3559 dst.material = new ArrayList<DeviceDefinitionMaterialComponent>(); 3560 for (DeviceDefinitionMaterialComponent i : material) 3561 dst.material.add(i.copy()); 3562 }; 3563 return dst; 3564 } 3565 3566 protected DeviceDefinition typedCopy() { 3567 return copy(); 3568 } 3569 3570 @Override 3571 public boolean equalsDeep(Base other_) { 3572 if (!super.equalsDeep(other_)) 3573 return false; 3574 if (!(other_ instanceof DeviceDefinition)) 3575 return false; 3576 DeviceDefinition o = (DeviceDefinition) other_; 3577 return compareDeep(identifier, o.identifier, true) && compareDeep(udiDeviceIdentifier, o.udiDeviceIdentifier, true) 3578 && compareDeep(manufacturer, o.manufacturer, true) && compareDeep(deviceName, o.deviceName, true) 3579 && compareDeep(modelNumber, o.modelNumber, true) && compareDeep(type, o.type, true) && compareDeep(specialization, o.specialization, true) 3580 && compareDeep(version, o.version, true) && compareDeep(safety, o.safety, true) && compareDeep(shelfLifeStorage, o.shelfLifeStorage, true) 3581 && compareDeep(physicalCharacteristics, o.physicalCharacteristics, true) && compareDeep(languageCode, o.languageCode, true) 3582 && compareDeep(capability, o.capability, true) && compareDeep(property, o.property, true) && compareDeep(owner, o.owner, true) 3583 && compareDeep(contact, o.contact, true) && compareDeep(url, o.url, true) && compareDeep(onlineInformation, o.onlineInformation, true) 3584 && compareDeep(note, o.note, true) && compareDeep(quantity, o.quantity, true) && compareDeep(parentDevice, o.parentDevice, true) 3585 && compareDeep(material, o.material, true); 3586 } 3587 3588 @Override 3589 public boolean equalsShallow(Base other_) { 3590 if (!super.equalsShallow(other_)) 3591 return false; 3592 if (!(other_ instanceof DeviceDefinition)) 3593 return false; 3594 DeviceDefinition o = (DeviceDefinition) other_; 3595 return compareValues(modelNumber, o.modelNumber, true) && compareValues(version, o.version, true) && compareValues(url, o.url, true) 3596 && compareValues(onlineInformation, o.onlineInformation, true); 3597 } 3598 3599 public boolean isEmpty() { 3600 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, udiDeviceIdentifier 3601 , manufacturer, deviceName, modelNumber, type, specialization, version, safety 3602 , shelfLifeStorage, physicalCharacteristics, languageCode, capability, property, owner 3603 , contact, url, onlineInformation, note, quantity, parentDevice, material); 3604 } 3605 3606 @Override 3607 public ResourceType getResourceType() { 3608 return ResourceType.DeviceDefinition; 3609 } 3610 3611 /** 3612 * Search parameter: <b>parent</b> 3613 * <p> 3614 * Description: <b>The parent DeviceDefinition resource</b><br> 3615 * Type: <b>reference</b><br> 3616 * Path: <b>DeviceDefinition.parentDevice</b><br> 3617 * </p> 3618 */ 3619 @SearchParamDefinition(name="parent", path="DeviceDefinition.parentDevice", description="The parent DeviceDefinition resource", type="reference", target={DeviceDefinition.class } ) 3620 public static final String SP_PARENT = "parent"; 3621 /** 3622 * <b>Fluent Client</b> search parameter constant for <b>parent</b> 3623 * <p> 3624 * Description: <b>The parent DeviceDefinition resource</b><br> 3625 * Type: <b>reference</b><br> 3626 * Path: <b>DeviceDefinition.parentDevice</b><br> 3627 * </p> 3628 */ 3629 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARENT); 3630 3631/** 3632 * Constant for fluent queries to be used to add include statements. Specifies 3633 * the path value of "<b>DeviceDefinition:parent</b>". 3634 */ 3635 public static final ca.uhn.fhir.model.api.Include INCLUDE_PARENT = new ca.uhn.fhir.model.api.Include("DeviceDefinition:parent").toLocked(); 3636 3637 /** 3638 * Search parameter: <b>identifier</b> 3639 * <p> 3640 * Description: <b>The identifier of the component</b><br> 3641 * Type: <b>token</b><br> 3642 * Path: <b>DeviceDefinition.identifier</b><br> 3643 * </p> 3644 */ 3645 @SearchParamDefinition(name="identifier", path="DeviceDefinition.identifier", description="The identifier of the component", type="token" ) 3646 public static final String SP_IDENTIFIER = "identifier"; 3647 /** 3648 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 3649 * <p> 3650 * Description: <b>The identifier of the component</b><br> 3651 * Type: <b>token</b><br> 3652 * Path: <b>DeviceDefinition.identifier</b><br> 3653 * </p> 3654 */ 3655 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 3656 3657 /** 3658 * Search parameter: <b>type</b> 3659 * <p> 3660 * Description: <b>The device component type</b><br> 3661 * Type: <b>token</b><br> 3662 * Path: <b>DeviceDefinition.type</b><br> 3663 * </p> 3664 */ 3665 @SearchParamDefinition(name="type", path="DeviceDefinition.type", description="The device component type", type="token" ) 3666 public static final String SP_TYPE = "type"; 3667 /** 3668 * <b>Fluent Client</b> search parameter constant for <b>type</b> 3669 * <p> 3670 * Description: <b>The device component type</b><br> 3671 * Type: <b>token</b><br> 3672 * Path: <b>DeviceDefinition.type</b><br> 3673 * </p> 3674 */ 3675 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 3676 3677 3678} 3679