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 Base makeProperty(int hash, String name) throws FHIRException { 1214 switch (hash) { 1215 case 1322005407: 1216 return getDeviceIdentifierElement(); 1217 case -1179159879: 1218 return getIssuerElement(); 1219 case -507075711: 1220 return getJurisdictionElement(); 1221 case -768521825: 1222 return getCarrierAIDCElement(); 1223 case 806499972: 1224 return getCarrierHRFElement(); 1225 case -479362356: 1226 return getEntryTypeElement(); 1227 default: 1228 return super.makeProperty(hash, name); 1229 } 1230 1231 } 1232 1233 @Override 1234 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1235 switch (hash) { 1236 case 1322005407: 1237 /* deviceIdentifier */ return new String[] { "string" }; 1238 case -1179159879: 1239 /* issuer */ return new String[] { "uri" }; 1240 case -507075711: 1241 /* jurisdiction */ return new String[] { "uri" }; 1242 case -768521825: 1243 /* carrierAIDC */ return new String[] { "base64Binary" }; 1244 case 806499972: 1245 /* carrierHRF */ return new String[] { "string" }; 1246 case -479362356: 1247 /* entryType */ return new String[] { "code" }; 1248 default: 1249 return super.getTypesForProperty(hash, name); 1250 } 1251 1252 } 1253 1254 @Override 1255 public Base addChild(String name) throws FHIRException { 1256 if (name.equals("deviceIdentifier")) { 1257 throw new FHIRException("Cannot call addChild on a singleton property Device.deviceIdentifier"); 1258 } else if (name.equals("issuer")) { 1259 throw new FHIRException("Cannot call addChild on a singleton property Device.issuer"); 1260 } else if (name.equals("jurisdiction")) { 1261 throw new FHIRException("Cannot call addChild on a singleton property Device.jurisdiction"); 1262 } else if (name.equals("carrierAIDC")) { 1263 throw new FHIRException("Cannot call addChild on a singleton property Device.carrierAIDC"); 1264 } else if (name.equals("carrierHRF")) { 1265 throw new FHIRException("Cannot call addChild on a singleton property Device.carrierHRF"); 1266 } else if (name.equals("entryType")) { 1267 throw new FHIRException("Cannot call addChild on a singleton property Device.entryType"); 1268 } else 1269 return super.addChild(name); 1270 } 1271 1272 public DeviceUdiCarrierComponent copy() { 1273 DeviceUdiCarrierComponent dst = new DeviceUdiCarrierComponent(); 1274 copyValues(dst); 1275 return dst; 1276 } 1277 1278 public void copyValues(DeviceUdiCarrierComponent dst) { 1279 super.copyValues(dst); 1280 dst.deviceIdentifier = deviceIdentifier == null ? null : deviceIdentifier.copy(); 1281 dst.issuer = issuer == null ? null : issuer.copy(); 1282 dst.jurisdiction = jurisdiction == null ? null : jurisdiction.copy(); 1283 dst.carrierAIDC = carrierAIDC == null ? null : carrierAIDC.copy(); 1284 dst.carrierHRF = carrierHRF == null ? null : carrierHRF.copy(); 1285 dst.entryType = entryType == null ? null : entryType.copy(); 1286 } 1287 1288 @Override 1289 public boolean equalsDeep(Base other_) { 1290 if (!super.equalsDeep(other_)) 1291 return false; 1292 if (!(other_ instanceof DeviceUdiCarrierComponent)) 1293 return false; 1294 DeviceUdiCarrierComponent o = (DeviceUdiCarrierComponent) other_; 1295 return compareDeep(deviceIdentifier, o.deviceIdentifier, true) && compareDeep(issuer, o.issuer, true) 1296 && compareDeep(jurisdiction, o.jurisdiction, true) && compareDeep(carrierAIDC, o.carrierAIDC, true) 1297 && compareDeep(carrierHRF, o.carrierHRF, true) && compareDeep(entryType, o.entryType, true); 1298 } 1299 1300 @Override 1301 public boolean equalsShallow(Base other_) { 1302 if (!super.equalsShallow(other_)) 1303 return false; 1304 if (!(other_ instanceof DeviceUdiCarrierComponent)) 1305 return false; 1306 DeviceUdiCarrierComponent o = (DeviceUdiCarrierComponent) other_; 1307 return compareValues(deviceIdentifier, o.deviceIdentifier, true) && compareValues(issuer, o.issuer, true) 1308 && compareValues(jurisdiction, o.jurisdiction, true) && compareValues(carrierAIDC, o.carrierAIDC, true) 1309 && compareValues(carrierHRF, o.carrierHRF, true) && compareValues(entryType, o.entryType, true); 1310 } 1311 1312 public boolean isEmpty() { 1313 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(deviceIdentifier, issuer, jurisdiction, 1314 carrierAIDC, carrierHRF, entryType); 1315 } 1316 1317 public String fhirType() { 1318 return "Device.udiCarrier"; 1319 1320 } 1321 1322 } 1323 1324 @Block() 1325 public static class DeviceDeviceNameComponent extends BackboneElement implements IBaseBackboneElement { 1326 /** 1327 * The name of the device. 1328 */ 1329 @Child(name = "name", type = { StringType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false) 1330 @Description(shortDefinition = "The name of the device", formalDefinition = "The name of the device.") 1331 protected StringType name; 1332 1333 /** 1334 * The type of deviceName. UDILabelName | UserFriendlyName | PatientReportedName 1335 * | ManufactureDeviceName | ModelName. 1336 */ 1337 @Child(name = "type", type = { CodeType.class }, order = 2, min = 1, max = 1, modifier = false, summary = false) 1338 @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.") 1339 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/device-nametype") 1340 protected Enumeration<DeviceNameType> type; 1341 1342 private static final long serialVersionUID = 918983440L; 1343 1344 /** 1345 * Constructor 1346 */ 1347 public DeviceDeviceNameComponent() { 1348 super(); 1349 } 1350 1351 /** 1352 * Constructor 1353 */ 1354 public DeviceDeviceNameComponent(StringType name, Enumeration<DeviceNameType> type) { 1355 super(); 1356 this.name = name; 1357 this.type = type; 1358 } 1359 1360 /** 1361 * @return {@link #name} (The name of the device.). This is the underlying 1362 * object with id, value and extensions. The accessor "getName" gives 1363 * direct access to the value 1364 */ 1365 public StringType getNameElement() { 1366 if (this.name == null) 1367 if (Configuration.errorOnAutoCreate()) 1368 throw new Error("Attempt to auto-create DeviceDeviceNameComponent.name"); 1369 else if (Configuration.doAutoCreate()) 1370 this.name = new StringType(); // bb 1371 return this.name; 1372 } 1373 1374 public boolean hasNameElement() { 1375 return this.name != null && !this.name.isEmpty(); 1376 } 1377 1378 public boolean hasName() { 1379 return this.name != null && !this.name.isEmpty(); 1380 } 1381 1382 /** 1383 * @param value {@link #name} (The name of the device.). This is the underlying 1384 * object with id, value and extensions. The accessor "getName" 1385 * gives direct access to the value 1386 */ 1387 public DeviceDeviceNameComponent setNameElement(StringType value) { 1388 this.name = value; 1389 return this; 1390 } 1391 1392 /** 1393 * @return The name of the device. 1394 */ 1395 public String getName() { 1396 return this.name == null ? null : this.name.getValue(); 1397 } 1398 1399 /** 1400 * @param value The name of the device. 1401 */ 1402 public DeviceDeviceNameComponent setName(String value) { 1403 if (this.name == null) 1404 this.name = new StringType(); 1405 this.name.setValue(value); 1406 return this; 1407 } 1408 1409 /** 1410 * @return {@link #type} (The type of deviceName. UDILabelName | 1411 * UserFriendlyName | PatientReportedName | ManufactureDeviceName | 1412 * ModelName.). This is the underlying object with id, value and 1413 * extensions. The accessor "getType" gives direct access to the value 1414 */ 1415 public Enumeration<DeviceNameType> getTypeElement() { 1416 if (this.type == null) 1417 if (Configuration.errorOnAutoCreate()) 1418 throw new Error("Attempt to auto-create DeviceDeviceNameComponent.type"); 1419 else if (Configuration.doAutoCreate()) 1420 this.type = new Enumeration<DeviceNameType>(new DeviceNameTypeEnumFactory()); // bb 1421 return this.type; 1422 } 1423 1424 public boolean hasTypeElement() { 1425 return this.type != null && !this.type.isEmpty(); 1426 } 1427 1428 public boolean hasType() { 1429 return this.type != null && !this.type.isEmpty(); 1430 } 1431 1432 /** 1433 * @param value {@link #type} (The type of deviceName. UDILabelName | 1434 * UserFriendlyName | PatientReportedName | ManufactureDeviceName | 1435 * ModelName.). This is the underlying object with id, value and 1436 * extensions. The accessor "getType" gives direct access to the 1437 * value 1438 */ 1439 public DeviceDeviceNameComponent setTypeElement(Enumeration<DeviceNameType> value) { 1440 this.type = value; 1441 return this; 1442 } 1443 1444 /** 1445 * @return The type of deviceName. UDILabelName | UserFriendlyName | 1446 * PatientReportedName | ManufactureDeviceName | ModelName. 1447 */ 1448 public DeviceNameType getType() { 1449 return this.type == null ? null : this.type.getValue(); 1450 } 1451 1452 /** 1453 * @param value The type of deviceName. UDILabelName | UserFriendlyName | 1454 * PatientReportedName | ManufactureDeviceName | ModelName. 1455 */ 1456 public DeviceDeviceNameComponent setType(DeviceNameType value) { 1457 if (this.type == null) 1458 this.type = new Enumeration<DeviceNameType>(new DeviceNameTypeEnumFactory()); 1459 this.type.setValue(value); 1460 return this; 1461 } 1462 1463 protected void listChildren(List<Property> children) { 1464 super.listChildren(children); 1465 children.add(new Property("name", "string", "The name of the device.", 0, 1, name)); 1466 children.add(new Property("type", "code", 1467 "The type of deviceName.\nUDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.", 1468 0, 1, type)); 1469 } 1470 1471 @Override 1472 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1473 switch (_hash) { 1474 case 3373707: 1475 /* name */ return new Property("name", "string", "The name of the device.", 0, 1, name); 1476 case 3575610: 1477 /* type */ return new Property("type", "code", 1478 "The type of deviceName.\nUDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.", 1479 0, 1, type); 1480 default: 1481 return super.getNamedProperty(_hash, _name, _checkValid); 1482 } 1483 1484 } 1485 1486 @Override 1487 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1488 switch (hash) { 1489 case 3373707: 1490 /* name */ return this.name == null ? new Base[0] : new Base[] { this.name }; // StringType 1491 case 3575610: 1492 /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // Enumeration<DeviceNameType> 1493 default: 1494 return super.getProperty(hash, name, checkValid); 1495 } 1496 1497 } 1498 1499 @Override 1500 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1501 switch (hash) { 1502 case 3373707: // name 1503 this.name = castToString(value); // StringType 1504 return value; 1505 case 3575610: // type 1506 value = new DeviceNameTypeEnumFactory().fromType(castToCode(value)); 1507 this.type = (Enumeration) value; // Enumeration<DeviceNameType> 1508 return value; 1509 default: 1510 return super.setProperty(hash, name, value); 1511 } 1512 1513 } 1514 1515 @Override 1516 public Base setProperty(String name, Base value) throws FHIRException { 1517 if (name.equals("name")) { 1518 this.name = castToString(value); // StringType 1519 } else if (name.equals("type")) { 1520 value = new DeviceNameTypeEnumFactory().fromType(castToCode(value)); 1521 this.type = (Enumeration) value; // Enumeration<DeviceNameType> 1522 } else 1523 return super.setProperty(name, value); 1524 return value; 1525 } 1526 1527 @Override 1528 public Base makeProperty(int hash, String name) throws FHIRException { 1529 switch (hash) { 1530 case 3373707: 1531 return getNameElement(); 1532 case 3575610: 1533 return getTypeElement(); 1534 default: 1535 return super.makeProperty(hash, name); 1536 } 1537 1538 } 1539 1540 @Override 1541 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1542 switch (hash) { 1543 case 3373707: 1544 /* name */ return new String[] { "string" }; 1545 case 3575610: 1546 /* type */ return new String[] { "code" }; 1547 default: 1548 return super.getTypesForProperty(hash, name); 1549 } 1550 1551 } 1552 1553 @Override 1554 public Base addChild(String name) throws FHIRException { 1555 if (name.equals("name")) { 1556 throw new FHIRException("Cannot call addChild on a singleton property Device.name"); 1557 } else if (name.equals("type")) { 1558 throw new FHIRException("Cannot call addChild on a singleton property Device.type"); 1559 } else 1560 return super.addChild(name); 1561 } 1562 1563 public DeviceDeviceNameComponent copy() { 1564 DeviceDeviceNameComponent dst = new DeviceDeviceNameComponent(); 1565 copyValues(dst); 1566 return dst; 1567 } 1568 1569 public void copyValues(DeviceDeviceNameComponent dst) { 1570 super.copyValues(dst); 1571 dst.name = name == null ? null : name.copy(); 1572 dst.type = type == null ? null : type.copy(); 1573 } 1574 1575 @Override 1576 public boolean equalsDeep(Base other_) { 1577 if (!super.equalsDeep(other_)) 1578 return false; 1579 if (!(other_ instanceof DeviceDeviceNameComponent)) 1580 return false; 1581 DeviceDeviceNameComponent o = (DeviceDeviceNameComponent) other_; 1582 return compareDeep(name, o.name, true) && compareDeep(type, o.type, true); 1583 } 1584 1585 @Override 1586 public boolean equalsShallow(Base other_) { 1587 if (!super.equalsShallow(other_)) 1588 return false; 1589 if (!(other_ instanceof DeviceDeviceNameComponent)) 1590 return false; 1591 DeviceDeviceNameComponent o = (DeviceDeviceNameComponent) other_; 1592 return compareValues(name, o.name, true) && compareValues(type, o.type, true); 1593 } 1594 1595 public boolean isEmpty() { 1596 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, type); 1597 } 1598 1599 public String fhirType() { 1600 return "Device.deviceName"; 1601 1602 } 1603 1604 } 1605 1606 @Block() 1607 public static class DeviceSpecializationComponent extends BackboneElement implements IBaseBackboneElement { 1608 /** 1609 * The standard that is used to operate and communicate. 1610 */ 1611 @Child(name = "systemType", type = { 1612 CodeableConcept.class }, order = 1, min = 1, max = 1, modifier = false, summary = false) 1613 @Description(shortDefinition = "The standard that is used to operate and communicate", formalDefinition = "The standard that is used to operate and communicate.") 1614 protected CodeableConcept systemType; 1615 1616 /** 1617 * The version of the standard that is used to operate and communicate. 1618 */ 1619 @Child(name = "version", type = { 1620 StringType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false) 1621 @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.") 1622 protected StringType version; 1623 1624 private static final long serialVersionUID = 1557342629L; 1625 1626 /** 1627 * Constructor 1628 */ 1629 public DeviceSpecializationComponent() { 1630 super(); 1631 } 1632 1633 /** 1634 * Constructor 1635 */ 1636 public DeviceSpecializationComponent(CodeableConcept systemType) { 1637 super(); 1638 this.systemType = systemType; 1639 } 1640 1641 /** 1642 * @return {@link #systemType} (The standard that is used to operate and 1643 * communicate.) 1644 */ 1645 public CodeableConcept getSystemType() { 1646 if (this.systemType == null) 1647 if (Configuration.errorOnAutoCreate()) 1648 throw new Error("Attempt to auto-create DeviceSpecializationComponent.systemType"); 1649 else if (Configuration.doAutoCreate()) 1650 this.systemType = new CodeableConcept(); // cc 1651 return this.systemType; 1652 } 1653 1654 public boolean hasSystemType() { 1655 return this.systemType != null && !this.systemType.isEmpty(); 1656 } 1657 1658 /** 1659 * @param value {@link #systemType} (The standard that is used to operate and 1660 * communicate.) 1661 */ 1662 public DeviceSpecializationComponent setSystemType(CodeableConcept value) { 1663 this.systemType = value; 1664 return this; 1665 } 1666 1667 /** 1668 * @return {@link #version} (The version of the standard that is used to operate 1669 * and communicate.). This is the underlying object with id, value and 1670 * extensions. The accessor "getVersion" gives direct access to the 1671 * value 1672 */ 1673 public StringType getVersionElement() { 1674 if (this.version == null) 1675 if (Configuration.errorOnAutoCreate()) 1676 throw new Error("Attempt to auto-create DeviceSpecializationComponent.version"); 1677 else if (Configuration.doAutoCreate()) 1678 this.version = new StringType(); // bb 1679 return this.version; 1680 } 1681 1682 public boolean hasVersionElement() { 1683 return this.version != null && !this.version.isEmpty(); 1684 } 1685 1686 public boolean hasVersion() { 1687 return this.version != null && !this.version.isEmpty(); 1688 } 1689 1690 /** 1691 * @param value {@link #version} (The version of the standard that is used to 1692 * operate and communicate.). This is the underlying object with 1693 * id, value and extensions. The accessor "getVersion" gives direct 1694 * access to the value 1695 */ 1696 public DeviceSpecializationComponent setVersionElement(StringType value) { 1697 this.version = value; 1698 return this; 1699 } 1700 1701 /** 1702 * @return The version of the standard that is used to operate and communicate. 1703 */ 1704 public String getVersion() { 1705 return this.version == null ? null : this.version.getValue(); 1706 } 1707 1708 /** 1709 * @param value The version of the standard that is used to operate and 1710 * communicate. 1711 */ 1712 public DeviceSpecializationComponent setVersion(String value) { 1713 if (Utilities.noString(value)) 1714 this.version = null; 1715 else { 1716 if (this.version == null) 1717 this.version = new StringType(); 1718 this.version.setValue(value); 1719 } 1720 return this; 1721 } 1722 1723 protected void listChildren(List<Property> children) { 1724 super.listChildren(children); 1725 children.add(new Property("systemType", "CodeableConcept", 1726 "The standard that is used to operate and communicate.", 0, 1, systemType)); 1727 children.add(new Property("version", "string", 1728 "The version of the standard that is used to operate and communicate.", 0, 1, version)); 1729 } 1730 1731 @Override 1732 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1733 switch (_hash) { 1734 case 642893321: 1735 /* systemType */ return new Property("systemType", "CodeableConcept", 1736 "The standard that is used to operate and communicate.", 0, 1, systemType); 1737 case 351608024: 1738 /* version */ return new Property("version", "string", 1739 "The version of the standard that is used to operate and communicate.", 0, 1, version); 1740 default: 1741 return super.getNamedProperty(_hash, _name, _checkValid); 1742 } 1743 1744 } 1745 1746 @Override 1747 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1748 switch (hash) { 1749 case 642893321: 1750 /* systemType */ return this.systemType == null ? new Base[0] : new Base[] { this.systemType }; // CodeableConcept 1751 case 351608024: 1752 /* version */ return this.version == null ? new Base[0] : new Base[] { this.version }; // StringType 1753 default: 1754 return super.getProperty(hash, name, checkValid); 1755 } 1756 1757 } 1758 1759 @Override 1760 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1761 switch (hash) { 1762 case 642893321: // systemType 1763 this.systemType = castToCodeableConcept(value); // CodeableConcept 1764 return value; 1765 case 351608024: // version 1766 this.version = castToString(value); // StringType 1767 return value; 1768 default: 1769 return super.setProperty(hash, name, value); 1770 } 1771 1772 } 1773 1774 @Override 1775 public Base setProperty(String name, Base value) throws FHIRException { 1776 if (name.equals("systemType")) { 1777 this.systemType = castToCodeableConcept(value); // CodeableConcept 1778 } else if (name.equals("version")) { 1779 this.version = castToString(value); // StringType 1780 } else 1781 return super.setProperty(name, value); 1782 return value; 1783 } 1784 1785 @Override 1786 public Base makeProperty(int hash, String name) throws FHIRException { 1787 switch (hash) { 1788 case 642893321: 1789 return getSystemType(); 1790 case 351608024: 1791 return getVersionElement(); 1792 default: 1793 return super.makeProperty(hash, name); 1794 } 1795 1796 } 1797 1798 @Override 1799 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1800 switch (hash) { 1801 case 642893321: 1802 /* systemType */ return new String[] { "CodeableConcept" }; 1803 case 351608024: 1804 /* version */ return new String[] { "string" }; 1805 default: 1806 return super.getTypesForProperty(hash, name); 1807 } 1808 1809 } 1810 1811 @Override 1812 public Base addChild(String name) throws FHIRException { 1813 if (name.equals("systemType")) { 1814 this.systemType = new CodeableConcept(); 1815 return this.systemType; 1816 } else if (name.equals("version")) { 1817 throw new FHIRException("Cannot call addChild on a singleton property Device.version"); 1818 } else 1819 return super.addChild(name); 1820 } 1821 1822 public DeviceSpecializationComponent copy() { 1823 DeviceSpecializationComponent dst = new DeviceSpecializationComponent(); 1824 copyValues(dst); 1825 return dst; 1826 } 1827 1828 public void copyValues(DeviceSpecializationComponent dst) { 1829 super.copyValues(dst); 1830 dst.systemType = systemType == null ? null : systemType.copy(); 1831 dst.version = version == null ? null : version.copy(); 1832 } 1833 1834 @Override 1835 public boolean equalsDeep(Base other_) { 1836 if (!super.equalsDeep(other_)) 1837 return false; 1838 if (!(other_ instanceof DeviceSpecializationComponent)) 1839 return false; 1840 DeviceSpecializationComponent o = (DeviceSpecializationComponent) other_; 1841 return compareDeep(systemType, o.systemType, true) && compareDeep(version, o.version, true); 1842 } 1843 1844 @Override 1845 public boolean equalsShallow(Base other_) { 1846 if (!super.equalsShallow(other_)) 1847 return false; 1848 if (!(other_ instanceof DeviceSpecializationComponent)) 1849 return false; 1850 DeviceSpecializationComponent o = (DeviceSpecializationComponent) other_; 1851 return compareValues(version, o.version, true); 1852 } 1853 1854 public boolean isEmpty() { 1855 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(systemType, version); 1856 } 1857 1858 public String fhirType() { 1859 return "Device.specialization"; 1860 1861 } 1862 1863 } 1864 1865 @Block() 1866 public static class DeviceVersionComponent extends BackboneElement implements IBaseBackboneElement { 1867 /** 1868 * The type of the device version. 1869 */ 1870 @Child(name = "type", type = { 1871 CodeableConcept.class }, order = 1, min = 0, max = 1, modifier = false, summary = false) 1872 @Description(shortDefinition = "The type of the device version", formalDefinition = "The type of the device version.") 1873 protected CodeableConcept type; 1874 1875 /** 1876 * A single component of the device version. 1877 */ 1878 @Child(name = "component", type = { 1879 Identifier.class }, order = 2, min = 0, max = 1, modifier = false, summary = false) 1880 @Description(shortDefinition = "A single component of the device version", formalDefinition = "A single component of the device version.") 1881 protected Identifier component; 1882 1883 /** 1884 * The version text. 1885 */ 1886 @Child(name = "value", type = { StringType.class }, order = 3, min = 1, max = 1, modifier = false, summary = false) 1887 @Description(shortDefinition = "The version text", formalDefinition = "The version text.") 1888 protected StringType value; 1889 1890 private static final long serialVersionUID = 645214295L; 1891 1892 /** 1893 * Constructor 1894 */ 1895 public DeviceVersionComponent() { 1896 super(); 1897 } 1898 1899 /** 1900 * Constructor 1901 */ 1902 public DeviceVersionComponent(StringType value) { 1903 super(); 1904 this.value = value; 1905 } 1906 1907 /** 1908 * @return {@link #type} (The type of the device version.) 1909 */ 1910 public CodeableConcept getType() { 1911 if (this.type == null) 1912 if (Configuration.errorOnAutoCreate()) 1913 throw new Error("Attempt to auto-create DeviceVersionComponent.type"); 1914 else if (Configuration.doAutoCreate()) 1915 this.type = new CodeableConcept(); // cc 1916 return this.type; 1917 } 1918 1919 public boolean hasType() { 1920 return this.type != null && !this.type.isEmpty(); 1921 } 1922 1923 /** 1924 * @param value {@link #type} (The type of the device version.) 1925 */ 1926 public DeviceVersionComponent setType(CodeableConcept value) { 1927 this.type = value; 1928 return this; 1929 } 1930 1931 /** 1932 * @return {@link #component} (A single component of the device version.) 1933 */ 1934 public Identifier getComponent() { 1935 if (this.component == null) 1936 if (Configuration.errorOnAutoCreate()) 1937 throw new Error("Attempt to auto-create DeviceVersionComponent.component"); 1938 else if (Configuration.doAutoCreate()) 1939 this.component = new Identifier(); // cc 1940 return this.component; 1941 } 1942 1943 public boolean hasComponent() { 1944 return this.component != null && !this.component.isEmpty(); 1945 } 1946 1947 /** 1948 * @param value {@link #component} (A single component of the device version.) 1949 */ 1950 public DeviceVersionComponent setComponent(Identifier value) { 1951 this.component = value; 1952 return this; 1953 } 1954 1955 /** 1956 * @return {@link #value} (The version text.). This is the underlying object 1957 * with id, value and extensions. The accessor "getValue" gives direct 1958 * access to the value 1959 */ 1960 public StringType getValueElement() { 1961 if (this.value == null) 1962 if (Configuration.errorOnAutoCreate()) 1963 throw new Error("Attempt to auto-create DeviceVersionComponent.value"); 1964 else if (Configuration.doAutoCreate()) 1965 this.value = new StringType(); // bb 1966 return this.value; 1967 } 1968 1969 public boolean hasValueElement() { 1970 return this.value != null && !this.value.isEmpty(); 1971 } 1972 1973 public boolean hasValue() { 1974 return this.value != null && !this.value.isEmpty(); 1975 } 1976 1977 /** 1978 * @param value {@link #value} (The version text.). This is the underlying 1979 * object with id, value and extensions. The accessor "getValue" 1980 * gives direct access to the value 1981 */ 1982 public DeviceVersionComponent setValueElement(StringType value) { 1983 this.value = value; 1984 return this; 1985 } 1986 1987 /** 1988 * @return The version text. 1989 */ 1990 public String getValue() { 1991 return this.value == null ? null : this.value.getValue(); 1992 } 1993 1994 /** 1995 * @param value The version text. 1996 */ 1997 public DeviceVersionComponent setValue(String value) { 1998 if (this.value == null) 1999 this.value = new StringType(); 2000 this.value.setValue(value); 2001 return this; 2002 } 2003 2004 protected void listChildren(List<Property> children) { 2005 super.listChildren(children); 2006 children.add(new Property("type", "CodeableConcept", "The type of the device version.", 0, 1, type)); 2007 children 2008 .add(new Property("component", "Identifier", "A single component of the device version.", 0, 1, component)); 2009 children.add(new Property("value", "string", "The version text.", 0, 1, value)); 2010 } 2011 2012 @Override 2013 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2014 switch (_hash) { 2015 case 3575610: 2016 /* type */ return new Property("type", "CodeableConcept", "The type of the device version.", 0, 1, type); 2017 case -1399907075: 2018 /* component */ return new Property("component", "Identifier", "A single component of the device version.", 0, 2019 1, component); 2020 case 111972721: 2021 /* value */ return new Property("value", "string", "The version text.", 0, 1, value); 2022 default: 2023 return super.getNamedProperty(_hash, _name, _checkValid); 2024 } 2025 2026 } 2027 2028 @Override 2029 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2030 switch (hash) { 2031 case 3575610: 2032 /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // CodeableConcept 2033 case -1399907075: 2034 /* component */ return this.component == null ? new Base[0] : new Base[] { this.component }; // Identifier 2035 case 111972721: 2036 /* value */ return this.value == null ? new Base[0] : new Base[] { this.value }; // StringType 2037 default: 2038 return super.getProperty(hash, name, checkValid); 2039 } 2040 2041 } 2042 2043 @Override 2044 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2045 switch (hash) { 2046 case 3575610: // type 2047 this.type = castToCodeableConcept(value); // CodeableConcept 2048 return value; 2049 case -1399907075: // component 2050 this.component = castToIdentifier(value); // Identifier 2051 return value; 2052 case 111972721: // value 2053 this.value = castToString(value); // StringType 2054 return value; 2055 default: 2056 return super.setProperty(hash, name, value); 2057 } 2058 2059 } 2060 2061 @Override 2062 public Base setProperty(String name, Base value) throws FHIRException { 2063 if (name.equals("type")) { 2064 this.type = castToCodeableConcept(value); // CodeableConcept 2065 } else if (name.equals("component")) { 2066 this.component = castToIdentifier(value); // Identifier 2067 } else if (name.equals("value")) { 2068 this.value = castToString(value); // StringType 2069 } else 2070 return super.setProperty(name, value); 2071 return value; 2072 } 2073 2074 @Override 2075 public Base makeProperty(int hash, String name) throws FHIRException { 2076 switch (hash) { 2077 case 3575610: 2078 return getType(); 2079 case -1399907075: 2080 return getComponent(); 2081 case 111972721: 2082 return getValueElement(); 2083 default: 2084 return super.makeProperty(hash, name); 2085 } 2086 2087 } 2088 2089 @Override 2090 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2091 switch (hash) { 2092 case 3575610: 2093 /* type */ return new String[] { "CodeableConcept" }; 2094 case -1399907075: 2095 /* component */ return new String[] { "Identifier" }; 2096 case 111972721: 2097 /* value */ return new String[] { "string" }; 2098 default: 2099 return super.getTypesForProperty(hash, name); 2100 } 2101 2102 } 2103 2104 @Override 2105 public Base addChild(String name) throws FHIRException { 2106 if (name.equals("type")) { 2107 this.type = new CodeableConcept(); 2108 return this.type; 2109 } else if (name.equals("component")) { 2110 this.component = new Identifier(); 2111 return this.component; 2112 } else if (name.equals("value")) { 2113 throw new FHIRException("Cannot call addChild on a singleton property Device.value"); 2114 } else 2115 return super.addChild(name); 2116 } 2117 2118 public DeviceVersionComponent copy() { 2119 DeviceVersionComponent dst = new DeviceVersionComponent(); 2120 copyValues(dst); 2121 return dst; 2122 } 2123 2124 public void copyValues(DeviceVersionComponent dst) { 2125 super.copyValues(dst); 2126 dst.type = type == null ? null : type.copy(); 2127 dst.component = component == null ? null : component.copy(); 2128 dst.value = value == null ? null : value.copy(); 2129 } 2130 2131 @Override 2132 public boolean equalsDeep(Base other_) { 2133 if (!super.equalsDeep(other_)) 2134 return false; 2135 if (!(other_ instanceof DeviceVersionComponent)) 2136 return false; 2137 DeviceVersionComponent o = (DeviceVersionComponent) other_; 2138 return compareDeep(type, o.type, true) && compareDeep(component, o.component, true) 2139 && compareDeep(value, o.value, true); 2140 } 2141 2142 @Override 2143 public boolean equalsShallow(Base other_) { 2144 if (!super.equalsShallow(other_)) 2145 return false; 2146 if (!(other_ instanceof DeviceVersionComponent)) 2147 return false; 2148 DeviceVersionComponent o = (DeviceVersionComponent) other_; 2149 return compareValues(value, o.value, true); 2150 } 2151 2152 public boolean isEmpty() { 2153 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, component, value); 2154 } 2155 2156 public String fhirType() { 2157 return "Device.version"; 2158 2159 } 2160 2161 } 2162 2163 @Block() 2164 public static class DevicePropertyComponent extends BackboneElement implements IBaseBackboneElement { 2165 /** 2166 * Code that specifies the property DeviceDefinitionPropetyCode (Extensible). 2167 */ 2168 @Child(name = "type", type = { 2169 CodeableConcept.class }, order = 1, min = 1, max = 1, modifier = false, summary = false) 2170 @Description(shortDefinition = "Code that specifies the property DeviceDefinitionPropetyCode (Extensible)", formalDefinition = "Code that specifies the property DeviceDefinitionPropetyCode (Extensible).") 2171 protected CodeableConcept type; 2172 2173 /** 2174 * Property value as a quantity. 2175 */ 2176 @Child(name = "valueQuantity", type = { 2177 Quantity.class }, order = 2, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2178 @Description(shortDefinition = "Property value as a quantity", formalDefinition = "Property value as a quantity.") 2179 protected List<Quantity> valueQuantity; 2180 2181 /** 2182 * Property value as a code, e.g., NTP4 (synced to NTP). 2183 */ 2184 @Child(name = "valueCode", type = { 2185 CodeableConcept.class }, order = 3, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2186 @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).") 2187 protected List<CodeableConcept> valueCode; 2188 2189 private static final long serialVersionUID = 1512172633L; 2190 2191 /** 2192 * Constructor 2193 */ 2194 public DevicePropertyComponent() { 2195 super(); 2196 } 2197 2198 /** 2199 * Constructor 2200 */ 2201 public DevicePropertyComponent(CodeableConcept type) { 2202 super(); 2203 this.type = type; 2204 } 2205 2206 /** 2207 * @return {@link #type} (Code that specifies the property 2208 * DeviceDefinitionPropetyCode (Extensible).) 2209 */ 2210 public CodeableConcept getType() { 2211 if (this.type == null) 2212 if (Configuration.errorOnAutoCreate()) 2213 throw new Error("Attempt to auto-create DevicePropertyComponent.type"); 2214 else if (Configuration.doAutoCreate()) 2215 this.type = new CodeableConcept(); // cc 2216 return this.type; 2217 } 2218 2219 public boolean hasType() { 2220 return this.type != null && !this.type.isEmpty(); 2221 } 2222 2223 /** 2224 * @param value {@link #type} (Code that specifies the property 2225 * DeviceDefinitionPropetyCode (Extensible).) 2226 */ 2227 public DevicePropertyComponent setType(CodeableConcept value) { 2228 this.type = value; 2229 return this; 2230 } 2231 2232 /** 2233 * @return {@link #valueQuantity} (Property value as a quantity.) 2234 */ 2235 public List<Quantity> getValueQuantity() { 2236 if (this.valueQuantity == null) 2237 this.valueQuantity = new ArrayList<Quantity>(); 2238 return this.valueQuantity; 2239 } 2240 2241 /** 2242 * @return Returns a reference to <code>this</code> for easy method chaining 2243 */ 2244 public DevicePropertyComponent setValueQuantity(List<Quantity> theValueQuantity) { 2245 this.valueQuantity = theValueQuantity; 2246 return this; 2247 } 2248 2249 public boolean hasValueQuantity() { 2250 if (this.valueQuantity == null) 2251 return false; 2252 for (Quantity item : this.valueQuantity) 2253 if (!item.isEmpty()) 2254 return true; 2255 return false; 2256 } 2257 2258 public Quantity addValueQuantity() { // 3 2259 Quantity t = new Quantity(); 2260 if (this.valueQuantity == null) 2261 this.valueQuantity = new ArrayList<Quantity>(); 2262 this.valueQuantity.add(t); 2263 return t; 2264 } 2265 2266 public DevicePropertyComponent addValueQuantity(Quantity t) { // 3 2267 if (t == null) 2268 return this; 2269 if (this.valueQuantity == null) 2270 this.valueQuantity = new ArrayList<Quantity>(); 2271 this.valueQuantity.add(t); 2272 return this; 2273 } 2274 2275 /** 2276 * @return The first repetition of repeating field {@link #valueQuantity}, 2277 * creating it if it does not already exist 2278 */ 2279 public Quantity getValueQuantityFirstRep() { 2280 if (getValueQuantity().isEmpty()) { 2281 addValueQuantity(); 2282 } 2283 return getValueQuantity().get(0); 2284 } 2285 2286 /** 2287 * @return {@link #valueCode} (Property value as a code, e.g., NTP4 (synced to 2288 * NTP).) 2289 */ 2290 public List<CodeableConcept> getValueCode() { 2291 if (this.valueCode == null) 2292 this.valueCode = new ArrayList<CodeableConcept>(); 2293 return this.valueCode; 2294 } 2295 2296 /** 2297 * @return Returns a reference to <code>this</code> for easy method chaining 2298 */ 2299 public DevicePropertyComponent setValueCode(List<CodeableConcept> theValueCode) { 2300 this.valueCode = theValueCode; 2301 return this; 2302 } 2303 2304 public boolean hasValueCode() { 2305 if (this.valueCode == null) 2306 return false; 2307 for (CodeableConcept item : this.valueCode) 2308 if (!item.isEmpty()) 2309 return true; 2310 return false; 2311 } 2312 2313 public CodeableConcept addValueCode() { // 3 2314 CodeableConcept t = new CodeableConcept(); 2315 if (this.valueCode == null) 2316 this.valueCode = new ArrayList<CodeableConcept>(); 2317 this.valueCode.add(t); 2318 return t; 2319 } 2320 2321 public DevicePropertyComponent addValueCode(CodeableConcept t) { // 3 2322 if (t == null) 2323 return this; 2324 if (this.valueCode == null) 2325 this.valueCode = new ArrayList<CodeableConcept>(); 2326 this.valueCode.add(t); 2327 return this; 2328 } 2329 2330 /** 2331 * @return The first repetition of repeating field {@link #valueCode}, creating 2332 * it if it does not already exist 2333 */ 2334 public CodeableConcept getValueCodeFirstRep() { 2335 if (getValueCode().isEmpty()) { 2336 addValueCode(); 2337 } 2338 return getValueCode().get(0); 2339 } 2340 2341 protected void listChildren(List<Property> children) { 2342 super.listChildren(children); 2343 children.add(new Property("type", "CodeableConcept", 2344 "Code that specifies the property DeviceDefinitionPropetyCode (Extensible).", 0, 1, type)); 2345 children.add(new Property("valueQuantity", "Quantity", "Property value as a quantity.", 0, 2346 java.lang.Integer.MAX_VALUE, valueQuantity)); 2347 children.add(new Property("valueCode", "CodeableConcept", "Property value as a code, e.g., NTP4 (synced to NTP).", 2348 0, java.lang.Integer.MAX_VALUE, valueCode)); 2349 } 2350 2351 @Override 2352 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2353 switch (_hash) { 2354 case 3575610: 2355 /* type */ return new Property("type", "CodeableConcept", 2356 "Code that specifies the property DeviceDefinitionPropetyCode (Extensible).", 0, 1, type); 2357 case -2029823716: 2358 /* valueQuantity */ return new Property("valueQuantity", "Quantity", "Property value as a quantity.", 0, 2359 java.lang.Integer.MAX_VALUE, valueQuantity); 2360 case -766209282: 2361 /* valueCode */ return new Property("valueCode", "CodeableConcept", 2362 "Property value as a code, e.g., NTP4 (synced to NTP).", 0, java.lang.Integer.MAX_VALUE, valueCode); 2363 default: 2364 return super.getNamedProperty(_hash, _name, _checkValid); 2365 } 2366 2367 } 2368 2369 @Override 2370 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2371 switch (hash) { 2372 case 3575610: 2373 /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // CodeableConcept 2374 case -2029823716: 2375 /* valueQuantity */ return this.valueQuantity == null ? new Base[0] 2376 : this.valueQuantity.toArray(new Base[this.valueQuantity.size()]); // Quantity 2377 case -766209282: 2378 /* valueCode */ return this.valueCode == null ? new Base[0] 2379 : this.valueCode.toArray(new Base[this.valueCode.size()]); // CodeableConcept 2380 default: 2381 return super.getProperty(hash, name, checkValid); 2382 } 2383 2384 } 2385 2386 @Override 2387 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2388 switch (hash) { 2389 case 3575610: // type 2390 this.type = castToCodeableConcept(value); // CodeableConcept 2391 return value; 2392 case -2029823716: // valueQuantity 2393 this.getValueQuantity().add(castToQuantity(value)); // Quantity 2394 return value; 2395 case -766209282: // valueCode 2396 this.getValueCode().add(castToCodeableConcept(value)); // CodeableConcept 2397 return value; 2398 default: 2399 return super.setProperty(hash, name, value); 2400 } 2401 2402 } 2403 2404 @Override 2405 public Base setProperty(String name, Base value) throws FHIRException { 2406 if (name.equals("type")) { 2407 this.type = castToCodeableConcept(value); // CodeableConcept 2408 } else if (name.equals("valueQuantity")) { 2409 this.getValueQuantity().add(castToQuantity(value)); 2410 } else if (name.equals("valueCode")) { 2411 this.getValueCode().add(castToCodeableConcept(value)); 2412 } else 2413 return super.setProperty(name, value); 2414 return value; 2415 } 2416 2417 @Override 2418 public Base makeProperty(int hash, String name) throws FHIRException { 2419 switch (hash) { 2420 case 3575610: 2421 return getType(); 2422 case -2029823716: 2423 return addValueQuantity(); 2424 case -766209282: 2425 return addValueCode(); 2426 default: 2427 return super.makeProperty(hash, name); 2428 } 2429 2430 } 2431 2432 @Override 2433 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2434 switch (hash) { 2435 case 3575610: 2436 /* type */ return new String[] { "CodeableConcept" }; 2437 case -2029823716: 2438 /* valueQuantity */ return new String[] { "Quantity" }; 2439 case -766209282: 2440 /* valueCode */ return new String[] { "CodeableConcept" }; 2441 default: 2442 return super.getTypesForProperty(hash, name); 2443 } 2444 2445 } 2446 2447 @Override 2448 public Base addChild(String name) throws FHIRException { 2449 if (name.equals("type")) { 2450 this.type = new CodeableConcept(); 2451 return this.type; 2452 } else if (name.equals("valueQuantity")) { 2453 return addValueQuantity(); 2454 } else if (name.equals("valueCode")) { 2455 return addValueCode(); 2456 } else 2457 return super.addChild(name); 2458 } 2459 2460 public DevicePropertyComponent copy() { 2461 DevicePropertyComponent dst = new DevicePropertyComponent(); 2462 copyValues(dst); 2463 return dst; 2464 } 2465 2466 public void copyValues(DevicePropertyComponent dst) { 2467 super.copyValues(dst); 2468 dst.type = type == null ? null : type.copy(); 2469 if (valueQuantity != null) { 2470 dst.valueQuantity = new ArrayList<Quantity>(); 2471 for (Quantity i : valueQuantity) 2472 dst.valueQuantity.add(i.copy()); 2473 } 2474 ; 2475 if (valueCode != null) { 2476 dst.valueCode = new ArrayList<CodeableConcept>(); 2477 for (CodeableConcept i : valueCode) 2478 dst.valueCode.add(i.copy()); 2479 } 2480 ; 2481 } 2482 2483 @Override 2484 public boolean equalsDeep(Base other_) { 2485 if (!super.equalsDeep(other_)) 2486 return false; 2487 if (!(other_ instanceof DevicePropertyComponent)) 2488 return false; 2489 DevicePropertyComponent o = (DevicePropertyComponent) other_; 2490 return compareDeep(type, o.type, true) && compareDeep(valueQuantity, o.valueQuantity, true) 2491 && compareDeep(valueCode, o.valueCode, true); 2492 } 2493 2494 @Override 2495 public boolean equalsShallow(Base other_) { 2496 if (!super.equalsShallow(other_)) 2497 return false; 2498 if (!(other_ instanceof DevicePropertyComponent)) 2499 return false; 2500 DevicePropertyComponent o = (DevicePropertyComponent) other_; 2501 return true; 2502 } 2503 2504 public boolean isEmpty() { 2505 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, valueQuantity, valueCode); 2506 } 2507 2508 public String fhirType() { 2509 return "Device.property"; 2510 2511 } 2512 2513 } 2514 2515 /** 2516 * Unique instance identifiers assigned to a device by manufacturers other 2517 * organizations or owners. 2518 */ 2519 @Child(name = "identifier", type = { 2520 Identifier.class }, order = 0, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2521 @Description(shortDefinition = "Instance identifier", formalDefinition = "Unique instance identifiers assigned to a device by manufacturers other organizations or owners.") 2522 protected List<Identifier> identifier; 2523 2524 /** 2525 * The reference to the definition for the device. 2526 */ 2527 @Child(name = "definition", type = { 2528 DeviceDefinition.class }, order = 1, min = 0, max = 1, modifier = false, summary = false) 2529 @Description(shortDefinition = "The reference to the definition for the device", formalDefinition = "The reference to the definition for the device.") 2530 protected Reference definition; 2531 2532 /** 2533 * The actual object that is the target of the reference (The reference to the 2534 * definition for the device.) 2535 */ 2536 protected DeviceDefinition definitionTarget; 2537 2538 /** 2539 * Unique device identifier (UDI) assigned to device label or package. Note that 2540 * the Device may include multiple udiCarriers as it either may include just the 2541 * udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it 2542 * could have been sold. 2543 */ 2544 @Child(name = "udiCarrier", type = {}, order = 2, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 2545 @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.") 2546 protected List<DeviceUdiCarrierComponent> udiCarrier; 2547 2548 /** 2549 * Status of the Device availability. 2550 */ 2551 @Child(name = "status", type = { CodeType.class }, order = 3, min = 0, max = 1, modifier = true, summary = true) 2552 @Description(shortDefinition = "active | inactive | entered-in-error | unknown", formalDefinition = "Status of the Device availability.") 2553 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/device-status") 2554 protected Enumeration<FHIRDeviceStatus> status; 2555 2556 /** 2557 * Reason for the dtatus of the Device availability. 2558 */ 2559 @Child(name = "statusReason", type = { 2560 CodeableConcept.class }, order = 4, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2561 @Description(shortDefinition = "online | paused | standby | offline | not-ready | transduc-discon | hw-discon | off", formalDefinition = "Reason for the dtatus of the Device availability.") 2562 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/device-status-reason") 2563 protected List<CodeableConcept> statusReason; 2564 2565 /** 2566 * The distinct identification string as required by regulation for a human 2567 * cell, tissue, or cellular and tissue-based product. 2568 */ 2569 @Child(name = "distinctIdentifier", type = { 2570 StringType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false) 2571 @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.") 2572 protected StringType distinctIdentifier; 2573 2574 /** 2575 * A name of the manufacturer. 2576 */ 2577 @Child(name = "manufacturer", type = { 2578 StringType.class }, order = 6, min = 0, max = 1, modifier = false, summary = false) 2579 @Description(shortDefinition = "Name of device manufacturer", formalDefinition = "A name of the manufacturer.") 2580 protected StringType manufacturer; 2581 2582 /** 2583 * The date and time when the device was manufactured. 2584 */ 2585 @Child(name = "manufactureDate", type = { 2586 DateTimeType.class }, order = 7, min = 0, max = 1, modifier = false, summary = false) 2587 @Description(shortDefinition = "Date when the device was made", formalDefinition = "The date and time when the device was manufactured.") 2588 protected DateTimeType manufactureDate; 2589 2590 /** 2591 * The date and time beyond which this device is no longer valid or should not 2592 * be used (if applicable). 2593 */ 2594 @Child(name = "expirationDate", type = { 2595 DateTimeType.class }, order = 8, min = 0, max = 1, modifier = false, summary = false) 2596 @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).") 2597 protected DateTimeType expirationDate; 2598 2599 /** 2600 * Lot number assigned by the manufacturer. 2601 */ 2602 @Child(name = "lotNumber", type = { 2603 StringType.class }, order = 9, min = 0, max = 1, modifier = false, summary = false) 2604 @Description(shortDefinition = "Lot number of manufacture", formalDefinition = "Lot number assigned by the manufacturer.") 2605 protected StringType lotNumber; 2606 2607 /** 2608 * The serial number assigned by the organization when the device was 2609 * manufactured. 2610 */ 2611 @Child(name = "serialNumber", type = { 2612 StringType.class }, order = 10, min = 0, max = 1, modifier = false, summary = false) 2613 @Description(shortDefinition = "Serial number assigned by the manufacturer", formalDefinition = "The serial number assigned by the organization when the device was manufactured.") 2614 protected StringType serialNumber; 2615 2616 /** 2617 * This represents the manufacturer's name of the device as provided by the 2618 * device, from a UDI label, or by a person describing the Device. This 2619 * typically would be used when a person provides the name(s) or when the device 2620 * represents one of the names available from DeviceDefinition. 2621 */ 2622 @Child(name = "deviceName", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2623 @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.") 2624 protected List<DeviceDeviceNameComponent> deviceName; 2625 2626 /** 2627 * The model number for the device. 2628 */ 2629 @Child(name = "modelNumber", type = { 2630 StringType.class }, order = 12, min = 0, max = 1, modifier = false, summary = false) 2631 @Description(shortDefinition = "The model number for the device", formalDefinition = "The model number for the device.") 2632 protected StringType modelNumber; 2633 2634 /** 2635 * The part number of the device. 2636 */ 2637 @Child(name = "partNumber", type = { 2638 StringType.class }, order = 13, min = 0, max = 1, modifier = false, summary = false) 2639 @Description(shortDefinition = "The part number of the device", formalDefinition = "The part number of the device.") 2640 protected StringType partNumber; 2641 2642 /** 2643 * The kind or type of device. 2644 */ 2645 @Child(name = "type", type = { 2646 CodeableConcept.class }, order = 14, min = 0, max = 1, modifier = false, summary = false) 2647 @Description(shortDefinition = "The kind or type of device", formalDefinition = "The kind or type of device.") 2648 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/device-type") 2649 protected CodeableConcept type; 2650 2651 /** 2652 * The capabilities supported on a device, the standards to which the device 2653 * conforms for a particular purpose, and used for the communication. 2654 */ 2655 @Child(name = "specialization", type = {}, order = 15, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2656 @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.") 2657 protected List<DeviceSpecializationComponent> specialization; 2658 2659 /** 2660 * The actual design of the device or software version running on the device. 2661 */ 2662 @Child(name = "version", type = {}, order = 16, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2663 @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.") 2664 protected List<DeviceVersionComponent> version; 2665 2666 /** 2667 * The actual configuration settings of a device as it actually operates, e.g., 2668 * regulation status, time properties. 2669 */ 2670 @Child(name = "property", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2671 @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.") 2672 protected List<DevicePropertyComponent> property; 2673 2674 /** 2675 * Patient information, If the device is affixed to a person. 2676 */ 2677 @Child(name = "patient", type = { Patient.class }, order = 18, min = 0, max = 1, modifier = false, summary = false) 2678 @Description(shortDefinition = "Patient to whom Device is affixed", formalDefinition = "Patient information, If the device is affixed to a person.") 2679 protected Reference patient; 2680 2681 /** 2682 * The actual object that is the target of the reference (Patient information, 2683 * If the device is affixed to a person.) 2684 */ 2685 protected Patient patientTarget; 2686 2687 /** 2688 * An organization that is responsible for the provision and ongoing maintenance 2689 * of the device. 2690 */ 2691 @Child(name = "owner", type = { Organization.class }, order = 19, min = 0, max = 1, modifier = false, summary = false) 2692 @Description(shortDefinition = "Organization responsible for device", formalDefinition = "An organization that is responsible for the provision and ongoing maintenance of the device.") 2693 protected Reference owner; 2694 2695 /** 2696 * The actual object that is the target of the reference (An organization that 2697 * is responsible for the provision and ongoing maintenance of the device.) 2698 */ 2699 protected Organization ownerTarget; 2700 2701 /** 2702 * Contact details for an organization or a particular human that is responsible 2703 * for the device. 2704 */ 2705 @Child(name = "contact", type = { 2706 ContactPoint.class }, order = 20, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2707 @Description(shortDefinition = "Details for human/organization for support", formalDefinition = "Contact details for an organization or a particular human that is responsible for the device.") 2708 protected List<ContactPoint> contact; 2709 2710 /** 2711 * The place where the device can be found. 2712 */ 2713 @Child(name = "location", type = { Location.class }, order = 21, min = 0, max = 1, modifier = false, summary = false) 2714 @Description(shortDefinition = "Where the device is found", formalDefinition = "The place where the device can be found.") 2715 protected Reference location; 2716 2717 /** 2718 * The actual object that is the target of the reference (The place where the 2719 * device can be found.) 2720 */ 2721 protected Location locationTarget; 2722 2723 /** 2724 * A network address on which the device may be contacted directly. 2725 */ 2726 @Child(name = "url", type = { UriType.class }, order = 22, min = 0, max = 1, modifier = false, summary = false) 2727 @Description(shortDefinition = "Network address to contact device", formalDefinition = "A network address on which the device may be contacted directly.") 2728 protected UriType url; 2729 2730 /** 2731 * Descriptive information, usage information or implantation information that 2732 * is not captured in an existing element. 2733 */ 2734 @Child(name = "note", type = { 2735 Annotation.class }, order = 23, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2736 @Description(shortDefinition = "Device notes and comments", formalDefinition = "Descriptive information, usage information or implantation information that is not captured in an existing element.") 2737 protected List<Annotation> note; 2738 2739 /** 2740 * Provides additional safety characteristics about a medical device. For 2741 * example devices containing latex. 2742 */ 2743 @Child(name = "safety", type = { 2744 CodeableConcept.class }, order = 24, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 2745 @Description(shortDefinition = "Safety Characteristics of Device", formalDefinition = "Provides additional safety characteristics about a medical device. For example devices containing latex.") 2746 protected List<CodeableConcept> safety; 2747 2748 /** 2749 * The parent device. 2750 */ 2751 @Child(name = "parent", type = { Device.class }, order = 25, min = 0, max = 1, modifier = false, summary = false) 2752 @Description(shortDefinition = "The parent device", formalDefinition = "The parent device.") 2753 protected Reference parent; 2754 2755 /** 2756 * The actual object that is the target of the reference (The parent device.) 2757 */ 2758 protected Device parentTarget; 2759 2760 private static final long serialVersionUID = -298380419L; 2761 2762 /** 2763 * Constructor 2764 */ 2765 public Device() { 2766 super(); 2767 } 2768 2769 /** 2770 * @return {@link #identifier} (Unique instance identifiers assigned to a device 2771 * by manufacturers other organizations or owners.) 2772 */ 2773 public List<Identifier> getIdentifier() { 2774 if (this.identifier == null) 2775 this.identifier = new ArrayList<Identifier>(); 2776 return this.identifier; 2777 } 2778 2779 /** 2780 * @return Returns a reference to <code>this</code> for easy method chaining 2781 */ 2782 public Device setIdentifier(List<Identifier> theIdentifier) { 2783 this.identifier = theIdentifier; 2784 return this; 2785 } 2786 2787 public boolean hasIdentifier() { 2788 if (this.identifier == null) 2789 return false; 2790 for (Identifier item : this.identifier) 2791 if (!item.isEmpty()) 2792 return true; 2793 return false; 2794 } 2795 2796 public Identifier addIdentifier() { // 3 2797 Identifier t = new Identifier(); 2798 if (this.identifier == null) 2799 this.identifier = new ArrayList<Identifier>(); 2800 this.identifier.add(t); 2801 return t; 2802 } 2803 2804 public Device addIdentifier(Identifier t) { // 3 2805 if (t == null) 2806 return this; 2807 if (this.identifier == null) 2808 this.identifier = new ArrayList<Identifier>(); 2809 this.identifier.add(t); 2810 return this; 2811 } 2812 2813 /** 2814 * @return The first repetition of repeating field {@link #identifier}, creating 2815 * it if it does not already exist 2816 */ 2817 public Identifier getIdentifierFirstRep() { 2818 if (getIdentifier().isEmpty()) { 2819 addIdentifier(); 2820 } 2821 return getIdentifier().get(0); 2822 } 2823 2824 /** 2825 * @return {@link #definition} (The reference to the definition for the device.) 2826 */ 2827 public Reference getDefinition() { 2828 if (this.definition == null) 2829 if (Configuration.errorOnAutoCreate()) 2830 throw new Error("Attempt to auto-create Device.definition"); 2831 else if (Configuration.doAutoCreate()) 2832 this.definition = new Reference(); // cc 2833 return this.definition; 2834 } 2835 2836 public boolean hasDefinition() { 2837 return this.definition != null && !this.definition.isEmpty(); 2838 } 2839 2840 /** 2841 * @param value {@link #definition} (The reference to the definition for the 2842 * device.) 2843 */ 2844 public Device setDefinition(Reference value) { 2845 this.definition = value; 2846 return this; 2847 } 2848 2849 /** 2850 * @return {@link #definition} The actual object that is the target of the 2851 * reference. The reference library doesn't populate this, but you can 2852 * use it to hold the resource if you resolve it. (The reference to the 2853 * definition for the device.) 2854 */ 2855 public DeviceDefinition getDefinitionTarget() { 2856 if (this.definitionTarget == null) 2857 if (Configuration.errorOnAutoCreate()) 2858 throw new Error("Attempt to auto-create Device.definition"); 2859 else if (Configuration.doAutoCreate()) 2860 this.definitionTarget = new DeviceDefinition(); // aa 2861 return this.definitionTarget; 2862 } 2863 2864 /** 2865 * @param value {@link #definition} The actual object that is the target of the 2866 * reference. The reference library doesn't use these, but you can 2867 * use it to hold the resource if you resolve it. (The reference to 2868 * the definition for the device.) 2869 */ 2870 public Device setDefinitionTarget(DeviceDefinition value) { 2871 this.definitionTarget = value; 2872 return this; 2873 } 2874 2875 /** 2876 * @return {@link #udiCarrier} (Unique device identifier (UDI) assigned to 2877 * device label or package. Note that the Device may include multiple 2878 * udiCarriers as it either may include just the udiCarrier for the 2879 * jurisdiction it is sold, or for multiple jurisdictions it could have 2880 * been sold.) 2881 */ 2882 public List<DeviceUdiCarrierComponent> getUdiCarrier() { 2883 if (this.udiCarrier == null) 2884 this.udiCarrier = new ArrayList<DeviceUdiCarrierComponent>(); 2885 return this.udiCarrier; 2886 } 2887 2888 /** 2889 * @return Returns a reference to <code>this</code> for easy method chaining 2890 */ 2891 public Device setUdiCarrier(List<DeviceUdiCarrierComponent> theUdiCarrier) { 2892 this.udiCarrier = theUdiCarrier; 2893 return this; 2894 } 2895 2896 public boolean hasUdiCarrier() { 2897 if (this.udiCarrier == null) 2898 return false; 2899 for (DeviceUdiCarrierComponent item : this.udiCarrier) 2900 if (!item.isEmpty()) 2901 return true; 2902 return false; 2903 } 2904 2905 public DeviceUdiCarrierComponent addUdiCarrier() { // 3 2906 DeviceUdiCarrierComponent t = new DeviceUdiCarrierComponent(); 2907 if (this.udiCarrier == null) 2908 this.udiCarrier = new ArrayList<DeviceUdiCarrierComponent>(); 2909 this.udiCarrier.add(t); 2910 return t; 2911 } 2912 2913 public Device addUdiCarrier(DeviceUdiCarrierComponent t) { // 3 2914 if (t == null) 2915 return this; 2916 if (this.udiCarrier == null) 2917 this.udiCarrier = new ArrayList<DeviceUdiCarrierComponent>(); 2918 this.udiCarrier.add(t); 2919 return this; 2920 } 2921 2922 /** 2923 * @return The first repetition of repeating field {@link #udiCarrier}, creating 2924 * it if it does not already exist 2925 */ 2926 public DeviceUdiCarrierComponent getUdiCarrierFirstRep() { 2927 if (getUdiCarrier().isEmpty()) { 2928 addUdiCarrier(); 2929 } 2930 return getUdiCarrier().get(0); 2931 } 2932 2933 /** 2934 * @return {@link #status} (Status of the Device availability.). This is the 2935 * underlying object with id, value and extensions. The accessor 2936 * "getStatus" gives direct access to the value 2937 */ 2938 public Enumeration<FHIRDeviceStatus> getStatusElement() { 2939 if (this.status == null) 2940 if (Configuration.errorOnAutoCreate()) 2941 throw new Error("Attempt to auto-create Device.status"); 2942 else if (Configuration.doAutoCreate()) 2943 this.status = new Enumeration<FHIRDeviceStatus>(new FHIRDeviceStatusEnumFactory()); // bb 2944 return this.status; 2945 } 2946 2947 public boolean hasStatusElement() { 2948 return this.status != null && !this.status.isEmpty(); 2949 } 2950 2951 public boolean hasStatus() { 2952 return this.status != null && !this.status.isEmpty(); 2953 } 2954 2955 /** 2956 * @param value {@link #status} (Status of the Device availability.). This is 2957 * the underlying object with id, value and extensions. The 2958 * accessor "getStatus" gives direct access to the value 2959 */ 2960 public Device setStatusElement(Enumeration<FHIRDeviceStatus> value) { 2961 this.status = value; 2962 return this; 2963 } 2964 2965 /** 2966 * @return Status of the Device availability. 2967 */ 2968 public FHIRDeviceStatus getStatus() { 2969 return this.status == null ? null : this.status.getValue(); 2970 } 2971 2972 /** 2973 * @param value Status of the Device availability. 2974 */ 2975 public Device setStatus(FHIRDeviceStatus value) { 2976 if (value == null) 2977 this.status = null; 2978 else { 2979 if (this.status == null) 2980 this.status = new Enumeration<FHIRDeviceStatus>(new FHIRDeviceStatusEnumFactory()); 2981 this.status.setValue(value); 2982 } 2983 return this; 2984 } 2985 2986 /** 2987 * @return {@link #statusReason} (Reason for the dtatus of the Device 2988 * availability.) 2989 */ 2990 public List<CodeableConcept> getStatusReason() { 2991 if (this.statusReason == null) 2992 this.statusReason = new ArrayList<CodeableConcept>(); 2993 return this.statusReason; 2994 } 2995 2996 /** 2997 * @return Returns a reference to <code>this</code> for easy method chaining 2998 */ 2999 public Device setStatusReason(List<CodeableConcept> theStatusReason) { 3000 this.statusReason = theStatusReason; 3001 return this; 3002 } 3003 3004 public boolean hasStatusReason() { 3005 if (this.statusReason == null) 3006 return false; 3007 for (CodeableConcept item : this.statusReason) 3008 if (!item.isEmpty()) 3009 return true; 3010 return false; 3011 } 3012 3013 public CodeableConcept addStatusReason() { // 3 3014 CodeableConcept t = new CodeableConcept(); 3015 if (this.statusReason == null) 3016 this.statusReason = new ArrayList<CodeableConcept>(); 3017 this.statusReason.add(t); 3018 return t; 3019 } 3020 3021 public Device addStatusReason(CodeableConcept t) { // 3 3022 if (t == null) 3023 return this; 3024 if (this.statusReason == null) 3025 this.statusReason = new ArrayList<CodeableConcept>(); 3026 this.statusReason.add(t); 3027 return this; 3028 } 3029 3030 /** 3031 * @return The first repetition of repeating field {@link #statusReason}, 3032 * creating it if it does not already exist 3033 */ 3034 public CodeableConcept getStatusReasonFirstRep() { 3035 if (getStatusReason().isEmpty()) { 3036 addStatusReason(); 3037 } 3038 return getStatusReason().get(0); 3039 } 3040 3041 /** 3042 * @return {@link #distinctIdentifier} (The distinct identification string as 3043 * required by regulation for a human cell, tissue, or cellular and 3044 * tissue-based product.). This is the underlying object with id, value 3045 * and extensions. The accessor "getDistinctIdentifier" gives direct 3046 * access to the value 3047 */ 3048 public StringType getDistinctIdentifierElement() { 3049 if (this.distinctIdentifier == null) 3050 if (Configuration.errorOnAutoCreate()) 3051 throw new Error("Attempt to auto-create Device.distinctIdentifier"); 3052 else if (Configuration.doAutoCreate()) 3053 this.distinctIdentifier = new StringType(); // bb 3054 return this.distinctIdentifier; 3055 } 3056 3057 public boolean hasDistinctIdentifierElement() { 3058 return this.distinctIdentifier != null && !this.distinctIdentifier.isEmpty(); 3059 } 3060 3061 public boolean hasDistinctIdentifier() { 3062 return this.distinctIdentifier != null && !this.distinctIdentifier.isEmpty(); 3063 } 3064 3065 /** 3066 * @param value {@link #distinctIdentifier} (The distinct identification string 3067 * as required by regulation for a human cell, tissue, or cellular 3068 * and tissue-based product.). This is the underlying object with 3069 * id, value and extensions. The accessor "getDistinctIdentifier" 3070 * gives direct access to the value 3071 */ 3072 public Device setDistinctIdentifierElement(StringType value) { 3073 this.distinctIdentifier = value; 3074 return this; 3075 } 3076 3077 /** 3078 * @return The distinct identification string as required by regulation for a 3079 * human cell, tissue, or cellular and tissue-based product. 3080 */ 3081 public String getDistinctIdentifier() { 3082 return this.distinctIdentifier == null ? null : this.distinctIdentifier.getValue(); 3083 } 3084 3085 /** 3086 * @param value The distinct identification string as required by regulation for 3087 * a human cell, tissue, or cellular and tissue-based product. 3088 */ 3089 public Device setDistinctIdentifier(String value) { 3090 if (Utilities.noString(value)) 3091 this.distinctIdentifier = null; 3092 else { 3093 if (this.distinctIdentifier == null) 3094 this.distinctIdentifier = new StringType(); 3095 this.distinctIdentifier.setValue(value); 3096 } 3097 return this; 3098 } 3099 3100 /** 3101 * @return {@link #manufacturer} (A name of the manufacturer.). This is the 3102 * underlying object with id, value and extensions. The accessor 3103 * "getManufacturer" gives direct access to the value 3104 */ 3105 public StringType getManufacturerElement() { 3106 if (this.manufacturer == null) 3107 if (Configuration.errorOnAutoCreate()) 3108 throw new Error("Attempt to auto-create Device.manufacturer"); 3109 else if (Configuration.doAutoCreate()) 3110 this.manufacturer = new StringType(); // bb 3111 return this.manufacturer; 3112 } 3113 3114 public boolean hasManufacturerElement() { 3115 return this.manufacturer != null && !this.manufacturer.isEmpty(); 3116 } 3117 3118 public boolean hasManufacturer() { 3119 return this.manufacturer != null && !this.manufacturer.isEmpty(); 3120 } 3121 3122 /** 3123 * @param value {@link #manufacturer} (A name of the manufacturer.). This is the 3124 * underlying object with id, value and extensions. The accessor 3125 * "getManufacturer" gives direct access to the value 3126 */ 3127 public Device setManufacturerElement(StringType value) { 3128 this.manufacturer = value; 3129 return this; 3130 } 3131 3132 /** 3133 * @return A name of the manufacturer. 3134 */ 3135 public String getManufacturer() { 3136 return this.manufacturer == null ? null : this.manufacturer.getValue(); 3137 } 3138 3139 /** 3140 * @param value A name of the manufacturer. 3141 */ 3142 public Device setManufacturer(String value) { 3143 if (Utilities.noString(value)) 3144 this.manufacturer = null; 3145 else { 3146 if (this.manufacturer == null) 3147 this.manufacturer = new StringType(); 3148 this.manufacturer.setValue(value); 3149 } 3150 return this; 3151 } 3152 3153 /** 3154 * @return {@link #manufactureDate} (The date and time when the device was 3155 * manufactured.). This is the underlying object with id, value and 3156 * extensions. The accessor "getManufactureDate" gives direct access to 3157 * the value 3158 */ 3159 public DateTimeType getManufactureDateElement() { 3160 if (this.manufactureDate == null) 3161 if (Configuration.errorOnAutoCreate()) 3162 throw new Error("Attempt to auto-create Device.manufactureDate"); 3163 else if (Configuration.doAutoCreate()) 3164 this.manufactureDate = new DateTimeType(); // bb 3165 return this.manufactureDate; 3166 } 3167 3168 public boolean hasManufactureDateElement() { 3169 return this.manufactureDate != null && !this.manufactureDate.isEmpty(); 3170 } 3171 3172 public boolean hasManufactureDate() { 3173 return this.manufactureDate != null && !this.manufactureDate.isEmpty(); 3174 } 3175 3176 /** 3177 * @param value {@link #manufactureDate} (The date and time when the device was 3178 * manufactured.). This is the underlying object with id, value and 3179 * extensions. The accessor "getManufactureDate" gives direct 3180 * access to the value 3181 */ 3182 public Device setManufactureDateElement(DateTimeType value) { 3183 this.manufactureDate = value; 3184 return this; 3185 } 3186 3187 /** 3188 * @return The date and time when the device was manufactured. 3189 */ 3190 public Date getManufactureDate() { 3191 return this.manufactureDate == null ? null : this.manufactureDate.getValue(); 3192 } 3193 3194 /** 3195 * @param value The date and time when the device was manufactured. 3196 */ 3197 public Device setManufactureDate(Date value) { 3198 if (value == null) 3199 this.manufactureDate = null; 3200 else { 3201 if (this.manufactureDate == null) 3202 this.manufactureDate = new DateTimeType(); 3203 this.manufactureDate.setValue(value); 3204 } 3205 return this; 3206 } 3207 3208 /** 3209 * @return {@link #expirationDate} (The date and time beyond which this device 3210 * is no longer valid or should not be used (if applicable).). This is 3211 * the underlying object with id, value and extensions. The accessor 3212 * "getExpirationDate" gives direct access to the value 3213 */ 3214 public DateTimeType getExpirationDateElement() { 3215 if (this.expirationDate == null) 3216 if (Configuration.errorOnAutoCreate()) 3217 throw new Error("Attempt to auto-create Device.expirationDate"); 3218 else if (Configuration.doAutoCreate()) 3219 this.expirationDate = new DateTimeType(); // bb 3220 return this.expirationDate; 3221 } 3222 3223 public boolean hasExpirationDateElement() { 3224 return this.expirationDate != null && !this.expirationDate.isEmpty(); 3225 } 3226 3227 public boolean hasExpirationDate() { 3228 return this.expirationDate != null && !this.expirationDate.isEmpty(); 3229 } 3230 3231 /** 3232 * @param value {@link #expirationDate} (The date and time beyond which this 3233 * device is no longer valid or should not be used (if 3234 * applicable).). This is the underlying object with id, value and 3235 * extensions. The accessor "getExpirationDate" gives direct access 3236 * to the value 3237 */ 3238 public Device setExpirationDateElement(DateTimeType value) { 3239 this.expirationDate = value; 3240 return this; 3241 } 3242 3243 /** 3244 * @return The date and time beyond which this device is no longer valid or 3245 * should not be used (if applicable). 3246 */ 3247 public Date getExpirationDate() { 3248 return this.expirationDate == null ? null : this.expirationDate.getValue(); 3249 } 3250 3251 /** 3252 * @param value The date and time beyond which this device is no longer valid or 3253 * should not be used (if applicable). 3254 */ 3255 public Device setExpirationDate(Date value) { 3256 if (value == null) 3257 this.expirationDate = null; 3258 else { 3259 if (this.expirationDate == null) 3260 this.expirationDate = new DateTimeType(); 3261 this.expirationDate.setValue(value); 3262 } 3263 return this; 3264 } 3265 3266 /** 3267 * @return {@link #lotNumber} (Lot number assigned by the manufacturer.). This 3268 * is the underlying object with id, value and extensions. The accessor 3269 * "getLotNumber" gives direct access to the value 3270 */ 3271 public StringType getLotNumberElement() { 3272 if (this.lotNumber == null) 3273 if (Configuration.errorOnAutoCreate()) 3274 throw new Error("Attempt to auto-create Device.lotNumber"); 3275 else if (Configuration.doAutoCreate()) 3276 this.lotNumber = new StringType(); // bb 3277 return this.lotNumber; 3278 } 3279 3280 public boolean hasLotNumberElement() { 3281 return this.lotNumber != null && !this.lotNumber.isEmpty(); 3282 } 3283 3284 public boolean hasLotNumber() { 3285 return this.lotNumber != null && !this.lotNumber.isEmpty(); 3286 } 3287 3288 /** 3289 * @param value {@link #lotNumber} (Lot number assigned by the manufacturer.). 3290 * This is the underlying object with id, value and extensions. The 3291 * accessor "getLotNumber" gives direct access to the value 3292 */ 3293 public Device setLotNumberElement(StringType value) { 3294 this.lotNumber = value; 3295 return this; 3296 } 3297 3298 /** 3299 * @return Lot number assigned by the manufacturer. 3300 */ 3301 public String getLotNumber() { 3302 return this.lotNumber == null ? null : this.lotNumber.getValue(); 3303 } 3304 3305 /** 3306 * @param value Lot number assigned by the manufacturer. 3307 */ 3308 public Device setLotNumber(String value) { 3309 if (Utilities.noString(value)) 3310 this.lotNumber = null; 3311 else { 3312 if (this.lotNumber == null) 3313 this.lotNumber = new StringType(); 3314 this.lotNumber.setValue(value); 3315 } 3316 return this; 3317 } 3318 3319 /** 3320 * @return {@link #serialNumber} (The serial number assigned by the organization 3321 * when the device was manufactured.). This is the underlying object 3322 * with id, value and extensions. The accessor "getSerialNumber" gives 3323 * direct access to the value 3324 */ 3325 public StringType getSerialNumberElement() { 3326 if (this.serialNumber == null) 3327 if (Configuration.errorOnAutoCreate()) 3328 throw new Error("Attempt to auto-create Device.serialNumber"); 3329 else if (Configuration.doAutoCreate()) 3330 this.serialNumber = new StringType(); // bb 3331 return this.serialNumber; 3332 } 3333 3334 public boolean hasSerialNumberElement() { 3335 return this.serialNumber != null && !this.serialNumber.isEmpty(); 3336 } 3337 3338 public boolean hasSerialNumber() { 3339 return this.serialNumber != null && !this.serialNumber.isEmpty(); 3340 } 3341 3342 /** 3343 * @param value {@link #serialNumber} (The serial number assigned by the 3344 * organization when the device was manufactured.). This is the 3345 * underlying object with id, value and extensions. The accessor 3346 * "getSerialNumber" gives direct access to the value 3347 */ 3348 public Device setSerialNumberElement(StringType value) { 3349 this.serialNumber = value; 3350 return this; 3351 } 3352 3353 /** 3354 * @return The serial number assigned by the organization when the device was 3355 * manufactured. 3356 */ 3357 public String getSerialNumber() { 3358 return this.serialNumber == null ? null : this.serialNumber.getValue(); 3359 } 3360 3361 /** 3362 * @param value The serial number assigned by the organization when the device 3363 * was manufactured. 3364 */ 3365 public Device setSerialNumber(String value) { 3366 if (Utilities.noString(value)) 3367 this.serialNumber = null; 3368 else { 3369 if (this.serialNumber == null) 3370 this.serialNumber = new StringType(); 3371 this.serialNumber.setValue(value); 3372 } 3373 return this; 3374 } 3375 3376 /** 3377 * @return {@link #deviceName} (This represents the manufacturer's name of the 3378 * device as provided by the device, from a UDI label, or by a person 3379 * describing the Device. This typically would be used when a person 3380 * provides the name(s) or when the device represents one of the names 3381 * available from DeviceDefinition.) 3382 */ 3383 public List<DeviceDeviceNameComponent> getDeviceName() { 3384 if (this.deviceName == null) 3385 this.deviceName = new ArrayList<DeviceDeviceNameComponent>(); 3386 return this.deviceName; 3387 } 3388 3389 /** 3390 * @return Returns a reference to <code>this</code> for easy method chaining 3391 */ 3392 public Device setDeviceName(List<DeviceDeviceNameComponent> theDeviceName) { 3393 this.deviceName = theDeviceName; 3394 return this; 3395 } 3396 3397 public boolean hasDeviceName() { 3398 if (this.deviceName == null) 3399 return false; 3400 for (DeviceDeviceNameComponent item : this.deviceName) 3401 if (!item.isEmpty()) 3402 return true; 3403 return false; 3404 } 3405 3406 public DeviceDeviceNameComponent addDeviceName() { // 3 3407 DeviceDeviceNameComponent t = new DeviceDeviceNameComponent(); 3408 if (this.deviceName == null) 3409 this.deviceName = new ArrayList<DeviceDeviceNameComponent>(); 3410 this.deviceName.add(t); 3411 return t; 3412 } 3413 3414 public Device addDeviceName(DeviceDeviceNameComponent t) { // 3 3415 if (t == null) 3416 return this; 3417 if (this.deviceName == null) 3418 this.deviceName = new ArrayList<DeviceDeviceNameComponent>(); 3419 this.deviceName.add(t); 3420 return this; 3421 } 3422 3423 /** 3424 * @return The first repetition of repeating field {@link #deviceName}, creating 3425 * it if it does not already exist 3426 */ 3427 public DeviceDeviceNameComponent getDeviceNameFirstRep() { 3428 if (getDeviceName().isEmpty()) { 3429 addDeviceName(); 3430 } 3431 return getDeviceName().get(0); 3432 } 3433 3434 /** 3435 * @return {@link #modelNumber} (The model number for the device.). This is the 3436 * underlying object with id, value and extensions. The accessor 3437 * "getModelNumber" gives direct access to the value 3438 */ 3439 public StringType getModelNumberElement() { 3440 if (this.modelNumber == null) 3441 if (Configuration.errorOnAutoCreate()) 3442 throw new Error("Attempt to auto-create Device.modelNumber"); 3443 else if (Configuration.doAutoCreate()) 3444 this.modelNumber = new StringType(); // bb 3445 return this.modelNumber; 3446 } 3447 3448 public boolean hasModelNumberElement() { 3449 return this.modelNumber != null && !this.modelNumber.isEmpty(); 3450 } 3451 3452 public boolean hasModelNumber() { 3453 return this.modelNumber != null && !this.modelNumber.isEmpty(); 3454 } 3455 3456 /** 3457 * @param value {@link #modelNumber} (The model number for the device.). This is 3458 * the underlying object with id, value and extensions. The 3459 * accessor "getModelNumber" gives direct access to the value 3460 */ 3461 public Device setModelNumberElement(StringType value) { 3462 this.modelNumber = value; 3463 return this; 3464 } 3465 3466 /** 3467 * @return The model number for the device. 3468 */ 3469 public String getModelNumber() { 3470 return this.modelNumber == null ? null : this.modelNumber.getValue(); 3471 } 3472 3473 /** 3474 * @param value The model number for the device. 3475 */ 3476 public Device setModelNumber(String value) { 3477 if (Utilities.noString(value)) 3478 this.modelNumber = null; 3479 else { 3480 if (this.modelNumber == null) 3481 this.modelNumber = new StringType(); 3482 this.modelNumber.setValue(value); 3483 } 3484 return this; 3485 } 3486 3487 /** 3488 * @return {@link #partNumber} (The part number of the device.). This is the 3489 * underlying object with id, value and extensions. The accessor 3490 * "getPartNumber" gives direct access to the value 3491 */ 3492 public StringType getPartNumberElement() { 3493 if (this.partNumber == null) 3494 if (Configuration.errorOnAutoCreate()) 3495 throw new Error("Attempt to auto-create Device.partNumber"); 3496 else if (Configuration.doAutoCreate()) 3497 this.partNumber = new StringType(); // bb 3498 return this.partNumber; 3499 } 3500 3501 public boolean hasPartNumberElement() { 3502 return this.partNumber != null && !this.partNumber.isEmpty(); 3503 } 3504 3505 public boolean hasPartNumber() { 3506 return this.partNumber != null && !this.partNumber.isEmpty(); 3507 } 3508 3509 /** 3510 * @param value {@link #partNumber} (The part number of the device.). This is 3511 * the underlying object with id, value and extensions. The 3512 * accessor "getPartNumber" gives direct access to the value 3513 */ 3514 public Device setPartNumberElement(StringType value) { 3515 this.partNumber = value; 3516 return this; 3517 } 3518 3519 /** 3520 * @return The part number of the device. 3521 */ 3522 public String getPartNumber() { 3523 return this.partNumber == null ? null : this.partNumber.getValue(); 3524 } 3525 3526 /** 3527 * @param value The part number of the device. 3528 */ 3529 public Device setPartNumber(String value) { 3530 if (Utilities.noString(value)) 3531 this.partNumber = null; 3532 else { 3533 if (this.partNumber == null) 3534 this.partNumber = new StringType(); 3535 this.partNumber.setValue(value); 3536 } 3537 return this; 3538 } 3539 3540 /** 3541 * @return {@link #type} (The kind or type of device.) 3542 */ 3543 public CodeableConcept getType() { 3544 if (this.type == null) 3545 if (Configuration.errorOnAutoCreate()) 3546 throw new Error("Attempt to auto-create Device.type"); 3547 else if (Configuration.doAutoCreate()) 3548 this.type = new CodeableConcept(); // cc 3549 return this.type; 3550 } 3551 3552 public boolean hasType() { 3553 return this.type != null && !this.type.isEmpty(); 3554 } 3555 3556 /** 3557 * @param value {@link #type} (The kind or type of device.) 3558 */ 3559 public Device setType(CodeableConcept value) { 3560 this.type = value; 3561 return this; 3562 } 3563 3564 /** 3565 * @return {@link #specialization} (The capabilities supported on a device, the 3566 * standards to which the device conforms for a particular purpose, and 3567 * used for the communication.) 3568 */ 3569 public List<DeviceSpecializationComponent> getSpecialization() { 3570 if (this.specialization == null) 3571 this.specialization = new ArrayList<DeviceSpecializationComponent>(); 3572 return this.specialization; 3573 } 3574 3575 /** 3576 * @return Returns a reference to <code>this</code> for easy method chaining 3577 */ 3578 public Device setSpecialization(List<DeviceSpecializationComponent> theSpecialization) { 3579 this.specialization = theSpecialization; 3580 return this; 3581 } 3582 3583 public boolean hasSpecialization() { 3584 if (this.specialization == null) 3585 return false; 3586 for (DeviceSpecializationComponent item : this.specialization) 3587 if (!item.isEmpty()) 3588 return true; 3589 return false; 3590 } 3591 3592 public DeviceSpecializationComponent addSpecialization() { // 3 3593 DeviceSpecializationComponent t = new DeviceSpecializationComponent(); 3594 if (this.specialization == null) 3595 this.specialization = new ArrayList<DeviceSpecializationComponent>(); 3596 this.specialization.add(t); 3597 return t; 3598 } 3599 3600 public Device addSpecialization(DeviceSpecializationComponent t) { // 3 3601 if (t == null) 3602 return this; 3603 if (this.specialization == null) 3604 this.specialization = new ArrayList<DeviceSpecializationComponent>(); 3605 this.specialization.add(t); 3606 return this; 3607 } 3608 3609 /** 3610 * @return The first repetition of repeating field {@link #specialization}, 3611 * creating it if it does not already exist 3612 */ 3613 public DeviceSpecializationComponent getSpecializationFirstRep() { 3614 if (getSpecialization().isEmpty()) { 3615 addSpecialization(); 3616 } 3617 return getSpecialization().get(0); 3618 } 3619 3620 /** 3621 * @return {@link #version} (The actual design of the device or software version 3622 * running on the device.) 3623 */ 3624 public List<DeviceVersionComponent> getVersion() { 3625 if (this.version == null) 3626 this.version = new ArrayList<DeviceVersionComponent>(); 3627 return this.version; 3628 } 3629 3630 /** 3631 * @return Returns a reference to <code>this</code> for easy method chaining 3632 */ 3633 public Device setVersion(List<DeviceVersionComponent> theVersion) { 3634 this.version = theVersion; 3635 return this; 3636 } 3637 3638 public boolean hasVersion() { 3639 if (this.version == null) 3640 return false; 3641 for (DeviceVersionComponent item : this.version) 3642 if (!item.isEmpty()) 3643 return true; 3644 return false; 3645 } 3646 3647 public DeviceVersionComponent addVersion() { // 3 3648 DeviceVersionComponent t = new DeviceVersionComponent(); 3649 if (this.version == null) 3650 this.version = new ArrayList<DeviceVersionComponent>(); 3651 this.version.add(t); 3652 return t; 3653 } 3654 3655 public Device addVersion(DeviceVersionComponent t) { // 3 3656 if (t == null) 3657 return this; 3658 if (this.version == null) 3659 this.version = new ArrayList<DeviceVersionComponent>(); 3660 this.version.add(t); 3661 return this; 3662 } 3663 3664 /** 3665 * @return The first repetition of repeating field {@link #version}, creating it 3666 * if it does not already exist 3667 */ 3668 public DeviceVersionComponent getVersionFirstRep() { 3669 if (getVersion().isEmpty()) { 3670 addVersion(); 3671 } 3672 return getVersion().get(0); 3673 } 3674 3675 /** 3676 * @return {@link #property} (The actual configuration settings of a device as 3677 * it actually operates, e.g., regulation status, time properties.) 3678 */ 3679 public List<DevicePropertyComponent> getProperty() { 3680 if (this.property == null) 3681 this.property = new ArrayList<DevicePropertyComponent>(); 3682 return this.property; 3683 } 3684 3685 /** 3686 * @return Returns a reference to <code>this</code> for easy method chaining 3687 */ 3688 public Device setProperty(List<DevicePropertyComponent> theProperty) { 3689 this.property = theProperty; 3690 return this; 3691 } 3692 3693 public boolean hasProperty() { 3694 if (this.property == null) 3695 return false; 3696 for (DevicePropertyComponent item : this.property) 3697 if (!item.isEmpty()) 3698 return true; 3699 return false; 3700 } 3701 3702 public DevicePropertyComponent addProperty() { // 3 3703 DevicePropertyComponent t = new DevicePropertyComponent(); 3704 if (this.property == null) 3705 this.property = new ArrayList<DevicePropertyComponent>(); 3706 this.property.add(t); 3707 return t; 3708 } 3709 3710 public Device addProperty(DevicePropertyComponent t) { // 3 3711 if (t == null) 3712 return this; 3713 if (this.property == null) 3714 this.property = new ArrayList<DevicePropertyComponent>(); 3715 this.property.add(t); 3716 return this; 3717 } 3718 3719 /** 3720 * @return The first repetition of repeating field {@link #property}, creating 3721 * it if it does not already exist 3722 */ 3723 public DevicePropertyComponent getPropertyFirstRep() { 3724 if (getProperty().isEmpty()) { 3725 addProperty(); 3726 } 3727 return getProperty().get(0); 3728 } 3729 3730 /** 3731 * @return {@link #patient} (Patient information, If the device is affixed to a 3732 * person.) 3733 */ 3734 public Reference getPatient() { 3735 if (this.patient == null) 3736 if (Configuration.errorOnAutoCreate()) 3737 throw new Error("Attempt to auto-create Device.patient"); 3738 else if (Configuration.doAutoCreate()) 3739 this.patient = new Reference(); // cc 3740 return this.patient; 3741 } 3742 3743 public boolean hasPatient() { 3744 return this.patient != null && !this.patient.isEmpty(); 3745 } 3746 3747 /** 3748 * @param value {@link #patient} (Patient information, If the device is affixed 3749 * to a person.) 3750 */ 3751 public Device setPatient(Reference value) { 3752 this.patient = value; 3753 return this; 3754 } 3755 3756 /** 3757 * @return {@link #patient} The actual object that is the target of the 3758 * reference. The reference library doesn't populate this, but you can 3759 * use it to hold the resource if you resolve it. (Patient information, 3760 * If the device is affixed to a person.) 3761 */ 3762 public Patient getPatientTarget() { 3763 if (this.patientTarget == null) 3764 if (Configuration.errorOnAutoCreate()) 3765 throw new Error("Attempt to auto-create Device.patient"); 3766 else if (Configuration.doAutoCreate()) 3767 this.patientTarget = new Patient(); // aa 3768 return this.patientTarget; 3769 } 3770 3771 /** 3772 * @param value {@link #patient} The actual object that is the target of the 3773 * reference. The reference library doesn't use these, but you can 3774 * use it to hold the resource if you resolve it. (Patient 3775 * information, If the device is affixed to a person.) 3776 */ 3777 public Device setPatientTarget(Patient value) { 3778 this.patientTarget = value; 3779 return this; 3780 } 3781 3782 /** 3783 * @return {@link #owner} (An organization that is responsible for the provision 3784 * and ongoing maintenance of the device.) 3785 */ 3786 public Reference getOwner() { 3787 if (this.owner == null) 3788 if (Configuration.errorOnAutoCreate()) 3789 throw new Error("Attempt to auto-create Device.owner"); 3790 else if (Configuration.doAutoCreate()) 3791 this.owner = new Reference(); // cc 3792 return this.owner; 3793 } 3794 3795 public boolean hasOwner() { 3796 return this.owner != null && !this.owner.isEmpty(); 3797 } 3798 3799 /** 3800 * @param value {@link #owner} (An organization that is responsible for the 3801 * provision and ongoing maintenance of the device.) 3802 */ 3803 public Device setOwner(Reference value) { 3804 this.owner = value; 3805 return this; 3806 } 3807 3808 /** 3809 * @return {@link #owner} The actual object that is the target of the reference. 3810 * The reference library doesn't populate this, but you can use it to 3811 * hold the resource if you resolve it. (An organization that is 3812 * responsible for the provision and ongoing maintenance of the device.) 3813 */ 3814 public Organization getOwnerTarget() { 3815 if (this.ownerTarget == null) 3816 if (Configuration.errorOnAutoCreate()) 3817 throw new Error("Attempt to auto-create Device.owner"); 3818 else if (Configuration.doAutoCreate()) 3819 this.ownerTarget = new Organization(); // aa 3820 return this.ownerTarget; 3821 } 3822 3823 /** 3824 * @param value {@link #owner} The actual object that is the target of the 3825 * reference. The reference library doesn't use these, but you can 3826 * use it to hold the resource if you resolve it. (An organization 3827 * that is responsible for the provision and ongoing maintenance of 3828 * the device.) 3829 */ 3830 public Device setOwnerTarget(Organization value) { 3831 this.ownerTarget = value; 3832 return this; 3833 } 3834 3835 /** 3836 * @return {@link #contact} (Contact details for an organization or a particular 3837 * human that is responsible for the device.) 3838 */ 3839 public List<ContactPoint> getContact() { 3840 if (this.contact == null) 3841 this.contact = new ArrayList<ContactPoint>(); 3842 return this.contact; 3843 } 3844 3845 /** 3846 * @return Returns a reference to <code>this</code> for easy method chaining 3847 */ 3848 public Device setContact(List<ContactPoint> theContact) { 3849 this.contact = theContact; 3850 return this; 3851 } 3852 3853 public boolean hasContact() { 3854 if (this.contact == null) 3855 return false; 3856 for (ContactPoint item : this.contact) 3857 if (!item.isEmpty()) 3858 return true; 3859 return false; 3860 } 3861 3862 public ContactPoint addContact() { // 3 3863 ContactPoint t = new ContactPoint(); 3864 if (this.contact == null) 3865 this.contact = new ArrayList<ContactPoint>(); 3866 this.contact.add(t); 3867 return t; 3868 } 3869 3870 public Device addContact(ContactPoint t) { // 3 3871 if (t == null) 3872 return this; 3873 if (this.contact == null) 3874 this.contact = new ArrayList<ContactPoint>(); 3875 this.contact.add(t); 3876 return this; 3877 } 3878 3879 /** 3880 * @return The first repetition of repeating field {@link #contact}, creating it 3881 * if it does not already exist 3882 */ 3883 public ContactPoint getContactFirstRep() { 3884 if (getContact().isEmpty()) { 3885 addContact(); 3886 } 3887 return getContact().get(0); 3888 } 3889 3890 /** 3891 * @return {@link #location} (The place where the device can be found.) 3892 */ 3893 public Reference getLocation() { 3894 if (this.location == null) 3895 if (Configuration.errorOnAutoCreate()) 3896 throw new Error("Attempt to auto-create Device.location"); 3897 else if (Configuration.doAutoCreate()) 3898 this.location = new Reference(); // cc 3899 return this.location; 3900 } 3901 3902 public boolean hasLocation() { 3903 return this.location != null && !this.location.isEmpty(); 3904 } 3905 3906 /** 3907 * @param value {@link #location} (The place where the device can be found.) 3908 */ 3909 public Device setLocation(Reference value) { 3910 this.location = value; 3911 return this; 3912 } 3913 3914 /** 3915 * @return {@link #location} The actual object that is the target of the 3916 * reference. The reference library doesn't populate this, but you can 3917 * use it to hold the resource if you resolve it. (The place where the 3918 * device can be found.) 3919 */ 3920 public Location getLocationTarget() { 3921 if (this.locationTarget == null) 3922 if (Configuration.errorOnAutoCreate()) 3923 throw new Error("Attempt to auto-create Device.location"); 3924 else if (Configuration.doAutoCreate()) 3925 this.locationTarget = new Location(); // aa 3926 return this.locationTarget; 3927 } 3928 3929 /** 3930 * @param value {@link #location} The actual object that is the target of the 3931 * reference. The reference library doesn't use these, but you can 3932 * use it to hold the resource if you resolve it. (The place where 3933 * the device can be found.) 3934 */ 3935 public Device setLocationTarget(Location value) { 3936 this.locationTarget = value; 3937 return this; 3938 } 3939 3940 /** 3941 * @return {@link #url} (A network address on which the device may be contacted 3942 * directly.). This is the underlying object with id, value and 3943 * extensions. The accessor "getUrl" gives direct access to the value 3944 */ 3945 public UriType getUrlElement() { 3946 if (this.url == null) 3947 if (Configuration.errorOnAutoCreate()) 3948 throw new Error("Attempt to auto-create Device.url"); 3949 else if (Configuration.doAutoCreate()) 3950 this.url = new UriType(); // bb 3951 return this.url; 3952 } 3953 3954 public boolean hasUrlElement() { 3955 return this.url != null && !this.url.isEmpty(); 3956 } 3957 3958 public boolean hasUrl() { 3959 return this.url != null && !this.url.isEmpty(); 3960 } 3961 3962 /** 3963 * @param value {@link #url} (A network address on which the device may be 3964 * contacted directly.). This is the underlying object with id, 3965 * value and extensions. The accessor "getUrl" gives direct access 3966 * to the value 3967 */ 3968 public Device setUrlElement(UriType value) { 3969 this.url = value; 3970 return this; 3971 } 3972 3973 /** 3974 * @return A network address on which the device may be contacted directly. 3975 */ 3976 public String getUrl() { 3977 return this.url == null ? null : this.url.getValue(); 3978 } 3979 3980 /** 3981 * @param value A network address on which the device may be contacted directly. 3982 */ 3983 public Device setUrl(String value) { 3984 if (Utilities.noString(value)) 3985 this.url = null; 3986 else { 3987 if (this.url == null) 3988 this.url = new UriType(); 3989 this.url.setValue(value); 3990 } 3991 return this; 3992 } 3993 3994 /** 3995 * @return {@link #note} (Descriptive information, usage information or 3996 * implantation information that is not captured in an existing 3997 * element.) 3998 */ 3999 public List<Annotation> getNote() { 4000 if (this.note == null) 4001 this.note = new ArrayList<Annotation>(); 4002 return this.note; 4003 } 4004 4005 /** 4006 * @return Returns a reference to <code>this</code> for easy method chaining 4007 */ 4008 public Device setNote(List<Annotation> theNote) { 4009 this.note = theNote; 4010 return this; 4011 } 4012 4013 public boolean hasNote() { 4014 if (this.note == null) 4015 return false; 4016 for (Annotation item : this.note) 4017 if (!item.isEmpty()) 4018 return true; 4019 return false; 4020 } 4021 4022 public Annotation addNote() { // 3 4023 Annotation t = new Annotation(); 4024 if (this.note == null) 4025 this.note = new ArrayList<Annotation>(); 4026 this.note.add(t); 4027 return t; 4028 } 4029 4030 public Device addNote(Annotation t) { // 3 4031 if (t == null) 4032 return this; 4033 if (this.note == null) 4034 this.note = new ArrayList<Annotation>(); 4035 this.note.add(t); 4036 return this; 4037 } 4038 4039 /** 4040 * @return The first repetition of repeating field {@link #note}, creating it if 4041 * it does not already exist 4042 */ 4043 public Annotation getNoteFirstRep() { 4044 if (getNote().isEmpty()) { 4045 addNote(); 4046 } 4047 return getNote().get(0); 4048 } 4049 4050 /** 4051 * @return {@link #safety} (Provides additional safety characteristics about a 4052 * medical device. For example devices containing latex.) 4053 */ 4054 public List<CodeableConcept> getSafety() { 4055 if (this.safety == null) 4056 this.safety = new ArrayList<CodeableConcept>(); 4057 return this.safety; 4058 } 4059 4060 /** 4061 * @return Returns a reference to <code>this</code> for easy method chaining 4062 */ 4063 public Device setSafety(List<CodeableConcept> theSafety) { 4064 this.safety = theSafety; 4065 return this; 4066 } 4067 4068 public boolean hasSafety() { 4069 if (this.safety == null) 4070 return false; 4071 for (CodeableConcept item : this.safety) 4072 if (!item.isEmpty()) 4073 return true; 4074 return false; 4075 } 4076 4077 public CodeableConcept addSafety() { // 3 4078 CodeableConcept t = new CodeableConcept(); 4079 if (this.safety == null) 4080 this.safety = new ArrayList<CodeableConcept>(); 4081 this.safety.add(t); 4082 return t; 4083 } 4084 4085 public Device addSafety(CodeableConcept t) { // 3 4086 if (t == null) 4087 return this; 4088 if (this.safety == null) 4089 this.safety = new ArrayList<CodeableConcept>(); 4090 this.safety.add(t); 4091 return this; 4092 } 4093 4094 /** 4095 * @return The first repetition of repeating field {@link #safety}, creating it 4096 * if it does not already exist 4097 */ 4098 public CodeableConcept getSafetyFirstRep() { 4099 if (getSafety().isEmpty()) { 4100 addSafety(); 4101 } 4102 return getSafety().get(0); 4103 } 4104 4105 /** 4106 * @return {@link #parent} (The parent device.) 4107 */ 4108 public Reference getParent() { 4109 if (this.parent == null) 4110 if (Configuration.errorOnAutoCreate()) 4111 throw new Error("Attempt to auto-create Device.parent"); 4112 else if (Configuration.doAutoCreate()) 4113 this.parent = new Reference(); // cc 4114 return this.parent; 4115 } 4116 4117 public boolean hasParent() { 4118 return this.parent != null && !this.parent.isEmpty(); 4119 } 4120 4121 /** 4122 * @param value {@link #parent} (The parent device.) 4123 */ 4124 public Device setParent(Reference value) { 4125 this.parent = value; 4126 return this; 4127 } 4128 4129 /** 4130 * @return {@link #parent} The actual object that is the target of the 4131 * reference. The reference library doesn't populate this, but you can 4132 * use it to hold the resource if you resolve it. (The parent device.) 4133 */ 4134 public Device getParentTarget() { 4135 if (this.parentTarget == null) 4136 if (Configuration.errorOnAutoCreate()) 4137 throw new Error("Attempt to auto-create Device.parent"); 4138 else if (Configuration.doAutoCreate()) 4139 this.parentTarget = new Device(); // aa 4140 return this.parentTarget; 4141 } 4142 4143 /** 4144 * @param value {@link #parent} The actual object that is the target of the 4145 * reference. The reference library doesn't use these, but you can 4146 * use it to hold the resource if you resolve it. (The parent 4147 * device.) 4148 */ 4149 public Device setParentTarget(Device value) { 4150 this.parentTarget = value; 4151 return this; 4152 } 4153 4154 protected void listChildren(List<Property> children) { 4155 super.listChildren(children); 4156 children.add(new Property("identifier", "Identifier", 4157 "Unique instance identifiers assigned to a device by manufacturers other organizations or owners.", 0, 4158 java.lang.Integer.MAX_VALUE, identifier)); 4159 children.add(new Property("definition", "Reference(DeviceDefinition)", 4160 "The reference to the definition for the device.", 0, 1, definition)); 4161 children.add(new Property("udiCarrier", "", 4162 "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.", 4163 0, java.lang.Integer.MAX_VALUE, udiCarrier)); 4164 children.add(new Property("status", "code", "Status of the Device availability.", 0, 1, status)); 4165 children.add(new Property("statusReason", "CodeableConcept", "Reason for the dtatus of the Device availability.", 0, 4166 java.lang.Integer.MAX_VALUE, statusReason)); 4167 children.add(new Property("distinctIdentifier", "string", 4168 "The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product.", 4169 0, 1, distinctIdentifier)); 4170 children.add(new Property("manufacturer", "string", "A name of the manufacturer.", 0, 1, manufacturer)); 4171 children.add(new Property("manufactureDate", "dateTime", "The date and time when the device was manufactured.", 0, 4172 1, manufactureDate)); 4173 children.add(new Property("expirationDate", "dateTime", 4174 "The date and time beyond which this device is no longer valid or should not be used (if applicable).", 0, 1, 4175 expirationDate)); 4176 children.add(new Property("lotNumber", "string", "Lot number assigned by the manufacturer.", 0, 1, lotNumber)); 4177 children.add(new Property("serialNumber", "string", 4178 "The serial number assigned by the organization when the device was manufactured.", 0, 1, serialNumber)); 4179 children.add(new Property("deviceName", "", 4180 "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.", 4181 0, java.lang.Integer.MAX_VALUE, deviceName)); 4182 children.add(new Property("modelNumber", "string", "The model number for the device.", 0, 1, modelNumber)); 4183 children.add(new Property("partNumber", "string", "The part number of the device.", 0, 1, partNumber)); 4184 children.add(new Property("type", "CodeableConcept", "The kind or type of device.", 0, 1, type)); 4185 children.add(new Property("specialization", "", 4186 "The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication.", 4187 0, java.lang.Integer.MAX_VALUE, specialization)); 4188 children 4189 .add(new Property("version", "", "The actual design of the device or software version running on the device.", 4190 0, java.lang.Integer.MAX_VALUE, version)); 4191 children.add(new Property("property", "", 4192 "The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.", 4193 0, java.lang.Integer.MAX_VALUE, property)); 4194 children.add(new Property("patient", "Reference(Patient)", 4195 "Patient information, If the device is affixed to a person.", 0, 1, patient)); 4196 children.add(new Property("owner", "Reference(Organization)", 4197 "An organization that is responsible for the provision and ongoing maintenance of the device.", 0, 1, owner)); 4198 children.add(new Property("contact", "ContactPoint", 4199 "Contact details for an organization or a particular human that is responsible for the device.", 0, 4200 java.lang.Integer.MAX_VALUE, contact)); 4201 children.add( 4202 new Property("location", "Reference(Location)", "The place where the device can be found.", 0, 1, location)); 4203 children 4204 .add(new Property("url", "uri", "A network address on which the device may be contacted directly.", 0, 1, url)); 4205 children.add(new Property("note", "Annotation", 4206 "Descriptive information, usage information or implantation information that is not captured in an existing element.", 4207 0, java.lang.Integer.MAX_VALUE, note)); 4208 children.add(new Property("safety", "CodeableConcept", 4209 "Provides additional safety characteristics about a medical device. For example devices containing latex.", 0, 4210 java.lang.Integer.MAX_VALUE, safety)); 4211 children.add(new Property("parent", "Reference(Device)", "The parent device.", 0, 1, parent)); 4212 } 4213 4214 @Override 4215 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4216 switch (_hash) { 4217 case -1618432855: 4218 /* identifier */ return new Property("identifier", "Identifier", 4219 "Unique instance identifiers assigned to a device by manufacturers other organizations or owners.", 0, 4220 java.lang.Integer.MAX_VALUE, identifier); 4221 case -1014418093: 4222 /* definition */ return new Property("definition", "Reference(DeviceDefinition)", 4223 "The reference to the definition for the device.", 0, 1, definition); 4224 case -1343558178: 4225 /* udiCarrier */ return new Property("udiCarrier", "", 4226 "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.", 4227 0, java.lang.Integer.MAX_VALUE, udiCarrier); 4228 case -892481550: 4229 /* status */ return new Property("status", "code", "Status of the Device availability.", 0, 1, status); 4230 case 2051346646: 4231 /* statusReason */ return new Property("statusReason", "CodeableConcept", 4232 "Reason for the dtatus of the Device availability.", 0, java.lang.Integer.MAX_VALUE, statusReason); 4233 case -1836176187: 4234 /* distinctIdentifier */ return 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 case -1969347631: 4238 /* manufacturer */ return new Property("manufacturer", "string", "A name of the manufacturer.", 0, 1, 4239 manufacturer); 4240 case 416714767: 4241 /* manufactureDate */ return new Property("manufactureDate", "dateTime", 4242 "The date and time when the device was manufactured.", 0, 1, manufactureDate); 4243 case -668811523: 4244 /* expirationDate */ return new Property("expirationDate", "dateTime", 4245 "The date and time beyond which this device is no longer valid or should not be used (if applicable).", 0, 1, 4246 expirationDate); 4247 case 462547450: 4248 /* lotNumber */ return new Property("lotNumber", "string", "Lot number assigned by the manufacturer.", 0, 1, 4249 lotNumber); 4250 case 83787357: 4251 /* serialNumber */ return new Property("serialNumber", "string", 4252 "The serial number assigned by the organization when the device was manufactured.", 0, 1, serialNumber); 4253 case 780988929: 4254 /* deviceName */ return new Property("deviceName", "", 4255 "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.", 4256 0, java.lang.Integer.MAX_VALUE, deviceName); 4257 case 346619858: 4258 /* modelNumber */ return new Property("modelNumber", "string", "The model number for the device.", 0, 1, 4259 modelNumber); 4260 case -731502308: 4261 /* partNumber */ return new Property("partNumber", "string", "The part number of the device.", 0, 1, partNumber); 4262 case 3575610: 4263 /* type */ return new Property("type", "CodeableConcept", "The kind or type of device.", 0, 1, type); 4264 case 682815883: 4265 /* specialization */ return new Property("specialization", "", 4266 "The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication.", 4267 0, java.lang.Integer.MAX_VALUE, specialization); 4268 case 351608024: 4269 /* version */ return new Property("version", "", 4270 "The actual design of the device or software version running on the device.", 0, java.lang.Integer.MAX_VALUE, 4271 version); 4272 case -993141291: 4273 /* property */ return new Property("property", "", 4274 "The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.", 4275 0, java.lang.Integer.MAX_VALUE, property); 4276 case -791418107: 4277 /* patient */ return new Property("patient", "Reference(Patient)", 4278 "Patient information, If the device is affixed to a person.", 0, 1, patient); 4279 case 106164915: 4280 /* owner */ return new Property("owner", "Reference(Organization)", 4281 "An organization that is responsible for the provision and ongoing maintenance of the device.", 0, 1, owner); 4282 case 951526432: 4283 /* contact */ return new Property("contact", "ContactPoint", 4284 "Contact details for an organization or a particular human that is responsible for the device.", 0, 4285 java.lang.Integer.MAX_VALUE, contact); 4286 case 1901043637: 4287 /* location */ return new Property("location", "Reference(Location)", "The place where the device can be found.", 4288 0, 1, location); 4289 case 116079: 4290 /* url */ return new Property("url", "uri", "A network address on which the device may be contacted directly.", 0, 4291 1, url); 4292 case 3387378: 4293 /* note */ return new Property("note", "Annotation", 4294 "Descriptive information, usage information or implantation information that is not captured in an existing element.", 4295 0, java.lang.Integer.MAX_VALUE, note); 4296 case -909893934: 4297 /* safety */ return new Property("safety", "CodeableConcept", 4298 "Provides additional safety characteristics about a medical device. For example devices containing latex.", 4299 0, java.lang.Integer.MAX_VALUE, safety); 4300 case -995424086: 4301 /* parent */ return new Property("parent", "Reference(Device)", "The parent device.", 0, 1, parent); 4302 default: 4303 return super.getNamedProperty(_hash, _name, _checkValid); 4304 } 4305 4306 } 4307 4308 @Override 4309 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4310 switch (hash) { 4311 case -1618432855: 4312 /* identifier */ return this.identifier == null ? new Base[0] 4313 : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 4314 case -1014418093: 4315 /* definition */ return this.definition == null ? new Base[0] : new Base[] { this.definition }; // Reference 4316 case -1343558178: 4317 /* udiCarrier */ return this.udiCarrier == null ? new Base[0] 4318 : this.udiCarrier.toArray(new Base[this.udiCarrier.size()]); // DeviceUdiCarrierComponent 4319 case -892481550: 4320 /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<FHIRDeviceStatus> 4321 case 2051346646: 4322 /* statusReason */ return this.statusReason == null ? new Base[0] 4323 : this.statusReason.toArray(new Base[this.statusReason.size()]); // CodeableConcept 4324 case -1836176187: 4325 /* distinctIdentifier */ return this.distinctIdentifier == null ? new Base[0] 4326 : new Base[] { this.distinctIdentifier }; // StringType 4327 case -1969347631: 4328 /* manufacturer */ return this.manufacturer == null ? new Base[0] : new Base[] { this.manufacturer }; // StringType 4329 case 416714767: 4330 /* manufactureDate */ return this.manufactureDate == null ? new Base[0] : new Base[] { this.manufactureDate }; // DateTimeType 4331 case -668811523: 4332 /* expirationDate */ return this.expirationDate == null ? new Base[0] : new Base[] { this.expirationDate }; // DateTimeType 4333 case 462547450: 4334 /* lotNumber */ return this.lotNumber == null ? new Base[0] : new Base[] { this.lotNumber }; // StringType 4335 case 83787357: 4336 /* serialNumber */ return this.serialNumber == null ? new Base[0] : new Base[] { this.serialNumber }; // StringType 4337 case 780988929: 4338 /* deviceName */ return this.deviceName == null ? new Base[0] 4339 : this.deviceName.toArray(new Base[this.deviceName.size()]); // DeviceDeviceNameComponent 4340 case 346619858: 4341 /* modelNumber */ return this.modelNumber == null ? new Base[0] : new Base[] { this.modelNumber }; // StringType 4342 case -731502308: 4343 /* partNumber */ return this.partNumber == null ? new Base[0] : new Base[] { this.partNumber }; // StringType 4344 case 3575610: 4345 /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // CodeableConcept 4346 case 682815883: 4347 /* specialization */ return this.specialization == null ? new Base[0] 4348 : this.specialization.toArray(new Base[this.specialization.size()]); // DeviceSpecializationComponent 4349 case 351608024: 4350 /* version */ return this.version == null ? new Base[0] : this.version.toArray(new Base[this.version.size()]); // DeviceVersionComponent 4351 case -993141291: 4352 /* property */ return this.property == null ? new Base[0] : this.property.toArray(new Base[this.property.size()]); // DevicePropertyComponent 4353 case -791418107: 4354 /* patient */ return this.patient == null ? new Base[0] : new Base[] { this.patient }; // Reference 4355 case 106164915: 4356 /* owner */ return this.owner == null ? new Base[0] : new Base[] { this.owner }; // Reference 4357 case 951526432: 4358 /* contact */ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactPoint 4359 case 1901043637: 4360 /* location */ return this.location == null ? new Base[0] : new Base[] { this.location }; // Reference 4361 case 116079: 4362 /* url */ return this.url == null ? new Base[0] : new Base[] { this.url }; // UriType 4363 case 3387378: 4364 /* note */ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 4365 case -909893934: 4366 /* safety */ return this.safety == null ? new Base[0] : this.safety.toArray(new Base[this.safety.size()]); // CodeableConcept 4367 case -995424086: 4368 /* parent */ return this.parent == null ? new Base[0] : new Base[] { this.parent }; // Reference 4369 default: 4370 return super.getProperty(hash, name, checkValid); 4371 } 4372 4373 } 4374 4375 @Override 4376 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4377 switch (hash) { 4378 case -1618432855: // identifier 4379 this.getIdentifier().add(castToIdentifier(value)); // Identifier 4380 return value; 4381 case -1014418093: // definition 4382 this.definition = castToReference(value); // Reference 4383 return value; 4384 case -1343558178: // udiCarrier 4385 this.getUdiCarrier().add((DeviceUdiCarrierComponent) value); // DeviceUdiCarrierComponent 4386 return value; 4387 case -892481550: // status 4388 value = new FHIRDeviceStatusEnumFactory().fromType(castToCode(value)); 4389 this.status = (Enumeration) value; // Enumeration<FHIRDeviceStatus> 4390 return value; 4391 case 2051346646: // statusReason 4392 this.getStatusReason().add(castToCodeableConcept(value)); // CodeableConcept 4393 return value; 4394 case -1836176187: // distinctIdentifier 4395 this.distinctIdentifier = castToString(value); // StringType 4396 return value; 4397 case -1969347631: // manufacturer 4398 this.manufacturer = castToString(value); // StringType 4399 return value; 4400 case 416714767: // manufactureDate 4401 this.manufactureDate = castToDateTime(value); // DateTimeType 4402 return value; 4403 case -668811523: // expirationDate 4404 this.expirationDate = castToDateTime(value); // DateTimeType 4405 return value; 4406 case 462547450: // lotNumber 4407 this.lotNumber = castToString(value); // StringType 4408 return value; 4409 case 83787357: // serialNumber 4410 this.serialNumber = castToString(value); // StringType 4411 return value; 4412 case 780988929: // deviceName 4413 this.getDeviceName().add((DeviceDeviceNameComponent) value); // DeviceDeviceNameComponent 4414 return value; 4415 case 346619858: // modelNumber 4416 this.modelNumber = castToString(value); // StringType 4417 return value; 4418 case -731502308: // partNumber 4419 this.partNumber = castToString(value); // StringType 4420 return value; 4421 case 3575610: // type 4422 this.type = castToCodeableConcept(value); // CodeableConcept 4423 return value; 4424 case 682815883: // specialization 4425 this.getSpecialization().add((DeviceSpecializationComponent) value); // DeviceSpecializationComponent 4426 return value; 4427 case 351608024: // version 4428 this.getVersion().add((DeviceVersionComponent) value); // DeviceVersionComponent 4429 return value; 4430 case -993141291: // property 4431 this.getProperty().add((DevicePropertyComponent) value); // DevicePropertyComponent 4432 return value; 4433 case -791418107: // patient 4434 this.patient = castToReference(value); // Reference 4435 return value; 4436 case 106164915: // owner 4437 this.owner = castToReference(value); // Reference 4438 return value; 4439 case 951526432: // contact 4440 this.getContact().add(castToContactPoint(value)); // ContactPoint 4441 return value; 4442 case 1901043637: // location 4443 this.location = castToReference(value); // Reference 4444 return value; 4445 case 116079: // url 4446 this.url = castToUri(value); // UriType 4447 return value; 4448 case 3387378: // note 4449 this.getNote().add(castToAnnotation(value)); // Annotation 4450 return value; 4451 case -909893934: // safety 4452 this.getSafety().add(castToCodeableConcept(value)); // CodeableConcept 4453 return value; 4454 case -995424086: // parent 4455 this.parent = castToReference(value); // Reference 4456 return value; 4457 default: 4458 return super.setProperty(hash, name, value); 4459 } 4460 4461 } 4462 4463 @Override 4464 public Base setProperty(String name, Base value) throws FHIRException { 4465 if (name.equals("identifier")) { 4466 this.getIdentifier().add(castToIdentifier(value)); 4467 } else if (name.equals("definition")) { 4468 this.definition = castToReference(value); // Reference 4469 } else if (name.equals("udiCarrier")) { 4470 this.getUdiCarrier().add((DeviceUdiCarrierComponent) value); 4471 } else if (name.equals("status")) { 4472 value = new FHIRDeviceStatusEnumFactory().fromType(castToCode(value)); 4473 this.status = (Enumeration) value; // Enumeration<FHIRDeviceStatus> 4474 } else if (name.equals("statusReason")) { 4475 this.getStatusReason().add(castToCodeableConcept(value)); 4476 } else if (name.equals("distinctIdentifier")) { 4477 this.distinctIdentifier = castToString(value); // StringType 4478 } else if (name.equals("manufacturer")) { 4479 this.manufacturer = castToString(value); // StringType 4480 } else if (name.equals("manufactureDate")) { 4481 this.manufactureDate = castToDateTime(value); // DateTimeType 4482 } else if (name.equals("expirationDate")) { 4483 this.expirationDate = castToDateTime(value); // DateTimeType 4484 } else if (name.equals("lotNumber")) { 4485 this.lotNumber = castToString(value); // StringType 4486 } else if (name.equals("serialNumber")) { 4487 this.serialNumber = castToString(value); // StringType 4488 } else if (name.equals("deviceName")) { 4489 this.getDeviceName().add((DeviceDeviceNameComponent) value); 4490 } else if (name.equals("modelNumber")) { 4491 this.modelNumber = castToString(value); // StringType 4492 } else if (name.equals("partNumber")) { 4493 this.partNumber = castToString(value); // StringType 4494 } else if (name.equals("type")) { 4495 this.type = castToCodeableConcept(value); // CodeableConcept 4496 } else if (name.equals("specialization")) { 4497 this.getSpecialization().add((DeviceSpecializationComponent) value); 4498 } else if (name.equals("version")) { 4499 this.getVersion().add((DeviceVersionComponent) value); 4500 } else if (name.equals("property")) { 4501 this.getProperty().add((DevicePropertyComponent) value); 4502 } else if (name.equals("patient")) { 4503 this.patient = castToReference(value); // Reference 4504 } else if (name.equals("owner")) { 4505 this.owner = castToReference(value); // Reference 4506 } else if (name.equals("contact")) { 4507 this.getContact().add(castToContactPoint(value)); 4508 } else if (name.equals("location")) { 4509 this.location = castToReference(value); // Reference 4510 } else if (name.equals("url")) { 4511 this.url = castToUri(value); // UriType 4512 } else if (name.equals("note")) { 4513 this.getNote().add(castToAnnotation(value)); 4514 } else if (name.equals("safety")) { 4515 this.getSafety().add(castToCodeableConcept(value)); 4516 } else if (name.equals("parent")) { 4517 this.parent = castToReference(value); // Reference 4518 } else 4519 return super.setProperty(name, value); 4520 return value; 4521 } 4522 4523 @Override 4524 public Base makeProperty(int hash, String name) throws FHIRException { 4525 switch (hash) { 4526 case -1618432855: 4527 return addIdentifier(); 4528 case -1014418093: 4529 return getDefinition(); 4530 case -1343558178: 4531 return addUdiCarrier(); 4532 case -892481550: 4533 return getStatusElement(); 4534 case 2051346646: 4535 return addStatusReason(); 4536 case -1836176187: 4537 return getDistinctIdentifierElement(); 4538 case -1969347631: 4539 return getManufacturerElement(); 4540 case 416714767: 4541 return getManufactureDateElement(); 4542 case -668811523: 4543 return getExpirationDateElement(); 4544 case 462547450: 4545 return getLotNumberElement(); 4546 case 83787357: 4547 return getSerialNumberElement(); 4548 case 780988929: 4549 return addDeviceName(); 4550 case 346619858: 4551 return getModelNumberElement(); 4552 case -731502308: 4553 return getPartNumberElement(); 4554 case 3575610: 4555 return getType(); 4556 case 682815883: 4557 return addSpecialization(); 4558 case 351608024: 4559 return addVersion(); 4560 case -993141291: 4561 return addProperty(); 4562 case -791418107: 4563 return getPatient(); 4564 case 106164915: 4565 return getOwner(); 4566 case 951526432: 4567 return addContact(); 4568 case 1901043637: 4569 return getLocation(); 4570 case 116079: 4571 return getUrlElement(); 4572 case 3387378: 4573 return addNote(); 4574 case -909893934: 4575 return addSafety(); 4576 case -995424086: 4577 return getParent(); 4578 default: 4579 return super.makeProperty(hash, name); 4580 } 4581 4582 } 4583 4584 @Override 4585 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4586 switch (hash) { 4587 case -1618432855: 4588 /* identifier */ return new String[] { "Identifier" }; 4589 case -1014418093: 4590 /* definition */ return new String[] { "Reference" }; 4591 case -1343558178: 4592 /* udiCarrier */ return new String[] {}; 4593 case -892481550: 4594 /* status */ return new String[] { "code" }; 4595 case 2051346646: 4596 /* statusReason */ return new String[] { "CodeableConcept" }; 4597 case -1836176187: 4598 /* distinctIdentifier */ return new String[] { "string" }; 4599 case -1969347631: 4600 /* manufacturer */ return new String[] { "string" }; 4601 case 416714767: 4602 /* manufactureDate */ return new String[] { "dateTime" }; 4603 case -668811523: 4604 /* expirationDate */ return new String[] { "dateTime" }; 4605 case 462547450: 4606 /* lotNumber */ return new String[] { "string" }; 4607 case 83787357: 4608 /* serialNumber */ return new String[] { "string" }; 4609 case 780988929: 4610 /* deviceName */ return new String[] {}; 4611 case 346619858: 4612 /* modelNumber */ return new String[] { "string" }; 4613 case -731502308: 4614 /* partNumber */ return new String[] { "string" }; 4615 case 3575610: 4616 /* type */ return new String[] { "CodeableConcept" }; 4617 case 682815883: 4618 /* specialization */ return new String[] {}; 4619 case 351608024: 4620 /* version */ return new String[] {}; 4621 case -993141291: 4622 /* property */ return new String[] {}; 4623 case -791418107: 4624 /* patient */ return new String[] { "Reference" }; 4625 case 106164915: 4626 /* owner */ return new String[] { "Reference" }; 4627 case 951526432: 4628 /* contact */ return new String[] { "ContactPoint" }; 4629 case 1901043637: 4630 /* location */ return new String[] { "Reference" }; 4631 case 116079: 4632 /* url */ return new String[] { "uri" }; 4633 case 3387378: 4634 /* note */ return new String[] { "Annotation" }; 4635 case -909893934: 4636 /* safety */ return new String[] { "CodeableConcept" }; 4637 case -995424086: 4638 /* parent */ return new String[] { "Reference" }; 4639 default: 4640 return super.getTypesForProperty(hash, name); 4641 } 4642 4643 } 4644 4645 @Override 4646 public Base addChild(String name) throws FHIRException { 4647 if (name.equals("identifier")) { 4648 return addIdentifier(); 4649 } else if (name.equals("definition")) { 4650 this.definition = new Reference(); 4651 return this.definition; 4652 } else if (name.equals("udiCarrier")) { 4653 return addUdiCarrier(); 4654 } else if (name.equals("status")) { 4655 throw new FHIRException("Cannot call addChild on a singleton property Device.status"); 4656 } else if (name.equals("statusReason")) { 4657 return addStatusReason(); 4658 } else if (name.equals("distinctIdentifier")) { 4659 throw new FHIRException("Cannot call addChild on a singleton property Device.distinctIdentifier"); 4660 } else if (name.equals("manufacturer")) { 4661 throw new FHIRException("Cannot call addChild on a singleton property Device.manufacturer"); 4662 } else if (name.equals("manufactureDate")) { 4663 throw new FHIRException("Cannot call addChild on a singleton property Device.manufactureDate"); 4664 } else if (name.equals("expirationDate")) { 4665 throw new FHIRException("Cannot call addChild on a singleton property Device.expirationDate"); 4666 } else if (name.equals("lotNumber")) { 4667 throw new FHIRException("Cannot call addChild on a singleton property Device.lotNumber"); 4668 } else if (name.equals("serialNumber")) { 4669 throw new FHIRException("Cannot call addChild on a singleton property Device.serialNumber"); 4670 } else if (name.equals("deviceName")) { 4671 return addDeviceName(); 4672 } else if (name.equals("modelNumber")) { 4673 throw new FHIRException("Cannot call addChild on a singleton property Device.modelNumber"); 4674 } else if (name.equals("partNumber")) { 4675 throw new FHIRException("Cannot call addChild on a singleton property Device.partNumber"); 4676 } else if (name.equals("type")) { 4677 this.type = new CodeableConcept(); 4678 return this.type; 4679 } else if (name.equals("specialization")) { 4680 return addSpecialization(); 4681 } else if (name.equals("version")) { 4682 return addVersion(); 4683 } else if (name.equals("property")) { 4684 return addProperty(); 4685 } else if (name.equals("patient")) { 4686 this.patient = new Reference(); 4687 return this.patient; 4688 } else if (name.equals("owner")) { 4689 this.owner = new Reference(); 4690 return this.owner; 4691 } else if (name.equals("contact")) { 4692 return addContact(); 4693 } else if (name.equals("location")) { 4694 this.location = new Reference(); 4695 return this.location; 4696 } else if (name.equals("url")) { 4697 throw new FHIRException("Cannot call addChild on a singleton property Device.url"); 4698 } else if (name.equals("note")) { 4699 return addNote(); 4700 } else if (name.equals("safety")) { 4701 return addSafety(); 4702 } else if (name.equals("parent")) { 4703 this.parent = new Reference(); 4704 return this.parent; 4705 } else 4706 return super.addChild(name); 4707 } 4708 4709 public String fhirType() { 4710 return "Device"; 4711 4712 } 4713 4714 public Device copy() { 4715 Device dst = new Device(); 4716 copyValues(dst); 4717 return dst; 4718 } 4719 4720 public void copyValues(Device dst) { 4721 super.copyValues(dst); 4722 if (identifier != null) { 4723 dst.identifier = new ArrayList<Identifier>(); 4724 for (Identifier i : identifier) 4725 dst.identifier.add(i.copy()); 4726 } 4727 ; 4728 dst.definition = definition == null ? null : definition.copy(); 4729 if (udiCarrier != null) { 4730 dst.udiCarrier = new ArrayList<DeviceUdiCarrierComponent>(); 4731 for (DeviceUdiCarrierComponent i : udiCarrier) 4732 dst.udiCarrier.add(i.copy()); 4733 } 4734 ; 4735 dst.status = status == null ? null : status.copy(); 4736 if (statusReason != null) { 4737 dst.statusReason = new ArrayList<CodeableConcept>(); 4738 for (CodeableConcept i : statusReason) 4739 dst.statusReason.add(i.copy()); 4740 } 4741 ; 4742 dst.distinctIdentifier = distinctIdentifier == null ? null : distinctIdentifier.copy(); 4743 dst.manufacturer = manufacturer == null ? null : manufacturer.copy(); 4744 dst.manufactureDate = manufactureDate == null ? null : manufactureDate.copy(); 4745 dst.expirationDate = expirationDate == null ? null : expirationDate.copy(); 4746 dst.lotNumber = lotNumber == null ? null : lotNumber.copy(); 4747 dst.serialNumber = serialNumber == null ? null : serialNumber.copy(); 4748 if (deviceName != null) { 4749 dst.deviceName = new ArrayList<DeviceDeviceNameComponent>(); 4750 for (DeviceDeviceNameComponent i : deviceName) 4751 dst.deviceName.add(i.copy()); 4752 } 4753 ; 4754 dst.modelNumber = modelNumber == null ? null : modelNumber.copy(); 4755 dst.partNumber = partNumber == null ? null : partNumber.copy(); 4756 dst.type = type == null ? null : type.copy(); 4757 if (specialization != null) { 4758 dst.specialization = new ArrayList<DeviceSpecializationComponent>(); 4759 for (DeviceSpecializationComponent i : specialization) 4760 dst.specialization.add(i.copy()); 4761 } 4762 ; 4763 if (version != null) { 4764 dst.version = new ArrayList<DeviceVersionComponent>(); 4765 for (DeviceVersionComponent i : version) 4766 dst.version.add(i.copy()); 4767 } 4768 ; 4769 if (property != null) { 4770 dst.property = new ArrayList<DevicePropertyComponent>(); 4771 for (DevicePropertyComponent i : property) 4772 dst.property.add(i.copy()); 4773 } 4774 ; 4775 dst.patient = patient == null ? null : patient.copy(); 4776 dst.owner = owner == null ? null : owner.copy(); 4777 if (contact != null) { 4778 dst.contact = new ArrayList<ContactPoint>(); 4779 for (ContactPoint i : contact) 4780 dst.contact.add(i.copy()); 4781 } 4782 ; 4783 dst.location = location == null ? null : location.copy(); 4784 dst.url = url == null ? null : url.copy(); 4785 if (note != null) { 4786 dst.note = new ArrayList<Annotation>(); 4787 for (Annotation i : note) 4788 dst.note.add(i.copy()); 4789 } 4790 ; 4791 if (safety != null) { 4792 dst.safety = new ArrayList<CodeableConcept>(); 4793 for (CodeableConcept i : safety) 4794 dst.safety.add(i.copy()); 4795 } 4796 ; 4797 dst.parent = parent == null ? null : parent.copy(); 4798 } 4799 4800 protected Device typedCopy() { 4801 return copy(); 4802 } 4803 4804 @Override 4805 public boolean equalsDeep(Base other_) { 4806 if (!super.equalsDeep(other_)) 4807 return false; 4808 if (!(other_ instanceof Device)) 4809 return false; 4810 Device o = (Device) other_; 4811 return compareDeep(identifier, o.identifier, true) && compareDeep(definition, o.definition, true) 4812 && compareDeep(udiCarrier, o.udiCarrier, true) && compareDeep(status, o.status, true) 4813 && compareDeep(statusReason, o.statusReason, true) 4814 && compareDeep(distinctIdentifier, o.distinctIdentifier, true) 4815 && compareDeep(manufacturer, o.manufacturer, true) && compareDeep(manufactureDate, o.manufactureDate, true) 4816 && compareDeep(expirationDate, o.expirationDate, true) && compareDeep(lotNumber, o.lotNumber, true) 4817 && compareDeep(serialNumber, o.serialNumber, true) && compareDeep(deviceName, o.deviceName, true) 4818 && compareDeep(modelNumber, o.modelNumber, true) && compareDeep(partNumber, o.partNumber, true) 4819 && compareDeep(type, o.type, true) && compareDeep(specialization, o.specialization, true) 4820 && compareDeep(version, o.version, true) && compareDeep(property, o.property, true) 4821 && compareDeep(patient, o.patient, true) && compareDeep(owner, o.owner, true) 4822 && compareDeep(contact, o.contact, true) && compareDeep(location, o.location, true) 4823 && compareDeep(url, o.url, true) && compareDeep(note, o.note, true) && compareDeep(safety, o.safety, true) 4824 && compareDeep(parent, o.parent, true); 4825 } 4826 4827 @Override 4828 public boolean equalsShallow(Base other_) { 4829 if (!super.equalsShallow(other_)) 4830 return false; 4831 if (!(other_ instanceof Device)) 4832 return false; 4833 Device o = (Device) other_; 4834 return compareValues(status, o.status, true) && compareValues(distinctIdentifier, o.distinctIdentifier, true) 4835 && compareValues(manufacturer, o.manufacturer, true) && compareValues(manufactureDate, o.manufactureDate, true) 4836 && compareValues(expirationDate, o.expirationDate, true) && compareValues(lotNumber, o.lotNumber, true) 4837 && compareValues(serialNumber, o.serialNumber, true) && compareValues(modelNumber, o.modelNumber, true) 4838 && compareValues(partNumber, o.partNumber, true) && compareValues(url, o.url, true); 4839 } 4840 4841 public boolean isEmpty() { 4842 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, definition, udiCarrier, status, 4843 statusReason, distinctIdentifier, manufacturer, manufactureDate, expirationDate, lotNumber, serialNumber, 4844 deviceName, modelNumber, partNumber, type, specialization, version, property, patient, owner, contact, location, 4845 url, note, safety, parent); 4846 } 4847 4848 @Override 4849 public ResourceType getResourceType() { 4850 return ResourceType.Device; 4851 } 4852 4853 /** 4854 * Search parameter: <b>udi-di</b> 4855 * <p> 4856 * Description: <b>The udi Device Identifier (DI)</b><br> 4857 * Type: <b>string</b><br> 4858 * Path: <b>Device.udiCarrier</b><br> 4859 * </p> 4860 */ 4861 @SearchParamDefinition(name = "udi-di", path = "Device.udiCarrier.deviceIdentifier", description = "The udi Device Identifier (DI)", type = "string") 4862 public static final String SP_UDI_DI = "udi-di"; 4863 /** 4864 * <b>Fluent Client</b> search parameter constant for <b>udi-di</b> 4865 * <p> 4866 * Description: <b>The udi Device Identifier (DI)</b><br> 4867 * Type: <b>string</b><br> 4868 * Path: <b>Device.udiCarrier</b><br> 4869 * </p> 4870 */ 4871 public static final ca.uhn.fhir.rest.gclient.StringClientParam UDI_DI = new ca.uhn.fhir.rest.gclient.StringClientParam( 4872 SP_UDI_DI); 4873 4874 /** 4875 * Search parameter: <b>identifier</b> 4876 * <p> 4877 * Description: <b>Instance id from manufacturer, owner, and others</b><br> 4878 * Type: <b>token</b><br> 4879 * Path: <b>Device.identifier</b><br> 4880 * </p> 4881 */ 4882 @SearchParamDefinition(name = "identifier", path = "Device.identifier", description = "Instance id from manufacturer, owner, and others", type = "token") 4883 public static final String SP_IDENTIFIER = "identifier"; 4884 /** 4885 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 4886 * <p> 4887 * Description: <b>Instance id from manufacturer, owner, and others</b><br> 4888 * Type: <b>token</b><br> 4889 * Path: <b>Device.identifier</b><br> 4890 * </p> 4891 */ 4892 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam( 4893 SP_IDENTIFIER); 4894 4895 /** 4896 * Search parameter: <b>udi-carrier</b> 4897 * <p> 4898 * Description: <b>UDI Barcode (RFID or other technology) string in *HRF* 4899 * format.</b><br> 4900 * Type: <b>string</b><br> 4901 * Path: <b>Device.udiCarrier</b><br> 4902 * </p> 4903 */ 4904 @SearchParamDefinition(name = "udi-carrier", path = "Device.udiCarrier.carrierHRF", description = "UDI Barcode (RFID or other technology) string in *HRF* format.", type = "string") 4905 public static final String SP_UDI_CARRIER = "udi-carrier"; 4906 /** 4907 * <b>Fluent Client</b> search parameter constant for <b>udi-carrier</b> 4908 * <p> 4909 * Description: <b>UDI Barcode (RFID or other technology) string in *HRF* 4910 * format.</b><br> 4911 * Type: <b>string</b><br> 4912 * Path: <b>Device.udiCarrier</b><br> 4913 * </p> 4914 */ 4915 public static final ca.uhn.fhir.rest.gclient.StringClientParam UDI_CARRIER = new ca.uhn.fhir.rest.gclient.StringClientParam( 4916 SP_UDI_CARRIER); 4917 4918 /** 4919 * Search parameter: <b>device-name</b> 4920 * <p> 4921 * Description: <b>A server defined search that may match any of the string 4922 * fields in Device.deviceName or Device.type.</b><br> 4923 * Type: <b>string</b><br> 4924 * Path: <b>Device.deviceName</b><br> 4925 * </p> 4926 */ 4927 @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") 4928 public static final String SP_DEVICE_NAME = "device-name"; 4929 /** 4930 * <b>Fluent Client</b> search parameter constant for <b>device-name</b> 4931 * <p> 4932 * Description: <b>A server defined search that may match any of the string 4933 * fields in Device.deviceName or Device.type.</b><br> 4934 * Type: <b>string</b><br> 4935 * Path: <b>Device.deviceName</b><br> 4936 * </p> 4937 */ 4938 public static final ca.uhn.fhir.rest.gclient.StringClientParam DEVICE_NAME = new ca.uhn.fhir.rest.gclient.StringClientParam( 4939 SP_DEVICE_NAME); 4940 4941 /** 4942 * Search parameter: <b>patient</b> 4943 * <p> 4944 * Description: <b>Patient information, if the resource is affixed to a 4945 * person</b><br> 4946 * Type: <b>reference</b><br> 4947 * Path: <b>Device.patient</b><br> 4948 * </p> 4949 */ 4950 @SearchParamDefinition(name = "patient", path = "Device.patient", description = "Patient information, if the resource is affixed to a person", type = "reference", target = { 4951 Patient.class }) 4952 public static final String SP_PATIENT = "patient"; 4953 /** 4954 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 4955 * <p> 4956 * Description: <b>Patient information, if the resource is affixed to a 4957 * person</b><br> 4958 * Type: <b>reference</b><br> 4959 * Path: <b>Device.patient</b><br> 4960 * </p> 4961 */ 4962 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 4963 SP_PATIENT); 4964 4965 /** 4966 * Constant for fluent queries to be used to add include statements. Specifies 4967 * the path value of "<b>Device:patient</b>". 4968 */ 4969 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include( 4970 "Device:patient").toLocked(); 4971 4972 /** 4973 * Search parameter: <b>organization</b> 4974 * <p> 4975 * Description: <b>The organization responsible for the device</b><br> 4976 * Type: <b>reference</b><br> 4977 * Path: <b>Device.owner</b><br> 4978 * </p> 4979 */ 4980 @SearchParamDefinition(name = "organization", path = "Device.owner", description = "The organization responsible for the device", type = "reference", target = { 4981 Organization.class }) 4982 public static final String SP_ORGANIZATION = "organization"; 4983 /** 4984 * <b>Fluent Client</b> search parameter constant for <b>organization</b> 4985 * <p> 4986 * Description: <b>The organization responsible for the device</b><br> 4987 * Type: <b>reference</b><br> 4988 * Path: <b>Device.owner</b><br> 4989 * </p> 4990 */ 4991 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 4992 SP_ORGANIZATION); 4993 4994 /** 4995 * Constant for fluent queries to be used to add include statements. Specifies 4996 * the path value of "<b>Device:organization</b>". 4997 */ 4998 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include( 4999 "Device:organization").toLocked(); 5000 5001 /** 5002 * Search parameter: <b>model</b> 5003 * <p> 5004 * Description: <b>The model of the device</b><br> 5005 * Type: <b>string</b><br> 5006 * Path: <b>Device.modelNumber</b><br> 5007 * </p> 5008 */ 5009 @SearchParamDefinition(name = "model", path = "Device.modelNumber", description = "The model of the device", type = "string") 5010 public static final String SP_MODEL = "model"; 5011 /** 5012 * <b>Fluent Client</b> search parameter constant for <b>model</b> 5013 * <p> 5014 * Description: <b>The model of the device</b><br> 5015 * Type: <b>string</b><br> 5016 * Path: <b>Device.modelNumber</b><br> 5017 * </p> 5018 */ 5019 public static final ca.uhn.fhir.rest.gclient.StringClientParam MODEL = new ca.uhn.fhir.rest.gclient.StringClientParam( 5020 SP_MODEL); 5021 5022 /** 5023 * Search parameter: <b>location</b> 5024 * <p> 5025 * Description: <b>A location, where the resource is found</b><br> 5026 * Type: <b>reference</b><br> 5027 * Path: <b>Device.location</b><br> 5028 * </p> 5029 */ 5030 @SearchParamDefinition(name = "location", path = "Device.location", description = "A location, where the resource is found", type = "reference", target = { 5031 Location.class }) 5032 public static final String SP_LOCATION = "location"; 5033 /** 5034 * <b>Fluent Client</b> search parameter constant for <b>location</b> 5035 * <p> 5036 * Description: <b>A location, where the resource is found</b><br> 5037 * Type: <b>reference</b><br> 5038 * Path: <b>Device.location</b><br> 5039 * </p> 5040 */ 5041 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 5042 SP_LOCATION); 5043 5044 /** 5045 * Constant for fluent queries to be used to add include statements. Specifies 5046 * the path value of "<b>Device:location</b>". 5047 */ 5048 public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include( 5049 "Device:location").toLocked(); 5050 5051 /** 5052 * Search parameter: <b>type</b> 5053 * <p> 5054 * Description: <b>The type of the device</b><br> 5055 * Type: <b>token</b><br> 5056 * Path: <b>Device.type</b><br> 5057 * </p> 5058 */ 5059 @SearchParamDefinition(name = "type", path = "Device.type", description = "The type of the device", type = "token") 5060 public static final String SP_TYPE = "type"; 5061 /** 5062 * <b>Fluent Client</b> search parameter constant for <b>type</b> 5063 * <p> 5064 * Description: <b>The type of the device</b><br> 5065 * Type: <b>token</b><br> 5066 * Path: <b>Device.type</b><br> 5067 * </p> 5068 */ 5069 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5070 SP_TYPE); 5071 5072 /** 5073 * Search parameter: <b>url</b> 5074 * <p> 5075 * Description: <b>Network address to contact device</b><br> 5076 * Type: <b>uri</b><br> 5077 * Path: <b>Device.url</b><br> 5078 * </p> 5079 */ 5080 @SearchParamDefinition(name = "url", path = "Device.url", description = "Network address to contact device", type = "uri") 5081 public static final String SP_URL = "url"; 5082 /** 5083 * <b>Fluent Client</b> search parameter constant for <b>url</b> 5084 * <p> 5085 * Description: <b>Network address to contact device</b><br> 5086 * Type: <b>uri</b><br> 5087 * Path: <b>Device.url</b><br> 5088 * </p> 5089 */ 5090 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 5091 5092 /** 5093 * Search parameter: <b>manufacturer</b> 5094 * <p> 5095 * Description: <b>The manufacturer of the device</b><br> 5096 * Type: <b>string</b><br> 5097 * Path: <b>Device.manufacturer</b><br> 5098 * </p> 5099 */ 5100 @SearchParamDefinition(name = "manufacturer", path = "Device.manufacturer", description = "The manufacturer of the device", type = "string") 5101 public static final String SP_MANUFACTURER = "manufacturer"; 5102 /** 5103 * <b>Fluent Client</b> search parameter constant for <b>manufacturer</b> 5104 * <p> 5105 * Description: <b>The manufacturer of the device</b><br> 5106 * Type: <b>string</b><br> 5107 * Path: <b>Device.manufacturer</b><br> 5108 * </p> 5109 */ 5110 public static final ca.uhn.fhir.rest.gclient.StringClientParam MANUFACTURER = new ca.uhn.fhir.rest.gclient.StringClientParam( 5111 SP_MANUFACTURER); 5112 5113 /** 5114 * Search parameter: <b>status</b> 5115 * <p> 5116 * Description: <b>active | inactive | entered-in-error | unknown</b><br> 5117 * Type: <b>token</b><br> 5118 * Path: <b>Device.status</b><br> 5119 * </p> 5120 */ 5121 @SearchParamDefinition(name = "status", path = "Device.status", description = "active | inactive | entered-in-error | unknown", type = "token") 5122 public static final String SP_STATUS = "status"; 5123 /** 5124 * <b>Fluent Client</b> search parameter constant for <b>status</b> 5125 * <p> 5126 * Description: <b>active | inactive | entered-in-error | unknown</b><br> 5127 * Type: <b>token</b><br> 5128 * Path: <b>Device.status</b><br> 5129 * </p> 5130 */ 5131 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam( 5132 SP_STATUS); 5133 5134}