001package org.hl7.fhir.dstu2.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 Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2 033import java.util.ArrayList; 034import java.util.Date; 035import java.util.List; 036 037import ca.uhn.fhir.model.api.annotation.Block; 038import ca.uhn.fhir.model.api.annotation.Child; 039import ca.uhn.fhir.model.api.annotation.Description; 040import ca.uhn.fhir.model.api.annotation.ResourceDef; 041import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 042import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 043import org.hl7.fhir.exceptions.FHIRException; 044import org.hl7.fhir.utilities.Utilities; 045 046/** 047 * Describes the characteristics, operational status and capabilities of a 048 * medical-related component of a medical device. 049 */ 050@ResourceDef(name = "DeviceComponent", profile = "http://hl7.org/fhir/Profile/DeviceComponent") 051public class DeviceComponent extends DomainResource { 052 053 public enum MeasmntPrinciple { 054 /** 055 * Measurement principle isn't in the list. 056 */ 057 OTHER, 058 /** 059 * Measurement is done using the chemical principle. 060 */ 061 CHEMICAL, 062 /** 063 * Measurement is done using the electrical principle. 064 */ 065 ELECTRICAL, 066 /** 067 * Measurement is done using the impedance principle. 068 */ 069 IMPEDANCE, 070 /** 071 * Measurement is done using the nuclear principle. 072 */ 073 NUCLEAR, 074 /** 075 * Measurement is done using the optical principle. 076 */ 077 OPTICAL, 078 /** 079 * Measurement is done using the thermal principle. 080 */ 081 THERMAL, 082 /** 083 * Measurement is done using the biological principle. 084 */ 085 BIOLOGICAL, 086 /** 087 * Measurement is done using the mechanical principle. 088 */ 089 MECHANICAL, 090 /** 091 * Measurement is done using the acoustical principle. 092 */ 093 ACOUSTICAL, 094 /** 095 * Measurement is done using the manual principle. 096 */ 097 MANUAL, 098 /** 099 * added to help the parsers 100 */ 101 NULL; 102 103 public static MeasmntPrinciple fromCode(String codeString) throws FHIRException { 104 if (codeString == null || "".equals(codeString)) 105 return null; 106 if ("other".equals(codeString)) 107 return OTHER; 108 if ("chemical".equals(codeString)) 109 return CHEMICAL; 110 if ("electrical".equals(codeString)) 111 return ELECTRICAL; 112 if ("impedance".equals(codeString)) 113 return IMPEDANCE; 114 if ("nuclear".equals(codeString)) 115 return NUCLEAR; 116 if ("optical".equals(codeString)) 117 return OPTICAL; 118 if ("thermal".equals(codeString)) 119 return THERMAL; 120 if ("biological".equals(codeString)) 121 return BIOLOGICAL; 122 if ("mechanical".equals(codeString)) 123 return MECHANICAL; 124 if ("acoustical".equals(codeString)) 125 return ACOUSTICAL; 126 if ("manual".equals(codeString)) 127 return MANUAL; 128 throw new FHIRException("Unknown MeasmntPrinciple code '" + codeString + "'"); 129 } 130 131 public String toCode() { 132 switch (this) { 133 case OTHER: 134 return "other"; 135 case CHEMICAL: 136 return "chemical"; 137 case ELECTRICAL: 138 return "electrical"; 139 case IMPEDANCE: 140 return "impedance"; 141 case NUCLEAR: 142 return "nuclear"; 143 case OPTICAL: 144 return "optical"; 145 case THERMAL: 146 return "thermal"; 147 case BIOLOGICAL: 148 return "biological"; 149 case MECHANICAL: 150 return "mechanical"; 151 case ACOUSTICAL: 152 return "acoustical"; 153 case MANUAL: 154 return "manual"; 155 case NULL: 156 return null; 157 default: 158 return "?"; 159 } 160 } 161 162 public String getSystem() { 163 switch (this) { 164 case OTHER: 165 return "http://hl7.org/fhir/measurement-principle"; 166 case CHEMICAL: 167 return "http://hl7.org/fhir/measurement-principle"; 168 case ELECTRICAL: 169 return "http://hl7.org/fhir/measurement-principle"; 170 case IMPEDANCE: 171 return "http://hl7.org/fhir/measurement-principle"; 172 case NUCLEAR: 173 return "http://hl7.org/fhir/measurement-principle"; 174 case OPTICAL: 175 return "http://hl7.org/fhir/measurement-principle"; 176 case THERMAL: 177 return "http://hl7.org/fhir/measurement-principle"; 178 case BIOLOGICAL: 179 return "http://hl7.org/fhir/measurement-principle"; 180 case MECHANICAL: 181 return "http://hl7.org/fhir/measurement-principle"; 182 case ACOUSTICAL: 183 return "http://hl7.org/fhir/measurement-principle"; 184 case MANUAL: 185 return "http://hl7.org/fhir/measurement-principle"; 186 case NULL: 187 return null; 188 default: 189 return "?"; 190 } 191 } 192 193 public String getDefinition() { 194 switch (this) { 195 case OTHER: 196 return "Measurement principle isn't in the list."; 197 case CHEMICAL: 198 return "Measurement is done using the chemical principle."; 199 case ELECTRICAL: 200 return "Measurement is done using the electrical principle."; 201 case IMPEDANCE: 202 return "Measurement is done using the impedance principle."; 203 case NUCLEAR: 204 return "Measurement is done using the nuclear principle."; 205 case OPTICAL: 206 return "Measurement is done using the optical principle."; 207 case THERMAL: 208 return "Measurement is done using the thermal principle."; 209 case BIOLOGICAL: 210 return "Measurement is done using the biological principle."; 211 case MECHANICAL: 212 return "Measurement is done using the mechanical principle."; 213 case ACOUSTICAL: 214 return "Measurement is done using the acoustical principle."; 215 case MANUAL: 216 return "Measurement is done using the manual principle."; 217 case NULL: 218 return null; 219 default: 220 return "?"; 221 } 222 } 223 224 public String getDisplay() { 225 switch (this) { 226 case OTHER: 227 return "MSP Other"; 228 case CHEMICAL: 229 return "MSP Chemical"; 230 case ELECTRICAL: 231 return "MSP Electrical"; 232 case IMPEDANCE: 233 return "MSP Impedance"; 234 case NUCLEAR: 235 return "MSP Nuclear"; 236 case OPTICAL: 237 return "MSP Optical"; 238 case THERMAL: 239 return "MSP Thermal"; 240 case BIOLOGICAL: 241 return "MSP Biological"; 242 case MECHANICAL: 243 return "MSP Mechanical"; 244 case ACOUSTICAL: 245 return "MSP Acoustical"; 246 case MANUAL: 247 return "MSP Manual"; 248 case NULL: 249 return null; 250 default: 251 return "?"; 252 } 253 } 254 } 255 256 public static class MeasmntPrincipleEnumFactory implements EnumFactory<MeasmntPrinciple> { 257 public MeasmntPrinciple fromCode(String codeString) throws IllegalArgumentException { 258 if (codeString == null || "".equals(codeString)) 259 if (codeString == null || "".equals(codeString)) 260 return null; 261 if ("other".equals(codeString)) 262 return MeasmntPrinciple.OTHER; 263 if ("chemical".equals(codeString)) 264 return MeasmntPrinciple.CHEMICAL; 265 if ("electrical".equals(codeString)) 266 return MeasmntPrinciple.ELECTRICAL; 267 if ("impedance".equals(codeString)) 268 return MeasmntPrinciple.IMPEDANCE; 269 if ("nuclear".equals(codeString)) 270 return MeasmntPrinciple.NUCLEAR; 271 if ("optical".equals(codeString)) 272 return MeasmntPrinciple.OPTICAL; 273 if ("thermal".equals(codeString)) 274 return MeasmntPrinciple.THERMAL; 275 if ("biological".equals(codeString)) 276 return MeasmntPrinciple.BIOLOGICAL; 277 if ("mechanical".equals(codeString)) 278 return MeasmntPrinciple.MECHANICAL; 279 if ("acoustical".equals(codeString)) 280 return MeasmntPrinciple.ACOUSTICAL; 281 if ("manual".equals(codeString)) 282 return MeasmntPrinciple.MANUAL; 283 throw new IllegalArgumentException("Unknown MeasmntPrinciple code '" + codeString + "'"); 284 } 285 286 public Enumeration<MeasmntPrinciple> fromType(Base code) throws FHIRException { 287 if (code == null || code.isEmpty()) 288 return null; 289 String codeString = ((PrimitiveType) code).asStringValue(); 290 if (codeString == null || "".equals(codeString)) 291 return null; 292 if ("other".equals(codeString)) 293 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.OTHER); 294 if ("chemical".equals(codeString)) 295 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.CHEMICAL); 296 if ("electrical".equals(codeString)) 297 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.ELECTRICAL); 298 if ("impedance".equals(codeString)) 299 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.IMPEDANCE); 300 if ("nuclear".equals(codeString)) 301 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.NUCLEAR); 302 if ("optical".equals(codeString)) 303 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.OPTICAL); 304 if ("thermal".equals(codeString)) 305 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.THERMAL); 306 if ("biological".equals(codeString)) 307 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.BIOLOGICAL); 308 if ("mechanical".equals(codeString)) 309 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.MECHANICAL); 310 if ("acoustical".equals(codeString)) 311 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.ACOUSTICAL); 312 if ("manual".equals(codeString)) 313 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.MANUAL); 314 throw new FHIRException("Unknown MeasmntPrinciple code '" + codeString + "'"); 315 } 316 317 public String toCode(MeasmntPrinciple code) { 318 if (code == MeasmntPrinciple.OTHER) 319 return "other"; 320 if (code == MeasmntPrinciple.CHEMICAL) 321 return "chemical"; 322 if (code == MeasmntPrinciple.ELECTRICAL) 323 return "electrical"; 324 if (code == MeasmntPrinciple.IMPEDANCE) 325 return "impedance"; 326 if (code == MeasmntPrinciple.NUCLEAR) 327 return "nuclear"; 328 if (code == MeasmntPrinciple.OPTICAL) 329 return "optical"; 330 if (code == MeasmntPrinciple.THERMAL) 331 return "thermal"; 332 if (code == MeasmntPrinciple.BIOLOGICAL) 333 return "biological"; 334 if (code == MeasmntPrinciple.MECHANICAL) 335 return "mechanical"; 336 if (code == MeasmntPrinciple.ACOUSTICAL) 337 return "acoustical"; 338 if (code == MeasmntPrinciple.MANUAL) 339 return "manual"; 340 return "?"; 341 } 342 } 343 344 @Block() 345 public static class DeviceComponentProductionSpecificationComponent extends BackboneElement 346 implements IBaseBackboneElement { 347 /** 348 * Describes the specification type, such as, serial number, part number, 349 * hardware revision, software revision, etc. 350 */ 351 @Child(name = "specType", type = { 352 CodeableConcept.class }, order = 1, min = 0, max = 1, modifier = false, summary = true) 353 @Description(shortDefinition = "Specification type", formalDefinition = "Describes the specification type, such as, serial number, part number, hardware revision, software revision, etc.") 354 protected CodeableConcept specType; 355 356 /** 357 * Describes the internal component unique identification. This is a provision 358 * for manufacture specific standard components using a private OID. 11073-10101 359 * has a partition for private OID semantic that the manufacture can make use 360 * of. 361 */ 362 @Child(name = "componentId", type = { 363 Identifier.class }, order = 2, min = 0, max = 1, modifier = false, summary = true) 364 @Description(shortDefinition = "Internal component unique identification", formalDefinition = "Describes the internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacture can make use of.") 365 protected Identifier componentId; 366 367 /** 368 * Describes the printable string defining the component. 369 */ 370 @Child(name = "productionSpec", type = { 371 StringType.class }, order = 3, min = 0, max = 1, modifier = false, summary = true) 372 @Description(shortDefinition = "A printable string defining the component", formalDefinition = "Describes the printable string defining the component.") 373 protected StringType productionSpec; 374 375 private static final long serialVersionUID = -1476597516L; 376 377 /* 378 * Constructor 379 */ 380 public DeviceComponentProductionSpecificationComponent() { 381 super(); 382 } 383 384 /** 385 * @return {@link #specType} (Describes the specification type, such as, serial 386 * number, part number, hardware revision, software revision, etc.) 387 */ 388 public CodeableConcept getSpecType() { 389 if (this.specType == null) 390 if (Configuration.errorOnAutoCreate()) 391 throw new Error("Attempt to auto-create DeviceComponentProductionSpecificationComponent.specType"); 392 else if (Configuration.doAutoCreate()) 393 this.specType = new CodeableConcept(); // cc 394 return this.specType; 395 } 396 397 public boolean hasSpecType() { 398 return this.specType != null && !this.specType.isEmpty(); 399 } 400 401 /** 402 * @param value {@link #specType} (Describes the specification type, such as, 403 * serial number, part number, hardware revision, software 404 * revision, etc.) 405 */ 406 public DeviceComponentProductionSpecificationComponent setSpecType(CodeableConcept value) { 407 this.specType = value; 408 return this; 409 } 410 411 /** 412 * @return {@link #componentId} (Describes the internal component unique 413 * identification. This is a provision for manufacture specific standard 414 * components using a private OID. 11073-10101 has a partition for 415 * private OID semantic that the manufacture can make use of.) 416 */ 417 public Identifier getComponentId() { 418 if (this.componentId == null) 419 if (Configuration.errorOnAutoCreate()) 420 throw new Error("Attempt to auto-create DeviceComponentProductionSpecificationComponent.componentId"); 421 else if (Configuration.doAutoCreate()) 422 this.componentId = new Identifier(); // cc 423 return this.componentId; 424 } 425 426 public boolean hasComponentId() { 427 return this.componentId != null && !this.componentId.isEmpty(); 428 } 429 430 /** 431 * @param value {@link #componentId} (Describes the internal component unique 432 * identification. This is a provision for manufacture specific 433 * standard components using a private OID. 11073-10101 has a 434 * partition for private OID semantic that the manufacture can make 435 * use of.) 436 */ 437 public DeviceComponentProductionSpecificationComponent setComponentId(Identifier value) { 438 this.componentId = value; 439 return this; 440 } 441 442 /** 443 * @return {@link #productionSpec} (Describes the printable string defining the 444 * component.). This is the underlying object with id, value and 445 * extensions. The accessor "getProductionSpec" gives direct access to 446 * the value 447 */ 448 public StringType getProductionSpecElement() { 449 if (this.productionSpec == null) 450 if (Configuration.errorOnAutoCreate()) 451 throw new Error("Attempt to auto-create DeviceComponentProductionSpecificationComponent.productionSpec"); 452 else if (Configuration.doAutoCreate()) 453 this.productionSpec = new StringType(); // bb 454 return this.productionSpec; 455 } 456 457 public boolean hasProductionSpecElement() { 458 return this.productionSpec != null && !this.productionSpec.isEmpty(); 459 } 460 461 public boolean hasProductionSpec() { 462 return this.productionSpec != null && !this.productionSpec.isEmpty(); 463 } 464 465 /** 466 * @param value {@link #productionSpec} (Describes the printable string defining 467 * the component.). This is the underlying object with id, value 468 * and extensions. The accessor "getProductionSpec" gives direct 469 * access to the value 470 */ 471 public DeviceComponentProductionSpecificationComponent setProductionSpecElement(StringType value) { 472 this.productionSpec = value; 473 return this; 474 } 475 476 /** 477 * @return Describes the printable string defining the component. 478 */ 479 public String getProductionSpec() { 480 return this.productionSpec == null ? null : this.productionSpec.getValue(); 481 } 482 483 /** 484 * @param value Describes the printable string defining the component. 485 */ 486 public DeviceComponentProductionSpecificationComponent setProductionSpec(String value) { 487 if (Utilities.noString(value)) 488 this.productionSpec = null; 489 else { 490 if (this.productionSpec == null) 491 this.productionSpec = new StringType(); 492 this.productionSpec.setValue(value); 493 } 494 return this; 495 } 496 497 protected void listChildren(List<Property> childrenList) { 498 super.listChildren(childrenList); 499 childrenList.add(new Property("specType", "CodeableConcept", 500 "Describes the specification type, such as, serial number, part number, hardware revision, software revision, etc.", 501 0, java.lang.Integer.MAX_VALUE, specType)); 502 childrenList.add(new Property("componentId", "Identifier", 503 "Describes the internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacture can make use of.", 504 0, java.lang.Integer.MAX_VALUE, componentId)); 505 childrenList.add(new Property("productionSpec", "string", 506 "Describes the printable string defining the component.", 0, java.lang.Integer.MAX_VALUE, productionSpec)); 507 } 508 509 @Override 510 public void setProperty(String name, Base value) throws FHIRException { 511 if (name.equals("specType")) 512 this.specType = castToCodeableConcept(value); // CodeableConcept 513 else if (name.equals("componentId")) 514 this.componentId = castToIdentifier(value); // Identifier 515 else if (name.equals("productionSpec")) 516 this.productionSpec = castToString(value); // StringType 517 else 518 super.setProperty(name, value); 519 } 520 521 @Override 522 public Base addChild(String name) throws FHIRException { 523 if (name.equals("specType")) { 524 this.specType = new CodeableConcept(); 525 return this.specType; 526 } else if (name.equals("componentId")) { 527 this.componentId = new Identifier(); 528 return this.componentId; 529 } else if (name.equals("productionSpec")) { 530 throw new FHIRException("Cannot call addChild on a singleton property DeviceComponent.productionSpec"); 531 } else 532 return super.addChild(name); 533 } 534 535 public DeviceComponentProductionSpecificationComponent copy() { 536 DeviceComponentProductionSpecificationComponent dst = new DeviceComponentProductionSpecificationComponent(); 537 copyValues(dst); 538 dst.specType = specType == null ? null : specType.copy(); 539 dst.componentId = componentId == null ? null : componentId.copy(); 540 dst.productionSpec = productionSpec == null ? null : productionSpec.copy(); 541 return dst; 542 } 543 544 @Override 545 public boolean equalsDeep(Base other) { 546 if (!super.equalsDeep(other)) 547 return false; 548 if (!(other instanceof DeviceComponentProductionSpecificationComponent)) 549 return false; 550 DeviceComponentProductionSpecificationComponent o = (DeviceComponentProductionSpecificationComponent) other; 551 return compareDeep(specType, o.specType, true) && compareDeep(componentId, o.componentId, true) 552 && compareDeep(productionSpec, o.productionSpec, true); 553 } 554 555 @Override 556 public boolean equalsShallow(Base other) { 557 if (!super.equalsShallow(other)) 558 return false; 559 if (!(other instanceof DeviceComponentProductionSpecificationComponent)) 560 return false; 561 DeviceComponentProductionSpecificationComponent o = (DeviceComponentProductionSpecificationComponent) other; 562 return compareValues(productionSpec, o.productionSpec, true); 563 } 564 565 public boolean isEmpty() { 566 return super.isEmpty() && (specType == null || specType.isEmpty()) 567 && (componentId == null || componentId.isEmpty()) && (productionSpec == null || productionSpec.isEmpty()); 568 } 569 570 public String fhirType() { 571 return "DeviceComponent.productionSpecification"; 572 573 } 574 575 } 576 577 /** 578 * Describes the specific component type as defined in the object-oriented or 579 * metric nomenclature partition. 580 */ 581 @Child(name = "type", type = { CodeableConcept.class }, order = 0, min = 1, max = 1, modifier = false, summary = true) 582 @Description(shortDefinition = "What kind of component it is", formalDefinition = "Describes the specific component type as defined in the object-oriented or metric nomenclature partition.") 583 protected CodeableConcept type; 584 585 /** 586 * Describes the local assigned unique identification by the software. For 587 * example: handle ID. 588 */ 589 @Child(name = "identifier", type = { 590 Identifier.class }, order = 1, min = 1, max = 1, modifier = false, summary = true) 591 @Description(shortDefinition = "Instance id assigned by the software stack", formalDefinition = "Describes the local assigned unique identification by the software. For example: handle ID.") 592 protected Identifier identifier; 593 594 /** 595 * Describes the timestamp for the most recent system change which includes 596 * device configuration or setting change. 597 */ 598 @Child(name = "lastSystemChange", type = { 599 InstantType.class }, order = 2, min = 1, max = 1, modifier = false, summary = true) 600 @Description(shortDefinition = "Recent system change timestamp", formalDefinition = "Describes the timestamp for the most recent system change which includes device configuration or setting change.") 601 protected InstantType lastSystemChange; 602 603 /** 604 * Describes the link to the source Device that contains administrative device 605 * information such as manufacture, serial number, etc. 606 */ 607 @Child(name = "source", type = { Device.class }, order = 3, min = 0, max = 1, modifier = false, summary = true) 608 @Description(shortDefinition = "A source device of this component", formalDefinition = "Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc.") 609 protected Reference source; 610 611 /** 612 * The actual object that is the target of the reference (Describes the link to 613 * the source Device that contains administrative device information such as 614 * manufacture, serial number, etc.) 615 */ 616 protected Device sourceTarget; 617 618 /** 619 * Describes the link to the parent resource. For example: Channel is linked to 620 * its VMD parent. 621 */ 622 @Child(name = "parent", type = { 623 DeviceComponent.class }, order = 4, min = 0, max = 1, modifier = false, summary = true) 624 @Description(shortDefinition = "Parent resource link", formalDefinition = "Describes the link to the parent resource. For example: Channel is linked to its VMD parent.") 625 protected Reference parent; 626 627 /** 628 * The actual object that is the target of the reference (Describes the link to 629 * the parent resource. For example: Channel is linked to its VMD parent.) 630 */ 631 protected DeviceComponent parentTarget; 632 633 /** 634 * Indicates current operational status of the device. For example: On, Off, 635 * Standby, etc. 636 */ 637 @Child(name = "operationalStatus", type = { 638 CodeableConcept.class }, order = 5, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 639 @Description(shortDefinition = "Component operational status", formalDefinition = "Indicates current operational status of the device. For example: On, Off, Standby, etc.") 640 protected List<CodeableConcept> operationalStatus; 641 642 /** 643 * Describes the parameter group supported by the current device component that 644 * is based on some nomenclature, e.g. cardiovascular. 645 */ 646 @Child(name = "parameterGroup", type = { 647 CodeableConcept.class }, order = 6, min = 0, max = 1, modifier = false, summary = true) 648 @Description(shortDefinition = "Current supported parameter group", formalDefinition = "Describes the parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.") 649 protected CodeableConcept parameterGroup; 650 651 /** 652 * Describes the physical principle of the measurement. For example: thermal, 653 * chemical, acoustical, etc. 654 */ 655 @Child(name = "measurementPrinciple", type = { 656 CodeType.class }, order = 7, min = 0, max = 1, modifier = false, summary = true) 657 @Description(shortDefinition = "other | chemical | electrical | impedance | nuclear | optical | thermal | biological | mechanical | acoustical | manual+", formalDefinition = "Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc.") 658 protected Enumeration<MeasmntPrinciple> measurementPrinciple; 659 660 /** 661 * Describes the production specification such as component revision, serial 662 * number, etc. 663 */ 664 @Child(name = "productionSpecification", type = {}, order = 8, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 665 @Description(shortDefinition = "Production specification of the component", formalDefinition = "Describes the production specification such as component revision, serial number, etc.") 666 protected List<DeviceComponentProductionSpecificationComponent> productionSpecification; 667 668 /** 669 * Describes the language code for the human-readable text string produced by 670 * the device. This language code will follow the IETF language tag. Example: 671 * en-US. 672 */ 673 @Child(name = "languageCode", type = { 674 CodeableConcept.class }, order = 9, min = 0, max = 1, modifier = false, summary = true) 675 @Description(shortDefinition = "Language code for the human-readable text strings produced by the device", formalDefinition = "Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.") 676 protected CodeableConcept languageCode; 677 678 private static final long serialVersionUID = -1742890034L; 679 680 /* 681 * Constructor 682 */ 683 public DeviceComponent() { 684 super(); 685 } 686 687 /* 688 * Constructor 689 */ 690 public DeviceComponent(CodeableConcept type, Identifier identifier, InstantType lastSystemChange) { 691 super(); 692 this.type = type; 693 this.identifier = identifier; 694 this.lastSystemChange = lastSystemChange; 695 } 696 697 /** 698 * @return {@link #type} (Describes the specific component type as defined in 699 * the object-oriented or metric nomenclature partition.) 700 */ 701 public CodeableConcept getType() { 702 if (this.type == null) 703 if (Configuration.errorOnAutoCreate()) 704 throw new Error("Attempt to auto-create DeviceComponent.type"); 705 else if (Configuration.doAutoCreate()) 706 this.type = new CodeableConcept(); // cc 707 return this.type; 708 } 709 710 public boolean hasType() { 711 return this.type != null && !this.type.isEmpty(); 712 } 713 714 /** 715 * @param value {@link #type} (Describes the specific component type as defined 716 * in the object-oriented or metric nomenclature partition.) 717 */ 718 public DeviceComponent setType(CodeableConcept value) { 719 this.type = value; 720 return this; 721 } 722 723 /** 724 * @return {@link #identifier} (Describes the local assigned unique 725 * identification by the software. For example: handle ID.) 726 */ 727 public Identifier getIdentifier() { 728 if (this.identifier == null) 729 if (Configuration.errorOnAutoCreate()) 730 throw new Error("Attempt to auto-create DeviceComponent.identifier"); 731 else if (Configuration.doAutoCreate()) 732 this.identifier = new Identifier(); // cc 733 return this.identifier; 734 } 735 736 public boolean hasIdentifier() { 737 return this.identifier != null && !this.identifier.isEmpty(); 738 } 739 740 /** 741 * @param value {@link #identifier} (Describes the local assigned unique 742 * identification by the software. For example: handle ID.) 743 */ 744 public DeviceComponent setIdentifier(Identifier value) { 745 this.identifier = value; 746 return this; 747 } 748 749 /** 750 * @return {@link #lastSystemChange} (Describes the timestamp for the most 751 * recent system change which includes device configuration or setting 752 * change.). This is the underlying object with id, value and 753 * extensions. The accessor "getLastSystemChange" gives direct access to 754 * the value 755 */ 756 public InstantType getLastSystemChangeElement() { 757 if (this.lastSystemChange == null) 758 if (Configuration.errorOnAutoCreate()) 759 throw new Error("Attempt to auto-create DeviceComponent.lastSystemChange"); 760 else if (Configuration.doAutoCreate()) 761 this.lastSystemChange = new InstantType(); // bb 762 return this.lastSystemChange; 763 } 764 765 public boolean hasLastSystemChangeElement() { 766 return this.lastSystemChange != null && !this.lastSystemChange.isEmpty(); 767 } 768 769 public boolean hasLastSystemChange() { 770 return this.lastSystemChange != null && !this.lastSystemChange.isEmpty(); 771 } 772 773 /** 774 * @param value {@link #lastSystemChange} (Describes the timestamp for the most 775 * recent system change which includes device configuration or 776 * setting change.). This is the underlying object with id, value 777 * and extensions. The accessor "getLastSystemChange" gives direct 778 * access to the value 779 */ 780 public DeviceComponent setLastSystemChangeElement(InstantType value) { 781 this.lastSystemChange = value; 782 return this; 783 } 784 785 /** 786 * @return Describes the timestamp for the most recent system change which 787 * includes device configuration or setting change. 788 */ 789 public Date getLastSystemChange() { 790 return this.lastSystemChange == null ? null : this.lastSystemChange.getValue(); 791 } 792 793 /** 794 * @param value Describes the timestamp for the most recent system change which 795 * includes device configuration or setting change. 796 */ 797 public DeviceComponent setLastSystemChange(Date value) { 798 if (this.lastSystemChange == null) 799 this.lastSystemChange = new InstantType(); 800 this.lastSystemChange.setValue(value); 801 return this; 802 } 803 804 /** 805 * @return {@link #source} (Describes the link to the source Device that 806 * contains administrative device information such as manufacture, 807 * serial number, etc.) 808 */ 809 public Reference getSource() { 810 if (this.source == null) 811 if (Configuration.errorOnAutoCreate()) 812 throw new Error("Attempt to auto-create DeviceComponent.source"); 813 else if (Configuration.doAutoCreate()) 814 this.source = new Reference(); // cc 815 return this.source; 816 } 817 818 public boolean hasSource() { 819 return this.source != null && !this.source.isEmpty(); 820 } 821 822 /** 823 * @param value {@link #source} (Describes the link to the source Device that 824 * contains administrative device information such as manufacture, 825 * serial number, etc.) 826 */ 827 public DeviceComponent setSource(Reference value) { 828 this.source = value; 829 return this; 830 } 831 832 /** 833 * @return {@link #source} The actual object that is the target of the 834 * reference. The reference library doesn't populate this, but you can 835 * use it to hold the resource if you resolve it. (Describes the link to 836 * the source Device that contains administrative device information 837 * such as manufacture, serial number, etc.) 838 */ 839 public Device getSourceTarget() { 840 if (this.sourceTarget == null) 841 if (Configuration.errorOnAutoCreate()) 842 throw new Error("Attempt to auto-create DeviceComponent.source"); 843 else if (Configuration.doAutoCreate()) 844 this.sourceTarget = new Device(); // aa 845 return this.sourceTarget; 846 } 847 848 /** 849 * @param value {@link #source} The actual object that is the target of the 850 * reference. The reference library doesn't use these, but you can 851 * use it to hold the resource if you resolve it. (Describes the 852 * link to the source Device that contains administrative device 853 * information such as manufacture, serial number, etc.) 854 */ 855 public DeviceComponent setSourceTarget(Device value) { 856 this.sourceTarget = value; 857 return this; 858 } 859 860 /** 861 * @return {@link #parent} (Describes the link to the parent resource. For 862 * example: Channel is linked to its VMD parent.) 863 */ 864 public Reference getParent() { 865 if (this.parent == null) 866 if (Configuration.errorOnAutoCreate()) 867 throw new Error("Attempt to auto-create DeviceComponent.parent"); 868 else if (Configuration.doAutoCreate()) 869 this.parent = new Reference(); // cc 870 return this.parent; 871 } 872 873 public boolean hasParent() { 874 return this.parent != null && !this.parent.isEmpty(); 875 } 876 877 /** 878 * @param value {@link #parent} (Describes the link to the parent resource. For 879 * example: Channel is linked to its VMD parent.) 880 */ 881 public DeviceComponent setParent(Reference value) { 882 this.parent = value; 883 return this; 884 } 885 886 /** 887 * @return {@link #parent} The actual object that is the target of the 888 * reference. The reference library doesn't populate this, but you can 889 * use it to hold the resource if you resolve it. (Describes the link to 890 * the parent resource. For example: Channel is linked to its VMD 891 * parent.) 892 */ 893 public DeviceComponent getParentTarget() { 894 if (this.parentTarget == null) 895 if (Configuration.errorOnAutoCreate()) 896 throw new Error("Attempt to auto-create DeviceComponent.parent"); 897 else if (Configuration.doAutoCreate()) 898 this.parentTarget = new DeviceComponent(); // aa 899 return this.parentTarget; 900 } 901 902 /** 903 * @param value {@link #parent} The actual object that is the target of the 904 * reference. The reference library doesn't use these, but you can 905 * use it to hold the resource if you resolve it. (Describes the 906 * link to the parent resource. For example: Channel is linked to 907 * its VMD parent.) 908 */ 909 public DeviceComponent setParentTarget(DeviceComponent value) { 910 this.parentTarget = value; 911 return this; 912 } 913 914 /** 915 * @return {@link #operationalStatus} (Indicates current operational status of 916 * the device. For example: On, Off, Standby, etc.) 917 */ 918 public List<CodeableConcept> getOperationalStatus() { 919 if (this.operationalStatus == null) 920 this.operationalStatus = new ArrayList<CodeableConcept>(); 921 return this.operationalStatus; 922 } 923 924 public boolean hasOperationalStatus() { 925 if (this.operationalStatus == null) 926 return false; 927 for (CodeableConcept item : this.operationalStatus) 928 if (!item.isEmpty()) 929 return true; 930 return false; 931 } 932 933 /** 934 * @return {@link #operationalStatus} (Indicates current operational status of 935 * the device. For example: On, Off, Standby, etc.) 936 */ 937 // syntactic sugar 938 public CodeableConcept addOperationalStatus() { // 3 939 CodeableConcept t = new CodeableConcept(); 940 if (this.operationalStatus == null) 941 this.operationalStatus = new ArrayList<CodeableConcept>(); 942 this.operationalStatus.add(t); 943 return t; 944 } 945 946 // syntactic sugar 947 public DeviceComponent addOperationalStatus(CodeableConcept t) { // 3 948 if (t == null) 949 return this; 950 if (this.operationalStatus == null) 951 this.operationalStatus = new ArrayList<CodeableConcept>(); 952 this.operationalStatus.add(t); 953 return this; 954 } 955 956 /** 957 * @return {@link #parameterGroup} (Describes the parameter group supported by 958 * the current device component that is based on some nomenclature, e.g. 959 * cardiovascular.) 960 */ 961 public CodeableConcept getParameterGroup() { 962 if (this.parameterGroup == null) 963 if (Configuration.errorOnAutoCreate()) 964 throw new Error("Attempt to auto-create DeviceComponent.parameterGroup"); 965 else if (Configuration.doAutoCreate()) 966 this.parameterGroup = new CodeableConcept(); // cc 967 return this.parameterGroup; 968 } 969 970 public boolean hasParameterGroup() { 971 return this.parameterGroup != null && !this.parameterGroup.isEmpty(); 972 } 973 974 /** 975 * @param value {@link #parameterGroup} (Describes the parameter group supported 976 * by the current device component that is based on some 977 * nomenclature, e.g. cardiovascular.) 978 */ 979 public DeviceComponent setParameterGroup(CodeableConcept value) { 980 this.parameterGroup = value; 981 return this; 982 } 983 984 /** 985 * @return {@link #measurementPrinciple} (Describes the physical principle of 986 * the measurement. For example: thermal, chemical, acoustical, etc.). 987 * This is the underlying object with id, value and extensions. The 988 * accessor "getMeasurementPrinciple" gives direct access to the value 989 */ 990 public Enumeration<MeasmntPrinciple> getMeasurementPrincipleElement() { 991 if (this.measurementPrinciple == null) 992 if (Configuration.errorOnAutoCreate()) 993 throw new Error("Attempt to auto-create DeviceComponent.measurementPrinciple"); 994 else if (Configuration.doAutoCreate()) 995 this.measurementPrinciple = new Enumeration<MeasmntPrinciple>(new MeasmntPrincipleEnumFactory()); // bb 996 return this.measurementPrinciple; 997 } 998 999 public boolean hasMeasurementPrincipleElement() { 1000 return this.measurementPrinciple != null && !this.measurementPrinciple.isEmpty(); 1001 } 1002 1003 public boolean hasMeasurementPrinciple() { 1004 return this.measurementPrinciple != null && !this.measurementPrinciple.isEmpty(); 1005 } 1006 1007 /** 1008 * @param value {@link #measurementPrinciple} (Describes the physical principle 1009 * of the measurement. For example: thermal, chemical, acoustical, 1010 * etc.). This is the underlying object with id, value and 1011 * extensions. The accessor "getMeasurementPrinciple" gives direct 1012 * access to the value 1013 */ 1014 public DeviceComponent setMeasurementPrincipleElement(Enumeration<MeasmntPrinciple> value) { 1015 this.measurementPrinciple = value; 1016 return this; 1017 } 1018 1019 /** 1020 * @return Describes the physical principle of the measurement. For example: 1021 * thermal, chemical, acoustical, etc. 1022 */ 1023 public MeasmntPrinciple getMeasurementPrinciple() { 1024 return this.measurementPrinciple == null ? null : this.measurementPrinciple.getValue(); 1025 } 1026 1027 /** 1028 * @param value Describes the physical principle of the measurement. For 1029 * example: thermal, chemical, acoustical, etc. 1030 */ 1031 public DeviceComponent setMeasurementPrinciple(MeasmntPrinciple value) { 1032 if (value == null) 1033 this.measurementPrinciple = null; 1034 else { 1035 if (this.measurementPrinciple == null) 1036 this.measurementPrinciple = new Enumeration<MeasmntPrinciple>(new MeasmntPrincipleEnumFactory()); 1037 this.measurementPrinciple.setValue(value); 1038 } 1039 return this; 1040 } 1041 1042 /** 1043 * @return {@link #productionSpecification} (Describes the production 1044 * specification such as component revision, serial number, etc.) 1045 */ 1046 public List<DeviceComponentProductionSpecificationComponent> getProductionSpecification() { 1047 if (this.productionSpecification == null) 1048 this.productionSpecification = new ArrayList<DeviceComponentProductionSpecificationComponent>(); 1049 return this.productionSpecification; 1050 } 1051 1052 public boolean hasProductionSpecification() { 1053 if (this.productionSpecification == null) 1054 return false; 1055 for (DeviceComponentProductionSpecificationComponent item : this.productionSpecification) 1056 if (!item.isEmpty()) 1057 return true; 1058 return false; 1059 } 1060 1061 /** 1062 * @return {@link #productionSpecification} (Describes the production 1063 * specification such as component revision, serial number, etc.) 1064 */ 1065 // syntactic sugar 1066 public DeviceComponentProductionSpecificationComponent addProductionSpecification() { // 3 1067 DeviceComponentProductionSpecificationComponent t = new DeviceComponentProductionSpecificationComponent(); 1068 if (this.productionSpecification == null) 1069 this.productionSpecification = new ArrayList<DeviceComponentProductionSpecificationComponent>(); 1070 this.productionSpecification.add(t); 1071 return t; 1072 } 1073 1074 // syntactic sugar 1075 public DeviceComponent addProductionSpecification(DeviceComponentProductionSpecificationComponent t) { // 3 1076 if (t == null) 1077 return this; 1078 if (this.productionSpecification == null) 1079 this.productionSpecification = new ArrayList<DeviceComponentProductionSpecificationComponent>(); 1080 this.productionSpecification.add(t); 1081 return this; 1082 } 1083 1084 /** 1085 * @return {@link #languageCode} (Describes the language code for the 1086 * human-readable text string produced by the device. This language code 1087 * will follow the IETF language tag. Example: en-US.) 1088 */ 1089 public CodeableConcept getLanguageCode() { 1090 if (this.languageCode == null) 1091 if (Configuration.errorOnAutoCreate()) 1092 throw new Error("Attempt to auto-create DeviceComponent.languageCode"); 1093 else if (Configuration.doAutoCreate()) 1094 this.languageCode = new CodeableConcept(); // cc 1095 return this.languageCode; 1096 } 1097 1098 public boolean hasLanguageCode() { 1099 return this.languageCode != null && !this.languageCode.isEmpty(); 1100 } 1101 1102 /** 1103 * @param value {@link #languageCode} (Describes the language code for the 1104 * human-readable text string produced by the device. This language 1105 * code will follow the IETF language tag. Example: en-US.) 1106 */ 1107 public DeviceComponent setLanguageCode(CodeableConcept value) { 1108 this.languageCode = value; 1109 return this; 1110 } 1111 1112 protected void listChildren(List<Property> childrenList) { 1113 super.listChildren(childrenList); 1114 childrenList.add(new Property("type", "CodeableConcept", 1115 "Describes the specific component type as defined in the object-oriented or metric nomenclature partition.", 0, 1116 java.lang.Integer.MAX_VALUE, type)); 1117 childrenList.add(new Property("identifier", "Identifier", 1118 "Describes the local assigned unique identification by the software. For example: handle ID.", 0, 1119 java.lang.Integer.MAX_VALUE, identifier)); 1120 childrenList.add(new Property("lastSystemChange", "instant", 1121 "Describes the timestamp for the most recent system change which includes device configuration or setting change.", 1122 0, java.lang.Integer.MAX_VALUE, lastSystemChange)); 1123 childrenList.add(new Property("source", "Reference(Device)", 1124 "Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc.", 1125 0, java.lang.Integer.MAX_VALUE, source)); 1126 childrenList.add(new Property("parent", "Reference(DeviceComponent)", 1127 "Describes the link to the parent resource. For example: Channel is linked to its VMD parent.", 0, 1128 java.lang.Integer.MAX_VALUE, parent)); 1129 childrenList.add(new Property("operationalStatus", "CodeableConcept", 1130 "Indicates current operational status of the device. For example: On, Off, Standby, etc.", 0, 1131 java.lang.Integer.MAX_VALUE, operationalStatus)); 1132 childrenList.add(new Property("parameterGroup", "CodeableConcept", 1133 "Describes the parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.", 1134 0, java.lang.Integer.MAX_VALUE, parameterGroup)); 1135 childrenList.add(new Property("measurementPrinciple", "code", 1136 "Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc.", 0, 1137 java.lang.Integer.MAX_VALUE, measurementPrinciple)); 1138 childrenList.add(new Property("productionSpecification", "", 1139 "Describes the production specification such as component revision, serial number, etc.", 0, 1140 java.lang.Integer.MAX_VALUE, productionSpecification)); 1141 childrenList.add(new Property("languageCode", "CodeableConcept", 1142 "Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.", 1143 0, java.lang.Integer.MAX_VALUE, languageCode)); 1144 } 1145 1146 @Override 1147 public void setProperty(String name, Base value) throws FHIRException { 1148 if (name.equals("type")) 1149 this.type = castToCodeableConcept(value); // CodeableConcept 1150 else if (name.equals("identifier")) 1151 this.identifier = castToIdentifier(value); // Identifier 1152 else if (name.equals("lastSystemChange")) 1153 this.lastSystemChange = castToInstant(value); // InstantType 1154 else if (name.equals("source")) 1155 this.source = castToReference(value); // Reference 1156 else if (name.equals("parent")) 1157 this.parent = castToReference(value); // Reference 1158 else if (name.equals("operationalStatus")) 1159 this.getOperationalStatus().add(castToCodeableConcept(value)); 1160 else if (name.equals("parameterGroup")) 1161 this.parameterGroup = castToCodeableConcept(value); // CodeableConcept 1162 else if (name.equals("measurementPrinciple")) 1163 this.measurementPrinciple = new MeasmntPrincipleEnumFactory().fromType(value); // Enumeration<MeasmntPrinciple> 1164 else if (name.equals("productionSpecification")) 1165 this.getProductionSpecification().add((DeviceComponentProductionSpecificationComponent) value); 1166 else if (name.equals("languageCode")) 1167 this.languageCode = castToCodeableConcept(value); // CodeableConcept 1168 else 1169 super.setProperty(name, value); 1170 } 1171 1172 @Override 1173 public Base addChild(String name) throws FHIRException { 1174 if (name.equals("type")) { 1175 this.type = new CodeableConcept(); 1176 return this.type; 1177 } else if (name.equals("identifier")) { 1178 this.identifier = new Identifier(); 1179 return this.identifier; 1180 } else if (name.equals("lastSystemChange")) { 1181 throw new FHIRException("Cannot call addChild on a singleton property DeviceComponent.lastSystemChange"); 1182 } else if (name.equals("source")) { 1183 this.source = new Reference(); 1184 return this.source; 1185 } else if (name.equals("parent")) { 1186 this.parent = new Reference(); 1187 return this.parent; 1188 } else if (name.equals("operationalStatus")) { 1189 return addOperationalStatus(); 1190 } else if (name.equals("parameterGroup")) { 1191 this.parameterGroup = new CodeableConcept(); 1192 return this.parameterGroup; 1193 } else if (name.equals("measurementPrinciple")) { 1194 throw new FHIRException("Cannot call addChild on a singleton property DeviceComponent.measurementPrinciple"); 1195 } else if (name.equals("productionSpecification")) { 1196 return addProductionSpecification(); 1197 } else if (name.equals("languageCode")) { 1198 this.languageCode = new CodeableConcept(); 1199 return this.languageCode; 1200 } else 1201 return super.addChild(name); 1202 } 1203 1204 public String fhirType() { 1205 return "DeviceComponent"; 1206 1207 } 1208 1209 public DeviceComponent copy() { 1210 DeviceComponent dst = new DeviceComponent(); 1211 copyValues(dst); 1212 dst.type = type == null ? null : type.copy(); 1213 dst.identifier = identifier == null ? null : identifier.copy(); 1214 dst.lastSystemChange = lastSystemChange == null ? null : lastSystemChange.copy(); 1215 dst.source = source == null ? null : source.copy(); 1216 dst.parent = parent == null ? null : parent.copy(); 1217 if (operationalStatus != null) { 1218 dst.operationalStatus = new ArrayList<CodeableConcept>(); 1219 for (CodeableConcept i : operationalStatus) 1220 dst.operationalStatus.add(i.copy()); 1221 } 1222 ; 1223 dst.parameterGroup = parameterGroup == null ? null : parameterGroup.copy(); 1224 dst.measurementPrinciple = measurementPrinciple == null ? null : measurementPrinciple.copy(); 1225 if (productionSpecification != null) { 1226 dst.productionSpecification = new ArrayList<DeviceComponentProductionSpecificationComponent>(); 1227 for (DeviceComponentProductionSpecificationComponent i : productionSpecification) 1228 dst.productionSpecification.add(i.copy()); 1229 } 1230 ; 1231 dst.languageCode = languageCode == null ? null : languageCode.copy(); 1232 return dst; 1233 } 1234 1235 protected DeviceComponent typedCopy() { 1236 return copy(); 1237 } 1238 1239 @Override 1240 public boolean equalsDeep(Base other) { 1241 if (!super.equalsDeep(other)) 1242 return false; 1243 if (!(other instanceof DeviceComponent)) 1244 return false; 1245 DeviceComponent o = (DeviceComponent) other; 1246 return compareDeep(type, o.type, true) && compareDeep(identifier, o.identifier, true) 1247 && compareDeep(lastSystemChange, o.lastSystemChange, true) && compareDeep(source, o.source, true) 1248 && compareDeep(parent, o.parent, true) && compareDeep(operationalStatus, o.operationalStatus, true) 1249 && compareDeep(parameterGroup, o.parameterGroup, true) 1250 && compareDeep(measurementPrinciple, o.measurementPrinciple, true) 1251 && compareDeep(productionSpecification, o.productionSpecification, true) 1252 && compareDeep(languageCode, o.languageCode, true); 1253 } 1254 1255 @Override 1256 public boolean equalsShallow(Base other) { 1257 if (!super.equalsShallow(other)) 1258 return false; 1259 if (!(other instanceof DeviceComponent)) 1260 return false; 1261 DeviceComponent o = (DeviceComponent) other; 1262 return compareValues(lastSystemChange, o.lastSystemChange, true) 1263 && compareValues(measurementPrinciple, o.measurementPrinciple, true); 1264 } 1265 1266 public boolean isEmpty() { 1267 return super.isEmpty() && (type == null || type.isEmpty()) && (identifier == null || identifier.isEmpty()) 1268 && (lastSystemChange == null || lastSystemChange.isEmpty()) && (source == null || source.isEmpty()) 1269 && (parent == null || parent.isEmpty()) && (operationalStatus == null || operationalStatus.isEmpty()) 1270 && (parameterGroup == null || parameterGroup.isEmpty()) 1271 && (measurementPrinciple == null || measurementPrinciple.isEmpty()) 1272 && (productionSpecification == null || productionSpecification.isEmpty()) 1273 && (languageCode == null || languageCode.isEmpty()); 1274 } 1275 1276 @Override 1277 public ResourceType getResourceType() { 1278 return ResourceType.DeviceComponent; 1279 } 1280 1281 @SearchParamDefinition(name = "parent", path = "DeviceComponent.parent", description = "The parent DeviceComponent resource", type = "reference") 1282 public static final String SP_PARENT = "parent"; 1283 @SearchParamDefinition(name = "source", path = "DeviceComponent.source", description = "The device source", type = "reference") 1284 public static final String SP_SOURCE = "source"; 1285 @SearchParamDefinition(name = "type", path = "DeviceComponent.type", description = "The device component type", type = "token") 1286 public static final String SP_TYPE = "type"; 1287 1288}