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