001package org.hl7.fhir.r4b.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r4b.model.Enumerations.*; 039import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.ICompositeType; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.ChildOrder; 047import ca.uhn.fhir.model.api.annotation.Description; 048import ca.uhn.fhir.model.api.annotation.Block; 049 050/** 051 * A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. 052 */ 053@ResourceDef(name="Device", profile="http://hl7.org/fhir/StructureDefinition/Device") 054public class Device extends DomainResource { 055 056 public enum FHIRDeviceStatus { 057 /** 058 * The device is available for use. Note: For *implanted devices* this means that the device is implanted in the patient. 059 */ 060 ACTIVE, 061 /** 062 * The device is no longer available for use (e.g. lost, expired, damaged). Note: For *implanted devices* this means that the device has been removed from the patient. 063 */ 064 INACTIVE, 065 /** 066 * The device was entered in error and voided. 067 */ 068 ENTEREDINERROR, 069 /** 070 * The status of the device has not been determined. 071 */ 072 UNKNOWN, 073 /** 074 * added to help the parsers with the generic types 075 */ 076 NULL; 077 public static FHIRDeviceStatus fromCode(String codeString) throws FHIRException { 078 if (codeString == null || "".equals(codeString)) 079 return null; 080 if ("active".equals(codeString)) 081 return ACTIVE; 082 if ("inactive".equals(codeString)) 083 return INACTIVE; 084 if ("entered-in-error".equals(codeString)) 085 return ENTEREDINERROR; 086 if ("unknown".equals(codeString)) 087 return UNKNOWN; 088 if (Configuration.isAcceptInvalidEnums()) 089 return null; 090 else 091 throw new FHIRException("Unknown FHIRDeviceStatus code '"+codeString+"'"); 092 } 093 public String toCode() { 094 switch (this) { 095 case ACTIVE: return "active"; 096 case INACTIVE: return "inactive"; 097 case ENTEREDINERROR: return "entered-in-error"; 098 case UNKNOWN: return "unknown"; 099 case NULL: return null; 100 default: return "?"; 101 } 102 } 103 public String getSystem() { 104 switch (this) { 105 case ACTIVE: return "http://hl7.org/fhir/device-status"; 106 case INACTIVE: return "http://hl7.org/fhir/device-status"; 107 case ENTEREDINERROR: return "http://hl7.org/fhir/device-status"; 108 case UNKNOWN: return "http://hl7.org/fhir/device-status"; 109 case NULL: return null; 110 default: return "?"; 111 } 112 } 113 public String getDefinition() { 114 switch (this) { 115 case ACTIVE: return "The device is available for use. Note: For *implanted devices* this means that the device is implanted in the patient."; 116 case INACTIVE: return "The device is no longer available for use (e.g. lost, expired, damaged). Note: For *implanted devices* this means that the device has been removed from the patient."; 117 case ENTEREDINERROR: return "The device was entered in error and voided."; 118 case UNKNOWN: return "The status of the device has not been determined."; 119 case NULL: return null; 120 default: return "?"; 121 } 122 } 123 public String getDisplay() { 124 switch (this) { 125 case ACTIVE: return "Active"; 126 case INACTIVE: return "Inactive"; 127 case ENTEREDINERROR: return "Entered in Error"; 128 case UNKNOWN: return "Unknown"; 129 case NULL: return null; 130 default: return "?"; 131 } 132 } 133 } 134 135 public static class FHIRDeviceStatusEnumFactory implements EnumFactory<FHIRDeviceStatus> { 136 public FHIRDeviceStatus fromCode(String codeString) throws IllegalArgumentException { 137 if (codeString == null || "".equals(codeString)) 138 if (codeString == null || "".equals(codeString)) 139 return null; 140 if ("active".equals(codeString)) 141 return FHIRDeviceStatus.ACTIVE; 142 if ("inactive".equals(codeString)) 143 return FHIRDeviceStatus.INACTIVE; 144 if ("entered-in-error".equals(codeString)) 145 return FHIRDeviceStatus.ENTEREDINERROR; 146 if ("unknown".equals(codeString)) 147 return FHIRDeviceStatus.UNKNOWN; 148 throw new IllegalArgumentException("Unknown FHIRDeviceStatus code '"+codeString+"'"); 149 } 150 public Enumeration<FHIRDeviceStatus> fromType(Base code) throws FHIRException { 151 if (code == null) 152 return null; 153 if (code.isEmpty()) 154 return new Enumeration<FHIRDeviceStatus>(this); 155 String codeString = ((PrimitiveType) code).asStringValue(); 156 if (codeString == null || "".equals(codeString)) 157 return null; 158 if ("active".equals(codeString)) 159 return new Enumeration<FHIRDeviceStatus>(this, FHIRDeviceStatus.ACTIVE); 160 if ("inactive".equals(codeString)) 161 return new Enumeration<FHIRDeviceStatus>(this, FHIRDeviceStatus.INACTIVE); 162 if ("entered-in-error".equals(codeString)) 163 return new Enumeration<FHIRDeviceStatus>(this, FHIRDeviceStatus.ENTEREDINERROR); 164 if ("unknown".equals(codeString)) 165 return new Enumeration<FHIRDeviceStatus>(this, FHIRDeviceStatus.UNKNOWN); 166 throw new FHIRException("Unknown FHIRDeviceStatus code '"+codeString+"'"); 167 } 168 public String toCode(FHIRDeviceStatus code) { 169 if (code == FHIRDeviceStatus.ACTIVE) 170 return "active"; 171 if (code == FHIRDeviceStatus.INACTIVE) 172 return "inactive"; 173 if (code == FHIRDeviceStatus.ENTEREDINERROR) 174 return "entered-in-error"; 175 if (code == FHIRDeviceStatus.UNKNOWN) 176 return "unknown"; 177 return "?"; 178 } 179 public String toSystem(FHIRDeviceStatus code) { 180 return code.getSystem(); 181 } 182 } 183 184 public enum UDIEntryType { 185 /** 186 * a barcodescanner captured the data from the device label. 187 */ 188 BARCODE, 189 /** 190 * An RFID chip reader captured the data from the device label. 191 */ 192 RFID, 193 /** 194 * The data was read from the label by a person and manually entered. (e.g. via a keyboard). 195 */ 196 MANUAL, 197 /** 198 * The data originated from a patient's implant card and was read by an operator. 199 */ 200 CARD, 201 /** 202 * The data originated from a patient source and was not directly scanned or read from a label or card. 203 */ 204 SELFREPORTED, 205 /** 206 * The method of data capture has not been determined. 207 */ 208 UNKNOWN, 209 /** 210 * added to help the parsers with the generic types 211 */ 212 NULL; 213 public static UDIEntryType fromCode(String codeString) throws FHIRException { 214 if (codeString == null || "".equals(codeString)) 215 return null; 216 if ("barcode".equals(codeString)) 217 return BARCODE; 218 if ("rfid".equals(codeString)) 219 return RFID; 220 if ("manual".equals(codeString)) 221 return MANUAL; 222 if ("card".equals(codeString)) 223 return CARD; 224 if ("self-reported".equals(codeString)) 225 return SELFREPORTED; 226 if ("unknown".equals(codeString)) 227 return UNKNOWN; 228 if (Configuration.isAcceptInvalidEnums()) 229 return null; 230 else 231 throw new FHIRException("Unknown UDIEntryType code '"+codeString+"'"); 232 } 233 public String toCode() { 234 switch (this) { 235 case BARCODE: return "barcode"; 236 case RFID: return "rfid"; 237 case MANUAL: return "manual"; 238 case CARD: return "card"; 239 case SELFREPORTED: return "self-reported"; 240 case UNKNOWN: return "unknown"; 241 case NULL: return null; 242 default: return "?"; 243 } 244 } 245 public String getSystem() { 246 switch (this) { 247 case BARCODE: return "http://hl7.org/fhir/udi-entry-type"; 248 case RFID: return "http://hl7.org/fhir/udi-entry-type"; 249 case MANUAL: return "http://hl7.org/fhir/udi-entry-type"; 250 case CARD: return "http://hl7.org/fhir/udi-entry-type"; 251 case SELFREPORTED: return "http://hl7.org/fhir/udi-entry-type"; 252 case UNKNOWN: return "http://hl7.org/fhir/udi-entry-type"; 253 case NULL: return null; 254 default: return "?"; 255 } 256 } 257 public String getDefinition() { 258 switch (this) { 259 case BARCODE: return "a barcodescanner captured the data from the device label."; 260 case RFID: return "An RFID chip reader captured the data from the device label."; 261 case MANUAL: return "The data was read from the label by a person and manually entered. (e.g. via a keyboard)."; 262 case CARD: return "The data originated from a patient's implant card and was read by an operator."; 263 case SELFREPORTED: return "The data originated from a patient source and was not directly scanned or read from a label or card."; 264 case UNKNOWN: return "The method of data capture has not been determined."; 265 case NULL: return null; 266 default: return "?"; 267 } 268 } 269 public String getDisplay() { 270 switch (this) { 271 case BARCODE: return "Barcode"; 272 case RFID: return "RFID"; 273 case MANUAL: return "Manual"; 274 case CARD: return "Card"; 275 case SELFREPORTED: return "Self Reported"; 276 case UNKNOWN: return "Unknown"; 277 case NULL: return null; 278 default: return "?"; 279 } 280 } 281 } 282 283 public static class UDIEntryTypeEnumFactory implements EnumFactory<UDIEntryType> { 284 public UDIEntryType fromCode(String codeString) throws IllegalArgumentException { 285 if (codeString == null || "".equals(codeString)) 286 if (codeString == null || "".equals(codeString)) 287 return null; 288 if ("barcode".equals(codeString)) 289 return UDIEntryType.BARCODE; 290 if ("rfid".equals(codeString)) 291 return UDIEntryType.RFID; 292 if ("manual".equals(codeString)) 293 return UDIEntryType.MANUAL; 294 if ("card".equals(codeString)) 295 return UDIEntryType.CARD; 296 if ("self-reported".equals(codeString)) 297 return UDIEntryType.SELFREPORTED; 298 if ("unknown".equals(codeString)) 299 return UDIEntryType.UNKNOWN; 300 throw new IllegalArgumentException("Unknown UDIEntryType code '"+codeString+"'"); 301 } 302 public Enumeration<UDIEntryType> fromType(Base code) throws FHIRException { 303 if (code == null) 304 return null; 305 if (code.isEmpty()) 306 return new Enumeration<UDIEntryType>(this); 307 String codeString = ((PrimitiveType) code).asStringValue(); 308 if (codeString == null || "".equals(codeString)) 309 return null; 310 if ("barcode".equals(codeString)) 311 return new Enumeration<UDIEntryType>(this, UDIEntryType.BARCODE); 312 if ("rfid".equals(codeString)) 313 return new Enumeration<UDIEntryType>(this, UDIEntryType.RFID); 314 if ("manual".equals(codeString)) 315 return new Enumeration<UDIEntryType>(this, UDIEntryType.MANUAL); 316 if ("card".equals(codeString)) 317 return new Enumeration<UDIEntryType>(this, UDIEntryType.CARD); 318 if ("self-reported".equals(codeString)) 319 return new Enumeration<UDIEntryType>(this, UDIEntryType.SELFREPORTED); 320 if ("unknown".equals(codeString)) 321 return new Enumeration<UDIEntryType>(this, UDIEntryType.UNKNOWN); 322 throw new FHIRException("Unknown UDIEntryType code '"+codeString+"'"); 323 } 324 public String toCode(UDIEntryType code) { 325 if (code == UDIEntryType.BARCODE) 326 return "barcode"; 327 if (code == UDIEntryType.RFID) 328 return "rfid"; 329 if (code == UDIEntryType.MANUAL) 330 return "manual"; 331 if (code == UDIEntryType.CARD) 332 return "card"; 333 if (code == UDIEntryType.SELFREPORTED) 334 return "self-reported"; 335 if (code == UDIEntryType.UNKNOWN) 336 return "unknown"; 337 return "?"; 338 } 339 public String toSystem(UDIEntryType code) { 340 return code.getSystem(); 341 } 342 } 343 344 @Block() 345 public static class DeviceUdiCarrierComponent extends BackboneElement implements IBaseBackboneElement { 346 /** 347 * The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device. 348 */ 349 @Child(name = "deviceIdentifier", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 350 @Description(shortDefinition="Mandatory fixed portion of UDI", formalDefinition="The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device." ) 351 protected StringType deviceIdentifier; 352 353 /** 354 * Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 3551) GS1: 356http://hl7.org/fhir/NamingSystem/gs1-di, 3572) HIBCC: 358http://hl7.org/fhir/NamingSystem/hibcc-dI, 3593) ICCBBA for blood containers: 360http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 3614) ICCBA for other devices: 362http://hl7.org/fhir/NamingSystem/iccbba-other-di. 363 */ 364 @Child(name = "issuer", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false) 365 @Description(shortDefinition="UDI Issuing Organization", formalDefinition="Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include :\n1) GS1: \nhttp://hl7.org/fhir/NamingSystem/gs1-di, \n2) HIBCC:\nhttp://hl7.org/fhir/NamingSystem/hibcc-dI, \n3) ICCBBA for blood containers:\nhttp://hl7.org/fhir/NamingSystem/iccbba-blood-di, \n4) ICCBA for other devices:\nhttp://hl7.org/fhir/NamingSystem/iccbba-other-di." ) 366 protected UriType issuer; 367 368 /** 369 * The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi. 370 */ 371 @Child(name = "jurisdiction", type = {UriType.class}, order=3, min=0, max=1, modifier=false, summary=false) 372 @Description(shortDefinition="Regional UDI authority", formalDefinition="The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi." ) 373 protected UriType jurisdiction; 374 375 /** 376 * The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded. 377 */ 378 @Child(name = "carrierAIDC", type = {Base64BinaryType.class}, order=4, min=0, max=1, modifier=false, summary=true) 379 @Description(shortDefinition="UDI Machine Readable Barcode String", formalDefinition="The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded." ) 380 protected Base64BinaryType carrierAIDC; 381 382 /** 383 * The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device. 384 */ 385 @Child(name = "carrierHRF", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 386 @Description(shortDefinition="UDI Human Readable Barcode String", formalDefinition="The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device." ) 387 protected StringType carrierHRF; 388 389 /** 390 * A coded entry to indicate how the data was entered. 391 */ 392 @Child(name = "entryType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) 393 @Description(shortDefinition="barcode | rfid | manual +", formalDefinition="A coded entry to indicate how the data was entered." ) 394 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/udi-entry-type") 395 protected Enumeration<UDIEntryType> entryType; 396 397 private static final long serialVersionUID = -191630425L; 398 399 /** 400 * Constructor 401 */ 402 public DeviceUdiCarrierComponent() { 403 super(); 404 } 405 406 /** 407 * @return {@link #deviceIdentifier} (The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.). This is the underlying object with id, value and extensions. The accessor "getDeviceIdentifier" gives direct access to the value 408 */ 409 public StringType getDeviceIdentifierElement() { 410 if (this.deviceIdentifier == null) 411 if (Configuration.errorOnAutoCreate()) 412 throw new Error("Attempt to auto-create DeviceUdiCarrierComponent.deviceIdentifier"); 413 else if (Configuration.doAutoCreate()) 414 this.deviceIdentifier = new StringType(); // bb 415 return this.deviceIdentifier; 416 } 417 418 public boolean hasDeviceIdentifierElement() { 419 return this.deviceIdentifier != null && !this.deviceIdentifier.isEmpty(); 420 } 421 422 public boolean hasDeviceIdentifier() { 423 return this.deviceIdentifier != null && !this.deviceIdentifier.isEmpty(); 424 } 425 426 /** 427 * @param value {@link #deviceIdentifier} (The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.). This is the underlying object with id, value and extensions. The accessor "getDeviceIdentifier" gives direct access to the value 428 */ 429 public DeviceUdiCarrierComponent setDeviceIdentifierElement(StringType value) { 430 this.deviceIdentifier = value; 431 return this; 432 } 433 434 /** 435 * @return The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device. 436 */ 437 public String getDeviceIdentifier() { 438 return this.deviceIdentifier == null ? null : this.deviceIdentifier.getValue(); 439 } 440 441 /** 442 * @param value The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device. 443 */ 444 public DeviceUdiCarrierComponent setDeviceIdentifier(String value) { 445 if (Utilities.noString(value)) 446 this.deviceIdentifier = null; 447 else { 448 if (this.deviceIdentifier == null) 449 this.deviceIdentifier = new StringType(); 450 this.deviceIdentifier.setValue(value); 451 } 452 return this; 453 } 454 455 /** 456 * @return {@link #issuer} (Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 4571) GS1: 458http://hl7.org/fhir/NamingSystem/gs1-di, 4592) HIBCC: 460http://hl7.org/fhir/NamingSystem/hibcc-dI, 4613) ICCBBA for blood containers: 462http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4634) ICCBA for other devices: 464http://hl7.org/fhir/NamingSystem/iccbba-other-di.). This is the underlying object with id, value and extensions. The accessor "getIssuer" gives direct access to the value 465 */ 466 public UriType getIssuerElement() { 467 if (this.issuer == null) 468 if (Configuration.errorOnAutoCreate()) 469 throw new Error("Attempt to auto-create DeviceUdiCarrierComponent.issuer"); 470 else if (Configuration.doAutoCreate()) 471 this.issuer = new UriType(); // bb 472 return this.issuer; 473 } 474 475 public boolean hasIssuerElement() { 476 return this.issuer != null && !this.issuer.isEmpty(); 477 } 478 479 public boolean hasIssuer() { 480 return this.issuer != null && !this.issuer.isEmpty(); 481 } 482 483 /** 484 * @param value {@link #issuer} (Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 4851) GS1: 486http://hl7.org/fhir/NamingSystem/gs1-di, 4872) HIBCC: 488http://hl7.org/fhir/NamingSystem/hibcc-dI, 4893) ICCBBA for blood containers: 490http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4914) ICCBA for other devices: 492http://hl7.org/fhir/NamingSystem/iccbba-other-di.). This is the underlying object with id, value and extensions. The accessor "getIssuer" gives direct access to the value 493 */ 494 public DeviceUdiCarrierComponent setIssuerElement(UriType value) { 495 this.issuer = value; 496 return this; 497 } 498 499 /** 500 * @return Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 5011) GS1: 502http://hl7.org/fhir/NamingSystem/gs1-di, 5032) HIBCC: 504http://hl7.org/fhir/NamingSystem/hibcc-dI, 5053) ICCBBA for blood containers: 506http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 5074) ICCBA for other devices: 508http://hl7.org/fhir/NamingSystem/iccbba-other-di. 509 */ 510 public String getIssuer() { 511 return this.issuer == null ? null : this.issuer.getValue(); 512 } 513 514 /** 515 * @param value Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 5161) GS1: 517http://hl7.org/fhir/NamingSystem/gs1-di, 5182) HIBCC: 519http://hl7.org/fhir/NamingSystem/hibcc-dI, 5203) ICCBBA for blood containers: 521http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 5224) ICCBA for other devices: 523http://hl7.org/fhir/NamingSystem/iccbba-other-di. 524 */ 525 public DeviceUdiCarrierComponent setIssuer(String value) { 526 if (Utilities.noString(value)) 527 this.issuer = null; 528 else { 529 if (this.issuer == null) 530 this.issuer = new UriType(); 531 this.issuer.setValue(value); 532 } 533 return this; 534 } 535 536 /** 537 * @return {@link #jurisdiction} (The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.). This is the underlying object with id, value and extensions. The accessor "getJurisdiction" gives direct access to the value 538 */ 539 public UriType getJurisdictionElement() { 540 if (this.jurisdiction == null) 541 if (Configuration.errorOnAutoCreate()) 542 throw new Error("Attempt to auto-create DeviceUdiCarrierComponent.jurisdiction"); 543 else if (Configuration.doAutoCreate()) 544 this.jurisdiction = new UriType(); // bb 545 return this.jurisdiction; 546 } 547 548 public boolean hasJurisdictionElement() { 549 return this.jurisdiction != null && !this.jurisdiction.isEmpty(); 550 } 551 552 public boolean hasJurisdiction() { 553 return this.jurisdiction != null && !this.jurisdiction.isEmpty(); 554 } 555 556 /** 557 * @param value {@link #jurisdiction} (The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.). This is the underlying object with id, value and extensions. The accessor "getJurisdiction" gives direct access to the value 558 */ 559 public DeviceUdiCarrierComponent setJurisdictionElement(UriType value) { 560 this.jurisdiction = value; 561 return this; 562 } 563 564 /** 565 * @return The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi. 566 */ 567 public String getJurisdiction() { 568 return this.jurisdiction == null ? null : this.jurisdiction.getValue(); 569 } 570 571 /** 572 * @param value The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi. 573 */ 574 public DeviceUdiCarrierComponent setJurisdiction(String value) { 575 if (Utilities.noString(value)) 576 this.jurisdiction = null; 577 else { 578 if (this.jurisdiction == null) 579 this.jurisdiction = new UriType(); 580 this.jurisdiction.setValue(value); 581 } 582 return this; 583 } 584 585 /** 586 * @return {@link #carrierAIDC} (The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.). This is the underlying object with id, value and extensions. The accessor "getCarrierAIDC" gives direct access to the value 587 */ 588 public Base64BinaryType getCarrierAIDCElement() { 589 if (this.carrierAIDC == null) 590 if (Configuration.errorOnAutoCreate()) 591 throw new Error("Attempt to auto-create DeviceUdiCarrierComponent.carrierAIDC"); 592 else if (Configuration.doAutoCreate()) 593 this.carrierAIDC = new Base64BinaryType(); // bb 594 return this.carrierAIDC; 595 } 596 597 public boolean hasCarrierAIDCElement() { 598 return this.carrierAIDC != null && !this.carrierAIDC.isEmpty(); 599 } 600 601 public boolean hasCarrierAIDC() { 602 return this.carrierAIDC != null && !this.carrierAIDC.isEmpty(); 603 } 604 605 /** 606 * @param value {@link #carrierAIDC} (The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.). This is the underlying object with id, value and extensions. The accessor "getCarrierAIDC" gives direct access to the value 607 */ 608 public DeviceUdiCarrierComponent setCarrierAIDCElement(Base64BinaryType value) { 609 this.carrierAIDC = value; 610 return this; 611 } 612 613 /** 614 * @return The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded. 615 */ 616 public byte[] getCarrierAIDC() { 617 return this.carrierAIDC == null ? null : this.carrierAIDC.getValue(); 618 } 619 620 /** 621 * @param value The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded. 622 */ 623 public DeviceUdiCarrierComponent setCarrierAIDC(byte[] value) { 624 if (value == null) 625 this.carrierAIDC = null; 626 else { 627 if (this.carrierAIDC == null) 628 this.carrierAIDC = new Base64BinaryType(); 629 this.carrierAIDC.setValue(value); 630 } 631 return this; 632 } 633 634 /** 635 * @return {@link #carrierHRF} (The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.). This is the underlying object with id, value and extensions. The accessor "getCarrierHRF" gives direct access to the value 636 */ 637 public StringType getCarrierHRFElement() { 638 if (this.carrierHRF == null) 639 if (Configuration.errorOnAutoCreate()) 640 throw new Error("Attempt to auto-create DeviceUdiCarrierComponent.carrierHRF"); 641 else if (Configuration.doAutoCreate()) 642 this.carrierHRF = new StringType(); // bb 643 return this.carrierHRF; 644 } 645 646 public boolean hasCarrierHRFElement() { 647 return this.carrierHRF != null && !this.carrierHRF.isEmpty(); 648 } 649 650 public boolean hasCarrierHRF() { 651 return this.carrierHRF != null && !this.carrierHRF.isEmpty(); 652 } 653 654 /** 655 * @param value {@link #carrierHRF} (The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.). This is the underlying object with id, value and extensions. The accessor "getCarrierHRF" gives direct access to the value 656 */ 657 public DeviceUdiCarrierComponent setCarrierHRFElement(StringType value) { 658 this.carrierHRF = value; 659 return this; 660 } 661 662 /** 663 * @return The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device. 664 */ 665 public String getCarrierHRF() { 666 return this.carrierHRF == null ? null : this.carrierHRF.getValue(); 667 } 668 669 /** 670 * @param value The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device. 671 */ 672 public DeviceUdiCarrierComponent setCarrierHRF(String value) { 673 if (Utilities.noString(value)) 674 this.carrierHRF = null; 675 else { 676 if (this.carrierHRF == null) 677 this.carrierHRF = new StringType(); 678 this.carrierHRF.setValue(value); 679 } 680 return this; 681 } 682 683 /** 684 * @return {@link #entryType} (A coded entry to indicate how the data was entered.). This is the underlying object with id, value and extensions. The accessor "getEntryType" gives direct access to the value 685 */ 686 public Enumeration<UDIEntryType> getEntryTypeElement() { 687 if (this.entryType == null) 688 if (Configuration.errorOnAutoCreate()) 689 throw new Error("Attempt to auto-create DeviceUdiCarrierComponent.entryType"); 690 else if (Configuration.doAutoCreate()) 691 this.entryType = new Enumeration<UDIEntryType>(new UDIEntryTypeEnumFactory()); // bb 692 return this.entryType; 693 } 694 695 public boolean hasEntryTypeElement() { 696 return this.entryType != null && !this.entryType.isEmpty(); 697 } 698 699 public boolean hasEntryType() { 700 return this.entryType != null && !this.entryType.isEmpty(); 701 } 702 703 /** 704 * @param value {@link #entryType} (A coded entry to indicate how the data was entered.). This is the underlying object with id, value and extensions. The accessor "getEntryType" gives direct access to the value 705 */ 706 public DeviceUdiCarrierComponent setEntryTypeElement(Enumeration<UDIEntryType> value) { 707 this.entryType = value; 708 return this; 709 } 710 711 /** 712 * @return A coded entry to indicate how the data was entered. 713 */ 714 public UDIEntryType getEntryType() { 715 return this.entryType == null ? null : this.entryType.getValue(); 716 } 717 718 /** 719 * @param value A coded entry to indicate how the data was entered. 720 */ 721 public DeviceUdiCarrierComponent setEntryType(UDIEntryType value) { 722 if (value == null) 723 this.entryType = null; 724 else { 725 if (this.entryType == null) 726 this.entryType = new Enumeration<UDIEntryType>(new UDIEntryTypeEnumFactory()); 727 this.entryType.setValue(value); 728 } 729 return this; 730 } 731 732 protected void listChildren(List<Property> children) { 733 super.listChildren(children); 734 children.add(new Property("deviceIdentifier", "string", "The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.", 0, 1, deviceIdentifier)); 735 children.add(new Property("issuer", "uri", "Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include :\n1) GS1: \nhttp://hl7.org/fhir/NamingSystem/gs1-di, \n2) HIBCC:\nhttp://hl7.org/fhir/NamingSystem/hibcc-dI, \n3) ICCBBA for blood containers:\nhttp://hl7.org/fhir/NamingSystem/iccbba-blood-di, \n4) ICCBA for other devices:\nhttp://hl7.org/fhir/NamingSystem/iccbba-other-di.", 0, 1, issuer)); 736 children.add(new Property("jurisdiction", "uri", "The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.", 0, 1, jurisdiction)); 737 children.add(new Property("carrierAIDC", "base64Binary", "The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.", 0, 1, carrierAIDC)); 738 children.add(new Property("carrierHRF", "string", "The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.", 0, 1, carrierHRF)); 739 children.add(new Property("entryType", "code", "A coded entry to indicate how the data was entered.", 0, 1, entryType)); 740 } 741 742 @Override 743 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 744 switch (_hash) { 745 case 1322005407: /*deviceIdentifier*/ return new Property("deviceIdentifier", "string", "The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.", 0, 1, deviceIdentifier); 746 case -1179159879: /*issuer*/ return new Property("issuer", "uri", "Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include :\n1) GS1: \nhttp://hl7.org/fhir/NamingSystem/gs1-di, \n2) HIBCC:\nhttp://hl7.org/fhir/NamingSystem/hibcc-dI, \n3) ICCBBA for blood containers:\nhttp://hl7.org/fhir/NamingSystem/iccbba-blood-di, \n4) ICCBA for other devices:\nhttp://hl7.org/fhir/NamingSystem/iccbba-other-di.", 0, 1, issuer); 747 case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "uri", "The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.", 0, 1, jurisdiction); 748 case -768521825: /*carrierAIDC*/ return new Property("carrierAIDC", "base64Binary", "The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.", 0, 1, carrierAIDC); 749 case 806499972: /*carrierHRF*/ return new Property("carrierHRF", "string", "The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.", 0, 1, carrierHRF); 750 case -479362356: /*entryType*/ return new Property("entryType", "code", "A coded entry to indicate how the data was entered.", 0, 1, entryType); 751 default: return super.getNamedProperty(_hash, _name, _checkValid); 752 } 753 754 } 755 756 @Override 757 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 758 switch (hash) { 759 case 1322005407: /*deviceIdentifier*/ return this.deviceIdentifier == null ? new Base[0] : new Base[] {this.deviceIdentifier}; // StringType 760 case -1179159879: /*issuer*/ return this.issuer == null ? new Base[0] : new Base[] {this.issuer}; // UriType 761 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : new Base[] {this.jurisdiction}; // UriType 762 case -768521825: /*carrierAIDC*/ return this.carrierAIDC == null ? new Base[0] : new Base[] {this.carrierAIDC}; // Base64BinaryType 763 case 806499972: /*carrierHRF*/ return this.carrierHRF == null ? new Base[0] : new Base[] {this.carrierHRF}; // StringType 764 case -479362356: /*entryType*/ return this.entryType == null ? new Base[0] : new Base[] {this.entryType}; // Enumeration<UDIEntryType> 765 default: return super.getProperty(hash, name, checkValid); 766 } 767 768 } 769 770 @Override 771 public Base setProperty(int hash, String name, Base value) throws FHIRException { 772 switch (hash) { 773 case 1322005407: // deviceIdentifier 774 this.deviceIdentifier = TypeConvertor.castToString(value); // StringType 775 return value; 776 case -1179159879: // issuer 777 this.issuer = TypeConvertor.castToUri(value); // UriType 778 return value; 779 case -507075711: // jurisdiction 780 this.jurisdiction = TypeConvertor.castToUri(value); // UriType 781 return value; 782 case -768521825: // carrierAIDC 783 this.carrierAIDC = TypeConvertor.castToBase64Binary(value); // Base64BinaryType 784 return value; 785 case 806499972: // carrierHRF 786 this.carrierHRF = TypeConvertor.castToString(value); // StringType 787 return value; 788 case -479362356: // entryType 789 value = new UDIEntryTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 790 this.entryType = (Enumeration) value; // Enumeration<UDIEntryType> 791 return value; 792 default: return super.setProperty(hash, name, value); 793 } 794 795 } 796 797 @Override 798 public Base setProperty(String name, Base value) throws FHIRException { 799 if (name.equals("deviceIdentifier")) { 800 this.deviceIdentifier = TypeConvertor.castToString(value); // StringType 801 } else if (name.equals("issuer")) { 802 this.issuer = TypeConvertor.castToUri(value); // UriType 803 } else if (name.equals("jurisdiction")) { 804 this.jurisdiction = TypeConvertor.castToUri(value); // UriType 805 } else if (name.equals("carrierAIDC")) { 806 this.carrierAIDC = TypeConvertor.castToBase64Binary(value); // Base64BinaryType 807 } else if (name.equals("carrierHRF")) { 808 this.carrierHRF = TypeConvertor.castToString(value); // StringType 809 } else if (name.equals("entryType")) { 810 value = new UDIEntryTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 811 this.entryType = (Enumeration) value; // Enumeration<UDIEntryType> 812 } else 813 return super.setProperty(name, value); 814 return value; 815 } 816 817 @Override 818 public Base makeProperty(int hash, String name) throws FHIRException { 819 switch (hash) { 820 case 1322005407: return getDeviceIdentifierElement(); 821 case -1179159879: return getIssuerElement(); 822 case -507075711: return getJurisdictionElement(); 823 case -768521825: return getCarrierAIDCElement(); 824 case 806499972: return getCarrierHRFElement(); 825 case -479362356: return getEntryTypeElement(); 826 default: return super.makeProperty(hash, name); 827 } 828 829 } 830 831 @Override 832 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 833 switch (hash) { 834 case 1322005407: /*deviceIdentifier*/ return new String[] {"string"}; 835 case -1179159879: /*issuer*/ return new String[] {"uri"}; 836 case -507075711: /*jurisdiction*/ return new String[] {"uri"}; 837 case -768521825: /*carrierAIDC*/ return new String[] {"base64Binary"}; 838 case 806499972: /*carrierHRF*/ return new String[] {"string"}; 839 case -479362356: /*entryType*/ return new String[] {"code"}; 840 default: return super.getTypesForProperty(hash, name); 841 } 842 843 } 844 845 @Override 846 public Base addChild(String name) throws FHIRException { 847 if (name.equals("deviceIdentifier")) { 848 throw new FHIRException("Cannot call addChild on a primitive type Device.udiCarrier.deviceIdentifier"); 849 } 850 else if (name.equals("issuer")) { 851 throw new FHIRException("Cannot call addChild on a primitive type Device.udiCarrier.issuer"); 852 } 853 else if (name.equals("jurisdiction")) { 854 throw new FHIRException("Cannot call addChild on a primitive type Device.udiCarrier.jurisdiction"); 855 } 856 else if (name.equals("carrierAIDC")) { 857 throw new FHIRException("Cannot call addChild on a primitive type Device.udiCarrier.carrierAIDC"); 858 } 859 else if (name.equals("carrierHRF")) { 860 throw new FHIRException("Cannot call addChild on a primitive type Device.udiCarrier.carrierHRF"); 861 } 862 else if (name.equals("entryType")) { 863 throw new FHIRException("Cannot call addChild on a primitive type Device.udiCarrier.entryType"); 864 } 865 else 866 return super.addChild(name); 867 } 868 869 public DeviceUdiCarrierComponent copy() { 870 DeviceUdiCarrierComponent dst = new DeviceUdiCarrierComponent(); 871 copyValues(dst); 872 return dst; 873 } 874 875 public void copyValues(DeviceUdiCarrierComponent dst) { 876 super.copyValues(dst); 877 dst.deviceIdentifier = deviceIdentifier == null ? null : deviceIdentifier.copy(); 878 dst.issuer = issuer == null ? null : issuer.copy(); 879 dst.jurisdiction = jurisdiction == null ? null : jurisdiction.copy(); 880 dst.carrierAIDC = carrierAIDC == null ? null : carrierAIDC.copy(); 881 dst.carrierHRF = carrierHRF == null ? null : carrierHRF.copy(); 882 dst.entryType = entryType == null ? null : entryType.copy(); 883 } 884 885 @Override 886 public boolean equalsDeep(Base other_) { 887 if (!super.equalsDeep(other_)) 888 return false; 889 if (!(other_ instanceof DeviceUdiCarrierComponent)) 890 return false; 891 DeviceUdiCarrierComponent o = (DeviceUdiCarrierComponent) other_; 892 return compareDeep(deviceIdentifier, o.deviceIdentifier, true) && compareDeep(issuer, o.issuer, true) 893 && compareDeep(jurisdiction, o.jurisdiction, true) && compareDeep(carrierAIDC, o.carrierAIDC, true) 894 && compareDeep(carrierHRF, o.carrierHRF, true) && compareDeep(entryType, o.entryType, true); 895 } 896 897 @Override 898 public boolean equalsShallow(Base other_) { 899 if (!super.equalsShallow(other_)) 900 return false; 901 if (!(other_ instanceof DeviceUdiCarrierComponent)) 902 return false; 903 DeviceUdiCarrierComponent o = (DeviceUdiCarrierComponent) other_; 904 return compareValues(deviceIdentifier, o.deviceIdentifier, true) && compareValues(issuer, o.issuer, true) 905 && compareValues(jurisdiction, o.jurisdiction, true) && compareValues(carrierAIDC, o.carrierAIDC, true) 906 && compareValues(carrierHRF, o.carrierHRF, true) && compareValues(entryType, o.entryType, true); 907 } 908 909 public boolean isEmpty() { 910 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(deviceIdentifier, issuer, jurisdiction 911 , carrierAIDC, carrierHRF, entryType); 912 } 913 914 public String fhirType() { 915 return "Device.udiCarrier"; 916 917 } 918 919 } 920 921 @Block() 922 public static class DeviceDeviceNameComponent extends BackboneElement implements IBaseBackboneElement { 923 /** 924 * The name that identifies the device. 925 */ 926 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 927 @Description(shortDefinition="The name that identifies the device", formalDefinition="The name that identifies the device." ) 928 protected StringType name; 929 930 /** 931 * The type of deviceName. 932UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName. 933 */ 934 @Child(name = "type", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) 935 @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." ) 936 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-nametype") 937 protected Enumeration<DeviceNameType> type; 938 939 private static final long serialVersionUID = 918983440L; 940 941 /** 942 * Constructor 943 */ 944 public DeviceDeviceNameComponent() { 945 super(); 946 } 947 948 /** 949 * Constructor 950 */ 951 public DeviceDeviceNameComponent(String name, DeviceNameType type) { 952 super(); 953 this.setName(name); 954 this.setType(type); 955 } 956 957 /** 958 * @return {@link #name} (The name that identifies the device.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 959 */ 960 public StringType getNameElement() { 961 if (this.name == null) 962 if (Configuration.errorOnAutoCreate()) 963 throw new Error("Attempt to auto-create DeviceDeviceNameComponent.name"); 964 else if (Configuration.doAutoCreate()) 965 this.name = new StringType(); // bb 966 return this.name; 967 } 968 969 public boolean hasNameElement() { 970 return this.name != null && !this.name.isEmpty(); 971 } 972 973 public boolean hasName() { 974 return this.name != null && !this.name.isEmpty(); 975 } 976 977 /** 978 * @param value {@link #name} (The name that identifies the device.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 979 */ 980 public DeviceDeviceNameComponent setNameElement(StringType value) { 981 this.name = value; 982 return this; 983 } 984 985 /** 986 * @return The name that identifies the device. 987 */ 988 public String getName() { 989 return this.name == null ? null : this.name.getValue(); 990 } 991 992 /** 993 * @param value The name that identifies the device. 994 */ 995 public DeviceDeviceNameComponent setName(String value) { 996 if (this.name == null) 997 this.name = new StringType(); 998 this.name.setValue(value); 999 return this; 1000 } 1001 1002 /** 1003 * @return {@link #type} (The type of deviceName. 1004UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1005 */ 1006 public Enumeration<DeviceNameType> getTypeElement() { 1007 if (this.type == null) 1008 if (Configuration.errorOnAutoCreate()) 1009 throw new Error("Attempt to auto-create DeviceDeviceNameComponent.type"); 1010 else if (Configuration.doAutoCreate()) 1011 this.type = new Enumeration<DeviceNameType>(new DeviceNameTypeEnumFactory()); // bb 1012 return this.type; 1013 } 1014 1015 public boolean hasTypeElement() { 1016 return this.type != null && !this.type.isEmpty(); 1017 } 1018 1019 public boolean hasType() { 1020 return this.type != null && !this.type.isEmpty(); 1021 } 1022 1023 /** 1024 * @param value {@link #type} (The type of deviceName. 1025UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1026 */ 1027 public DeviceDeviceNameComponent setTypeElement(Enumeration<DeviceNameType> value) { 1028 this.type = value; 1029 return this; 1030 } 1031 1032 /** 1033 * @return The type of deviceName. 1034UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName. 1035 */ 1036 public DeviceNameType getType() { 1037 return this.type == null ? null : this.type.getValue(); 1038 } 1039 1040 /** 1041 * @param value The type of deviceName. 1042UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName. 1043 */ 1044 public DeviceDeviceNameComponent setType(DeviceNameType value) { 1045 if (this.type == null) 1046 this.type = new Enumeration<DeviceNameType>(new DeviceNameTypeEnumFactory()); 1047 this.type.setValue(value); 1048 return this; 1049 } 1050 1051 protected void listChildren(List<Property> children) { 1052 super.listChildren(children); 1053 children.add(new Property("name", "string", "The name that identifies the device.", 0, 1, name)); 1054 children.add(new Property("type", "code", "The type of deviceName.\nUDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.", 0, 1, type)); 1055 } 1056 1057 @Override 1058 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1059 switch (_hash) { 1060 case 3373707: /*name*/ return new Property("name", "string", "The name that identifies the device.", 0, 1, name); 1061 case 3575610: /*type*/ return new Property("type", "code", "The type of deviceName.\nUDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.", 0, 1, type); 1062 default: return super.getNamedProperty(_hash, _name, _checkValid); 1063 } 1064 1065 } 1066 1067 @Override 1068 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1069 switch (hash) { 1070 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1071 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<DeviceNameType> 1072 default: return super.getProperty(hash, name, checkValid); 1073 } 1074 1075 } 1076 1077 @Override 1078 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1079 switch (hash) { 1080 case 3373707: // name 1081 this.name = TypeConvertor.castToString(value); // StringType 1082 return value; 1083 case 3575610: // type 1084 value = new DeviceNameTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1085 this.type = (Enumeration) value; // Enumeration<DeviceNameType> 1086 return value; 1087 default: return super.setProperty(hash, name, value); 1088 } 1089 1090 } 1091 1092 @Override 1093 public Base setProperty(String name, Base value) throws FHIRException { 1094 if (name.equals("name")) { 1095 this.name = TypeConvertor.castToString(value); // StringType 1096 } else if (name.equals("type")) { 1097 value = new DeviceNameTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1098 this.type = (Enumeration) value; // Enumeration<DeviceNameType> 1099 } else 1100 return super.setProperty(name, value); 1101 return value; 1102 } 1103 1104 @Override 1105 public Base makeProperty(int hash, String name) throws FHIRException { 1106 switch (hash) { 1107 case 3373707: return getNameElement(); 1108 case 3575610: return getTypeElement(); 1109 default: return super.makeProperty(hash, name); 1110 } 1111 1112 } 1113 1114 @Override 1115 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1116 switch (hash) { 1117 case 3373707: /*name*/ return new String[] {"string"}; 1118 case 3575610: /*type*/ return new String[] {"code"}; 1119 default: return super.getTypesForProperty(hash, name); 1120 } 1121 1122 } 1123 1124 @Override 1125 public Base addChild(String name) throws FHIRException { 1126 if (name.equals("name")) { 1127 throw new FHIRException("Cannot call addChild on a primitive type Device.deviceName.name"); 1128 } 1129 else if (name.equals("type")) { 1130 throw new FHIRException("Cannot call addChild on a primitive type Device.deviceName.type"); 1131 } 1132 else 1133 return super.addChild(name); 1134 } 1135 1136 public DeviceDeviceNameComponent copy() { 1137 DeviceDeviceNameComponent dst = new DeviceDeviceNameComponent(); 1138 copyValues(dst); 1139 return dst; 1140 } 1141 1142 public void copyValues(DeviceDeviceNameComponent dst) { 1143 super.copyValues(dst); 1144 dst.name = name == null ? null : name.copy(); 1145 dst.type = type == null ? null : type.copy(); 1146 } 1147 1148 @Override 1149 public boolean equalsDeep(Base other_) { 1150 if (!super.equalsDeep(other_)) 1151 return false; 1152 if (!(other_ instanceof DeviceDeviceNameComponent)) 1153 return false; 1154 DeviceDeviceNameComponent o = (DeviceDeviceNameComponent) other_; 1155 return compareDeep(name, o.name, true) && compareDeep(type, o.type, true); 1156 } 1157 1158 @Override 1159 public boolean equalsShallow(Base other_) { 1160 if (!super.equalsShallow(other_)) 1161 return false; 1162 if (!(other_ instanceof DeviceDeviceNameComponent)) 1163 return false; 1164 DeviceDeviceNameComponent o = (DeviceDeviceNameComponent) other_; 1165 return compareValues(name, o.name, true) && compareValues(type, o.type, true); 1166 } 1167 1168 public boolean isEmpty() { 1169 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, type); 1170 } 1171 1172 public String fhirType() { 1173 return "Device.deviceName"; 1174 1175 } 1176 1177 } 1178 1179 @Block() 1180 public static class DeviceSpecializationComponent extends BackboneElement implements IBaseBackboneElement { 1181 /** 1182 * The standard that is used to operate and communicate. 1183 */ 1184 @Child(name = "systemType", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 1185 @Description(shortDefinition="The standard that is used to operate and communicate", formalDefinition="The standard that is used to operate and communicate." ) 1186 protected CodeableConcept systemType; 1187 1188 /** 1189 * The version of the standard that is used to operate and communicate. 1190 */ 1191 @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1192 @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." ) 1193 protected StringType version; 1194 1195 private static final long serialVersionUID = 1557342629L; 1196 1197 /** 1198 * Constructor 1199 */ 1200 public DeviceSpecializationComponent() { 1201 super(); 1202 } 1203 1204 /** 1205 * Constructor 1206 */ 1207 public DeviceSpecializationComponent(CodeableConcept systemType) { 1208 super(); 1209 this.setSystemType(systemType); 1210 } 1211 1212 /** 1213 * @return {@link #systemType} (The standard that is used to operate and communicate.) 1214 */ 1215 public CodeableConcept getSystemType() { 1216 if (this.systemType == null) 1217 if (Configuration.errorOnAutoCreate()) 1218 throw new Error("Attempt to auto-create DeviceSpecializationComponent.systemType"); 1219 else if (Configuration.doAutoCreate()) 1220 this.systemType = new CodeableConcept(); // cc 1221 return this.systemType; 1222 } 1223 1224 public boolean hasSystemType() { 1225 return this.systemType != null && !this.systemType.isEmpty(); 1226 } 1227 1228 /** 1229 * @param value {@link #systemType} (The standard that is used to operate and communicate.) 1230 */ 1231 public DeviceSpecializationComponent setSystemType(CodeableConcept value) { 1232 this.systemType = value; 1233 return this; 1234 } 1235 1236 /** 1237 * @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 1238 */ 1239 public StringType getVersionElement() { 1240 if (this.version == null) 1241 if (Configuration.errorOnAutoCreate()) 1242 throw new Error("Attempt to auto-create DeviceSpecializationComponent.version"); 1243 else if (Configuration.doAutoCreate()) 1244 this.version = new StringType(); // bb 1245 return this.version; 1246 } 1247 1248 public boolean hasVersionElement() { 1249 return this.version != null && !this.version.isEmpty(); 1250 } 1251 1252 public boolean hasVersion() { 1253 return this.version != null && !this.version.isEmpty(); 1254 } 1255 1256 /** 1257 * @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 1258 */ 1259 public DeviceSpecializationComponent setVersionElement(StringType value) { 1260 this.version = value; 1261 return this; 1262 } 1263 1264 /** 1265 * @return The version of the standard that is used to operate and communicate. 1266 */ 1267 public String getVersion() { 1268 return this.version == null ? null : this.version.getValue(); 1269 } 1270 1271 /** 1272 * @param value The version of the standard that is used to operate and communicate. 1273 */ 1274 public DeviceSpecializationComponent setVersion(String value) { 1275 if (Utilities.noString(value)) 1276 this.version = null; 1277 else { 1278 if (this.version == null) 1279 this.version = new StringType(); 1280 this.version.setValue(value); 1281 } 1282 return this; 1283 } 1284 1285 protected void listChildren(List<Property> children) { 1286 super.listChildren(children); 1287 children.add(new Property("systemType", "CodeableConcept", "The standard that is used to operate and communicate.", 0, 1, systemType)); 1288 children.add(new Property("version", "string", "The version of the standard that is used to operate and communicate.", 0, 1, version)); 1289 } 1290 1291 @Override 1292 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1293 switch (_hash) { 1294 case 642893321: /*systemType*/ return new Property("systemType", "CodeableConcept", "The standard that is used to operate and communicate.", 0, 1, systemType); 1295 case 351608024: /*version*/ return new Property("version", "string", "The version of the standard that is used to operate and communicate.", 0, 1, version); 1296 default: return super.getNamedProperty(_hash, _name, _checkValid); 1297 } 1298 1299 } 1300 1301 @Override 1302 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1303 switch (hash) { 1304 case 642893321: /*systemType*/ return this.systemType == null ? new Base[0] : new Base[] {this.systemType}; // CodeableConcept 1305 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 1306 default: return super.getProperty(hash, name, checkValid); 1307 } 1308 1309 } 1310 1311 @Override 1312 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1313 switch (hash) { 1314 case 642893321: // systemType 1315 this.systemType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1316 return value; 1317 case 351608024: // version 1318 this.version = TypeConvertor.castToString(value); // StringType 1319 return value; 1320 default: return super.setProperty(hash, name, value); 1321 } 1322 1323 } 1324 1325 @Override 1326 public Base setProperty(String name, Base value) throws FHIRException { 1327 if (name.equals("systemType")) { 1328 this.systemType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1329 } else if (name.equals("version")) { 1330 this.version = TypeConvertor.castToString(value); // StringType 1331 } else 1332 return super.setProperty(name, value); 1333 return value; 1334 } 1335 1336 @Override 1337 public Base makeProperty(int hash, String name) throws FHIRException { 1338 switch (hash) { 1339 case 642893321: return getSystemType(); 1340 case 351608024: return getVersionElement(); 1341 default: return super.makeProperty(hash, name); 1342 } 1343 1344 } 1345 1346 @Override 1347 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1348 switch (hash) { 1349 case 642893321: /*systemType*/ return new String[] {"CodeableConcept"}; 1350 case 351608024: /*version*/ return new String[] {"string"}; 1351 default: return super.getTypesForProperty(hash, name); 1352 } 1353 1354 } 1355 1356 @Override 1357 public Base addChild(String name) throws FHIRException { 1358 if (name.equals("systemType")) { 1359 this.systemType = new CodeableConcept(); 1360 return this.systemType; 1361 } 1362 else if (name.equals("version")) { 1363 throw new FHIRException("Cannot call addChild on a primitive type Device.specialization.version"); 1364 } 1365 else 1366 return super.addChild(name); 1367 } 1368 1369 public DeviceSpecializationComponent copy() { 1370 DeviceSpecializationComponent dst = new DeviceSpecializationComponent(); 1371 copyValues(dst); 1372 return dst; 1373 } 1374 1375 public void copyValues(DeviceSpecializationComponent dst) { 1376 super.copyValues(dst); 1377 dst.systemType = systemType == null ? null : systemType.copy(); 1378 dst.version = version == null ? null : version.copy(); 1379 } 1380 1381 @Override 1382 public boolean equalsDeep(Base other_) { 1383 if (!super.equalsDeep(other_)) 1384 return false; 1385 if (!(other_ instanceof DeviceSpecializationComponent)) 1386 return false; 1387 DeviceSpecializationComponent o = (DeviceSpecializationComponent) other_; 1388 return compareDeep(systemType, o.systemType, true) && compareDeep(version, o.version, true); 1389 } 1390 1391 @Override 1392 public boolean equalsShallow(Base other_) { 1393 if (!super.equalsShallow(other_)) 1394 return false; 1395 if (!(other_ instanceof DeviceSpecializationComponent)) 1396 return false; 1397 DeviceSpecializationComponent o = (DeviceSpecializationComponent) other_; 1398 return compareValues(version, o.version, true); 1399 } 1400 1401 public boolean isEmpty() { 1402 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(systemType, version); 1403 } 1404 1405 public String fhirType() { 1406 return "Device.specialization"; 1407 1408 } 1409 1410 } 1411 1412 @Block() 1413 public static class DeviceVersionComponent extends BackboneElement implements IBaseBackboneElement { 1414 /** 1415 * The type of the device version, e.g. manufacturer, approved, internal. 1416 */ 1417 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 1418 @Description(shortDefinition="The type of the device version, e.g. manufacturer, approved, internal", formalDefinition="The type of the device version, e.g. manufacturer, approved, internal." ) 1419 protected CodeableConcept type; 1420 1421 /** 1422 * A single component of the device version. 1423 */ 1424 @Child(name = "component", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=false) 1425 @Description(shortDefinition="A single component of the device version", formalDefinition="A single component of the device version." ) 1426 protected Identifier component; 1427 1428 /** 1429 * The version text. 1430 */ 1431 @Child(name = "value", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=false) 1432 @Description(shortDefinition="The version text", formalDefinition="The version text." ) 1433 protected StringType value; 1434 1435 private static final long serialVersionUID = 645214295L; 1436 1437 /** 1438 * Constructor 1439 */ 1440 public DeviceVersionComponent() { 1441 super(); 1442 } 1443 1444 /** 1445 * Constructor 1446 */ 1447 public DeviceVersionComponent(String value) { 1448 super(); 1449 this.setValue(value); 1450 } 1451 1452 /** 1453 * @return {@link #type} (The type of the device version, e.g. manufacturer, approved, internal.) 1454 */ 1455 public CodeableConcept getType() { 1456 if (this.type == null) 1457 if (Configuration.errorOnAutoCreate()) 1458 throw new Error("Attempt to auto-create DeviceVersionComponent.type"); 1459 else if (Configuration.doAutoCreate()) 1460 this.type = new CodeableConcept(); // cc 1461 return this.type; 1462 } 1463 1464 public boolean hasType() { 1465 return this.type != null && !this.type.isEmpty(); 1466 } 1467 1468 /** 1469 * @param value {@link #type} (The type of the device version, e.g. manufacturer, approved, internal.) 1470 */ 1471 public DeviceVersionComponent setType(CodeableConcept value) { 1472 this.type = value; 1473 return this; 1474 } 1475 1476 /** 1477 * @return {@link #component} (A single component of the device version.) 1478 */ 1479 public Identifier getComponent() { 1480 if (this.component == null) 1481 if (Configuration.errorOnAutoCreate()) 1482 throw new Error("Attempt to auto-create DeviceVersionComponent.component"); 1483 else if (Configuration.doAutoCreate()) 1484 this.component = new Identifier(); // cc 1485 return this.component; 1486 } 1487 1488 public boolean hasComponent() { 1489 return this.component != null && !this.component.isEmpty(); 1490 } 1491 1492 /** 1493 * @param value {@link #component} (A single component of the device version.) 1494 */ 1495 public DeviceVersionComponent setComponent(Identifier value) { 1496 this.component = value; 1497 return this; 1498 } 1499 1500 /** 1501 * @return {@link #value} (The version text.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 1502 */ 1503 public StringType getValueElement() { 1504 if (this.value == null) 1505 if (Configuration.errorOnAutoCreate()) 1506 throw new Error("Attempt to auto-create DeviceVersionComponent.value"); 1507 else if (Configuration.doAutoCreate()) 1508 this.value = new StringType(); // bb 1509 return this.value; 1510 } 1511 1512 public boolean hasValueElement() { 1513 return this.value != null && !this.value.isEmpty(); 1514 } 1515 1516 public boolean hasValue() { 1517 return this.value != null && !this.value.isEmpty(); 1518 } 1519 1520 /** 1521 * @param value {@link #value} (The version text.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 1522 */ 1523 public DeviceVersionComponent setValueElement(StringType value) { 1524 this.value = value; 1525 return this; 1526 } 1527 1528 /** 1529 * @return The version text. 1530 */ 1531 public String getValue() { 1532 return this.value == null ? null : this.value.getValue(); 1533 } 1534 1535 /** 1536 * @param value The version text. 1537 */ 1538 public DeviceVersionComponent setValue(String value) { 1539 if (this.value == null) 1540 this.value = new StringType(); 1541 this.value.setValue(value); 1542 return this; 1543 } 1544 1545 protected void listChildren(List<Property> children) { 1546 super.listChildren(children); 1547 children.add(new Property("type", "CodeableConcept", "The type of the device version, e.g. manufacturer, approved, internal.", 0, 1, type)); 1548 children.add(new Property("component", "Identifier", "A single component of the device version.", 0, 1, component)); 1549 children.add(new Property("value", "string", "The version text.", 0, 1, value)); 1550 } 1551 1552 @Override 1553 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1554 switch (_hash) { 1555 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type of the device version, e.g. manufacturer, approved, internal.", 0, 1, type); 1556 case -1399907075: /*component*/ return new Property("component", "Identifier", "A single component of the device version.", 0, 1, component); 1557 case 111972721: /*value*/ return new Property("value", "string", "The version text.", 0, 1, value); 1558 default: return super.getNamedProperty(_hash, _name, _checkValid); 1559 } 1560 1561 } 1562 1563 @Override 1564 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1565 switch (hash) { 1566 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1567 case -1399907075: /*component*/ return this.component == null ? new Base[0] : new Base[] {this.component}; // Identifier 1568 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 1569 default: return super.getProperty(hash, name, checkValid); 1570 } 1571 1572 } 1573 1574 @Override 1575 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1576 switch (hash) { 1577 case 3575610: // type 1578 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1579 return value; 1580 case -1399907075: // component 1581 this.component = TypeConvertor.castToIdentifier(value); // Identifier 1582 return value; 1583 case 111972721: // value 1584 this.value = TypeConvertor.castToString(value); // StringType 1585 return value; 1586 default: return super.setProperty(hash, name, value); 1587 } 1588 1589 } 1590 1591 @Override 1592 public Base setProperty(String name, Base value) throws FHIRException { 1593 if (name.equals("type")) { 1594 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1595 } else if (name.equals("component")) { 1596 this.component = TypeConvertor.castToIdentifier(value); // Identifier 1597 } else if (name.equals("value")) { 1598 this.value = TypeConvertor.castToString(value); // StringType 1599 } else 1600 return super.setProperty(name, value); 1601 return value; 1602 } 1603 1604 @Override 1605 public Base makeProperty(int hash, String name) throws FHIRException { 1606 switch (hash) { 1607 case 3575610: return getType(); 1608 case -1399907075: return getComponent(); 1609 case 111972721: return getValueElement(); 1610 default: return super.makeProperty(hash, name); 1611 } 1612 1613 } 1614 1615 @Override 1616 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1617 switch (hash) { 1618 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1619 case -1399907075: /*component*/ return new String[] {"Identifier"}; 1620 case 111972721: /*value*/ return new String[] {"string"}; 1621 default: return super.getTypesForProperty(hash, name); 1622 } 1623 1624 } 1625 1626 @Override 1627 public Base addChild(String name) throws FHIRException { 1628 if (name.equals("type")) { 1629 this.type = new CodeableConcept(); 1630 return this.type; 1631 } 1632 else if (name.equals("component")) { 1633 this.component = new Identifier(); 1634 return this.component; 1635 } 1636 else if (name.equals("value")) { 1637 throw new FHIRException("Cannot call addChild on a primitive type Device.version.value"); 1638 } 1639 else 1640 return super.addChild(name); 1641 } 1642 1643 public DeviceVersionComponent copy() { 1644 DeviceVersionComponent dst = new DeviceVersionComponent(); 1645 copyValues(dst); 1646 return dst; 1647 } 1648 1649 public void copyValues(DeviceVersionComponent dst) { 1650 super.copyValues(dst); 1651 dst.type = type == null ? null : type.copy(); 1652 dst.component = component == null ? null : component.copy(); 1653 dst.value = value == null ? null : value.copy(); 1654 } 1655 1656 @Override 1657 public boolean equalsDeep(Base other_) { 1658 if (!super.equalsDeep(other_)) 1659 return false; 1660 if (!(other_ instanceof DeviceVersionComponent)) 1661 return false; 1662 DeviceVersionComponent o = (DeviceVersionComponent) other_; 1663 return compareDeep(type, o.type, true) && compareDeep(component, o.component, true) && compareDeep(value, o.value, true) 1664 ; 1665 } 1666 1667 @Override 1668 public boolean equalsShallow(Base other_) { 1669 if (!super.equalsShallow(other_)) 1670 return false; 1671 if (!(other_ instanceof DeviceVersionComponent)) 1672 return false; 1673 DeviceVersionComponent o = (DeviceVersionComponent) other_; 1674 return compareValues(value, o.value, true); 1675 } 1676 1677 public boolean isEmpty() { 1678 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, component, value); 1679 } 1680 1681 public String fhirType() { 1682 return "Device.version"; 1683 1684 } 1685 1686 } 1687 1688 @Block() 1689 public static class DevicePropertyComponent extends BackboneElement implements IBaseBackboneElement { 1690 /** 1691 * Code that specifies the property DeviceDefinitionPropetyCode (Extensible). 1692 */ 1693 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 1694 @Description(shortDefinition="Code that specifies the property DeviceDefinitionPropetyCode (Extensible)", formalDefinition="Code that specifies the property DeviceDefinitionPropetyCode (Extensible)." ) 1695 protected CodeableConcept type; 1696 1697 /** 1698 * Property value as a quantity. 1699 */ 1700 @Child(name = "valueQuantity", type = {Quantity.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1701 @Description(shortDefinition="Property value as a quantity", formalDefinition="Property value as a quantity." ) 1702 protected List<Quantity> valueQuantity; 1703 1704 /** 1705 * Property value as a code, e.g., NTP4 (synced to NTP). 1706 */ 1707 @Child(name = "valueCode", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1708 @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)." ) 1709 protected List<CodeableConcept> valueCode; 1710 1711 private static final long serialVersionUID = 1512172633L; 1712 1713 /** 1714 * Constructor 1715 */ 1716 public DevicePropertyComponent() { 1717 super(); 1718 } 1719 1720 /** 1721 * Constructor 1722 */ 1723 public DevicePropertyComponent(CodeableConcept type) { 1724 super(); 1725 this.setType(type); 1726 } 1727 1728 /** 1729 * @return {@link #type} (Code that specifies the property DeviceDefinitionPropetyCode (Extensible).) 1730 */ 1731 public CodeableConcept getType() { 1732 if (this.type == null) 1733 if (Configuration.errorOnAutoCreate()) 1734 throw new Error("Attempt to auto-create DevicePropertyComponent.type"); 1735 else if (Configuration.doAutoCreate()) 1736 this.type = new CodeableConcept(); // cc 1737 return this.type; 1738 } 1739 1740 public boolean hasType() { 1741 return this.type != null && !this.type.isEmpty(); 1742 } 1743 1744 /** 1745 * @param value {@link #type} (Code that specifies the property DeviceDefinitionPropetyCode (Extensible).) 1746 */ 1747 public DevicePropertyComponent setType(CodeableConcept value) { 1748 this.type = value; 1749 return this; 1750 } 1751 1752 /** 1753 * @return {@link #valueQuantity} (Property value as a quantity.) 1754 */ 1755 public List<Quantity> getValueQuantity() { 1756 if (this.valueQuantity == null) 1757 this.valueQuantity = new ArrayList<Quantity>(); 1758 return this.valueQuantity; 1759 } 1760 1761 /** 1762 * @return Returns a reference to <code>this</code> for easy method chaining 1763 */ 1764 public DevicePropertyComponent setValueQuantity(List<Quantity> theValueQuantity) { 1765 this.valueQuantity = theValueQuantity; 1766 return this; 1767 } 1768 1769 public boolean hasValueQuantity() { 1770 if (this.valueQuantity == null) 1771 return false; 1772 for (Quantity item : this.valueQuantity) 1773 if (!item.isEmpty()) 1774 return true; 1775 return false; 1776 } 1777 1778 public Quantity addValueQuantity() { //3 1779 Quantity t = new Quantity(); 1780 if (this.valueQuantity == null) 1781 this.valueQuantity = new ArrayList<Quantity>(); 1782 this.valueQuantity.add(t); 1783 return t; 1784 } 1785 1786 public DevicePropertyComponent addValueQuantity(Quantity t) { //3 1787 if (t == null) 1788 return this; 1789 if (this.valueQuantity == null) 1790 this.valueQuantity = new ArrayList<Quantity>(); 1791 this.valueQuantity.add(t); 1792 return this; 1793 } 1794 1795 /** 1796 * @return The first repetition of repeating field {@link #valueQuantity}, creating it if it does not already exist {3} 1797 */ 1798 public Quantity getValueQuantityFirstRep() { 1799 if (getValueQuantity().isEmpty()) { 1800 addValueQuantity(); 1801 } 1802 return getValueQuantity().get(0); 1803 } 1804 1805 /** 1806 * @return {@link #valueCode} (Property value as a code, e.g., NTP4 (synced to NTP).) 1807 */ 1808 public List<CodeableConcept> getValueCode() { 1809 if (this.valueCode == null) 1810 this.valueCode = new ArrayList<CodeableConcept>(); 1811 return this.valueCode; 1812 } 1813 1814 /** 1815 * @return Returns a reference to <code>this</code> for easy method chaining 1816 */ 1817 public DevicePropertyComponent setValueCode(List<CodeableConcept> theValueCode) { 1818 this.valueCode = theValueCode; 1819 return this; 1820 } 1821 1822 public boolean hasValueCode() { 1823 if (this.valueCode == null) 1824 return false; 1825 for (CodeableConcept item : this.valueCode) 1826 if (!item.isEmpty()) 1827 return true; 1828 return false; 1829 } 1830 1831 public CodeableConcept addValueCode() { //3 1832 CodeableConcept t = new CodeableConcept(); 1833 if (this.valueCode == null) 1834 this.valueCode = new ArrayList<CodeableConcept>(); 1835 this.valueCode.add(t); 1836 return t; 1837 } 1838 1839 public DevicePropertyComponent addValueCode(CodeableConcept t) { //3 1840 if (t == null) 1841 return this; 1842 if (this.valueCode == null) 1843 this.valueCode = new ArrayList<CodeableConcept>(); 1844 this.valueCode.add(t); 1845 return this; 1846 } 1847 1848 /** 1849 * @return The first repetition of repeating field {@link #valueCode}, creating it if it does not already exist {3} 1850 */ 1851 public CodeableConcept getValueCodeFirstRep() { 1852 if (getValueCode().isEmpty()) { 1853 addValueCode(); 1854 } 1855 return getValueCode().get(0); 1856 } 1857 1858 protected void listChildren(List<Property> children) { 1859 super.listChildren(children); 1860 children.add(new Property("type", "CodeableConcept", "Code that specifies the property DeviceDefinitionPropetyCode (Extensible).", 0, 1, type)); 1861 children.add(new Property("valueQuantity", "Quantity", "Property value as a quantity.", 0, java.lang.Integer.MAX_VALUE, valueQuantity)); 1862 children.add(new Property("valueCode", "CodeableConcept", "Property value as a code, e.g., NTP4 (synced to NTP).", 0, java.lang.Integer.MAX_VALUE, valueCode)); 1863 } 1864 1865 @Override 1866 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1867 switch (_hash) { 1868 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Code that specifies the property DeviceDefinitionPropetyCode (Extensible).", 0, 1, type); 1869 case -2029823716: /*valueQuantity*/ return new Property("valueQuantity", "Quantity", "Property value as a quantity.", 0, java.lang.Integer.MAX_VALUE, valueQuantity); 1870 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); 1871 default: return super.getNamedProperty(_hash, _name, _checkValid); 1872 } 1873 1874 } 1875 1876 @Override 1877 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1878 switch (hash) { 1879 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1880 case -2029823716: /*valueQuantity*/ return this.valueQuantity == null ? new Base[0] : this.valueQuantity.toArray(new Base[this.valueQuantity.size()]); // Quantity 1881 case -766209282: /*valueCode*/ return this.valueCode == null ? new Base[0] : this.valueCode.toArray(new Base[this.valueCode.size()]); // CodeableConcept 1882 default: return super.getProperty(hash, name, checkValid); 1883 } 1884 1885 } 1886 1887 @Override 1888 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1889 switch (hash) { 1890 case 3575610: // type 1891 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1892 return value; 1893 case -2029823716: // valueQuantity 1894 this.getValueQuantity().add(TypeConvertor.castToQuantity(value)); // Quantity 1895 return value; 1896 case -766209282: // valueCode 1897 this.getValueCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1898 return value; 1899 default: return super.setProperty(hash, name, value); 1900 } 1901 1902 } 1903 1904 @Override 1905 public Base setProperty(String name, Base value) throws FHIRException { 1906 if (name.equals("type")) { 1907 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1908 } else if (name.equals("valueQuantity")) { 1909 this.getValueQuantity().add(TypeConvertor.castToQuantity(value)); 1910 } else if (name.equals("valueCode")) { 1911 this.getValueCode().add(TypeConvertor.castToCodeableConcept(value)); 1912 } else 1913 return super.setProperty(name, value); 1914 return value; 1915 } 1916 1917 @Override 1918 public Base makeProperty(int hash, String name) throws FHIRException { 1919 switch (hash) { 1920 case 3575610: return getType(); 1921 case -2029823716: return addValueQuantity(); 1922 case -766209282: return addValueCode(); 1923 default: return super.makeProperty(hash, name); 1924 } 1925 1926 } 1927 1928 @Override 1929 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1930 switch (hash) { 1931 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1932 case -2029823716: /*valueQuantity*/ return new String[] {"Quantity"}; 1933 case -766209282: /*valueCode*/ return new String[] {"CodeableConcept"}; 1934 default: return super.getTypesForProperty(hash, name); 1935 } 1936 1937 } 1938 1939 @Override 1940 public Base addChild(String name) throws FHIRException { 1941 if (name.equals("type")) { 1942 this.type = new CodeableConcept(); 1943 return this.type; 1944 } 1945 else if (name.equals("valueQuantity")) { 1946 return addValueQuantity(); 1947 } 1948 else if (name.equals("valueCode")) { 1949 return addValueCode(); 1950 } 1951 else 1952 return super.addChild(name); 1953 } 1954 1955 public DevicePropertyComponent copy() { 1956 DevicePropertyComponent dst = new DevicePropertyComponent(); 1957 copyValues(dst); 1958 return dst; 1959 } 1960 1961 public void copyValues(DevicePropertyComponent dst) { 1962 super.copyValues(dst); 1963 dst.type = type == null ? null : type.copy(); 1964 if (valueQuantity != null) { 1965 dst.valueQuantity = new ArrayList<Quantity>(); 1966 for (Quantity i : valueQuantity) 1967 dst.valueQuantity.add(i.copy()); 1968 }; 1969 if (valueCode != null) { 1970 dst.valueCode = new ArrayList<CodeableConcept>(); 1971 for (CodeableConcept i : valueCode) 1972 dst.valueCode.add(i.copy()); 1973 }; 1974 } 1975 1976 @Override 1977 public boolean equalsDeep(Base other_) { 1978 if (!super.equalsDeep(other_)) 1979 return false; 1980 if (!(other_ instanceof DevicePropertyComponent)) 1981 return false; 1982 DevicePropertyComponent o = (DevicePropertyComponent) other_; 1983 return compareDeep(type, o.type, true) && compareDeep(valueQuantity, o.valueQuantity, true) && compareDeep(valueCode, o.valueCode, true) 1984 ; 1985 } 1986 1987 @Override 1988 public boolean equalsShallow(Base other_) { 1989 if (!super.equalsShallow(other_)) 1990 return false; 1991 if (!(other_ instanceof DevicePropertyComponent)) 1992 return false; 1993 DevicePropertyComponent o = (DevicePropertyComponent) other_; 1994 return true; 1995 } 1996 1997 public boolean isEmpty() { 1998 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, valueQuantity, valueCode 1999 ); 2000 } 2001 2002 public String fhirType() { 2003 return "Device.property"; 2004 2005 } 2006 2007 } 2008 2009 /** 2010 * Unique instance identifiers assigned to a device by manufacturers other organizations or owners. 2011 */ 2012 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2013 @Description(shortDefinition="Instance identifier", formalDefinition="Unique instance identifiers assigned to a device by manufacturers other organizations or owners." ) 2014 protected List<Identifier> identifier; 2015 2016 /** 2017 * The reference to the definition for the device. 2018 */ 2019 @Child(name = "definition", type = {DeviceDefinition.class}, order=1, min=0, max=1, modifier=false, summary=false) 2020 @Description(shortDefinition="The reference to the definition for the device", formalDefinition="The reference to the definition for the device." ) 2021 protected Reference definition; 2022 2023 /** 2024 * 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. 2025 */ 2026 @Child(name = "udiCarrier", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2027 @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." ) 2028 protected List<DeviceUdiCarrierComponent> udiCarrier; 2029 2030 /** 2031 * Status of the Device availability. 2032 */ 2033 @Child(name = "status", type = {CodeType.class}, order=3, min=0, max=1, modifier=true, summary=true) 2034 @Description(shortDefinition="active | inactive | entered-in-error | unknown", formalDefinition="Status of the Device availability." ) 2035 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-status") 2036 protected Enumeration<FHIRDeviceStatus> status; 2037 2038 /** 2039 * Reason for the dtatus of the Device availability. 2040 */ 2041 @Child(name = "statusReason", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2042 @Description(shortDefinition="online | paused | standby | offline | not-ready | transduc-discon | hw-discon | off", formalDefinition="Reason for the dtatus of the Device availability." ) 2043 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-status-reason") 2044 protected List<CodeableConcept> statusReason; 2045 2046 /** 2047 * The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product. 2048 */ 2049 @Child(name = "distinctIdentifier", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 2050 @Description(shortDefinition="The distinct identification string", formalDefinition="The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product." ) 2051 protected StringType distinctIdentifier; 2052 2053 /** 2054 * A name of the manufacturer. 2055 */ 2056 @Child(name = "manufacturer", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 2057 @Description(shortDefinition="Name of device manufacturer", formalDefinition="A name of the manufacturer." ) 2058 protected StringType manufacturer; 2059 2060 /** 2061 * The date and time when the device was manufactured. 2062 */ 2063 @Child(name = "manufactureDate", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=false) 2064 @Description(shortDefinition="Date when the device was made", formalDefinition="The date and time when the device was manufactured." ) 2065 protected DateTimeType manufactureDate; 2066 2067 /** 2068 * The date and time beyond which this device is no longer valid or should not be used (if applicable). 2069 */ 2070 @Child(name = "expirationDate", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=false) 2071 @Description(shortDefinition="Date and time of expiry of this device (if applicable)", formalDefinition="The date and time beyond which this device is no longer valid or should not be used (if applicable)." ) 2072 protected DateTimeType expirationDate; 2073 2074 /** 2075 * Lot number assigned by the manufacturer. 2076 */ 2077 @Child(name = "lotNumber", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 2078 @Description(shortDefinition="Lot number of manufacture", formalDefinition="Lot number assigned by the manufacturer." ) 2079 protected StringType lotNumber; 2080 2081 /** 2082 * The serial number assigned by the organization when the device was manufactured. 2083 */ 2084 @Child(name = "serialNumber", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 2085 @Description(shortDefinition="Serial number assigned by the manufacturer", formalDefinition="The serial number assigned by the organization when the device was manufactured." ) 2086 protected StringType serialNumber; 2087 2088 /** 2089 * This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device. This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition. 2090 */ 2091 @Child(name = "deviceName", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2092 @Description(shortDefinition="The name of the device as given by the manufacturer", formalDefinition="This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device. This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition." ) 2093 protected List<DeviceDeviceNameComponent> deviceName; 2094 2095 /** 2096 * The manufacturer's model number for the device. 2097 */ 2098 @Child(name = "modelNumber", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) 2099 @Description(shortDefinition="The manufacturer's model number for the device", formalDefinition="The manufacturer's model number for the device." ) 2100 protected StringType modelNumber; 2101 2102 /** 2103 * The part number or catalog number of the device. 2104 */ 2105 @Child(name = "partNumber", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) 2106 @Description(shortDefinition="The part number or catalog number of the device", formalDefinition="The part number or catalog number of the device." ) 2107 protected StringType partNumber; 2108 2109 /** 2110 * The kind or type of device. 2111 */ 2112 @Child(name = "type", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=false) 2113 @Description(shortDefinition="The kind or type of device", formalDefinition="The kind or type of device." ) 2114 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-type") 2115 protected CodeableConcept type; 2116 2117 /** 2118 * The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication. 2119 */ 2120 @Child(name = "specialization", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2121 @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." ) 2122 protected List<DeviceSpecializationComponent> specialization; 2123 2124 /** 2125 * The actual design of the device or software version running on the device. 2126 */ 2127 @Child(name = "version", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2128 @Description(shortDefinition="The actual design of the device or software version running on the device", formalDefinition="The actual design of the device or software version running on the device." ) 2129 protected List<DeviceVersionComponent> version; 2130 2131 /** 2132 * The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties. 2133 */ 2134 @Child(name = "property", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2135 @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." ) 2136 protected List<DevicePropertyComponent> property; 2137 2138 /** 2139 * Patient information, If the device is affixed to a person. 2140 */ 2141 @Child(name = "patient", type = {Patient.class}, order=18, min=0, max=1, modifier=false, summary=false) 2142 @Description(shortDefinition="Patient to whom Device is affixed", formalDefinition="Patient information, If the device is affixed to a person." ) 2143 protected Reference patient; 2144 2145 /** 2146 * An organization that is responsible for the provision and ongoing maintenance of the device. 2147 */ 2148 @Child(name = "owner", type = {Organization.class}, order=19, min=0, max=1, modifier=false, summary=false) 2149 @Description(shortDefinition="Organization responsible for device", formalDefinition="An organization that is responsible for the provision and ongoing maintenance of the device." ) 2150 protected Reference owner; 2151 2152 /** 2153 * Contact details for an organization or a particular human that is responsible for the device. 2154 */ 2155 @Child(name = "contact", type = {ContactPoint.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2156 @Description(shortDefinition="Details for human/organization for support", formalDefinition="Contact details for an organization or a particular human that is responsible for the device." ) 2157 protected List<ContactPoint> contact; 2158 2159 /** 2160 * The place where the device can be found. 2161 */ 2162 @Child(name = "location", type = {Location.class}, order=21, min=0, max=1, modifier=false, summary=false) 2163 @Description(shortDefinition="Where the device is found", formalDefinition="The place where the device can be found." ) 2164 protected Reference location; 2165 2166 /** 2167 * A network address on which the device may be contacted directly. 2168 */ 2169 @Child(name = "url", type = {UriType.class}, order=22, min=0, max=1, modifier=false, summary=false) 2170 @Description(shortDefinition="Network address to contact device", formalDefinition="A network address on which the device may be contacted directly." ) 2171 protected UriType url; 2172 2173 /** 2174 * Descriptive information, usage information or implantation information that is not captured in an existing element. 2175 */ 2176 @Child(name = "note", type = {Annotation.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2177 @Description(shortDefinition="Device notes and comments", formalDefinition="Descriptive information, usage information or implantation information that is not captured in an existing element." ) 2178 protected List<Annotation> note; 2179 2180 /** 2181 * Provides additional safety characteristics about a medical device. For example devices containing latex. 2182 */ 2183 @Child(name = "safety", type = {CodeableConcept.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2184 @Description(shortDefinition="Safety Characteristics of Device", formalDefinition="Provides additional safety characteristics about a medical device. For example devices containing latex." ) 2185 protected List<CodeableConcept> safety; 2186 2187 /** 2188 * The device that this device is attached to or is part of. 2189 */ 2190 @Child(name = "parent", type = {Device.class}, order=25, min=0, max=1, modifier=false, summary=false) 2191 @Description(shortDefinition="The device that this device is attached to or is part of", formalDefinition="The device that this device is attached to or is part of." ) 2192 protected Reference parent; 2193 2194 private static final long serialVersionUID = 634832360L; 2195 2196 /** 2197 * Constructor 2198 */ 2199 public Device() { 2200 super(); 2201 } 2202 2203 /** 2204 * @return {@link #identifier} (Unique instance identifiers assigned to a device by manufacturers other organizations or owners.) 2205 */ 2206 public List<Identifier> getIdentifier() { 2207 if (this.identifier == null) 2208 this.identifier = new ArrayList<Identifier>(); 2209 return this.identifier; 2210 } 2211 2212 /** 2213 * @return Returns a reference to <code>this</code> for easy method chaining 2214 */ 2215 public Device setIdentifier(List<Identifier> theIdentifier) { 2216 this.identifier = theIdentifier; 2217 return this; 2218 } 2219 2220 public boolean hasIdentifier() { 2221 if (this.identifier == null) 2222 return false; 2223 for (Identifier item : this.identifier) 2224 if (!item.isEmpty()) 2225 return true; 2226 return false; 2227 } 2228 2229 public Identifier addIdentifier() { //3 2230 Identifier t = new Identifier(); 2231 if (this.identifier == null) 2232 this.identifier = new ArrayList<Identifier>(); 2233 this.identifier.add(t); 2234 return t; 2235 } 2236 2237 public Device addIdentifier(Identifier t) { //3 2238 if (t == null) 2239 return this; 2240 if (this.identifier == null) 2241 this.identifier = new ArrayList<Identifier>(); 2242 this.identifier.add(t); 2243 return this; 2244 } 2245 2246 /** 2247 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 2248 */ 2249 public Identifier getIdentifierFirstRep() { 2250 if (getIdentifier().isEmpty()) { 2251 addIdentifier(); 2252 } 2253 return getIdentifier().get(0); 2254 } 2255 2256 /** 2257 * @return {@link #definition} (The reference to the definition for the device.) 2258 */ 2259 public Reference getDefinition() { 2260 if (this.definition == null) 2261 if (Configuration.errorOnAutoCreate()) 2262 throw new Error("Attempt to auto-create Device.definition"); 2263 else if (Configuration.doAutoCreate()) 2264 this.definition = new Reference(); // cc 2265 return this.definition; 2266 } 2267 2268 public boolean hasDefinition() { 2269 return this.definition != null && !this.definition.isEmpty(); 2270 } 2271 2272 /** 2273 * @param value {@link #definition} (The reference to the definition for the device.) 2274 */ 2275 public Device setDefinition(Reference value) { 2276 this.definition = value; 2277 return this; 2278 } 2279 2280 /** 2281 * @return {@link #udiCarrier} (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.) 2282 */ 2283 public List<DeviceUdiCarrierComponent> getUdiCarrier() { 2284 if (this.udiCarrier == null) 2285 this.udiCarrier = new ArrayList<DeviceUdiCarrierComponent>(); 2286 return this.udiCarrier; 2287 } 2288 2289 /** 2290 * @return Returns a reference to <code>this</code> for easy method chaining 2291 */ 2292 public Device setUdiCarrier(List<DeviceUdiCarrierComponent> theUdiCarrier) { 2293 this.udiCarrier = theUdiCarrier; 2294 return this; 2295 } 2296 2297 public boolean hasUdiCarrier() { 2298 if (this.udiCarrier == null) 2299 return false; 2300 for (DeviceUdiCarrierComponent item : this.udiCarrier) 2301 if (!item.isEmpty()) 2302 return true; 2303 return false; 2304 } 2305 2306 public DeviceUdiCarrierComponent addUdiCarrier() { //3 2307 DeviceUdiCarrierComponent t = new DeviceUdiCarrierComponent(); 2308 if (this.udiCarrier == null) 2309 this.udiCarrier = new ArrayList<DeviceUdiCarrierComponent>(); 2310 this.udiCarrier.add(t); 2311 return t; 2312 } 2313 2314 public Device addUdiCarrier(DeviceUdiCarrierComponent t) { //3 2315 if (t == null) 2316 return this; 2317 if (this.udiCarrier == null) 2318 this.udiCarrier = new ArrayList<DeviceUdiCarrierComponent>(); 2319 this.udiCarrier.add(t); 2320 return this; 2321 } 2322 2323 /** 2324 * @return The first repetition of repeating field {@link #udiCarrier}, creating it if it does not already exist {3} 2325 */ 2326 public DeviceUdiCarrierComponent getUdiCarrierFirstRep() { 2327 if (getUdiCarrier().isEmpty()) { 2328 addUdiCarrier(); 2329 } 2330 return getUdiCarrier().get(0); 2331 } 2332 2333 /** 2334 * @return {@link #status} (Status of the Device availability.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2335 */ 2336 public Enumeration<FHIRDeviceStatus> getStatusElement() { 2337 if (this.status == null) 2338 if (Configuration.errorOnAutoCreate()) 2339 throw new Error("Attempt to auto-create Device.status"); 2340 else if (Configuration.doAutoCreate()) 2341 this.status = new Enumeration<FHIRDeviceStatus>(new FHIRDeviceStatusEnumFactory()); // bb 2342 return this.status; 2343 } 2344 2345 public boolean hasStatusElement() { 2346 return this.status != null && !this.status.isEmpty(); 2347 } 2348 2349 public boolean hasStatus() { 2350 return this.status != null && !this.status.isEmpty(); 2351 } 2352 2353 /** 2354 * @param value {@link #status} (Status of the Device availability.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2355 */ 2356 public Device setStatusElement(Enumeration<FHIRDeviceStatus> value) { 2357 this.status = value; 2358 return this; 2359 } 2360 2361 /** 2362 * @return Status of the Device availability. 2363 */ 2364 public FHIRDeviceStatus getStatus() { 2365 return this.status == null ? null : this.status.getValue(); 2366 } 2367 2368 /** 2369 * @param value Status of the Device availability. 2370 */ 2371 public Device setStatus(FHIRDeviceStatus value) { 2372 if (value == null) 2373 this.status = null; 2374 else { 2375 if (this.status == null) 2376 this.status = new Enumeration<FHIRDeviceStatus>(new FHIRDeviceStatusEnumFactory()); 2377 this.status.setValue(value); 2378 } 2379 return this; 2380 } 2381 2382 /** 2383 * @return {@link #statusReason} (Reason for the dtatus of the Device availability.) 2384 */ 2385 public List<CodeableConcept> getStatusReason() { 2386 if (this.statusReason == null) 2387 this.statusReason = new ArrayList<CodeableConcept>(); 2388 return this.statusReason; 2389 } 2390 2391 /** 2392 * @return Returns a reference to <code>this</code> for easy method chaining 2393 */ 2394 public Device setStatusReason(List<CodeableConcept> theStatusReason) { 2395 this.statusReason = theStatusReason; 2396 return this; 2397 } 2398 2399 public boolean hasStatusReason() { 2400 if (this.statusReason == null) 2401 return false; 2402 for (CodeableConcept item : this.statusReason) 2403 if (!item.isEmpty()) 2404 return true; 2405 return false; 2406 } 2407 2408 public CodeableConcept addStatusReason() { //3 2409 CodeableConcept t = new CodeableConcept(); 2410 if (this.statusReason == null) 2411 this.statusReason = new ArrayList<CodeableConcept>(); 2412 this.statusReason.add(t); 2413 return t; 2414 } 2415 2416 public Device addStatusReason(CodeableConcept t) { //3 2417 if (t == null) 2418 return this; 2419 if (this.statusReason == null) 2420 this.statusReason = new ArrayList<CodeableConcept>(); 2421 this.statusReason.add(t); 2422 return this; 2423 } 2424 2425 /** 2426 * @return The first repetition of repeating field {@link #statusReason}, creating it if it does not already exist {3} 2427 */ 2428 public CodeableConcept getStatusReasonFirstRep() { 2429 if (getStatusReason().isEmpty()) { 2430 addStatusReason(); 2431 } 2432 return getStatusReason().get(0); 2433 } 2434 2435 /** 2436 * @return {@link #distinctIdentifier} (The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product.). This is the underlying object with id, value and extensions. The accessor "getDistinctIdentifier" gives direct access to the value 2437 */ 2438 public StringType getDistinctIdentifierElement() { 2439 if (this.distinctIdentifier == null) 2440 if (Configuration.errorOnAutoCreate()) 2441 throw new Error("Attempt to auto-create Device.distinctIdentifier"); 2442 else if (Configuration.doAutoCreate()) 2443 this.distinctIdentifier = new StringType(); // bb 2444 return this.distinctIdentifier; 2445 } 2446 2447 public boolean hasDistinctIdentifierElement() { 2448 return this.distinctIdentifier != null && !this.distinctIdentifier.isEmpty(); 2449 } 2450 2451 public boolean hasDistinctIdentifier() { 2452 return this.distinctIdentifier != null && !this.distinctIdentifier.isEmpty(); 2453 } 2454 2455 /** 2456 * @param value {@link #distinctIdentifier} (The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product.). This is the underlying object with id, value and extensions. The accessor "getDistinctIdentifier" gives direct access to the value 2457 */ 2458 public Device setDistinctIdentifierElement(StringType value) { 2459 this.distinctIdentifier = value; 2460 return this; 2461 } 2462 2463 /** 2464 * @return The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product. 2465 */ 2466 public String getDistinctIdentifier() { 2467 return this.distinctIdentifier == null ? null : this.distinctIdentifier.getValue(); 2468 } 2469 2470 /** 2471 * @param value The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product. 2472 */ 2473 public Device setDistinctIdentifier(String value) { 2474 if (Utilities.noString(value)) 2475 this.distinctIdentifier = null; 2476 else { 2477 if (this.distinctIdentifier == null) 2478 this.distinctIdentifier = new StringType(); 2479 this.distinctIdentifier.setValue(value); 2480 } 2481 return this; 2482 } 2483 2484 /** 2485 * @return {@link #manufacturer} (A name of the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getManufacturer" gives direct access to the value 2486 */ 2487 public StringType getManufacturerElement() { 2488 if (this.manufacturer == null) 2489 if (Configuration.errorOnAutoCreate()) 2490 throw new Error("Attempt to auto-create Device.manufacturer"); 2491 else if (Configuration.doAutoCreate()) 2492 this.manufacturer = new StringType(); // bb 2493 return this.manufacturer; 2494 } 2495 2496 public boolean hasManufacturerElement() { 2497 return this.manufacturer != null && !this.manufacturer.isEmpty(); 2498 } 2499 2500 public boolean hasManufacturer() { 2501 return this.manufacturer != null && !this.manufacturer.isEmpty(); 2502 } 2503 2504 /** 2505 * @param value {@link #manufacturer} (A name of the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getManufacturer" gives direct access to the value 2506 */ 2507 public Device setManufacturerElement(StringType value) { 2508 this.manufacturer = value; 2509 return this; 2510 } 2511 2512 /** 2513 * @return A name of the manufacturer. 2514 */ 2515 public String getManufacturer() { 2516 return this.manufacturer == null ? null : this.manufacturer.getValue(); 2517 } 2518 2519 /** 2520 * @param value A name of the manufacturer. 2521 */ 2522 public Device setManufacturer(String value) { 2523 if (Utilities.noString(value)) 2524 this.manufacturer = null; 2525 else { 2526 if (this.manufacturer == null) 2527 this.manufacturer = new StringType(); 2528 this.manufacturer.setValue(value); 2529 } 2530 return this; 2531 } 2532 2533 /** 2534 * @return {@link #manufactureDate} (The date and time when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getManufactureDate" gives direct access to the value 2535 */ 2536 public DateTimeType getManufactureDateElement() { 2537 if (this.manufactureDate == null) 2538 if (Configuration.errorOnAutoCreate()) 2539 throw new Error("Attempt to auto-create Device.manufactureDate"); 2540 else if (Configuration.doAutoCreate()) 2541 this.manufactureDate = new DateTimeType(); // bb 2542 return this.manufactureDate; 2543 } 2544 2545 public boolean hasManufactureDateElement() { 2546 return this.manufactureDate != null && !this.manufactureDate.isEmpty(); 2547 } 2548 2549 public boolean hasManufactureDate() { 2550 return this.manufactureDate != null && !this.manufactureDate.isEmpty(); 2551 } 2552 2553 /** 2554 * @param value {@link #manufactureDate} (The date and time when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getManufactureDate" gives direct access to the value 2555 */ 2556 public Device setManufactureDateElement(DateTimeType value) { 2557 this.manufactureDate = value; 2558 return this; 2559 } 2560 2561 /** 2562 * @return The date and time when the device was manufactured. 2563 */ 2564 public Date getManufactureDate() { 2565 return this.manufactureDate == null ? null : this.manufactureDate.getValue(); 2566 } 2567 2568 /** 2569 * @param value The date and time when the device was manufactured. 2570 */ 2571 public Device setManufactureDate(Date value) { 2572 if (value == null) 2573 this.manufactureDate = null; 2574 else { 2575 if (this.manufactureDate == null) 2576 this.manufactureDate = new DateTimeType(); 2577 this.manufactureDate.setValue(value); 2578 } 2579 return this; 2580 } 2581 2582 /** 2583 * @return {@link #expirationDate} (The date and time beyond which this device is no longer valid or should not be used (if applicable).). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value 2584 */ 2585 public DateTimeType getExpirationDateElement() { 2586 if (this.expirationDate == null) 2587 if (Configuration.errorOnAutoCreate()) 2588 throw new Error("Attempt to auto-create Device.expirationDate"); 2589 else if (Configuration.doAutoCreate()) 2590 this.expirationDate = new DateTimeType(); // bb 2591 return this.expirationDate; 2592 } 2593 2594 public boolean hasExpirationDateElement() { 2595 return this.expirationDate != null && !this.expirationDate.isEmpty(); 2596 } 2597 2598 public boolean hasExpirationDate() { 2599 return this.expirationDate != null && !this.expirationDate.isEmpty(); 2600 } 2601 2602 /** 2603 * @param value {@link #expirationDate} (The date and time beyond which this device is no longer valid or should not be used (if applicable).). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value 2604 */ 2605 public Device setExpirationDateElement(DateTimeType value) { 2606 this.expirationDate = value; 2607 return this; 2608 } 2609 2610 /** 2611 * @return The date and time beyond which this device is no longer valid or should not be used (if applicable). 2612 */ 2613 public Date getExpirationDate() { 2614 return this.expirationDate == null ? null : this.expirationDate.getValue(); 2615 } 2616 2617 /** 2618 * @param value The date and time beyond which this device is no longer valid or should not be used (if applicable). 2619 */ 2620 public Device setExpirationDate(Date value) { 2621 if (value == null) 2622 this.expirationDate = null; 2623 else { 2624 if (this.expirationDate == null) 2625 this.expirationDate = new DateTimeType(); 2626 this.expirationDate.setValue(value); 2627 } 2628 return this; 2629 } 2630 2631 /** 2632 * @return {@link #lotNumber} (Lot number assigned by the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value 2633 */ 2634 public StringType getLotNumberElement() { 2635 if (this.lotNumber == null) 2636 if (Configuration.errorOnAutoCreate()) 2637 throw new Error("Attempt to auto-create Device.lotNumber"); 2638 else if (Configuration.doAutoCreate()) 2639 this.lotNumber = new StringType(); // bb 2640 return this.lotNumber; 2641 } 2642 2643 public boolean hasLotNumberElement() { 2644 return this.lotNumber != null && !this.lotNumber.isEmpty(); 2645 } 2646 2647 public boolean hasLotNumber() { 2648 return this.lotNumber != null && !this.lotNumber.isEmpty(); 2649 } 2650 2651 /** 2652 * @param value {@link #lotNumber} (Lot number assigned by the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value 2653 */ 2654 public Device setLotNumberElement(StringType value) { 2655 this.lotNumber = value; 2656 return this; 2657 } 2658 2659 /** 2660 * @return Lot number assigned by the manufacturer. 2661 */ 2662 public String getLotNumber() { 2663 return this.lotNumber == null ? null : this.lotNumber.getValue(); 2664 } 2665 2666 /** 2667 * @param value Lot number assigned by the manufacturer. 2668 */ 2669 public Device setLotNumber(String value) { 2670 if (Utilities.noString(value)) 2671 this.lotNumber = null; 2672 else { 2673 if (this.lotNumber == null) 2674 this.lotNumber = new StringType(); 2675 this.lotNumber.setValue(value); 2676 } 2677 return this; 2678 } 2679 2680 /** 2681 * @return {@link #serialNumber} (The serial number assigned by the organization when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getSerialNumber" gives direct access to the value 2682 */ 2683 public StringType getSerialNumberElement() { 2684 if (this.serialNumber == null) 2685 if (Configuration.errorOnAutoCreate()) 2686 throw new Error("Attempt to auto-create Device.serialNumber"); 2687 else if (Configuration.doAutoCreate()) 2688 this.serialNumber = new StringType(); // bb 2689 return this.serialNumber; 2690 } 2691 2692 public boolean hasSerialNumberElement() { 2693 return this.serialNumber != null && !this.serialNumber.isEmpty(); 2694 } 2695 2696 public boolean hasSerialNumber() { 2697 return this.serialNumber != null && !this.serialNumber.isEmpty(); 2698 } 2699 2700 /** 2701 * @param value {@link #serialNumber} (The serial number assigned by the organization when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getSerialNumber" gives direct access to the value 2702 */ 2703 public Device setSerialNumberElement(StringType value) { 2704 this.serialNumber = value; 2705 return this; 2706 } 2707 2708 /** 2709 * @return The serial number assigned by the organization when the device was manufactured. 2710 */ 2711 public String getSerialNumber() { 2712 return this.serialNumber == null ? null : this.serialNumber.getValue(); 2713 } 2714 2715 /** 2716 * @param value The serial number assigned by the organization when the device was manufactured. 2717 */ 2718 public Device setSerialNumber(String value) { 2719 if (Utilities.noString(value)) 2720 this.serialNumber = null; 2721 else { 2722 if (this.serialNumber == null) 2723 this.serialNumber = new StringType(); 2724 this.serialNumber.setValue(value); 2725 } 2726 return this; 2727 } 2728 2729 /** 2730 * @return {@link #deviceName} (This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device. This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition.) 2731 */ 2732 public List<DeviceDeviceNameComponent> getDeviceName() { 2733 if (this.deviceName == null) 2734 this.deviceName = new ArrayList<DeviceDeviceNameComponent>(); 2735 return this.deviceName; 2736 } 2737 2738 /** 2739 * @return Returns a reference to <code>this</code> for easy method chaining 2740 */ 2741 public Device setDeviceName(List<DeviceDeviceNameComponent> theDeviceName) { 2742 this.deviceName = theDeviceName; 2743 return this; 2744 } 2745 2746 public boolean hasDeviceName() { 2747 if (this.deviceName == null) 2748 return false; 2749 for (DeviceDeviceNameComponent item : this.deviceName) 2750 if (!item.isEmpty()) 2751 return true; 2752 return false; 2753 } 2754 2755 public DeviceDeviceNameComponent addDeviceName() { //3 2756 DeviceDeviceNameComponent t = new DeviceDeviceNameComponent(); 2757 if (this.deviceName == null) 2758 this.deviceName = new ArrayList<DeviceDeviceNameComponent>(); 2759 this.deviceName.add(t); 2760 return t; 2761 } 2762 2763 public Device addDeviceName(DeviceDeviceNameComponent t) { //3 2764 if (t == null) 2765 return this; 2766 if (this.deviceName == null) 2767 this.deviceName = new ArrayList<DeviceDeviceNameComponent>(); 2768 this.deviceName.add(t); 2769 return this; 2770 } 2771 2772 /** 2773 * @return The first repetition of repeating field {@link #deviceName}, creating it if it does not already exist {3} 2774 */ 2775 public DeviceDeviceNameComponent getDeviceNameFirstRep() { 2776 if (getDeviceName().isEmpty()) { 2777 addDeviceName(); 2778 } 2779 return getDeviceName().get(0); 2780 } 2781 2782 /** 2783 * @return {@link #modelNumber} (The manufacturer's model number for the device.). This is the underlying object with id, value and extensions. The accessor "getModelNumber" gives direct access to the value 2784 */ 2785 public StringType getModelNumberElement() { 2786 if (this.modelNumber == null) 2787 if (Configuration.errorOnAutoCreate()) 2788 throw new Error("Attempt to auto-create Device.modelNumber"); 2789 else if (Configuration.doAutoCreate()) 2790 this.modelNumber = new StringType(); // bb 2791 return this.modelNumber; 2792 } 2793 2794 public boolean hasModelNumberElement() { 2795 return this.modelNumber != null && !this.modelNumber.isEmpty(); 2796 } 2797 2798 public boolean hasModelNumber() { 2799 return this.modelNumber != null && !this.modelNumber.isEmpty(); 2800 } 2801 2802 /** 2803 * @param value {@link #modelNumber} (The manufacturer's model number for the device.). This is the underlying object with id, value and extensions. The accessor "getModelNumber" gives direct access to the value 2804 */ 2805 public Device setModelNumberElement(StringType value) { 2806 this.modelNumber = value; 2807 return this; 2808 } 2809 2810 /** 2811 * @return The manufacturer's model number for the device. 2812 */ 2813 public String getModelNumber() { 2814 return this.modelNumber == null ? null : this.modelNumber.getValue(); 2815 } 2816 2817 /** 2818 * @param value The manufacturer's model number for the device. 2819 */ 2820 public Device setModelNumber(String value) { 2821 if (Utilities.noString(value)) 2822 this.modelNumber = null; 2823 else { 2824 if (this.modelNumber == null) 2825 this.modelNumber = new StringType(); 2826 this.modelNumber.setValue(value); 2827 } 2828 return this; 2829 } 2830 2831 /** 2832 * @return {@link #partNumber} (The part number or catalog number of the device.). This is the underlying object with id, value and extensions. The accessor "getPartNumber" gives direct access to the value 2833 */ 2834 public StringType getPartNumberElement() { 2835 if (this.partNumber == null) 2836 if (Configuration.errorOnAutoCreate()) 2837 throw new Error("Attempt to auto-create Device.partNumber"); 2838 else if (Configuration.doAutoCreate()) 2839 this.partNumber = new StringType(); // bb 2840 return this.partNumber; 2841 } 2842 2843 public boolean hasPartNumberElement() { 2844 return this.partNumber != null && !this.partNumber.isEmpty(); 2845 } 2846 2847 public boolean hasPartNumber() { 2848 return this.partNumber != null && !this.partNumber.isEmpty(); 2849 } 2850 2851 /** 2852 * @param value {@link #partNumber} (The part number or catalog number of the device.). This is the underlying object with id, value and extensions. The accessor "getPartNumber" gives direct access to the value 2853 */ 2854 public Device setPartNumberElement(StringType value) { 2855 this.partNumber = value; 2856 return this; 2857 } 2858 2859 /** 2860 * @return The part number or catalog number of the device. 2861 */ 2862 public String getPartNumber() { 2863 return this.partNumber == null ? null : this.partNumber.getValue(); 2864 } 2865 2866 /** 2867 * @param value The part number or catalog number of the device. 2868 */ 2869 public Device setPartNumber(String value) { 2870 if (Utilities.noString(value)) 2871 this.partNumber = null; 2872 else { 2873 if (this.partNumber == null) 2874 this.partNumber = new StringType(); 2875 this.partNumber.setValue(value); 2876 } 2877 return this; 2878 } 2879 2880 /** 2881 * @return {@link #type} (The kind or type of device.) 2882 */ 2883 public CodeableConcept getType() { 2884 if (this.type == null) 2885 if (Configuration.errorOnAutoCreate()) 2886 throw new Error("Attempt to auto-create Device.type"); 2887 else if (Configuration.doAutoCreate()) 2888 this.type = new CodeableConcept(); // cc 2889 return this.type; 2890 } 2891 2892 public boolean hasType() { 2893 return this.type != null && !this.type.isEmpty(); 2894 } 2895 2896 /** 2897 * @param value {@link #type} (The kind or type of device.) 2898 */ 2899 public Device setType(CodeableConcept value) { 2900 this.type = value; 2901 return this; 2902 } 2903 2904 /** 2905 * @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.) 2906 */ 2907 public List<DeviceSpecializationComponent> getSpecialization() { 2908 if (this.specialization == null) 2909 this.specialization = new ArrayList<DeviceSpecializationComponent>(); 2910 return this.specialization; 2911 } 2912 2913 /** 2914 * @return Returns a reference to <code>this</code> for easy method chaining 2915 */ 2916 public Device setSpecialization(List<DeviceSpecializationComponent> theSpecialization) { 2917 this.specialization = theSpecialization; 2918 return this; 2919 } 2920 2921 public boolean hasSpecialization() { 2922 if (this.specialization == null) 2923 return false; 2924 for (DeviceSpecializationComponent item : this.specialization) 2925 if (!item.isEmpty()) 2926 return true; 2927 return false; 2928 } 2929 2930 public DeviceSpecializationComponent addSpecialization() { //3 2931 DeviceSpecializationComponent t = new DeviceSpecializationComponent(); 2932 if (this.specialization == null) 2933 this.specialization = new ArrayList<DeviceSpecializationComponent>(); 2934 this.specialization.add(t); 2935 return t; 2936 } 2937 2938 public Device addSpecialization(DeviceSpecializationComponent t) { //3 2939 if (t == null) 2940 return this; 2941 if (this.specialization == null) 2942 this.specialization = new ArrayList<DeviceSpecializationComponent>(); 2943 this.specialization.add(t); 2944 return this; 2945 } 2946 2947 /** 2948 * @return The first repetition of repeating field {@link #specialization}, creating it if it does not already exist {3} 2949 */ 2950 public DeviceSpecializationComponent getSpecializationFirstRep() { 2951 if (getSpecialization().isEmpty()) { 2952 addSpecialization(); 2953 } 2954 return getSpecialization().get(0); 2955 } 2956 2957 /** 2958 * @return {@link #version} (The actual design of the device or software version running on the device.) 2959 */ 2960 public List<DeviceVersionComponent> getVersion() { 2961 if (this.version == null) 2962 this.version = new ArrayList<DeviceVersionComponent>(); 2963 return this.version; 2964 } 2965 2966 /** 2967 * @return Returns a reference to <code>this</code> for easy method chaining 2968 */ 2969 public Device setVersion(List<DeviceVersionComponent> theVersion) { 2970 this.version = theVersion; 2971 return this; 2972 } 2973 2974 public boolean hasVersion() { 2975 if (this.version == null) 2976 return false; 2977 for (DeviceVersionComponent item : this.version) 2978 if (!item.isEmpty()) 2979 return true; 2980 return false; 2981 } 2982 2983 public DeviceVersionComponent addVersion() { //3 2984 DeviceVersionComponent t = new DeviceVersionComponent(); 2985 if (this.version == null) 2986 this.version = new ArrayList<DeviceVersionComponent>(); 2987 this.version.add(t); 2988 return t; 2989 } 2990 2991 public Device addVersion(DeviceVersionComponent t) { //3 2992 if (t == null) 2993 return this; 2994 if (this.version == null) 2995 this.version = new ArrayList<DeviceVersionComponent>(); 2996 this.version.add(t); 2997 return this; 2998 } 2999 3000 /** 3001 * @return The first repetition of repeating field {@link #version}, creating it if it does not already exist {3} 3002 */ 3003 public DeviceVersionComponent getVersionFirstRep() { 3004 if (getVersion().isEmpty()) { 3005 addVersion(); 3006 } 3007 return getVersion().get(0); 3008 } 3009 3010 /** 3011 * @return {@link #property} (The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.) 3012 */ 3013 public List<DevicePropertyComponent> getProperty() { 3014 if (this.property == null) 3015 this.property = new ArrayList<DevicePropertyComponent>(); 3016 return this.property; 3017 } 3018 3019 /** 3020 * @return Returns a reference to <code>this</code> for easy method chaining 3021 */ 3022 public Device setProperty(List<DevicePropertyComponent> theProperty) { 3023 this.property = theProperty; 3024 return this; 3025 } 3026 3027 public boolean hasProperty() { 3028 if (this.property == null) 3029 return false; 3030 for (DevicePropertyComponent item : this.property) 3031 if (!item.isEmpty()) 3032 return true; 3033 return false; 3034 } 3035 3036 public DevicePropertyComponent addProperty() { //3 3037 DevicePropertyComponent t = new DevicePropertyComponent(); 3038 if (this.property == null) 3039 this.property = new ArrayList<DevicePropertyComponent>(); 3040 this.property.add(t); 3041 return t; 3042 } 3043 3044 public Device addProperty(DevicePropertyComponent t) { //3 3045 if (t == null) 3046 return this; 3047 if (this.property == null) 3048 this.property = new ArrayList<DevicePropertyComponent>(); 3049 this.property.add(t); 3050 return this; 3051 } 3052 3053 /** 3054 * @return The first repetition of repeating field {@link #property}, creating it if it does not already exist {3} 3055 */ 3056 public DevicePropertyComponent getPropertyFirstRep() { 3057 if (getProperty().isEmpty()) { 3058 addProperty(); 3059 } 3060 return getProperty().get(0); 3061 } 3062 3063 /** 3064 * @return {@link #patient} (Patient information, If the device is affixed to a person.) 3065 */ 3066 public Reference getPatient() { 3067 if (this.patient == null) 3068 if (Configuration.errorOnAutoCreate()) 3069 throw new Error("Attempt to auto-create Device.patient"); 3070 else if (Configuration.doAutoCreate()) 3071 this.patient = new Reference(); // cc 3072 return this.patient; 3073 } 3074 3075 public boolean hasPatient() { 3076 return this.patient != null && !this.patient.isEmpty(); 3077 } 3078 3079 /** 3080 * @param value {@link #patient} (Patient information, If the device is affixed to a person.) 3081 */ 3082 public Device setPatient(Reference value) { 3083 this.patient = value; 3084 return this; 3085 } 3086 3087 /** 3088 * @return {@link #owner} (An organization that is responsible for the provision and ongoing maintenance of the device.) 3089 */ 3090 public Reference getOwner() { 3091 if (this.owner == null) 3092 if (Configuration.errorOnAutoCreate()) 3093 throw new Error("Attempt to auto-create Device.owner"); 3094 else if (Configuration.doAutoCreate()) 3095 this.owner = new Reference(); // cc 3096 return this.owner; 3097 } 3098 3099 public boolean hasOwner() { 3100 return this.owner != null && !this.owner.isEmpty(); 3101 } 3102 3103 /** 3104 * @param value {@link #owner} (An organization that is responsible for the provision and ongoing maintenance of the device.) 3105 */ 3106 public Device setOwner(Reference value) { 3107 this.owner = value; 3108 return this; 3109 } 3110 3111 /** 3112 * @return {@link #contact} (Contact details for an organization or a particular human that is responsible for the device.) 3113 */ 3114 public List<ContactPoint> getContact() { 3115 if (this.contact == null) 3116 this.contact = new ArrayList<ContactPoint>(); 3117 return this.contact; 3118 } 3119 3120 /** 3121 * @return Returns a reference to <code>this</code> for easy method chaining 3122 */ 3123 public Device setContact(List<ContactPoint> theContact) { 3124 this.contact = theContact; 3125 return this; 3126 } 3127 3128 public boolean hasContact() { 3129 if (this.contact == null) 3130 return false; 3131 for (ContactPoint item : this.contact) 3132 if (!item.isEmpty()) 3133 return true; 3134 return false; 3135 } 3136 3137 public ContactPoint addContact() { //3 3138 ContactPoint t = new ContactPoint(); 3139 if (this.contact == null) 3140 this.contact = new ArrayList<ContactPoint>(); 3141 this.contact.add(t); 3142 return t; 3143 } 3144 3145 public Device addContact(ContactPoint t) { //3 3146 if (t == null) 3147 return this; 3148 if (this.contact == null) 3149 this.contact = new ArrayList<ContactPoint>(); 3150 this.contact.add(t); 3151 return this; 3152 } 3153 3154 /** 3155 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3} 3156 */ 3157 public ContactPoint getContactFirstRep() { 3158 if (getContact().isEmpty()) { 3159 addContact(); 3160 } 3161 return getContact().get(0); 3162 } 3163 3164 /** 3165 * @return {@link #location} (The place where the device can be found.) 3166 */ 3167 public Reference getLocation() { 3168 if (this.location == null) 3169 if (Configuration.errorOnAutoCreate()) 3170 throw new Error("Attempt to auto-create Device.location"); 3171 else if (Configuration.doAutoCreate()) 3172 this.location = new Reference(); // cc 3173 return this.location; 3174 } 3175 3176 public boolean hasLocation() { 3177 return this.location != null && !this.location.isEmpty(); 3178 } 3179 3180 /** 3181 * @param value {@link #location} (The place where the device can be found.) 3182 */ 3183 public Device setLocation(Reference value) { 3184 this.location = value; 3185 return this; 3186 } 3187 3188 /** 3189 * @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 3190 */ 3191 public UriType getUrlElement() { 3192 if (this.url == null) 3193 if (Configuration.errorOnAutoCreate()) 3194 throw new Error("Attempt to auto-create Device.url"); 3195 else if (Configuration.doAutoCreate()) 3196 this.url = new UriType(); // bb 3197 return this.url; 3198 } 3199 3200 public boolean hasUrlElement() { 3201 return this.url != null && !this.url.isEmpty(); 3202 } 3203 3204 public boolean hasUrl() { 3205 return this.url != null && !this.url.isEmpty(); 3206 } 3207 3208 /** 3209 * @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 3210 */ 3211 public Device setUrlElement(UriType value) { 3212 this.url = value; 3213 return this; 3214 } 3215 3216 /** 3217 * @return A network address on which the device may be contacted directly. 3218 */ 3219 public String getUrl() { 3220 return this.url == null ? null : this.url.getValue(); 3221 } 3222 3223 /** 3224 * @param value A network address on which the device may be contacted directly. 3225 */ 3226 public Device setUrl(String value) { 3227 if (Utilities.noString(value)) 3228 this.url = null; 3229 else { 3230 if (this.url == null) 3231 this.url = new UriType(); 3232 this.url.setValue(value); 3233 } 3234 return this; 3235 } 3236 3237 /** 3238 * @return {@link #note} (Descriptive information, usage information or implantation information that is not captured in an existing element.) 3239 */ 3240 public List<Annotation> getNote() { 3241 if (this.note == null) 3242 this.note = new ArrayList<Annotation>(); 3243 return this.note; 3244 } 3245 3246 /** 3247 * @return Returns a reference to <code>this</code> for easy method chaining 3248 */ 3249 public Device setNote(List<Annotation> theNote) { 3250 this.note = theNote; 3251 return this; 3252 } 3253 3254 public boolean hasNote() { 3255 if (this.note == null) 3256 return false; 3257 for (Annotation item : this.note) 3258 if (!item.isEmpty()) 3259 return true; 3260 return false; 3261 } 3262 3263 public Annotation addNote() { //3 3264 Annotation t = new Annotation(); 3265 if (this.note == null) 3266 this.note = new ArrayList<Annotation>(); 3267 this.note.add(t); 3268 return t; 3269 } 3270 3271 public Device addNote(Annotation t) { //3 3272 if (t == null) 3273 return this; 3274 if (this.note == null) 3275 this.note = new ArrayList<Annotation>(); 3276 this.note.add(t); 3277 return this; 3278 } 3279 3280 /** 3281 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} 3282 */ 3283 public Annotation getNoteFirstRep() { 3284 if (getNote().isEmpty()) { 3285 addNote(); 3286 } 3287 return getNote().get(0); 3288 } 3289 3290 /** 3291 * @return {@link #safety} (Provides additional safety characteristics about a medical device. For example devices containing latex.) 3292 */ 3293 public List<CodeableConcept> getSafety() { 3294 if (this.safety == null) 3295 this.safety = new ArrayList<CodeableConcept>(); 3296 return this.safety; 3297 } 3298 3299 /** 3300 * @return Returns a reference to <code>this</code> for easy method chaining 3301 */ 3302 public Device setSafety(List<CodeableConcept> theSafety) { 3303 this.safety = theSafety; 3304 return this; 3305 } 3306 3307 public boolean hasSafety() { 3308 if (this.safety == null) 3309 return false; 3310 for (CodeableConcept item : this.safety) 3311 if (!item.isEmpty()) 3312 return true; 3313 return false; 3314 } 3315 3316 public CodeableConcept addSafety() { //3 3317 CodeableConcept t = new CodeableConcept(); 3318 if (this.safety == null) 3319 this.safety = new ArrayList<CodeableConcept>(); 3320 this.safety.add(t); 3321 return t; 3322 } 3323 3324 public Device addSafety(CodeableConcept t) { //3 3325 if (t == null) 3326 return this; 3327 if (this.safety == null) 3328 this.safety = new ArrayList<CodeableConcept>(); 3329 this.safety.add(t); 3330 return this; 3331 } 3332 3333 /** 3334 * @return The first repetition of repeating field {@link #safety}, creating it if it does not already exist {3} 3335 */ 3336 public CodeableConcept getSafetyFirstRep() { 3337 if (getSafety().isEmpty()) { 3338 addSafety(); 3339 } 3340 return getSafety().get(0); 3341 } 3342 3343 /** 3344 * @return {@link #parent} (The device that this device is attached to or is part of.) 3345 */ 3346 public Reference getParent() { 3347 if (this.parent == null) 3348 if (Configuration.errorOnAutoCreate()) 3349 throw new Error("Attempt to auto-create Device.parent"); 3350 else if (Configuration.doAutoCreate()) 3351 this.parent = new Reference(); // cc 3352 return this.parent; 3353 } 3354 3355 public boolean hasParent() { 3356 return this.parent != null && !this.parent.isEmpty(); 3357 } 3358 3359 /** 3360 * @param value {@link #parent} (The device that this device is attached to or is part of.) 3361 */ 3362 public Device setParent(Reference value) { 3363 this.parent = value; 3364 return this; 3365 } 3366 3367 protected void listChildren(List<Property> children) { 3368 super.listChildren(children); 3369 children.add(new Property("identifier", "Identifier", "Unique instance identifiers assigned to a device by manufacturers other organizations or owners.", 0, java.lang.Integer.MAX_VALUE, identifier)); 3370 children.add(new Property("definition", "Reference(DeviceDefinition)", "The reference to the definition for the device.", 0, 1, definition)); 3371 children.add(new Property("udiCarrier", "", "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, udiCarrier)); 3372 children.add(new Property("status", "code", "Status of the Device availability.", 0, 1, status)); 3373 children.add(new Property("statusReason", "CodeableConcept", "Reason for the dtatus of the Device availability.", 0, java.lang.Integer.MAX_VALUE, statusReason)); 3374 children.add(new Property("distinctIdentifier", "string", "The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product.", 0, 1, distinctIdentifier)); 3375 children.add(new Property("manufacturer", "string", "A name of the manufacturer.", 0, 1, manufacturer)); 3376 children.add(new Property("manufactureDate", "dateTime", "The date and time when the device was manufactured.", 0, 1, manufactureDate)); 3377 children.add(new Property("expirationDate", "dateTime", "The date and time beyond which this device is no longer valid or should not be used (if applicable).", 0, 1, expirationDate)); 3378 children.add(new Property("lotNumber", "string", "Lot number assigned by the manufacturer.", 0, 1, lotNumber)); 3379 children.add(new Property("serialNumber", "string", "The serial number assigned by the organization when the device was manufactured.", 0, 1, serialNumber)); 3380 children.add(new Property("deviceName", "", "This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device. This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition.", 0, java.lang.Integer.MAX_VALUE, deviceName)); 3381 children.add(new Property("modelNumber", "string", "The manufacturer's model number for the device.", 0, 1, modelNumber)); 3382 children.add(new Property("partNumber", "string", "The part number or catalog number of the device.", 0, 1, partNumber)); 3383 children.add(new Property("type", "CodeableConcept", "The kind or type of device.", 0, 1, type)); 3384 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)); 3385 children.add(new Property("version", "", "The actual design of the device or software version running on the device.", 0, java.lang.Integer.MAX_VALUE, version)); 3386 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)); 3387 children.add(new Property("patient", "Reference(Patient)", "Patient information, If the device is affixed to a person.", 0, 1, patient)); 3388 children.add(new Property("owner", "Reference(Organization)", "An organization that is responsible for the provision and ongoing maintenance of the device.", 0, 1, owner)); 3389 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)); 3390 children.add(new Property("location", "Reference(Location)", "The place where the device can be found.", 0, 1, location)); 3391 children.add(new Property("url", "uri", "A network address on which the device may be contacted directly.", 0, 1, url)); 3392 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)); 3393 children.add(new Property("safety", "CodeableConcept", "Provides additional safety characteristics about a medical device. For example devices containing latex.", 0, java.lang.Integer.MAX_VALUE, safety)); 3394 children.add(new Property("parent", "Reference(Device)", "The device that this device is attached to or is part of.", 0, 1, parent)); 3395 } 3396 3397 @Override 3398 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3399 switch (_hash) { 3400 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique instance identifiers assigned to a device by manufacturers other organizations or owners.", 0, java.lang.Integer.MAX_VALUE, identifier); 3401 case -1014418093: /*definition*/ return new Property("definition", "Reference(DeviceDefinition)", "The reference to the definition for the device.", 0, 1, definition); 3402 case -1343558178: /*udiCarrier*/ return new Property("udiCarrier", "", "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, udiCarrier); 3403 case -892481550: /*status*/ return new Property("status", "code", "Status of the Device availability.", 0, 1, status); 3404 case 2051346646: /*statusReason*/ return new Property("statusReason", "CodeableConcept", "Reason for the dtatus of the Device availability.", 0, java.lang.Integer.MAX_VALUE, statusReason); 3405 case -1836176187: /*distinctIdentifier*/ return new Property("distinctIdentifier", "string", "The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product.", 0, 1, distinctIdentifier); 3406 case -1969347631: /*manufacturer*/ return new Property("manufacturer", "string", "A name of the manufacturer.", 0, 1, manufacturer); 3407 case 416714767: /*manufactureDate*/ return new Property("manufactureDate", "dateTime", "The date and time when the device was manufactured.", 0, 1, manufactureDate); 3408 case -668811523: /*expirationDate*/ return new Property("expirationDate", "dateTime", "The date and time beyond which this device is no longer valid or should not be used (if applicable).", 0, 1, expirationDate); 3409 case 462547450: /*lotNumber*/ return new Property("lotNumber", "string", "Lot number assigned by the manufacturer.", 0, 1, lotNumber); 3410 case 83787357: /*serialNumber*/ return new Property("serialNumber", "string", "The serial number assigned by the organization when the device was manufactured.", 0, 1, serialNumber); 3411 case 780988929: /*deviceName*/ return new Property("deviceName", "", "This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device. This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition.", 0, java.lang.Integer.MAX_VALUE, deviceName); 3412 case 346619858: /*modelNumber*/ return new Property("modelNumber", "string", "The manufacturer's model number for the device.", 0, 1, modelNumber); 3413 case -731502308: /*partNumber*/ return new Property("partNumber", "string", "The part number or catalog number of the device.", 0, 1, partNumber); 3414 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The kind or type of device.", 0, 1, type); 3415 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); 3416 case 351608024: /*version*/ return new Property("version", "", "The actual design of the device or software version running on the device.", 0, java.lang.Integer.MAX_VALUE, version); 3417 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); 3418 case -791418107: /*patient*/ return new Property("patient", "Reference(Patient)", "Patient information, If the device is affixed to a person.", 0, 1, patient); 3419 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); 3420 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); 3421 case 1901043637: /*location*/ return new Property("location", "Reference(Location)", "The place where the device can be found.", 0, 1, location); 3422 case 116079: /*url*/ return new Property("url", "uri", "A network address on which the device may be contacted directly.", 0, 1, url); 3423 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); 3424 case -909893934: /*safety*/ return new Property("safety", "CodeableConcept", "Provides additional safety characteristics about a medical device. For example devices containing latex.", 0, java.lang.Integer.MAX_VALUE, safety); 3425 case -995424086: /*parent*/ return new Property("parent", "Reference(Device)", "The device that this device is attached to or is part of.", 0, 1, parent); 3426 default: return super.getNamedProperty(_hash, _name, _checkValid); 3427 } 3428 3429 } 3430 3431 @Override 3432 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3433 switch (hash) { 3434 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 3435 case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // Reference 3436 case -1343558178: /*udiCarrier*/ return this.udiCarrier == null ? new Base[0] : this.udiCarrier.toArray(new Base[this.udiCarrier.size()]); // DeviceUdiCarrierComponent 3437 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<FHIRDeviceStatus> 3438 case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : this.statusReason.toArray(new Base[this.statusReason.size()]); // CodeableConcept 3439 case -1836176187: /*distinctIdentifier*/ return this.distinctIdentifier == null ? new Base[0] : new Base[] {this.distinctIdentifier}; // StringType 3440 case -1969347631: /*manufacturer*/ return this.manufacturer == null ? new Base[0] : new Base[] {this.manufacturer}; // StringType 3441 case 416714767: /*manufactureDate*/ return this.manufactureDate == null ? new Base[0] : new Base[] {this.manufactureDate}; // DateTimeType 3442 case -668811523: /*expirationDate*/ return this.expirationDate == null ? new Base[0] : new Base[] {this.expirationDate}; // DateTimeType 3443 case 462547450: /*lotNumber*/ return this.lotNumber == null ? new Base[0] : new Base[] {this.lotNumber}; // StringType 3444 case 83787357: /*serialNumber*/ return this.serialNumber == null ? new Base[0] : new Base[] {this.serialNumber}; // StringType 3445 case 780988929: /*deviceName*/ return this.deviceName == null ? new Base[0] : this.deviceName.toArray(new Base[this.deviceName.size()]); // DeviceDeviceNameComponent 3446 case 346619858: /*modelNumber*/ return this.modelNumber == null ? new Base[0] : new Base[] {this.modelNumber}; // StringType 3447 case -731502308: /*partNumber*/ return this.partNumber == null ? new Base[0] : new Base[] {this.partNumber}; // StringType 3448 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3449 case 682815883: /*specialization*/ return this.specialization == null ? new Base[0] : this.specialization.toArray(new Base[this.specialization.size()]); // DeviceSpecializationComponent 3450 case 351608024: /*version*/ return this.version == null ? new Base[0] : this.version.toArray(new Base[this.version.size()]); // DeviceVersionComponent 3451 case -993141291: /*property*/ return this.property == null ? new Base[0] : this.property.toArray(new Base[this.property.size()]); // DevicePropertyComponent 3452 case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference 3453 case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference 3454 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactPoint 3455 case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference 3456 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 3457 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 3458 case -909893934: /*safety*/ return this.safety == null ? new Base[0] : this.safety.toArray(new Base[this.safety.size()]); // CodeableConcept 3459 case -995424086: /*parent*/ return this.parent == null ? new Base[0] : new Base[] {this.parent}; // Reference 3460 default: return super.getProperty(hash, name, checkValid); 3461 } 3462 3463 } 3464 3465 @Override 3466 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3467 switch (hash) { 3468 case -1618432855: // identifier 3469 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 3470 return value; 3471 case -1014418093: // definition 3472 this.definition = TypeConvertor.castToReference(value); // Reference 3473 return value; 3474 case -1343558178: // udiCarrier 3475 this.getUdiCarrier().add((DeviceUdiCarrierComponent) value); // DeviceUdiCarrierComponent 3476 return value; 3477 case -892481550: // status 3478 value = new FHIRDeviceStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 3479 this.status = (Enumeration) value; // Enumeration<FHIRDeviceStatus> 3480 return value; 3481 case 2051346646: // statusReason 3482 this.getStatusReason().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 3483 return value; 3484 case -1836176187: // distinctIdentifier 3485 this.distinctIdentifier = TypeConvertor.castToString(value); // StringType 3486 return value; 3487 case -1969347631: // manufacturer 3488 this.manufacturer = TypeConvertor.castToString(value); // StringType 3489 return value; 3490 case 416714767: // manufactureDate 3491 this.manufactureDate = TypeConvertor.castToDateTime(value); // DateTimeType 3492 return value; 3493 case -668811523: // expirationDate 3494 this.expirationDate = TypeConvertor.castToDateTime(value); // DateTimeType 3495 return value; 3496 case 462547450: // lotNumber 3497 this.lotNumber = TypeConvertor.castToString(value); // StringType 3498 return value; 3499 case 83787357: // serialNumber 3500 this.serialNumber = TypeConvertor.castToString(value); // StringType 3501 return value; 3502 case 780988929: // deviceName 3503 this.getDeviceName().add((DeviceDeviceNameComponent) value); // DeviceDeviceNameComponent 3504 return value; 3505 case 346619858: // modelNumber 3506 this.modelNumber = TypeConvertor.castToString(value); // StringType 3507 return value; 3508 case -731502308: // partNumber 3509 this.partNumber = TypeConvertor.castToString(value); // StringType 3510 return value; 3511 case 3575610: // type 3512 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3513 return value; 3514 case 682815883: // specialization 3515 this.getSpecialization().add((DeviceSpecializationComponent) value); // DeviceSpecializationComponent 3516 return value; 3517 case 351608024: // version 3518 this.getVersion().add((DeviceVersionComponent) value); // DeviceVersionComponent 3519 return value; 3520 case -993141291: // property 3521 this.getProperty().add((DevicePropertyComponent) value); // DevicePropertyComponent 3522 return value; 3523 case -791418107: // patient 3524 this.patient = TypeConvertor.castToReference(value); // Reference 3525 return value; 3526 case 106164915: // owner 3527 this.owner = TypeConvertor.castToReference(value); // Reference 3528 return value; 3529 case 951526432: // contact 3530 this.getContact().add(TypeConvertor.castToContactPoint(value)); // ContactPoint 3531 return value; 3532 case 1901043637: // location 3533 this.location = TypeConvertor.castToReference(value); // Reference 3534 return value; 3535 case 116079: // url 3536 this.url = TypeConvertor.castToUri(value); // UriType 3537 return value; 3538 case 3387378: // note 3539 this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation 3540 return value; 3541 case -909893934: // safety 3542 this.getSafety().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 3543 return value; 3544 case -995424086: // parent 3545 this.parent = TypeConvertor.castToReference(value); // Reference 3546 return value; 3547 default: return super.setProperty(hash, name, value); 3548 } 3549 3550 } 3551 3552 @Override 3553 public Base setProperty(String name, Base value) throws FHIRException { 3554 if (name.equals("identifier")) { 3555 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 3556 } else if (name.equals("definition")) { 3557 this.definition = TypeConvertor.castToReference(value); // Reference 3558 } else if (name.equals("udiCarrier")) { 3559 this.getUdiCarrier().add((DeviceUdiCarrierComponent) value); 3560 } else if (name.equals("status")) { 3561 value = new FHIRDeviceStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 3562 this.status = (Enumeration) value; // Enumeration<FHIRDeviceStatus> 3563 } else if (name.equals("statusReason")) { 3564 this.getStatusReason().add(TypeConvertor.castToCodeableConcept(value)); 3565 } else if (name.equals("distinctIdentifier")) { 3566 this.distinctIdentifier = TypeConvertor.castToString(value); // StringType 3567 } else if (name.equals("manufacturer")) { 3568 this.manufacturer = TypeConvertor.castToString(value); // StringType 3569 } else if (name.equals("manufactureDate")) { 3570 this.manufactureDate = TypeConvertor.castToDateTime(value); // DateTimeType 3571 } else if (name.equals("expirationDate")) { 3572 this.expirationDate = TypeConvertor.castToDateTime(value); // DateTimeType 3573 } else if (name.equals("lotNumber")) { 3574 this.lotNumber = TypeConvertor.castToString(value); // StringType 3575 } else if (name.equals("serialNumber")) { 3576 this.serialNumber = TypeConvertor.castToString(value); // StringType 3577 } else if (name.equals("deviceName")) { 3578 this.getDeviceName().add((DeviceDeviceNameComponent) value); 3579 } else if (name.equals("modelNumber")) { 3580 this.modelNumber = TypeConvertor.castToString(value); // StringType 3581 } else if (name.equals("partNumber")) { 3582 this.partNumber = TypeConvertor.castToString(value); // StringType 3583 } else if (name.equals("type")) { 3584 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3585 } else if (name.equals("specialization")) { 3586 this.getSpecialization().add((DeviceSpecializationComponent) value); 3587 } else if (name.equals("version")) { 3588 this.getVersion().add((DeviceVersionComponent) value); 3589 } else if (name.equals("property")) { 3590 this.getProperty().add((DevicePropertyComponent) value); 3591 } else if (name.equals("patient")) { 3592 this.patient = TypeConvertor.castToReference(value); // Reference 3593 } else if (name.equals("owner")) { 3594 this.owner = TypeConvertor.castToReference(value); // Reference 3595 } else if (name.equals("contact")) { 3596 this.getContact().add(TypeConvertor.castToContactPoint(value)); 3597 } else if (name.equals("location")) { 3598 this.location = TypeConvertor.castToReference(value); // Reference 3599 } else if (name.equals("url")) { 3600 this.url = TypeConvertor.castToUri(value); // UriType 3601 } else if (name.equals("note")) { 3602 this.getNote().add(TypeConvertor.castToAnnotation(value)); 3603 } else if (name.equals("safety")) { 3604 this.getSafety().add(TypeConvertor.castToCodeableConcept(value)); 3605 } else if (name.equals("parent")) { 3606 this.parent = TypeConvertor.castToReference(value); // Reference 3607 } else 3608 return super.setProperty(name, value); 3609 return value; 3610 } 3611 3612 @Override 3613 public Base makeProperty(int hash, String name) throws FHIRException { 3614 switch (hash) { 3615 case -1618432855: return addIdentifier(); 3616 case -1014418093: return getDefinition(); 3617 case -1343558178: return addUdiCarrier(); 3618 case -892481550: return getStatusElement(); 3619 case 2051346646: return addStatusReason(); 3620 case -1836176187: return getDistinctIdentifierElement(); 3621 case -1969347631: return getManufacturerElement(); 3622 case 416714767: return getManufactureDateElement(); 3623 case -668811523: return getExpirationDateElement(); 3624 case 462547450: return getLotNumberElement(); 3625 case 83787357: return getSerialNumberElement(); 3626 case 780988929: return addDeviceName(); 3627 case 346619858: return getModelNumberElement(); 3628 case -731502308: return getPartNumberElement(); 3629 case 3575610: return getType(); 3630 case 682815883: return addSpecialization(); 3631 case 351608024: return addVersion(); 3632 case -993141291: return addProperty(); 3633 case -791418107: return getPatient(); 3634 case 106164915: return getOwner(); 3635 case 951526432: return addContact(); 3636 case 1901043637: return getLocation(); 3637 case 116079: return getUrlElement(); 3638 case 3387378: return addNote(); 3639 case -909893934: return addSafety(); 3640 case -995424086: return getParent(); 3641 default: return super.makeProperty(hash, name); 3642 } 3643 3644 } 3645 3646 @Override 3647 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3648 switch (hash) { 3649 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3650 case -1014418093: /*definition*/ return new String[] {"Reference"}; 3651 case -1343558178: /*udiCarrier*/ return new String[] {}; 3652 case -892481550: /*status*/ return new String[] {"code"}; 3653 case 2051346646: /*statusReason*/ return new String[] {"CodeableConcept"}; 3654 case -1836176187: /*distinctIdentifier*/ return new String[] {"string"}; 3655 case -1969347631: /*manufacturer*/ return new String[] {"string"}; 3656 case 416714767: /*manufactureDate*/ return new String[] {"dateTime"}; 3657 case -668811523: /*expirationDate*/ return new String[] {"dateTime"}; 3658 case 462547450: /*lotNumber*/ return new String[] {"string"}; 3659 case 83787357: /*serialNumber*/ return new String[] {"string"}; 3660 case 780988929: /*deviceName*/ return new String[] {}; 3661 case 346619858: /*modelNumber*/ return new String[] {"string"}; 3662 case -731502308: /*partNumber*/ return new String[] {"string"}; 3663 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 3664 case 682815883: /*specialization*/ return new String[] {}; 3665 case 351608024: /*version*/ return new String[] {}; 3666 case -993141291: /*property*/ return new String[] {}; 3667 case -791418107: /*patient*/ return new String[] {"Reference"}; 3668 case 106164915: /*owner*/ return new String[] {"Reference"}; 3669 case 951526432: /*contact*/ return new String[] {"ContactPoint"}; 3670 case 1901043637: /*location*/ return new String[] {"Reference"}; 3671 case 116079: /*url*/ return new String[] {"uri"}; 3672 case 3387378: /*note*/ return new String[] {"Annotation"}; 3673 case -909893934: /*safety*/ return new String[] {"CodeableConcept"}; 3674 case -995424086: /*parent*/ return new String[] {"Reference"}; 3675 default: return super.getTypesForProperty(hash, name); 3676 } 3677 3678 } 3679 3680 @Override 3681 public Base addChild(String name) throws FHIRException { 3682 if (name.equals("identifier")) { 3683 return addIdentifier(); 3684 } 3685 else if (name.equals("definition")) { 3686 this.definition = new Reference(); 3687 return this.definition; 3688 } 3689 else if (name.equals("udiCarrier")) { 3690 return addUdiCarrier(); 3691 } 3692 else if (name.equals("status")) { 3693 throw new FHIRException("Cannot call addChild on a primitive type Device.status"); 3694 } 3695 else if (name.equals("statusReason")) { 3696 return addStatusReason(); 3697 } 3698 else if (name.equals("distinctIdentifier")) { 3699 throw new FHIRException("Cannot call addChild on a primitive type Device.distinctIdentifier"); 3700 } 3701 else if (name.equals("manufacturer")) { 3702 throw new FHIRException("Cannot call addChild on a primitive type Device.manufacturer"); 3703 } 3704 else if (name.equals("manufactureDate")) { 3705 throw new FHIRException("Cannot call addChild on a primitive type Device.manufactureDate"); 3706 } 3707 else if (name.equals("expirationDate")) { 3708 throw new FHIRException("Cannot call addChild on a primitive type Device.expirationDate"); 3709 } 3710 else if (name.equals("lotNumber")) { 3711 throw new FHIRException("Cannot call addChild on a primitive type Device.lotNumber"); 3712 } 3713 else if (name.equals("serialNumber")) { 3714 throw new FHIRException("Cannot call addChild on a primitive type Device.serialNumber"); 3715 } 3716 else if (name.equals("deviceName")) { 3717 return addDeviceName(); 3718 } 3719 else if (name.equals("modelNumber")) { 3720 throw new FHIRException("Cannot call addChild on a primitive type Device.modelNumber"); 3721 } 3722 else if (name.equals("partNumber")) { 3723 throw new FHIRException("Cannot call addChild on a primitive type Device.partNumber"); 3724 } 3725 else if (name.equals("type")) { 3726 this.type = new CodeableConcept(); 3727 return this.type; 3728 } 3729 else if (name.equals("specialization")) { 3730 return addSpecialization(); 3731 } 3732 else if (name.equals("version")) { 3733 return addVersion(); 3734 } 3735 else if (name.equals("property")) { 3736 return addProperty(); 3737 } 3738 else if (name.equals("patient")) { 3739 this.patient = new Reference(); 3740 return this.patient; 3741 } 3742 else if (name.equals("owner")) { 3743 this.owner = new Reference(); 3744 return this.owner; 3745 } 3746 else if (name.equals("contact")) { 3747 return addContact(); 3748 } 3749 else if (name.equals("location")) { 3750 this.location = new Reference(); 3751 return this.location; 3752 } 3753 else if (name.equals("url")) { 3754 throw new FHIRException("Cannot call addChild on a primitive type Device.url"); 3755 } 3756 else if (name.equals("note")) { 3757 return addNote(); 3758 } 3759 else if (name.equals("safety")) { 3760 return addSafety(); 3761 } 3762 else if (name.equals("parent")) { 3763 this.parent = new Reference(); 3764 return this.parent; 3765 } 3766 else 3767 return super.addChild(name); 3768 } 3769 3770 public String fhirType() { 3771 return "Device"; 3772 3773 } 3774 3775 public Device copy() { 3776 Device dst = new Device(); 3777 copyValues(dst); 3778 return dst; 3779 } 3780 3781 public void copyValues(Device dst) { 3782 super.copyValues(dst); 3783 if (identifier != null) { 3784 dst.identifier = new ArrayList<Identifier>(); 3785 for (Identifier i : identifier) 3786 dst.identifier.add(i.copy()); 3787 }; 3788 dst.definition = definition == null ? null : definition.copy(); 3789 if (udiCarrier != null) { 3790 dst.udiCarrier = new ArrayList<DeviceUdiCarrierComponent>(); 3791 for (DeviceUdiCarrierComponent i : udiCarrier) 3792 dst.udiCarrier.add(i.copy()); 3793 }; 3794 dst.status = status == null ? null : status.copy(); 3795 if (statusReason != null) { 3796 dst.statusReason = new ArrayList<CodeableConcept>(); 3797 for (CodeableConcept i : statusReason) 3798 dst.statusReason.add(i.copy()); 3799 }; 3800 dst.distinctIdentifier = distinctIdentifier == null ? null : distinctIdentifier.copy(); 3801 dst.manufacturer = manufacturer == null ? null : manufacturer.copy(); 3802 dst.manufactureDate = manufactureDate == null ? null : manufactureDate.copy(); 3803 dst.expirationDate = expirationDate == null ? null : expirationDate.copy(); 3804 dst.lotNumber = lotNumber == null ? null : lotNumber.copy(); 3805 dst.serialNumber = serialNumber == null ? null : serialNumber.copy(); 3806 if (deviceName != null) { 3807 dst.deviceName = new ArrayList<DeviceDeviceNameComponent>(); 3808 for (DeviceDeviceNameComponent i : deviceName) 3809 dst.deviceName.add(i.copy()); 3810 }; 3811 dst.modelNumber = modelNumber == null ? null : modelNumber.copy(); 3812 dst.partNumber = partNumber == null ? null : partNumber.copy(); 3813 dst.type = type == null ? null : type.copy(); 3814 if (specialization != null) { 3815 dst.specialization = new ArrayList<DeviceSpecializationComponent>(); 3816 for (DeviceSpecializationComponent i : specialization) 3817 dst.specialization.add(i.copy()); 3818 }; 3819 if (version != null) { 3820 dst.version = new ArrayList<DeviceVersionComponent>(); 3821 for (DeviceVersionComponent i : version) 3822 dst.version.add(i.copy()); 3823 }; 3824 if (property != null) { 3825 dst.property = new ArrayList<DevicePropertyComponent>(); 3826 for (DevicePropertyComponent i : property) 3827 dst.property.add(i.copy()); 3828 }; 3829 dst.patient = patient == null ? null : patient.copy(); 3830 dst.owner = owner == null ? null : owner.copy(); 3831 if (contact != null) { 3832 dst.contact = new ArrayList<ContactPoint>(); 3833 for (ContactPoint i : contact) 3834 dst.contact.add(i.copy()); 3835 }; 3836 dst.location = location == null ? null : location.copy(); 3837 dst.url = url == null ? null : url.copy(); 3838 if (note != null) { 3839 dst.note = new ArrayList<Annotation>(); 3840 for (Annotation i : note) 3841 dst.note.add(i.copy()); 3842 }; 3843 if (safety != null) { 3844 dst.safety = new ArrayList<CodeableConcept>(); 3845 for (CodeableConcept i : safety) 3846 dst.safety.add(i.copy()); 3847 }; 3848 dst.parent = parent == null ? null : parent.copy(); 3849 } 3850 3851 protected Device typedCopy() { 3852 return copy(); 3853 } 3854 3855 @Override 3856 public boolean equalsDeep(Base other_) { 3857 if (!super.equalsDeep(other_)) 3858 return false; 3859 if (!(other_ instanceof Device)) 3860 return false; 3861 Device o = (Device) other_; 3862 return compareDeep(identifier, o.identifier, true) && compareDeep(definition, o.definition, true) 3863 && compareDeep(udiCarrier, o.udiCarrier, true) && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true) 3864 && compareDeep(distinctIdentifier, o.distinctIdentifier, true) && compareDeep(manufacturer, o.manufacturer, true) 3865 && compareDeep(manufactureDate, o.manufactureDate, true) && compareDeep(expirationDate, o.expirationDate, true) 3866 && compareDeep(lotNumber, o.lotNumber, true) && compareDeep(serialNumber, o.serialNumber, true) 3867 && compareDeep(deviceName, o.deviceName, true) && compareDeep(modelNumber, o.modelNumber, true) 3868 && compareDeep(partNumber, o.partNumber, true) && compareDeep(type, o.type, true) && compareDeep(specialization, o.specialization, true) 3869 && compareDeep(version, o.version, true) && compareDeep(property, o.property, true) && compareDeep(patient, o.patient, true) 3870 && compareDeep(owner, o.owner, true) && compareDeep(contact, o.contact, true) && compareDeep(location, o.location, true) 3871 && compareDeep(url, o.url, true) && compareDeep(note, o.note, true) && compareDeep(safety, o.safety, true) 3872 && compareDeep(parent, o.parent, true); 3873 } 3874 3875 @Override 3876 public boolean equalsShallow(Base other_) { 3877 if (!super.equalsShallow(other_)) 3878 return false; 3879 if (!(other_ instanceof Device)) 3880 return false; 3881 Device o = (Device) other_; 3882 return compareValues(status, o.status, true) && compareValues(distinctIdentifier, o.distinctIdentifier, true) 3883 && compareValues(manufacturer, o.manufacturer, true) && compareValues(manufactureDate, o.manufactureDate, true) 3884 && compareValues(expirationDate, o.expirationDate, true) && compareValues(lotNumber, o.lotNumber, true) 3885 && compareValues(serialNumber, o.serialNumber, true) && compareValues(modelNumber, o.modelNumber, true) 3886 && compareValues(partNumber, o.partNumber, true) && compareValues(url, o.url, true); 3887 } 3888 3889 public boolean isEmpty() { 3890 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, definition, udiCarrier 3891 , status, statusReason, distinctIdentifier, manufacturer, manufactureDate, expirationDate 3892 , lotNumber, serialNumber, deviceName, modelNumber, partNumber, type, specialization 3893 , version, property, patient, owner, contact, location, url, note, safety 3894 , parent); 3895 } 3896 3897 @Override 3898 public ResourceType getResourceType() { 3899 return ResourceType.Device; 3900 } 3901 3902 /** 3903 * Search parameter: <b>device-name</b> 3904 * <p> 3905 * Description: <b>A server defined search that may match any of the string fields in Device.deviceName or Device.type.</b><br> 3906 * Type: <b>string</b><br> 3907 * Path: <b>Device.deviceName.name | Device.type.coding.display | Device.type.text</b><br> 3908 * </p> 3909 */ 3910 @SearchParamDefinition(name="device-name", path="Device.deviceName.name | Device.type.coding.display | Device.type.text", description="A server defined search that may match any of the string fields in Device.deviceName or Device.type.", type="string" ) 3911 public static final String SP_DEVICE_NAME = "device-name"; 3912 /** 3913 * <b>Fluent Client</b> search parameter constant for <b>device-name</b> 3914 * <p> 3915 * Description: <b>A server defined search that may match any of the string fields in Device.deviceName or Device.type.</b><br> 3916 * Type: <b>string</b><br> 3917 * Path: <b>Device.deviceName.name | Device.type.coding.display | Device.type.text</b><br> 3918 * </p> 3919 */ 3920 public static final ca.uhn.fhir.rest.gclient.StringClientParam DEVICE_NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DEVICE_NAME); 3921 3922 /** 3923 * Search parameter: <b>identifier</b> 3924 * <p> 3925 * Description: <b>Instance id from manufacturer, owner, and others</b><br> 3926 * Type: <b>token</b><br> 3927 * Path: <b>Device.identifier</b><br> 3928 * </p> 3929 */ 3930 @SearchParamDefinition(name="identifier", path="Device.identifier", description="Instance id from manufacturer, owner, and others", type="token" ) 3931 public static final String SP_IDENTIFIER = "identifier"; 3932 /** 3933 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 3934 * <p> 3935 * Description: <b>Instance id from manufacturer, owner, and others</b><br> 3936 * Type: <b>token</b><br> 3937 * Path: <b>Device.identifier</b><br> 3938 * </p> 3939 */ 3940 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 3941 3942 /** 3943 * Search parameter: <b>location</b> 3944 * <p> 3945 * Description: <b>A location, where the resource is found</b><br> 3946 * Type: <b>reference</b><br> 3947 * Path: <b>Device.location</b><br> 3948 * </p> 3949 */ 3950 @SearchParamDefinition(name="location", path="Device.location", description="A location, where the resource is found", type="reference", target={Location.class } ) 3951 public static final String SP_LOCATION = "location"; 3952 /** 3953 * <b>Fluent Client</b> search parameter constant for <b>location</b> 3954 * <p> 3955 * Description: <b>A location, where the resource is found</b><br> 3956 * Type: <b>reference</b><br> 3957 * Path: <b>Device.location</b><br> 3958 * </p> 3959 */ 3960 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LOCATION); 3961 3962/** 3963 * Constant for fluent queries to be used to add include statements. Specifies 3964 * the path value of "<b>Device:location</b>". 3965 */ 3966 public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("Device:location").toLocked(); 3967 3968 /** 3969 * Search parameter: <b>manufacturer</b> 3970 * <p> 3971 * Description: <b>The manufacturer of the device</b><br> 3972 * Type: <b>string</b><br> 3973 * Path: <b>Device.manufacturer</b><br> 3974 * </p> 3975 */ 3976 @SearchParamDefinition(name="manufacturer", path="Device.manufacturer", description="The manufacturer of the device", type="string" ) 3977 public static final String SP_MANUFACTURER = "manufacturer"; 3978 /** 3979 * <b>Fluent Client</b> search parameter constant for <b>manufacturer</b> 3980 * <p> 3981 * Description: <b>The manufacturer of the device</b><br> 3982 * Type: <b>string</b><br> 3983 * Path: <b>Device.manufacturer</b><br> 3984 * </p> 3985 */ 3986 public static final ca.uhn.fhir.rest.gclient.StringClientParam MANUFACTURER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_MANUFACTURER); 3987 3988 /** 3989 * Search parameter: <b>model</b> 3990 * <p> 3991 * Description: <b>The model of the device</b><br> 3992 * Type: <b>string</b><br> 3993 * Path: <b>Device.modelNumber</b><br> 3994 * </p> 3995 */ 3996 @SearchParamDefinition(name="model", path="Device.modelNumber", description="The model of the device", type="string" ) 3997 public static final String SP_MODEL = "model"; 3998 /** 3999 * <b>Fluent Client</b> search parameter constant for <b>model</b> 4000 * <p> 4001 * Description: <b>The model of the device</b><br> 4002 * Type: <b>string</b><br> 4003 * Path: <b>Device.modelNumber</b><br> 4004 * </p> 4005 */ 4006 public static final ca.uhn.fhir.rest.gclient.StringClientParam MODEL = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_MODEL); 4007 4008 /** 4009 * Search parameter: <b>organization</b> 4010 * <p> 4011 * Description: <b>The organization responsible for the device</b><br> 4012 * Type: <b>reference</b><br> 4013 * Path: <b>Device.owner</b><br> 4014 * </p> 4015 */ 4016 @SearchParamDefinition(name="organization", path="Device.owner", description="The organization responsible for the device", type="reference", target={Organization.class } ) 4017 public static final String SP_ORGANIZATION = "organization"; 4018 /** 4019 * <b>Fluent Client</b> search parameter constant for <b>organization</b> 4020 * <p> 4021 * Description: <b>The organization responsible for the device</b><br> 4022 * Type: <b>reference</b><br> 4023 * Path: <b>Device.owner</b><br> 4024 * </p> 4025 */ 4026 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); 4027 4028/** 4029 * Constant for fluent queries to be used to add include statements. Specifies 4030 * the path value of "<b>Device:organization</b>". 4031 */ 4032 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("Device:organization").toLocked(); 4033 4034 /** 4035 * Search parameter: <b>patient</b> 4036 * <p> 4037 * Description: <b>Patient information, if the resource is affixed to a person</b><br> 4038 * Type: <b>reference</b><br> 4039 * Path: <b>Device.patient</b><br> 4040 * </p> 4041 */ 4042 @SearchParamDefinition(name="patient", path="Device.patient", description="Patient information, if the resource is affixed to a person", type="reference", target={Patient.class } ) 4043 public static final String SP_PATIENT = "patient"; 4044 /** 4045 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 4046 * <p> 4047 * Description: <b>Patient information, if the resource is affixed to a person</b><br> 4048 * Type: <b>reference</b><br> 4049 * Path: <b>Device.patient</b><br> 4050 * </p> 4051 */ 4052 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 4053 4054/** 4055 * Constant for fluent queries to be used to add include statements. Specifies 4056 * the path value of "<b>Device:patient</b>". 4057 */ 4058 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Device:patient").toLocked(); 4059 4060 /** 4061 * Search parameter: <b>status</b> 4062 * <p> 4063 * Description: <b>active | inactive | entered-in-error | unknown</b><br> 4064 * Type: <b>token</b><br> 4065 * Path: <b>Device.status</b><br> 4066 * </p> 4067 */ 4068 @SearchParamDefinition(name="status", path="Device.status", description="active | inactive | entered-in-error | unknown", type="token" ) 4069 public static final String SP_STATUS = "status"; 4070 /** 4071 * <b>Fluent Client</b> search parameter constant for <b>status</b> 4072 * <p> 4073 * Description: <b>active | inactive | entered-in-error | unknown</b><br> 4074 * Type: <b>token</b><br> 4075 * Path: <b>Device.status</b><br> 4076 * </p> 4077 */ 4078 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 4079 4080 /** 4081 * Search parameter: <b>type</b> 4082 * <p> 4083 * Description: <b>The type of the device</b><br> 4084 * Type: <b>token</b><br> 4085 * Path: <b>Device.type</b><br> 4086 * </p> 4087 */ 4088 @SearchParamDefinition(name="type", path="Device.type", description="The type of the device", type="token" ) 4089 public static final String SP_TYPE = "type"; 4090 /** 4091 * <b>Fluent Client</b> search parameter constant for <b>type</b> 4092 * <p> 4093 * Description: <b>The type of the device</b><br> 4094 * Type: <b>token</b><br> 4095 * Path: <b>Device.type</b><br> 4096 * </p> 4097 */ 4098 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 4099 4100 /** 4101 * Search parameter: <b>udi-carrier</b> 4102 * <p> 4103 * Description: <b>UDI Barcode (RFID or other technology) string in *HRF* format.</b><br> 4104 * Type: <b>string</b><br> 4105 * Path: <b>Device.udiCarrier.carrierHRF</b><br> 4106 * </p> 4107 */ 4108 @SearchParamDefinition(name="udi-carrier", path="Device.udiCarrier.carrierHRF", description="UDI Barcode (RFID or other technology) string in *HRF* format.", type="string" ) 4109 public static final String SP_UDI_CARRIER = "udi-carrier"; 4110 /** 4111 * <b>Fluent Client</b> search parameter constant for <b>udi-carrier</b> 4112 * <p> 4113 * Description: <b>UDI Barcode (RFID or other technology) string in *HRF* format.</b><br> 4114 * Type: <b>string</b><br> 4115 * Path: <b>Device.udiCarrier.carrierHRF</b><br> 4116 * </p> 4117 */ 4118 public static final ca.uhn.fhir.rest.gclient.StringClientParam UDI_CARRIER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_UDI_CARRIER); 4119 4120 /** 4121 * Search parameter: <b>udi-di</b> 4122 * <p> 4123 * Description: <b>The udi Device Identifier (DI)</b><br> 4124 * Type: <b>string</b><br> 4125 * Path: <b>Device.udiCarrier.deviceIdentifier</b><br> 4126 * </p> 4127 */ 4128 @SearchParamDefinition(name="udi-di", path="Device.udiCarrier.deviceIdentifier", description="The udi Device Identifier (DI)", type="string" ) 4129 public static final String SP_UDI_DI = "udi-di"; 4130 /** 4131 * <b>Fluent Client</b> search parameter constant for <b>udi-di</b> 4132 * <p> 4133 * Description: <b>The udi Device Identifier (DI)</b><br> 4134 * Type: <b>string</b><br> 4135 * Path: <b>Device.udiCarrier.deviceIdentifier</b><br> 4136 * </p> 4137 */ 4138 public static final ca.uhn.fhir.rest.gclient.StringClientParam UDI_DI = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_UDI_DI); 4139 4140 /** 4141 * Search parameter: <b>url</b> 4142 * <p> 4143 * Description: <b>Network address to contact device</b><br> 4144 * Type: <b>uri</b><br> 4145 * Path: <b>Device.url</b><br> 4146 * </p> 4147 */ 4148 @SearchParamDefinition(name="url", path="Device.url", description="Network address to contact device", type="uri" ) 4149 public static final String SP_URL = "url"; 4150 /** 4151 * <b>Fluent Client</b> search parameter constant for <b>url</b> 4152 * <p> 4153 * Description: <b>Network address to contact device</b><br> 4154 * Type: <b>uri</b><br> 4155 * Path: <b>Device.url</b><br> 4156 * </p> 4157 */ 4158 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 4159 4160 /** 4161 * Search parameter: <b>din</b> 4162 * <p> 4163 * Description: <b>The donation identification number (DIN)</b><br> 4164 * Type: <b>token</b><br> 4165 * Path: <b>Device.extension('http://hl7.org/fhir/SearchParameter/device-extensions-Device-din')</b><br> 4166 * </p> 4167 */ 4168 @SearchParamDefinition(name="din", path="Device.extension('http://hl7.org/fhir/SearchParameter/device-extensions-Device-din')", description="The donation identification number (DIN)", type="token" ) 4169 public static final String SP_DIN = "din"; 4170 /** 4171 * <b>Fluent Client</b> search parameter constant for <b>din</b> 4172 * <p> 4173 * Description: <b>The donation identification number (DIN)</b><br> 4174 * Type: <b>token</b><br> 4175 * Path: <b>Device.extension('http://hl7.org/fhir/SearchParameter/device-extensions-Device-din')</b><br> 4176 * </p> 4177 */ 4178 public static final ca.uhn.fhir.rest.gclient.TokenClientParam DIN = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DIN); 4179 4180 4181} 4182