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