001package org.hl7.fhir.dstu2.model; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2 036import java.util.ArrayList; 037import java.util.Date; 038import java.util.List; 039 040import ca.uhn.fhir.model.api.annotation.Child; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.exceptions.FHIRException; 045import org.hl7.fhir.utilities.Utilities; 046/** 047 * This resource identifies an instance of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. 048 */ 049@ResourceDef(name="Device", profile="http://hl7.org/fhir/Profile/Device") 050public class Device extends DomainResource { 051 052 public enum DeviceStatus { 053 /** 054 * The Device is available for use. 055 */ 056 AVAILABLE, 057 /** 058 * The Device is no longer available for use (e.g. lost, expired, damaged). 059 */ 060 NOTAVAILABLE, 061 /** 062 * The Device was entered in error and voided. 063 */ 064 ENTEREDINERROR, 065 /** 066 * added to help the parsers 067 */ 068 NULL; 069 public static DeviceStatus fromCode(String codeString) throws FHIRException { 070 if (codeString == null || "".equals(codeString)) 071 return null; 072 if ("available".equals(codeString)) 073 return AVAILABLE; 074 if ("not-available".equals(codeString)) 075 return NOTAVAILABLE; 076 if ("entered-in-error".equals(codeString)) 077 return ENTEREDINERROR; 078 throw new FHIRException("Unknown DeviceStatus code '"+codeString+"'"); 079 } 080 public String toCode() { 081 switch (this) { 082 case AVAILABLE: return "available"; 083 case NOTAVAILABLE: return "not-available"; 084 case ENTEREDINERROR: return "entered-in-error"; 085 case NULL: return null; 086 default: return "?"; 087 } 088 } 089 public String getSystem() { 090 switch (this) { 091 case AVAILABLE: return "http://hl7.org/fhir/devicestatus"; 092 case NOTAVAILABLE: return "http://hl7.org/fhir/devicestatus"; 093 case ENTEREDINERROR: return "http://hl7.org/fhir/devicestatus"; 094 case NULL: return null; 095 default: return "?"; 096 } 097 } 098 public String getDefinition() { 099 switch (this) { 100 case AVAILABLE: return "The Device is available for use."; 101 case NOTAVAILABLE: return "The Device is no longer available for use (e.g. lost, expired, damaged)."; 102 case ENTEREDINERROR: return "The Device was entered in error and voided."; 103 case NULL: return null; 104 default: return "?"; 105 } 106 } 107 public String getDisplay() { 108 switch (this) { 109 case AVAILABLE: return "Available"; 110 case NOTAVAILABLE: return "Not Available"; 111 case ENTEREDINERROR: return "Entered in Error"; 112 case NULL: return null; 113 default: return "?"; 114 } 115 } 116 } 117 118 public static class DeviceStatusEnumFactory implements EnumFactory<DeviceStatus> { 119 public DeviceStatus fromCode(String codeString) throws IllegalArgumentException { 120 if (codeString == null || "".equals(codeString)) 121 if (codeString == null || "".equals(codeString)) 122 return null; 123 if ("available".equals(codeString)) 124 return DeviceStatus.AVAILABLE; 125 if ("not-available".equals(codeString)) 126 return DeviceStatus.NOTAVAILABLE; 127 if ("entered-in-error".equals(codeString)) 128 return DeviceStatus.ENTEREDINERROR; 129 throw new IllegalArgumentException("Unknown DeviceStatus code '"+codeString+"'"); 130 } 131 public Enumeration<DeviceStatus> fromType(Base code) throws FHIRException { 132 if (code == null || code.isEmpty()) 133 return null; 134 String codeString = ((PrimitiveType) code).asStringValue(); 135 if (codeString == null || "".equals(codeString)) 136 return null; 137 if ("available".equals(codeString)) 138 return new Enumeration<DeviceStatus>(this, DeviceStatus.AVAILABLE); 139 if ("not-available".equals(codeString)) 140 return new Enumeration<DeviceStatus>(this, DeviceStatus.NOTAVAILABLE); 141 if ("entered-in-error".equals(codeString)) 142 return new Enumeration<DeviceStatus>(this, DeviceStatus.ENTEREDINERROR); 143 throw new FHIRException("Unknown DeviceStatus code '"+codeString+"'"); 144 } 145 public String toCode(DeviceStatus code) { 146 if (code == DeviceStatus.AVAILABLE) 147 return "available"; 148 if (code == DeviceStatus.NOTAVAILABLE) 149 return "not-available"; 150 if (code == DeviceStatus.ENTEREDINERROR) 151 return "entered-in-error"; 152 return "?"; 153 } 154 } 155 156 /** 157 * Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used. 158 */ 159 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 160 @Description(shortDefinition="Instance id from manufacturer, owner, and others", formalDefinition="Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used." ) 161 protected List<Identifier> identifier; 162 163 /** 164 * Code or identifier to identify a kind of device. 165 */ 166 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 167 @Description(shortDefinition="What kind of device this is", formalDefinition="Code or identifier to identify a kind of device." ) 168 protected CodeableConcept type; 169 170 /** 171 * Descriptive information, usage information or implantation information that is not captured in an existing element. 172 */ 173 @Child(name = "note", type = {Annotation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 174 @Description(shortDefinition="Device notes and comments", formalDefinition="Descriptive information, usage information or implantation information that is not captured in an existing element." ) 175 protected List<Annotation> note; 176 177 /** 178 * Status of the Device availability. 179 */ 180 @Child(name = "status", type = {CodeType.class}, order=3, min=0, max=1, modifier=true, summary=true) 181 @Description(shortDefinition="available | not-available | entered-in-error", formalDefinition="Status of the Device availability." ) 182 protected Enumeration<DeviceStatus> status; 183 184 /** 185 * A name of the manufacturer. 186 */ 187 @Child(name = "manufacturer", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 188 @Description(shortDefinition="Name of device manufacturer", formalDefinition="A name of the manufacturer." ) 189 protected StringType manufacturer; 190 191 /** 192 * The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type. 193 */ 194 @Child(name = "model", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 195 @Description(shortDefinition="Model id assigned by the manufacturer", formalDefinition="The \"model\" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type." ) 196 protected StringType model; 197 198 /** 199 * The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware. 200 */ 201 @Child(name = "version", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 202 @Description(shortDefinition="Version number (i.e. software)", formalDefinition="The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware." ) 203 protected StringType version; 204 205 /** 206 * The date and time when the device was manufactured. 207 */ 208 @Child(name = "manufactureDate", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=false) 209 @Description(shortDefinition="Manufacture date", formalDefinition="The date and time when the device was manufactured." ) 210 protected DateTimeType manufactureDate; 211 212 /** 213 * The date and time beyond which this device is no longer valid or should not be used (if applicable). 214 */ 215 @Child(name = "expiry", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=false) 216 @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)." ) 217 protected DateTimeType expiry; 218 219 /** 220 * United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm. 221 */ 222 @Child(name = "udi", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 223 @Description(shortDefinition="FDA mandated Unique Device Identifier", formalDefinition="United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm." ) 224 protected StringType udi; 225 226 /** 227 * Lot number assigned by the manufacturer. 228 */ 229 @Child(name = "lotNumber", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 230 @Description(shortDefinition="Lot number of manufacture", formalDefinition="Lot number assigned by the manufacturer." ) 231 protected StringType lotNumber; 232 233 /** 234 * An organization that is responsible for the provision and ongoing maintenance of the device. 235 */ 236 @Child(name = "owner", type = {Organization.class}, order=11, min=0, max=1, modifier=false, summary=false) 237 @Description(shortDefinition="Organization responsible for device", formalDefinition="An organization that is responsible for the provision and ongoing maintenance of the device." ) 238 protected Reference owner; 239 240 /** 241 * The actual object that is the target of the reference (An organization that is responsible for the provision and ongoing maintenance of the device.) 242 */ 243 protected Organization ownerTarget; 244 245 /** 246 * The place where the device can be found. 247 */ 248 @Child(name = "location", type = {Location.class}, order=12, min=0, max=1, modifier=false, summary=false) 249 @Description(shortDefinition="Where the resource is found", formalDefinition="The place where the device can be found." ) 250 protected Reference location; 251 252 /** 253 * The actual object that is the target of the reference (The place where the device can be found.) 254 */ 255 protected Location locationTarget; 256 257 /** 258 * Patient information, if the resource is affixed to a person. 259 */ 260 @Child(name = "patient", type = {Patient.class}, order=13, min=0, max=1, modifier=false, summary=false) 261 @Description(shortDefinition="If the resource is affixed to a person", formalDefinition="Patient information, if the resource is affixed to a person." ) 262 protected Reference patient; 263 264 /** 265 * The actual object that is the target of the reference (Patient information, if the resource is affixed to a person.) 266 */ 267 protected Patient patientTarget; 268 269 /** 270 * Contact details for an organization or a particular human that is responsible for the device. 271 */ 272 @Child(name = "contact", type = {ContactPoint.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 273 @Description(shortDefinition="Details for human/organization for support", formalDefinition="Contact details for an organization or a particular human that is responsible for the device." ) 274 protected List<ContactPoint> contact; 275 276 /** 277 * A network address on which the device may be contacted directly. 278 */ 279 @Child(name = "url", type = {UriType.class}, order=15, min=0, max=1, modifier=false, summary=false) 280 @Description(shortDefinition="Network address to contact device", formalDefinition="A network address on which the device may be contacted directly." ) 281 protected UriType url; 282 283 private static final long serialVersionUID = 366690094L; 284 285 /* 286 * Constructor 287 */ 288 public Device() { 289 super(); 290 } 291 292 /* 293 * Constructor 294 */ 295 public Device(CodeableConcept type) { 296 super(); 297 this.type = type; 298 } 299 300 /** 301 * @return {@link #identifier} (Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.) 302 */ 303 public List<Identifier> getIdentifier() { 304 if (this.identifier == null) 305 this.identifier = new ArrayList<Identifier>(); 306 return this.identifier; 307 } 308 309 public boolean hasIdentifier() { 310 if (this.identifier == null) 311 return false; 312 for (Identifier item : this.identifier) 313 if (!item.isEmpty()) 314 return true; 315 return false; 316 } 317 318 /** 319 * @return {@link #identifier} (Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.) 320 */ 321 // syntactic sugar 322 public Identifier addIdentifier() { //3 323 Identifier t = new Identifier(); 324 if (this.identifier == null) 325 this.identifier = new ArrayList<Identifier>(); 326 this.identifier.add(t); 327 return t; 328 } 329 330 // syntactic sugar 331 public Device addIdentifier(Identifier t) { //3 332 if (t == null) 333 return this; 334 if (this.identifier == null) 335 this.identifier = new ArrayList<Identifier>(); 336 this.identifier.add(t); 337 return this; 338 } 339 340 /** 341 * @return {@link #type} (Code or identifier to identify a kind of device.) 342 */ 343 public CodeableConcept getType() { 344 if (this.type == null) 345 if (Configuration.errorOnAutoCreate()) 346 throw new Error("Attempt to auto-create Device.type"); 347 else if (Configuration.doAutoCreate()) 348 this.type = new CodeableConcept(); // cc 349 return this.type; 350 } 351 352 public boolean hasType() { 353 return this.type != null && !this.type.isEmpty(); 354 } 355 356 /** 357 * @param value {@link #type} (Code or identifier to identify a kind of device.) 358 */ 359 public Device setType(CodeableConcept value) { 360 this.type = value; 361 return this; 362 } 363 364 /** 365 * @return {@link #note} (Descriptive information, usage information or implantation information that is not captured in an existing element.) 366 */ 367 public List<Annotation> getNote() { 368 if (this.note == null) 369 this.note = new ArrayList<Annotation>(); 370 return this.note; 371 } 372 373 public boolean hasNote() { 374 if (this.note == null) 375 return false; 376 for (Annotation item : this.note) 377 if (!item.isEmpty()) 378 return true; 379 return false; 380 } 381 382 /** 383 * @return {@link #note} (Descriptive information, usage information or implantation information that is not captured in an existing element.) 384 */ 385 // syntactic sugar 386 public Annotation addNote() { //3 387 Annotation t = new Annotation(); 388 if (this.note == null) 389 this.note = new ArrayList<Annotation>(); 390 this.note.add(t); 391 return t; 392 } 393 394 // syntactic sugar 395 public Device addNote(Annotation t) { //3 396 if (t == null) 397 return this; 398 if (this.note == null) 399 this.note = new ArrayList<Annotation>(); 400 this.note.add(t); 401 return this; 402 } 403 404 /** 405 * @return {@link #status} (Status of the Device availability.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 406 */ 407 public Enumeration<DeviceStatus> getStatusElement() { 408 if (this.status == null) 409 if (Configuration.errorOnAutoCreate()) 410 throw new Error("Attempt to auto-create Device.status"); 411 else if (Configuration.doAutoCreate()) 412 this.status = new Enumeration<DeviceStatus>(new DeviceStatusEnumFactory()); // bb 413 return this.status; 414 } 415 416 public boolean hasStatusElement() { 417 return this.status != null && !this.status.isEmpty(); 418 } 419 420 public boolean hasStatus() { 421 return this.status != null && !this.status.isEmpty(); 422 } 423 424 /** 425 * @param value {@link #status} (Status of the Device availability.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 426 */ 427 public Device setStatusElement(Enumeration<DeviceStatus> value) { 428 this.status = value; 429 return this; 430 } 431 432 /** 433 * @return Status of the Device availability. 434 */ 435 public DeviceStatus getStatus() { 436 return this.status == null ? null : this.status.getValue(); 437 } 438 439 /** 440 * @param value Status of the Device availability. 441 */ 442 public Device setStatus(DeviceStatus value) { 443 if (value == null) 444 this.status = null; 445 else { 446 if (this.status == null) 447 this.status = new Enumeration<DeviceStatus>(new DeviceStatusEnumFactory()); 448 this.status.setValue(value); 449 } 450 return this; 451 } 452 453 /** 454 * @return {@link #manufacturer} (A name of the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getManufacturer" gives direct access to the value 455 */ 456 public StringType getManufacturerElement() { 457 if (this.manufacturer == null) 458 if (Configuration.errorOnAutoCreate()) 459 throw new Error("Attempt to auto-create Device.manufacturer"); 460 else if (Configuration.doAutoCreate()) 461 this.manufacturer = new StringType(); // bb 462 return this.manufacturer; 463 } 464 465 public boolean hasManufacturerElement() { 466 return this.manufacturer != null && !this.manufacturer.isEmpty(); 467 } 468 469 public boolean hasManufacturer() { 470 return this.manufacturer != null && !this.manufacturer.isEmpty(); 471 } 472 473 /** 474 * @param value {@link #manufacturer} (A name of the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getManufacturer" gives direct access to the value 475 */ 476 public Device setManufacturerElement(StringType value) { 477 this.manufacturer = value; 478 return this; 479 } 480 481 /** 482 * @return A name of the manufacturer. 483 */ 484 public String getManufacturer() { 485 return this.manufacturer == null ? null : this.manufacturer.getValue(); 486 } 487 488 /** 489 * @param value A name of the manufacturer. 490 */ 491 public Device setManufacturer(String value) { 492 if (Utilities.noString(value)) 493 this.manufacturer = null; 494 else { 495 if (this.manufacturer == null) 496 this.manufacturer = new StringType(); 497 this.manufacturer.setValue(value); 498 } 499 return this; 500 } 501 502 /** 503 * @return {@link #model} (The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.). This is the underlying object with id, value and extensions. The accessor "getModel" gives direct access to the value 504 */ 505 public StringType getModelElement() { 506 if (this.model == null) 507 if (Configuration.errorOnAutoCreate()) 508 throw new Error("Attempt to auto-create Device.model"); 509 else if (Configuration.doAutoCreate()) 510 this.model = new StringType(); // bb 511 return this.model; 512 } 513 514 public boolean hasModelElement() { 515 return this.model != null && !this.model.isEmpty(); 516 } 517 518 public boolean hasModel() { 519 return this.model != null && !this.model.isEmpty(); 520 } 521 522 /** 523 * @param value {@link #model} (The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.). This is the underlying object with id, value and extensions. The accessor "getModel" gives direct access to the value 524 */ 525 public Device setModelElement(StringType value) { 526 this.model = value; 527 return this; 528 } 529 530 /** 531 * @return The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type. 532 */ 533 public String getModel() { 534 return this.model == null ? null : this.model.getValue(); 535 } 536 537 /** 538 * @param value The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type. 539 */ 540 public Device setModel(String value) { 541 if (Utilities.noString(value)) 542 this.model = null; 543 else { 544 if (this.model == null) 545 this.model = new StringType(); 546 this.model.setValue(value); 547 } 548 return this; 549 } 550 551 /** 552 * @return {@link #version} (The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 553 */ 554 public StringType getVersionElement() { 555 if (this.version == null) 556 if (Configuration.errorOnAutoCreate()) 557 throw new Error("Attempt to auto-create Device.version"); 558 else if (Configuration.doAutoCreate()) 559 this.version = new StringType(); // bb 560 return this.version; 561 } 562 563 public boolean hasVersionElement() { 564 return this.version != null && !this.version.isEmpty(); 565 } 566 567 public boolean hasVersion() { 568 return this.version != null && !this.version.isEmpty(); 569 } 570 571 /** 572 * @param value {@link #version} (The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 573 */ 574 public Device setVersionElement(StringType value) { 575 this.version = value; 576 return this; 577 } 578 579 /** 580 * @return The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware. 581 */ 582 public String getVersion() { 583 return this.version == null ? null : this.version.getValue(); 584 } 585 586 /** 587 * @param value The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware. 588 */ 589 public Device setVersion(String value) { 590 if (Utilities.noString(value)) 591 this.version = null; 592 else { 593 if (this.version == null) 594 this.version = new StringType(); 595 this.version.setValue(value); 596 } 597 return this; 598 } 599 600 /** 601 * @return {@link #manufactureDate} (The date and time when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getManufactureDate" gives direct access to the value 602 */ 603 public DateTimeType getManufactureDateElement() { 604 if (this.manufactureDate == null) 605 if (Configuration.errorOnAutoCreate()) 606 throw new Error("Attempt to auto-create Device.manufactureDate"); 607 else if (Configuration.doAutoCreate()) 608 this.manufactureDate = new DateTimeType(); // bb 609 return this.manufactureDate; 610 } 611 612 public boolean hasManufactureDateElement() { 613 return this.manufactureDate != null && !this.manufactureDate.isEmpty(); 614 } 615 616 public boolean hasManufactureDate() { 617 return this.manufactureDate != null && !this.manufactureDate.isEmpty(); 618 } 619 620 /** 621 * @param value {@link #manufactureDate} (The date and time when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getManufactureDate" gives direct access to the value 622 */ 623 public Device setManufactureDateElement(DateTimeType value) { 624 this.manufactureDate = value; 625 return this; 626 } 627 628 /** 629 * @return The date and time when the device was manufactured. 630 */ 631 public Date getManufactureDate() { 632 return this.manufactureDate == null ? null : this.manufactureDate.getValue(); 633 } 634 635 /** 636 * @param value The date and time when the device was manufactured. 637 */ 638 public Device setManufactureDate(Date value) { 639 if (value == null) 640 this.manufactureDate = null; 641 else { 642 if (this.manufactureDate == null) 643 this.manufactureDate = new DateTimeType(); 644 this.manufactureDate.setValue(value); 645 } 646 return this; 647 } 648 649 /** 650 * @return {@link #expiry} (The date and time beyond which this device is no longer valid or should not be used (if applicable).). This is the underlying object with id, value and extensions. The accessor "getExpiry" gives direct access to the value 651 */ 652 public DateTimeType getExpiryElement() { 653 if (this.expiry == null) 654 if (Configuration.errorOnAutoCreate()) 655 throw new Error("Attempt to auto-create Device.expiry"); 656 else if (Configuration.doAutoCreate()) 657 this.expiry = new DateTimeType(); // bb 658 return this.expiry; 659 } 660 661 public boolean hasExpiryElement() { 662 return this.expiry != null && !this.expiry.isEmpty(); 663 } 664 665 public boolean hasExpiry() { 666 return this.expiry != null && !this.expiry.isEmpty(); 667 } 668 669 /** 670 * @param value {@link #expiry} (The date and time beyond which this device is no longer valid or should not be used (if applicable).). This is the underlying object with id, value and extensions. The accessor "getExpiry" gives direct access to the value 671 */ 672 public Device setExpiryElement(DateTimeType value) { 673 this.expiry = value; 674 return this; 675 } 676 677 /** 678 * @return The date and time beyond which this device is no longer valid or should not be used (if applicable). 679 */ 680 public Date getExpiry() { 681 return this.expiry == null ? null : this.expiry.getValue(); 682 } 683 684 /** 685 * @param value The date and time beyond which this device is no longer valid or should not be used (if applicable). 686 */ 687 public Device setExpiry(Date value) { 688 if (value == null) 689 this.expiry = null; 690 else { 691 if (this.expiry == null) 692 this.expiry = new DateTimeType(); 693 this.expiry.setValue(value); 694 } 695 return this; 696 } 697 698 /** 699 * @return {@link #udi} (United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.). This is the underlying object with id, value and extensions. The accessor "getUdi" gives direct access to the value 700 */ 701 public StringType getUdiElement() { 702 if (this.udi == null) 703 if (Configuration.errorOnAutoCreate()) 704 throw new Error("Attempt to auto-create Device.udi"); 705 else if (Configuration.doAutoCreate()) 706 this.udi = new StringType(); // bb 707 return this.udi; 708 } 709 710 public boolean hasUdiElement() { 711 return this.udi != null && !this.udi.isEmpty(); 712 } 713 714 public boolean hasUdi() { 715 return this.udi != null && !this.udi.isEmpty(); 716 } 717 718 /** 719 * @param value {@link #udi} (United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.). This is the underlying object with id, value and extensions. The accessor "getUdi" gives direct access to the value 720 */ 721 public Device setUdiElement(StringType value) { 722 this.udi = value; 723 return this; 724 } 725 726 /** 727 * @return United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm. 728 */ 729 public String getUdi() { 730 return this.udi == null ? null : this.udi.getValue(); 731 } 732 733 /** 734 * @param value United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm. 735 */ 736 public Device setUdi(String value) { 737 if (Utilities.noString(value)) 738 this.udi = null; 739 else { 740 if (this.udi == null) 741 this.udi = new StringType(); 742 this.udi.setValue(value); 743 } 744 return this; 745 } 746 747 /** 748 * @return {@link #lotNumber} (Lot number assigned by the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value 749 */ 750 public StringType getLotNumberElement() { 751 if (this.lotNumber == null) 752 if (Configuration.errorOnAutoCreate()) 753 throw new Error("Attempt to auto-create Device.lotNumber"); 754 else if (Configuration.doAutoCreate()) 755 this.lotNumber = new StringType(); // bb 756 return this.lotNumber; 757 } 758 759 public boolean hasLotNumberElement() { 760 return this.lotNumber != null && !this.lotNumber.isEmpty(); 761 } 762 763 public boolean hasLotNumber() { 764 return this.lotNumber != null && !this.lotNumber.isEmpty(); 765 } 766 767 /** 768 * @param value {@link #lotNumber} (Lot number assigned by the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value 769 */ 770 public Device setLotNumberElement(StringType value) { 771 this.lotNumber = value; 772 return this; 773 } 774 775 /** 776 * @return Lot number assigned by the manufacturer. 777 */ 778 public String getLotNumber() { 779 return this.lotNumber == null ? null : this.lotNumber.getValue(); 780 } 781 782 /** 783 * @param value Lot number assigned by the manufacturer. 784 */ 785 public Device setLotNumber(String value) { 786 if (Utilities.noString(value)) 787 this.lotNumber = null; 788 else { 789 if (this.lotNumber == null) 790 this.lotNumber = new StringType(); 791 this.lotNumber.setValue(value); 792 } 793 return this; 794 } 795 796 /** 797 * @return {@link #owner} (An organization that is responsible for the provision and ongoing maintenance of the device.) 798 */ 799 public Reference getOwner() { 800 if (this.owner == null) 801 if (Configuration.errorOnAutoCreate()) 802 throw new Error("Attempt to auto-create Device.owner"); 803 else if (Configuration.doAutoCreate()) 804 this.owner = new Reference(); // cc 805 return this.owner; 806 } 807 808 public boolean hasOwner() { 809 return this.owner != null && !this.owner.isEmpty(); 810 } 811 812 /** 813 * @param value {@link #owner} (An organization that is responsible for the provision and ongoing maintenance of the device.) 814 */ 815 public Device setOwner(Reference value) { 816 this.owner = value; 817 return this; 818 } 819 820 /** 821 * @return {@link #owner} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (An organization that is responsible for the provision and ongoing maintenance of the device.) 822 */ 823 public Organization getOwnerTarget() { 824 if (this.ownerTarget == null) 825 if (Configuration.errorOnAutoCreate()) 826 throw new Error("Attempt to auto-create Device.owner"); 827 else if (Configuration.doAutoCreate()) 828 this.ownerTarget = new Organization(); // aa 829 return this.ownerTarget; 830 } 831 832 /** 833 * @param value {@link #owner} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (An organization that is responsible for the provision and ongoing maintenance of the device.) 834 */ 835 public Device setOwnerTarget(Organization value) { 836 this.ownerTarget = value; 837 return this; 838 } 839 840 /** 841 * @return {@link #location} (The place where the device can be found.) 842 */ 843 public Reference getLocation() { 844 if (this.location == null) 845 if (Configuration.errorOnAutoCreate()) 846 throw new Error("Attempt to auto-create Device.location"); 847 else if (Configuration.doAutoCreate()) 848 this.location = new Reference(); // cc 849 return this.location; 850 } 851 852 public boolean hasLocation() { 853 return this.location != null && !this.location.isEmpty(); 854 } 855 856 /** 857 * @param value {@link #location} (The place where the device can be found.) 858 */ 859 public Device setLocation(Reference value) { 860 this.location = value; 861 return this; 862 } 863 864 /** 865 * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The place where the device can be found.) 866 */ 867 public Location getLocationTarget() { 868 if (this.locationTarget == null) 869 if (Configuration.errorOnAutoCreate()) 870 throw new Error("Attempt to auto-create Device.location"); 871 else if (Configuration.doAutoCreate()) 872 this.locationTarget = new Location(); // aa 873 return this.locationTarget; 874 } 875 876 /** 877 * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The place where the device can be found.) 878 */ 879 public Device setLocationTarget(Location value) { 880 this.locationTarget = value; 881 return this; 882 } 883 884 /** 885 * @return {@link #patient} (Patient information, if the resource is affixed to a person.) 886 */ 887 public Reference getPatient() { 888 if (this.patient == null) 889 if (Configuration.errorOnAutoCreate()) 890 throw new Error("Attempt to auto-create Device.patient"); 891 else if (Configuration.doAutoCreate()) 892 this.patient = new Reference(); // cc 893 return this.patient; 894 } 895 896 public boolean hasPatient() { 897 return this.patient != null && !this.patient.isEmpty(); 898 } 899 900 /** 901 * @param value {@link #patient} (Patient information, if the resource is affixed to a person.) 902 */ 903 public Device setPatient(Reference value) { 904 this.patient = value; 905 return this; 906 } 907 908 /** 909 * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient information, if the resource is affixed to a person.) 910 */ 911 public Patient getPatientTarget() { 912 if (this.patientTarget == null) 913 if (Configuration.errorOnAutoCreate()) 914 throw new Error("Attempt to auto-create Device.patient"); 915 else if (Configuration.doAutoCreate()) 916 this.patientTarget = new Patient(); // aa 917 return this.patientTarget; 918 } 919 920 /** 921 * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient information, if the resource is affixed to a person.) 922 */ 923 public Device setPatientTarget(Patient value) { 924 this.patientTarget = value; 925 return this; 926 } 927 928 /** 929 * @return {@link #contact} (Contact details for an organization or a particular human that is responsible for the device.) 930 */ 931 public List<ContactPoint> getContact() { 932 if (this.contact == null) 933 this.contact = new ArrayList<ContactPoint>(); 934 return this.contact; 935 } 936 937 public boolean hasContact() { 938 if (this.contact == null) 939 return false; 940 for (ContactPoint item : this.contact) 941 if (!item.isEmpty()) 942 return true; 943 return false; 944 } 945 946 /** 947 * @return {@link #contact} (Contact details for an organization or a particular human that is responsible for the device.) 948 */ 949 // syntactic sugar 950 public ContactPoint addContact() { //3 951 ContactPoint t = new ContactPoint(); 952 if (this.contact == null) 953 this.contact = new ArrayList<ContactPoint>(); 954 this.contact.add(t); 955 return t; 956 } 957 958 // syntactic sugar 959 public Device addContact(ContactPoint t) { //3 960 if (t == null) 961 return this; 962 if (this.contact == null) 963 this.contact = new ArrayList<ContactPoint>(); 964 this.contact.add(t); 965 return this; 966 } 967 968 /** 969 * @return {@link #url} (A network address on which the device may be contacted directly.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 970 */ 971 public UriType getUrlElement() { 972 if (this.url == null) 973 if (Configuration.errorOnAutoCreate()) 974 throw new Error("Attempt to auto-create Device.url"); 975 else if (Configuration.doAutoCreate()) 976 this.url = new UriType(); // bb 977 return this.url; 978 } 979 980 public boolean hasUrlElement() { 981 return this.url != null && !this.url.isEmpty(); 982 } 983 984 public boolean hasUrl() { 985 return this.url != null && !this.url.isEmpty(); 986 } 987 988 /** 989 * @param value {@link #url} (A network address on which the device may be contacted directly.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 990 */ 991 public Device setUrlElement(UriType value) { 992 this.url = value; 993 return this; 994 } 995 996 /** 997 * @return A network address on which the device may be contacted directly. 998 */ 999 public String getUrl() { 1000 return this.url == null ? null : this.url.getValue(); 1001 } 1002 1003 /** 1004 * @param value A network address on which the device may be contacted directly. 1005 */ 1006 public Device setUrl(String value) { 1007 if (Utilities.noString(value)) 1008 this.url = null; 1009 else { 1010 if (this.url == null) 1011 this.url = new UriType(); 1012 this.url.setValue(value); 1013 } 1014 return this; 1015 } 1016 1017 protected void listChildren(List<Property> childrenList) { 1018 super.listChildren(childrenList); 1019 childrenList.add(new Property("identifier", "Identifier", "Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1020 childrenList.add(new Property("type", "CodeableConcept", "Code or identifier to identify a kind of device.", 0, java.lang.Integer.MAX_VALUE, type)); 1021 childrenList.add(new Property("note", "Annotation", "Descriptive information, usage information or implantation information that is not captured in an existing element.", 0, java.lang.Integer.MAX_VALUE, note)); 1022 childrenList.add(new Property("status", "code", "Status of the Device availability.", 0, java.lang.Integer.MAX_VALUE, status)); 1023 childrenList.add(new Property("manufacturer", "string", "A name of the manufacturer.", 0, java.lang.Integer.MAX_VALUE, manufacturer)); 1024 childrenList.add(new Property("model", "string", "The \"model\" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", 0, java.lang.Integer.MAX_VALUE, model)); 1025 childrenList.add(new Property("version", "string", "The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.", 0, java.lang.Integer.MAX_VALUE, version)); 1026 childrenList.add(new Property("manufactureDate", "dateTime", "The date and time when the device was manufactured.", 0, java.lang.Integer.MAX_VALUE, manufactureDate)); 1027 childrenList.add(new Property("expiry", "dateTime", "The date and time beyond which this device is no longer valid or should not be used (if applicable).", 0, java.lang.Integer.MAX_VALUE, expiry)); 1028 childrenList.add(new Property("udi", "string", "United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.", 0, java.lang.Integer.MAX_VALUE, udi)); 1029 childrenList.add(new Property("lotNumber", "string", "Lot number assigned by the manufacturer.", 0, java.lang.Integer.MAX_VALUE, lotNumber)); 1030 childrenList.add(new Property("owner", "Reference(Organization)", "An organization that is responsible for the provision and ongoing maintenance of the device.", 0, java.lang.Integer.MAX_VALUE, owner)); 1031 childrenList.add(new Property("location", "Reference(Location)", "The place where the device can be found.", 0, java.lang.Integer.MAX_VALUE, location)); 1032 childrenList.add(new Property("patient", "Reference(Patient)", "Patient information, if the resource is affixed to a person.", 0, java.lang.Integer.MAX_VALUE, patient)); 1033 childrenList.add(new Property("contact", "ContactPoint", "Contact details for an organization or a particular human that is responsible for the device.", 0, java.lang.Integer.MAX_VALUE, contact)); 1034 childrenList.add(new Property("url", "uri", "A network address on which the device may be contacted directly.", 0, java.lang.Integer.MAX_VALUE, url)); 1035 } 1036 1037 @Override 1038 public void setProperty(String name, Base value) throws FHIRException { 1039 if (name.equals("identifier")) 1040 this.getIdentifier().add(castToIdentifier(value)); 1041 else if (name.equals("type")) 1042 this.type = castToCodeableConcept(value); // CodeableConcept 1043 else if (name.equals("note")) 1044 this.getNote().add(castToAnnotation(value)); 1045 else if (name.equals("status")) 1046 this.status = new DeviceStatusEnumFactory().fromType(value); // Enumeration<DeviceStatus> 1047 else if (name.equals("manufacturer")) 1048 this.manufacturer = castToString(value); // StringType 1049 else if (name.equals("model")) 1050 this.model = castToString(value); // StringType 1051 else if (name.equals("version")) 1052 this.version = castToString(value); // StringType 1053 else if (name.equals("manufactureDate")) 1054 this.manufactureDate = castToDateTime(value); // DateTimeType 1055 else if (name.equals("expiry")) 1056 this.expiry = castToDateTime(value); // DateTimeType 1057 else if (name.equals("udi")) 1058 this.udi = castToString(value); // StringType 1059 else if (name.equals("lotNumber")) 1060 this.lotNumber = castToString(value); // StringType 1061 else if (name.equals("owner")) 1062 this.owner = castToReference(value); // Reference 1063 else if (name.equals("location")) 1064 this.location = castToReference(value); // Reference 1065 else if (name.equals("patient")) 1066 this.patient = castToReference(value); // Reference 1067 else if (name.equals("contact")) 1068 this.getContact().add(castToContactPoint(value)); 1069 else if (name.equals("url")) 1070 this.url = castToUri(value); // UriType 1071 else 1072 super.setProperty(name, value); 1073 } 1074 1075 @Override 1076 public Base addChild(String name) throws FHIRException { 1077 if (name.equals("identifier")) { 1078 return addIdentifier(); 1079 } 1080 else if (name.equals("type")) { 1081 this.type = new CodeableConcept(); 1082 return this.type; 1083 } 1084 else if (name.equals("note")) { 1085 return addNote(); 1086 } 1087 else if (name.equals("status")) { 1088 throw new FHIRException("Cannot call addChild on a primitive type Device.status"); 1089 } 1090 else if (name.equals("manufacturer")) { 1091 throw new FHIRException("Cannot call addChild on a primitive type Device.manufacturer"); 1092 } 1093 else if (name.equals("model")) { 1094 throw new FHIRException("Cannot call addChild on a primitive type Device.model"); 1095 } 1096 else if (name.equals("version")) { 1097 throw new FHIRException("Cannot call addChild on a primitive type Device.version"); 1098 } 1099 else if (name.equals("manufactureDate")) { 1100 throw new FHIRException("Cannot call addChild on a primitive type Device.manufactureDate"); 1101 } 1102 else if (name.equals("expiry")) { 1103 throw new FHIRException("Cannot call addChild on a primitive type Device.expiry"); 1104 } 1105 else if (name.equals("udi")) { 1106 throw new FHIRException("Cannot call addChild on a primitive type Device.udi"); 1107 } 1108 else if (name.equals("lotNumber")) { 1109 throw new FHIRException("Cannot call addChild on a primitive type Device.lotNumber"); 1110 } 1111 else if (name.equals("owner")) { 1112 this.owner = new Reference(); 1113 return this.owner; 1114 } 1115 else if (name.equals("location")) { 1116 this.location = new Reference(); 1117 return this.location; 1118 } 1119 else if (name.equals("patient")) { 1120 this.patient = new Reference(); 1121 return this.patient; 1122 } 1123 else if (name.equals("contact")) { 1124 return addContact(); 1125 } 1126 else if (name.equals("url")) { 1127 throw new FHIRException("Cannot call addChild on a primitive type Device.url"); 1128 } 1129 else 1130 return super.addChild(name); 1131 } 1132 1133 public String fhirType() { 1134 return "Device"; 1135 1136 } 1137 1138 public Device copy() { 1139 Device dst = new Device(); 1140 copyValues(dst); 1141 if (identifier != null) { 1142 dst.identifier = new ArrayList<Identifier>(); 1143 for (Identifier i : identifier) 1144 dst.identifier.add(i.copy()); 1145 }; 1146 dst.type = type == null ? null : type.copy(); 1147 if (note != null) { 1148 dst.note = new ArrayList<Annotation>(); 1149 for (Annotation i : note) 1150 dst.note.add(i.copy()); 1151 }; 1152 dst.status = status == null ? null : status.copy(); 1153 dst.manufacturer = manufacturer == null ? null : manufacturer.copy(); 1154 dst.model = model == null ? null : model.copy(); 1155 dst.version = version == null ? null : version.copy(); 1156 dst.manufactureDate = manufactureDate == null ? null : manufactureDate.copy(); 1157 dst.expiry = expiry == null ? null : expiry.copy(); 1158 dst.udi = udi == null ? null : udi.copy(); 1159 dst.lotNumber = lotNumber == null ? null : lotNumber.copy(); 1160 dst.owner = owner == null ? null : owner.copy(); 1161 dst.location = location == null ? null : location.copy(); 1162 dst.patient = patient == null ? null : patient.copy(); 1163 if (contact != null) { 1164 dst.contact = new ArrayList<ContactPoint>(); 1165 for (ContactPoint i : contact) 1166 dst.contact.add(i.copy()); 1167 }; 1168 dst.url = url == null ? null : url.copy(); 1169 return dst; 1170 } 1171 1172 protected Device typedCopy() { 1173 return copy(); 1174 } 1175 1176 @Override 1177 public boolean equalsDeep(Base other) { 1178 if (!super.equalsDeep(other)) 1179 return false; 1180 if (!(other instanceof Device)) 1181 return false; 1182 Device o = (Device) other; 1183 return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(note, o.note, true) 1184 && compareDeep(status, o.status, true) && compareDeep(manufacturer, o.manufacturer, true) && compareDeep(model, o.model, true) 1185 && compareDeep(version, o.version, true) && compareDeep(manufactureDate, o.manufactureDate, true) 1186 && compareDeep(expiry, o.expiry, true) && compareDeep(udi, o.udi, true) && compareDeep(lotNumber, o.lotNumber, true) 1187 && compareDeep(owner, o.owner, true) && compareDeep(location, o.location, true) && compareDeep(patient, o.patient, true) 1188 && compareDeep(contact, o.contact, true) && compareDeep(url, o.url, true); 1189 } 1190 1191 @Override 1192 public boolean equalsShallow(Base other) { 1193 if (!super.equalsShallow(other)) 1194 return false; 1195 if (!(other instanceof Device)) 1196 return false; 1197 Device o = (Device) other; 1198 return compareValues(status, o.status, true) && compareValues(manufacturer, o.manufacturer, true) && compareValues(model, o.model, true) 1199 && compareValues(version, o.version, true) && compareValues(manufactureDate, o.manufactureDate, true) 1200 && compareValues(expiry, o.expiry, true) && compareValues(udi, o.udi, true) && compareValues(lotNumber, o.lotNumber, true) 1201 && compareValues(url, o.url, true); 1202 } 1203 1204 public boolean isEmpty() { 1205 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (type == null || type.isEmpty()) 1206 && (note == null || note.isEmpty()) && (status == null || status.isEmpty()) && (manufacturer == null || manufacturer.isEmpty()) 1207 && (model == null || model.isEmpty()) && (version == null || version.isEmpty()) && (manufactureDate == null || manufactureDate.isEmpty()) 1208 && (expiry == null || expiry.isEmpty()) && (udi == null || udi.isEmpty()) && (lotNumber == null || lotNumber.isEmpty()) 1209 && (owner == null || owner.isEmpty()) && (location == null || location.isEmpty()) && (patient == null || patient.isEmpty()) 1210 && (contact == null || contact.isEmpty()) && (url == null || url.isEmpty()); 1211 } 1212 1213 @Override 1214 public ResourceType getResourceType() { 1215 return ResourceType.Device; 1216 } 1217 1218 @SearchParamDefinition(name="identifier", path="Device.identifier", description="Instance id from manufacturer, owner, and others", type="token" ) 1219 public static final String SP_IDENTIFIER = "identifier"; 1220 @SearchParamDefinition(name="patient", path="Device.patient", description="Patient information, if the resource is affixed to a person", type="reference" ) 1221 public static final String SP_PATIENT = "patient"; 1222 @SearchParamDefinition(name="organization", path="Device.owner", description="The organization responsible for the device", type="reference" ) 1223 public static final String SP_ORGANIZATION = "organization"; 1224 @SearchParamDefinition(name="model", path="Device.model", description="The model of the device", type="string" ) 1225 public static final String SP_MODEL = "model"; 1226 @SearchParamDefinition(name="location", path="Device.location", description="A location, where the resource is found", type="reference" ) 1227 public static final String SP_LOCATION = "location"; 1228 @SearchParamDefinition(name="udi", path="Device.udi", description="FDA mandated Unique Device Identifier", type="string" ) 1229 public static final String SP_UDI = "udi"; 1230 @SearchParamDefinition(name="type", path="Device.type", description="The type of the device", type="token" ) 1231 public static final String SP_TYPE = "type"; 1232 @SearchParamDefinition(name="url", path="Device.url", description="Network address to contact device", type="uri" ) 1233 public static final String SP_URL = "url"; 1234 @SearchParamDefinition(name="manufacturer", path="Device.manufacturer", description="The manufacturer of the device", type="string" ) 1235 public static final String SP_MANUFACTURER = "manufacturer"; 1236 1237}