001package org.hl7.fhir.dstu3.model; 002 003 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x 035import java.util.ArrayList; 036import java.util.Date; 037import java.util.List; 038 039import org.hl7.fhir.exceptions.FHIRException; 040import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 041import org.hl7.fhir.utilities.Utilities; 042 043import ca.uhn.fhir.model.api.annotation.Block; 044import ca.uhn.fhir.model.api.annotation.Child; 045import ca.uhn.fhir.model.api.annotation.Description; 046import ca.uhn.fhir.model.api.annotation.ResourceDef; 047import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 048/** 049 * The characteristics, operational status and capabilities of a medical-related component of a medical device. 050 */ 051@ResourceDef(name="DeviceComponent", profile="http://hl7.org/fhir/Profile/DeviceComponent") 052public class DeviceComponent extends DomainResource { 053 054 public enum MeasmntPrinciple { 055 /** 056 * Measurement principle isn't in the list. 057 */ 058 OTHER, 059 /** 060 * Measurement is done using the chemical principle. 061 */ 062 CHEMICAL, 063 /** 064 * Measurement is done using the electrical principle. 065 */ 066 ELECTRICAL, 067 /** 068 * Measurement is done using the impedance principle. 069 */ 070 IMPEDANCE, 071 /** 072 * Measurement is done using the nuclear principle. 073 */ 074 NUCLEAR, 075 /** 076 * Measurement is done using the optical principle. 077 */ 078 OPTICAL, 079 /** 080 * Measurement is done using the thermal principle. 081 */ 082 THERMAL, 083 /** 084 * Measurement is done using the biological principle. 085 */ 086 BIOLOGICAL, 087 /** 088 * Measurement is done using the mechanical principle. 089 */ 090 MECHANICAL, 091 /** 092 * Measurement is done using the acoustical principle. 093 */ 094 ACOUSTICAL, 095 /** 096 * Measurement is done using the manual principle. 097 */ 098 MANUAL, 099 /** 100 * added to help the parsers with the generic types 101 */ 102 NULL; 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 if (Configuration.isAcceptInvalidEnums()) 129 return null; 130 else 131 throw new FHIRException("Unknown MeasmntPrinciple code '"+codeString+"'"); 132 } 133 public String toCode() { 134 switch (this) { 135 case OTHER: return "other"; 136 case CHEMICAL: return "chemical"; 137 case ELECTRICAL: return "electrical"; 138 case IMPEDANCE: return "impedance"; 139 case NUCLEAR: return "nuclear"; 140 case OPTICAL: return "optical"; 141 case THERMAL: return "thermal"; 142 case BIOLOGICAL: return "biological"; 143 case MECHANICAL: return "mechanical"; 144 case ACOUSTICAL: return "acoustical"; 145 case MANUAL: return "manual"; 146 case NULL: return null; 147 default: return "?"; 148 } 149 } 150 public String getSystem() { 151 switch (this) { 152 case OTHER: return "http://hl7.org/fhir/measurement-principle"; 153 case CHEMICAL: return "http://hl7.org/fhir/measurement-principle"; 154 case ELECTRICAL: return "http://hl7.org/fhir/measurement-principle"; 155 case IMPEDANCE: return "http://hl7.org/fhir/measurement-principle"; 156 case NUCLEAR: return "http://hl7.org/fhir/measurement-principle"; 157 case OPTICAL: return "http://hl7.org/fhir/measurement-principle"; 158 case THERMAL: return "http://hl7.org/fhir/measurement-principle"; 159 case BIOLOGICAL: return "http://hl7.org/fhir/measurement-principle"; 160 case MECHANICAL: return "http://hl7.org/fhir/measurement-principle"; 161 case ACOUSTICAL: return "http://hl7.org/fhir/measurement-principle"; 162 case MANUAL: return "http://hl7.org/fhir/measurement-principle"; 163 case NULL: return null; 164 default: return "?"; 165 } 166 } 167 public String getDefinition() { 168 switch (this) { 169 case OTHER: return "Measurement principle isn't in the list."; 170 case CHEMICAL: return "Measurement is done using the chemical principle."; 171 case ELECTRICAL: return "Measurement is done using the electrical principle."; 172 case IMPEDANCE: return "Measurement is done using the impedance principle."; 173 case NUCLEAR: return "Measurement is done using the nuclear principle."; 174 case OPTICAL: return "Measurement is done using the optical principle."; 175 case THERMAL: return "Measurement is done using the thermal principle."; 176 case BIOLOGICAL: return "Measurement is done using the biological principle."; 177 case MECHANICAL: return "Measurement is done using the mechanical principle."; 178 case ACOUSTICAL: return "Measurement is done using the acoustical principle."; 179 case MANUAL: return "Measurement is done using the manual principle."; 180 case NULL: return null; 181 default: return "?"; 182 } 183 } 184 public String getDisplay() { 185 switch (this) { 186 case OTHER: return "MSP Other"; 187 case CHEMICAL: return "MSP Chemical"; 188 case ELECTRICAL: return "MSP Electrical"; 189 case IMPEDANCE: return "MSP Impedance"; 190 case NUCLEAR: return "MSP Nuclear"; 191 case OPTICAL: return "MSP Optical"; 192 case THERMAL: return "MSP Thermal"; 193 case BIOLOGICAL: return "MSP Biological"; 194 case MECHANICAL: return "MSP Mechanical"; 195 case ACOUSTICAL: return "MSP Acoustical"; 196 case MANUAL: return "MSP Manual"; 197 case NULL: return null; 198 default: return "?"; 199 } 200 } 201 } 202 203 public static class MeasmntPrincipleEnumFactory implements EnumFactory<MeasmntPrinciple> { 204 public MeasmntPrinciple fromCode(String codeString) throws IllegalArgumentException { 205 if (codeString == null || "".equals(codeString)) 206 if (codeString == null || "".equals(codeString)) 207 return null; 208 if ("other".equals(codeString)) 209 return MeasmntPrinciple.OTHER; 210 if ("chemical".equals(codeString)) 211 return MeasmntPrinciple.CHEMICAL; 212 if ("electrical".equals(codeString)) 213 return MeasmntPrinciple.ELECTRICAL; 214 if ("impedance".equals(codeString)) 215 return MeasmntPrinciple.IMPEDANCE; 216 if ("nuclear".equals(codeString)) 217 return MeasmntPrinciple.NUCLEAR; 218 if ("optical".equals(codeString)) 219 return MeasmntPrinciple.OPTICAL; 220 if ("thermal".equals(codeString)) 221 return MeasmntPrinciple.THERMAL; 222 if ("biological".equals(codeString)) 223 return MeasmntPrinciple.BIOLOGICAL; 224 if ("mechanical".equals(codeString)) 225 return MeasmntPrinciple.MECHANICAL; 226 if ("acoustical".equals(codeString)) 227 return MeasmntPrinciple.ACOUSTICAL; 228 if ("manual".equals(codeString)) 229 return MeasmntPrinciple.MANUAL; 230 throw new IllegalArgumentException("Unknown MeasmntPrinciple code '"+codeString+"'"); 231 } 232 public Enumeration<MeasmntPrinciple> fromType(PrimitiveType<?> code) throws FHIRException { 233 if (code == null) 234 return null; 235 if (code.isEmpty()) 236 return new Enumeration<MeasmntPrinciple>(this); 237 String codeString = code.asStringValue(); 238 if (codeString == null || "".equals(codeString)) 239 return null; 240 if ("other".equals(codeString)) 241 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.OTHER); 242 if ("chemical".equals(codeString)) 243 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.CHEMICAL); 244 if ("electrical".equals(codeString)) 245 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.ELECTRICAL); 246 if ("impedance".equals(codeString)) 247 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.IMPEDANCE); 248 if ("nuclear".equals(codeString)) 249 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.NUCLEAR); 250 if ("optical".equals(codeString)) 251 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.OPTICAL); 252 if ("thermal".equals(codeString)) 253 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.THERMAL); 254 if ("biological".equals(codeString)) 255 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.BIOLOGICAL); 256 if ("mechanical".equals(codeString)) 257 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.MECHANICAL); 258 if ("acoustical".equals(codeString)) 259 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.ACOUSTICAL); 260 if ("manual".equals(codeString)) 261 return new Enumeration<MeasmntPrinciple>(this, MeasmntPrinciple.MANUAL); 262 throw new FHIRException("Unknown MeasmntPrinciple code '"+codeString+"'"); 263 } 264 public String toCode(MeasmntPrinciple code) { 265 if (code == MeasmntPrinciple.OTHER) 266 return "other"; 267 if (code == MeasmntPrinciple.CHEMICAL) 268 return "chemical"; 269 if (code == MeasmntPrinciple.ELECTRICAL) 270 return "electrical"; 271 if (code == MeasmntPrinciple.IMPEDANCE) 272 return "impedance"; 273 if (code == MeasmntPrinciple.NUCLEAR) 274 return "nuclear"; 275 if (code == MeasmntPrinciple.OPTICAL) 276 return "optical"; 277 if (code == MeasmntPrinciple.THERMAL) 278 return "thermal"; 279 if (code == MeasmntPrinciple.BIOLOGICAL) 280 return "biological"; 281 if (code == MeasmntPrinciple.MECHANICAL) 282 return "mechanical"; 283 if (code == MeasmntPrinciple.ACOUSTICAL) 284 return "acoustical"; 285 if (code == MeasmntPrinciple.MANUAL) 286 return "manual"; 287 return "?"; 288 } 289 public String toSystem(MeasmntPrinciple code) { 290 return code.getSystem(); 291 } 292 } 293 294 @Block() 295 public static class DeviceComponentProductionSpecificationComponent extends BackboneElement implements IBaseBackboneElement { 296 /** 297 * The specification type, such as, serial number, part number, hardware revision, software revision, etc. 298 */ 299 @Child(name = "specType", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 300 @Description(shortDefinition="Type or kind of production specification, for example serial number or software revision", formalDefinition="The specification type, such as, serial number, part number, hardware revision, software revision, etc." ) 301 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/specification-type") 302 protected CodeableConcept specType; 303 304 /** 305 * 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 manufacturer can make use of. 306 */ 307 @Child(name = "componentId", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=true) 308 @Description(shortDefinition="Internal component unique identification", formalDefinition="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 manufacturer can make use of." ) 309 protected Identifier componentId; 310 311 /** 312 * The printable string defining the component. 313 */ 314 @Child(name = "productionSpec", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 315 @Description(shortDefinition="A printable string defining the component", formalDefinition="The printable string defining the component." ) 316 protected StringType productionSpec; 317 318 private static final long serialVersionUID = -1476597516L; 319 320 /** 321 * Constructor 322 */ 323 public DeviceComponentProductionSpecificationComponent() { 324 super(); 325 } 326 327 /** 328 * @return {@link #specType} (The specification type, such as, serial number, part number, hardware revision, software revision, etc.) 329 */ 330 public CodeableConcept getSpecType() { 331 if (this.specType == null) 332 if (Configuration.errorOnAutoCreate()) 333 throw new Error("Attempt to auto-create DeviceComponentProductionSpecificationComponent.specType"); 334 else if (Configuration.doAutoCreate()) 335 this.specType = new CodeableConcept(); // cc 336 return this.specType; 337 } 338 339 public boolean hasSpecType() { 340 return this.specType != null && !this.specType.isEmpty(); 341 } 342 343 /** 344 * @param value {@link #specType} (The specification type, such as, serial number, part number, hardware revision, software revision, etc.) 345 */ 346 public DeviceComponentProductionSpecificationComponent setSpecType(CodeableConcept value) { 347 this.specType = value; 348 return this; 349 } 350 351 /** 352 * @return {@link #componentId} (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 manufacturer can make use of.) 353 */ 354 public Identifier getComponentId() { 355 if (this.componentId == null) 356 if (Configuration.errorOnAutoCreate()) 357 throw new Error("Attempt to auto-create DeviceComponentProductionSpecificationComponent.componentId"); 358 else if (Configuration.doAutoCreate()) 359 this.componentId = new Identifier(); // cc 360 return this.componentId; 361 } 362 363 public boolean hasComponentId() { 364 return this.componentId != null && !this.componentId.isEmpty(); 365 } 366 367 /** 368 * @param value {@link #componentId} (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 manufacturer can make use of.) 369 */ 370 public DeviceComponentProductionSpecificationComponent setComponentId(Identifier value) { 371 this.componentId = value; 372 return this; 373 } 374 375 /** 376 * @return {@link #productionSpec} (The printable string defining the component.). This is the underlying object with id, value and extensions. The accessor "getProductionSpec" gives direct access to the value 377 */ 378 public StringType getProductionSpecElement() { 379 if (this.productionSpec == null) 380 if (Configuration.errorOnAutoCreate()) 381 throw new Error("Attempt to auto-create DeviceComponentProductionSpecificationComponent.productionSpec"); 382 else if (Configuration.doAutoCreate()) 383 this.productionSpec = new StringType(); // bb 384 return this.productionSpec; 385 } 386 387 public boolean hasProductionSpecElement() { 388 return this.productionSpec != null && !this.productionSpec.isEmpty(); 389 } 390 391 public boolean hasProductionSpec() { 392 return this.productionSpec != null && !this.productionSpec.isEmpty(); 393 } 394 395 /** 396 * @param value {@link #productionSpec} (The printable string defining the component.). This is the underlying object with id, value and extensions. The accessor "getProductionSpec" gives direct access to the value 397 */ 398 public DeviceComponentProductionSpecificationComponent setProductionSpecElement(StringType value) { 399 this.productionSpec = value; 400 return this; 401 } 402 403 /** 404 * @return The printable string defining the component. 405 */ 406 public String getProductionSpec() { 407 return this.productionSpec == null ? null : this.productionSpec.getValue(); 408 } 409 410 /** 411 * @param value The printable string defining the component. 412 */ 413 public DeviceComponentProductionSpecificationComponent setProductionSpec(String value) { 414 if (Utilities.noString(value)) 415 this.productionSpec = null; 416 else { 417 if (this.productionSpec == null) 418 this.productionSpec = new StringType(); 419 this.productionSpec.setValue(value); 420 } 421 return this; 422 } 423 424 protected void listChildren(List<Property> children) { 425 super.listChildren(children); 426 children.add(new Property("specType", "CodeableConcept", "The specification type, such as, serial number, part number, hardware revision, software revision, etc.", 0, 1, specType)); 427 children.add(new Property("componentId", "Identifier", "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 manufacturer can make use of.", 0, 1, componentId)); 428 children.add(new Property("productionSpec", "string", "The printable string defining the component.", 0, 1, productionSpec)); 429 } 430 431 @Override 432 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 433 switch (_hash) { 434 case -2133482091: /*specType*/ return new Property("specType", "CodeableConcept", "The specification type, such as, serial number, part number, hardware revision, software revision, etc.", 0, 1, specType); 435 case -985933064: /*componentId*/ return new Property("componentId", "Identifier", "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 manufacturer can make use of.", 0, 1, componentId); 436 case 182147092: /*productionSpec*/ return new Property("productionSpec", "string", "The printable string defining the component.", 0, 1, productionSpec); 437 default: return super.getNamedProperty(_hash, _name, _checkValid); 438 } 439 440 } 441 442 @Override 443 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 444 switch (hash) { 445 case -2133482091: /*specType*/ return this.specType == null ? new Base[0] : new Base[] {this.specType}; // CodeableConcept 446 case -985933064: /*componentId*/ return this.componentId == null ? new Base[0] : new Base[] {this.componentId}; // Identifier 447 case 182147092: /*productionSpec*/ return this.productionSpec == null ? new Base[0] : new Base[] {this.productionSpec}; // StringType 448 default: return super.getProperty(hash, name, checkValid); 449 } 450 451 } 452 453 @Override 454 public Base setProperty(int hash, String name, Base value) throws FHIRException { 455 switch (hash) { 456 case -2133482091: // specType 457 this.specType = castToCodeableConcept(value); // CodeableConcept 458 return value; 459 case -985933064: // componentId 460 this.componentId = castToIdentifier(value); // Identifier 461 return value; 462 case 182147092: // productionSpec 463 this.productionSpec = castToString(value); // StringType 464 return value; 465 default: return super.setProperty(hash, name, value); 466 } 467 468 } 469 470 @Override 471 public Base setProperty(String name, Base value) throws FHIRException { 472 if (name.equals("specType")) { 473 this.specType = castToCodeableConcept(value); // CodeableConcept 474 } else if (name.equals("componentId")) { 475 this.componentId = castToIdentifier(value); // Identifier 476 } else if (name.equals("productionSpec")) { 477 this.productionSpec = castToString(value); // StringType 478 } else 479 return super.setProperty(name, value); 480 return value; 481 } 482 483 @Override 484 public Base makeProperty(int hash, String name) throws FHIRException { 485 switch (hash) { 486 case -2133482091: return getSpecType(); 487 case -985933064: return getComponentId(); 488 case 182147092: return getProductionSpecElement(); 489 default: return super.makeProperty(hash, name); 490 } 491 492 } 493 494 @Override 495 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 496 switch (hash) { 497 case -2133482091: /*specType*/ return new String[] {"CodeableConcept"}; 498 case -985933064: /*componentId*/ return new String[] {"Identifier"}; 499 case 182147092: /*productionSpec*/ return new String[] {"string"}; 500 default: return super.getTypesForProperty(hash, name); 501 } 502 503 } 504 505 @Override 506 public Base addChild(String name) throws FHIRException { 507 if (name.equals("specType")) { 508 this.specType = new CodeableConcept(); 509 return this.specType; 510 } 511 else if (name.equals("componentId")) { 512 this.componentId = new Identifier(); 513 return this.componentId; 514 } 515 else if (name.equals("productionSpec")) { 516 throw new FHIRException("Cannot call addChild on a singleton property DeviceComponent.productionSpec"); 517 } 518 else 519 return super.addChild(name); 520 } 521 522 public DeviceComponentProductionSpecificationComponent copy() { 523 DeviceComponentProductionSpecificationComponent dst = new DeviceComponentProductionSpecificationComponent(); 524 copyValues(dst); 525 dst.specType = specType == null ? null : specType.copy(); 526 dst.componentId = componentId == null ? null : componentId.copy(); 527 dst.productionSpec = productionSpec == null ? null : productionSpec.copy(); 528 return dst; 529 } 530 531 @Override 532 public boolean equalsDeep(Base other_) { 533 if (!super.equalsDeep(other_)) 534 return false; 535 if (!(other_ instanceof DeviceComponentProductionSpecificationComponent)) 536 return false; 537 DeviceComponentProductionSpecificationComponent o = (DeviceComponentProductionSpecificationComponent) other_; 538 return compareDeep(specType, o.specType, true) && compareDeep(componentId, o.componentId, true) 539 && compareDeep(productionSpec, o.productionSpec, true); 540 } 541 542 @Override 543 public boolean equalsShallow(Base other_) { 544 if (!super.equalsShallow(other_)) 545 return false; 546 if (!(other_ instanceof DeviceComponentProductionSpecificationComponent)) 547 return false; 548 DeviceComponentProductionSpecificationComponent o = (DeviceComponentProductionSpecificationComponent) other_; 549 return compareValues(productionSpec, o.productionSpec, true); 550 } 551 552 public boolean isEmpty() { 553 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(specType, componentId, productionSpec 554 ); 555 } 556 557 public String fhirType() { 558 return "DeviceComponent.productionSpecification"; 559 560 } 561 562 } 563 564 /** 565 * The locally assigned unique identification by the software. For example: handle ID. 566 */ 567 @Child(name = "identifier", type = {Identifier.class}, order=0, min=1, max=1, modifier=false, summary=true) 568 @Description(shortDefinition="Instance id assigned by the software stack", formalDefinition="The locally assigned unique identification by the software. For example: handle ID." ) 569 protected Identifier identifier; 570 571 /** 572 * The component type as defined in the object-oriented or metric nomenclature partition. 573 */ 574 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 575 @Description(shortDefinition="What kind of component it is", formalDefinition="The component type as defined in the object-oriented or metric nomenclature partition." ) 576 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-kind") 577 protected CodeableConcept type; 578 579 /** 580 * The timestamp for the most recent system change which includes device configuration or setting change. 581 */ 582 @Child(name = "lastSystemChange", type = {InstantType.class}, order=2, min=0, max=1, modifier=false, summary=true) 583 @Description(shortDefinition="Recent system change timestamp", formalDefinition="The timestamp for the most recent system change which includes device configuration or setting change." ) 584 protected InstantType lastSystemChange; 585 586 /** 587 * The link to the source Device that contains administrative device information such as manufacture, serial number, etc. 588 */ 589 @Child(name = "source", type = {Device.class}, order=3, min=0, max=1, modifier=false, summary=true) 590 @Description(shortDefinition="Top-level device resource link", formalDefinition="The link to the source Device that contains administrative device information such as manufacture, serial number, etc." ) 591 protected Reference source; 592 593 /** 594 * The actual object that is the target of the reference (The link to the source Device that contains administrative device information such as manufacture, serial number, etc.) 595 */ 596 protected Device sourceTarget; 597 598 /** 599 * The link to the parent resource. For example: Channel is linked to its VMD parent. 600 */ 601 @Child(name = "parent", type = {DeviceComponent.class}, order=4, min=0, max=1, modifier=false, summary=true) 602 @Description(shortDefinition="Parent resource link", formalDefinition="The link to the parent resource. For example: Channel is linked to its VMD parent." ) 603 protected Reference parent; 604 605 /** 606 * The actual object that is the target of the reference (The link to the parent resource. For example: Channel is linked to its VMD parent.) 607 */ 608 protected DeviceComponent parentTarget; 609 610 /** 611 * The current operational status of the device. For example: On, Off, Standby, etc. 612 */ 613 @Child(name = "operationalStatus", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 614 @Description(shortDefinition="Current operational status of the component, for example On, Off or Standby", formalDefinition="The current operational status of the device. For example: On, Off, Standby, etc." ) 615 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/operational-status") 616 protected List<CodeableConcept> operationalStatus; 617 618 /** 619 * The parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular. 620 */ 621 @Child(name = "parameterGroup", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) 622 @Description(shortDefinition="Current supported parameter group", formalDefinition="The parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular." ) 623 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/parameter-group") 624 protected CodeableConcept parameterGroup; 625 626 /** 627 * The physical principle of the measurement. For example: thermal, chemical, acoustical, etc. 628 */ 629 @Child(name = "measurementPrinciple", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=true) 630 @Description(shortDefinition="other | chemical | electrical | impedance | nuclear | optical | thermal | biological | mechanical | acoustical | manual+", formalDefinition="The physical principle of the measurement. For example: thermal, chemical, acoustical, etc." ) 631 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/measurement-principle") 632 protected Enumeration<MeasmntPrinciple> measurementPrinciple; 633 634 /** 635 * The production specification such as component revision, serial number, etc. 636 */ 637 @Child(name = "productionSpecification", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 638 @Description(shortDefinition="Specification details such as Component Revisions, or Serial Numbers", formalDefinition="The production specification such as component revision, serial number, etc." ) 639 protected List<DeviceComponentProductionSpecificationComponent> productionSpecification; 640 641 /** 642 * 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. 643 */ 644 @Child(name = "languageCode", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=true) 645 @Description(shortDefinition="Language code for the human-readable text strings produced by the device", formalDefinition="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." ) 646 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/languages") 647 protected CodeableConcept languageCode; 648 649 private static final long serialVersionUID = 32987426L; 650 651 /** 652 * Constructor 653 */ 654 public DeviceComponent() { 655 super(); 656 } 657 658 /** 659 * Constructor 660 */ 661 public DeviceComponent(Identifier identifier, CodeableConcept type) { 662 super(); 663 this.identifier = identifier; 664 this.type = type; 665 } 666 667 /** 668 * @return {@link #identifier} (The locally assigned unique identification by the software. For example: handle ID.) 669 */ 670 public Identifier getIdentifier() { 671 if (this.identifier == null) 672 if (Configuration.errorOnAutoCreate()) 673 throw new Error("Attempt to auto-create DeviceComponent.identifier"); 674 else if (Configuration.doAutoCreate()) 675 this.identifier = new Identifier(); // cc 676 return this.identifier; 677 } 678 679 public boolean hasIdentifier() { 680 return this.identifier != null && !this.identifier.isEmpty(); 681 } 682 683 /** 684 * @param value {@link #identifier} (The locally assigned unique identification by the software. For example: handle ID.) 685 */ 686 public DeviceComponent setIdentifier(Identifier value) { 687 this.identifier = value; 688 return this; 689 } 690 691 /** 692 * @return {@link #type} (The component type as defined in the object-oriented or metric nomenclature partition.) 693 */ 694 public CodeableConcept getType() { 695 if (this.type == null) 696 if (Configuration.errorOnAutoCreate()) 697 throw new Error("Attempt to auto-create DeviceComponent.type"); 698 else if (Configuration.doAutoCreate()) 699 this.type = new CodeableConcept(); // cc 700 return this.type; 701 } 702 703 public boolean hasType() { 704 return this.type != null && !this.type.isEmpty(); 705 } 706 707 /** 708 * @param value {@link #type} (The component type as defined in the object-oriented or metric nomenclature partition.) 709 */ 710 public DeviceComponent setType(CodeableConcept value) { 711 this.type = value; 712 return this; 713 } 714 715 /** 716 * @return {@link #lastSystemChange} (The timestamp for the most recent system change which includes device configuration or setting change.). This is the underlying object with id, value and extensions. The accessor "getLastSystemChange" gives direct access to the value 717 */ 718 public InstantType getLastSystemChangeElement() { 719 if (this.lastSystemChange == null) 720 if (Configuration.errorOnAutoCreate()) 721 throw new Error("Attempt to auto-create DeviceComponent.lastSystemChange"); 722 else if (Configuration.doAutoCreate()) 723 this.lastSystemChange = new InstantType(); // bb 724 return this.lastSystemChange; 725 } 726 727 public boolean hasLastSystemChangeElement() { 728 return this.lastSystemChange != null && !this.lastSystemChange.isEmpty(); 729 } 730 731 public boolean hasLastSystemChange() { 732 return this.lastSystemChange != null && !this.lastSystemChange.isEmpty(); 733 } 734 735 /** 736 * @param value {@link #lastSystemChange} (The timestamp for the most recent system change which includes device configuration or setting change.). This is the underlying object with id, value and extensions. The accessor "getLastSystemChange" gives direct access to the value 737 */ 738 public DeviceComponent setLastSystemChangeElement(InstantType value) { 739 this.lastSystemChange = value; 740 return this; 741 } 742 743 /** 744 * @return The timestamp for the most recent system change which includes device configuration or setting change. 745 */ 746 public Date getLastSystemChange() { 747 return this.lastSystemChange == null ? null : this.lastSystemChange.getValue(); 748 } 749 750 /** 751 * @param value The timestamp for the most recent system change which includes device configuration or setting change. 752 */ 753 public DeviceComponent setLastSystemChange(Date value) { 754 if (value == null) 755 this.lastSystemChange = null; 756 else { 757 if (this.lastSystemChange == null) 758 this.lastSystemChange = new InstantType(); 759 this.lastSystemChange.setValue(value); 760 } 761 return this; 762 } 763 764 /** 765 * @return {@link #source} (The link to the source Device that contains administrative device information such as manufacture, serial number, etc.) 766 */ 767 public Reference getSource() { 768 if (this.source == null) 769 if (Configuration.errorOnAutoCreate()) 770 throw new Error("Attempt to auto-create DeviceComponent.source"); 771 else if (Configuration.doAutoCreate()) 772 this.source = new Reference(); // cc 773 return this.source; 774 } 775 776 public boolean hasSource() { 777 return this.source != null && !this.source.isEmpty(); 778 } 779 780 /** 781 * @param value {@link #source} (The link to the source Device that contains administrative device information such as manufacture, serial number, etc.) 782 */ 783 public DeviceComponent setSource(Reference value) { 784 this.source = value; 785 return this; 786 } 787 788 /** 789 * @return {@link #source} 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 link to the source Device that contains administrative device information such as manufacture, serial number, etc.) 790 */ 791 public Device getSourceTarget() { 792 if (this.sourceTarget == null) 793 if (Configuration.errorOnAutoCreate()) 794 throw new Error("Attempt to auto-create DeviceComponent.source"); 795 else if (Configuration.doAutoCreate()) 796 this.sourceTarget = new Device(); // aa 797 return this.sourceTarget; 798 } 799 800 /** 801 * @param value {@link #source} 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 link to the source Device that contains administrative device information such as manufacture, serial number, etc.) 802 */ 803 public DeviceComponent setSourceTarget(Device value) { 804 this.sourceTarget = value; 805 return this; 806 } 807 808 /** 809 * @return {@link #parent} (The link to the parent resource. For example: Channel is linked to its VMD parent.) 810 */ 811 public Reference getParent() { 812 if (this.parent == null) 813 if (Configuration.errorOnAutoCreate()) 814 throw new Error("Attempt to auto-create DeviceComponent.parent"); 815 else if (Configuration.doAutoCreate()) 816 this.parent = new Reference(); // cc 817 return this.parent; 818 } 819 820 public boolean hasParent() { 821 return this.parent != null && !this.parent.isEmpty(); 822 } 823 824 /** 825 * @param value {@link #parent} (The link to the parent resource. For example: Channel is linked to its VMD parent.) 826 */ 827 public DeviceComponent setParent(Reference value) { 828 this.parent = value; 829 return this; 830 } 831 832 /** 833 * @return {@link #parent} 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 link to the parent resource. For example: Channel is linked to its VMD parent.) 834 */ 835 public DeviceComponent getParentTarget() { 836 if (this.parentTarget == null) 837 if (Configuration.errorOnAutoCreate()) 838 throw new Error("Attempt to auto-create DeviceComponent.parent"); 839 else if (Configuration.doAutoCreate()) 840 this.parentTarget = new DeviceComponent(); // aa 841 return this.parentTarget; 842 } 843 844 /** 845 * @param value {@link #parent} 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 link to the parent resource. For example: Channel is linked to its VMD parent.) 846 */ 847 public DeviceComponent setParentTarget(DeviceComponent value) { 848 this.parentTarget = value; 849 return this; 850 } 851 852 /** 853 * @return {@link #operationalStatus} (The current operational status of the device. For example: On, Off, Standby, etc.) 854 */ 855 public List<CodeableConcept> getOperationalStatus() { 856 if (this.operationalStatus == null) 857 this.operationalStatus = new ArrayList<CodeableConcept>(); 858 return this.operationalStatus; 859 } 860 861 /** 862 * @return Returns a reference to <code>this</code> for easy method chaining 863 */ 864 public DeviceComponent setOperationalStatus(List<CodeableConcept> theOperationalStatus) { 865 this.operationalStatus = theOperationalStatus; 866 return this; 867 } 868 869 public boolean hasOperationalStatus() { 870 if (this.operationalStatus == null) 871 return false; 872 for (CodeableConcept item : this.operationalStatus) 873 if (!item.isEmpty()) 874 return true; 875 return false; 876 } 877 878 public CodeableConcept addOperationalStatus() { //3 879 CodeableConcept t = new CodeableConcept(); 880 if (this.operationalStatus == null) 881 this.operationalStatus = new ArrayList<CodeableConcept>(); 882 this.operationalStatus.add(t); 883 return t; 884 } 885 886 public DeviceComponent addOperationalStatus(CodeableConcept t) { //3 887 if (t == null) 888 return this; 889 if (this.operationalStatus == null) 890 this.operationalStatus = new ArrayList<CodeableConcept>(); 891 this.operationalStatus.add(t); 892 return this; 893 } 894 895 /** 896 * @return The first repetition of repeating field {@link #operationalStatus}, creating it if it does not already exist 897 */ 898 public CodeableConcept getOperationalStatusFirstRep() { 899 if (getOperationalStatus().isEmpty()) { 900 addOperationalStatus(); 901 } 902 return getOperationalStatus().get(0); 903 } 904 905 /** 906 * @return {@link #parameterGroup} (The parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.) 907 */ 908 public CodeableConcept getParameterGroup() { 909 if (this.parameterGroup == null) 910 if (Configuration.errorOnAutoCreate()) 911 throw new Error("Attempt to auto-create DeviceComponent.parameterGroup"); 912 else if (Configuration.doAutoCreate()) 913 this.parameterGroup = new CodeableConcept(); // cc 914 return this.parameterGroup; 915 } 916 917 public boolean hasParameterGroup() { 918 return this.parameterGroup != null && !this.parameterGroup.isEmpty(); 919 } 920 921 /** 922 * @param value {@link #parameterGroup} (The parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.) 923 */ 924 public DeviceComponent setParameterGroup(CodeableConcept value) { 925 this.parameterGroup = value; 926 return this; 927 } 928 929 /** 930 * @return {@link #measurementPrinciple} (The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.). This is the underlying object with id, value and extensions. The accessor "getMeasurementPrinciple" gives direct access to the value 931 */ 932 public Enumeration<MeasmntPrinciple> getMeasurementPrincipleElement() { 933 if (this.measurementPrinciple == null) 934 if (Configuration.errorOnAutoCreate()) 935 throw new Error("Attempt to auto-create DeviceComponent.measurementPrinciple"); 936 else if (Configuration.doAutoCreate()) 937 this.measurementPrinciple = new Enumeration<MeasmntPrinciple>(new MeasmntPrincipleEnumFactory()); // bb 938 return this.measurementPrinciple; 939 } 940 941 public boolean hasMeasurementPrincipleElement() { 942 return this.measurementPrinciple != null && !this.measurementPrinciple.isEmpty(); 943 } 944 945 public boolean hasMeasurementPrinciple() { 946 return this.measurementPrinciple != null && !this.measurementPrinciple.isEmpty(); 947 } 948 949 /** 950 * @param value {@link #measurementPrinciple} (The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.). This is the underlying object with id, value and extensions. The accessor "getMeasurementPrinciple" gives direct access to the value 951 */ 952 public DeviceComponent setMeasurementPrincipleElement(Enumeration<MeasmntPrinciple> value) { 953 this.measurementPrinciple = value; 954 return this; 955 } 956 957 /** 958 * @return The physical principle of the measurement. For example: thermal, chemical, acoustical, etc. 959 */ 960 public MeasmntPrinciple getMeasurementPrinciple() { 961 return this.measurementPrinciple == null ? null : this.measurementPrinciple.getValue(); 962 } 963 964 /** 965 * @param value The physical principle of the measurement. For example: thermal, chemical, acoustical, etc. 966 */ 967 public DeviceComponent setMeasurementPrinciple(MeasmntPrinciple value) { 968 if (value == null) 969 this.measurementPrinciple = null; 970 else { 971 if (this.measurementPrinciple == null) 972 this.measurementPrinciple = new Enumeration<MeasmntPrinciple>(new MeasmntPrincipleEnumFactory()); 973 this.measurementPrinciple.setValue(value); 974 } 975 return this; 976 } 977 978 /** 979 * @return {@link #productionSpecification} (The production specification such as component revision, serial number, etc.) 980 */ 981 public List<DeviceComponentProductionSpecificationComponent> getProductionSpecification() { 982 if (this.productionSpecification == null) 983 this.productionSpecification = new ArrayList<DeviceComponentProductionSpecificationComponent>(); 984 return this.productionSpecification; 985 } 986 987 /** 988 * @return Returns a reference to <code>this</code> for easy method chaining 989 */ 990 public DeviceComponent setProductionSpecification(List<DeviceComponentProductionSpecificationComponent> theProductionSpecification) { 991 this.productionSpecification = theProductionSpecification; 992 return this; 993 } 994 995 public boolean hasProductionSpecification() { 996 if (this.productionSpecification == null) 997 return false; 998 for (DeviceComponentProductionSpecificationComponent item : this.productionSpecification) 999 if (!item.isEmpty()) 1000 return true; 1001 return false; 1002 } 1003 1004 public DeviceComponentProductionSpecificationComponent addProductionSpecification() { //3 1005 DeviceComponentProductionSpecificationComponent t = new DeviceComponentProductionSpecificationComponent(); 1006 if (this.productionSpecification == null) 1007 this.productionSpecification = new ArrayList<DeviceComponentProductionSpecificationComponent>(); 1008 this.productionSpecification.add(t); 1009 return t; 1010 } 1011 1012 public DeviceComponent addProductionSpecification(DeviceComponentProductionSpecificationComponent t) { //3 1013 if (t == null) 1014 return this; 1015 if (this.productionSpecification == null) 1016 this.productionSpecification = new ArrayList<DeviceComponentProductionSpecificationComponent>(); 1017 this.productionSpecification.add(t); 1018 return this; 1019 } 1020 1021 /** 1022 * @return The first repetition of repeating field {@link #productionSpecification}, creating it if it does not already exist 1023 */ 1024 public DeviceComponentProductionSpecificationComponent getProductionSpecificationFirstRep() { 1025 if (getProductionSpecification().isEmpty()) { 1026 addProductionSpecification(); 1027 } 1028 return getProductionSpecification().get(0); 1029 } 1030 1031 /** 1032 * @return {@link #languageCode} (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.) 1033 */ 1034 public CodeableConcept getLanguageCode() { 1035 if (this.languageCode == null) 1036 if (Configuration.errorOnAutoCreate()) 1037 throw new Error("Attempt to auto-create DeviceComponent.languageCode"); 1038 else if (Configuration.doAutoCreate()) 1039 this.languageCode = new CodeableConcept(); // cc 1040 return this.languageCode; 1041 } 1042 1043 public boolean hasLanguageCode() { 1044 return this.languageCode != null && !this.languageCode.isEmpty(); 1045 } 1046 1047 /** 1048 * @param value {@link #languageCode} (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.) 1049 */ 1050 public DeviceComponent setLanguageCode(CodeableConcept value) { 1051 this.languageCode = value; 1052 return this; 1053 } 1054 1055 protected void listChildren(List<Property> children) { 1056 super.listChildren(children); 1057 children.add(new Property("identifier", "Identifier", "The locally assigned unique identification by the software. For example: handle ID.", 0, 1, identifier)); 1058 children.add(new Property("type", "CodeableConcept", "The component type as defined in the object-oriented or metric nomenclature partition.", 0, 1, type)); 1059 children.add(new Property("lastSystemChange", "instant", "The timestamp for the most recent system change which includes device configuration or setting change.", 0, 1, lastSystemChange)); 1060 children.add(new Property("source", "Reference(Device)", "The link to the source Device that contains administrative device information such as manufacture, serial number, etc.", 0, 1, source)); 1061 children.add(new Property("parent", "Reference(DeviceComponent)", "The link to the parent resource. For example: Channel is linked to its VMD parent.", 0, 1, parent)); 1062 children.add(new Property("operationalStatus", "CodeableConcept", "The current operational status of the device. For example: On, Off, Standby, etc.", 0, java.lang.Integer.MAX_VALUE, operationalStatus)); 1063 children.add(new Property("parameterGroup", "CodeableConcept", "The parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.", 0, 1, parameterGroup)); 1064 children.add(new Property("measurementPrinciple", "code", "The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.", 0, 1, measurementPrinciple)); 1065 children.add(new Property("productionSpecification", "", "The production specification such as component revision, serial number, etc.", 0, java.lang.Integer.MAX_VALUE, productionSpecification)); 1066 children.add(new Property("languageCode", "CodeableConcept", "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.", 0, 1, languageCode)); 1067 } 1068 1069 @Override 1070 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1071 switch (_hash) { 1072 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "The locally assigned unique identification by the software. For example: handle ID.", 0, 1, identifier); 1073 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The component type as defined in the object-oriented or metric nomenclature partition.", 0, 1, type); 1074 case -2072475531: /*lastSystemChange*/ return new Property("lastSystemChange", "instant", "The timestamp for the most recent system change which includes device configuration or setting change.", 0, 1, lastSystemChange); 1075 case -896505829: /*source*/ return new Property("source", "Reference(Device)", "The link to the source Device that contains administrative device information such as manufacture, serial number, etc.", 0, 1, source); 1076 case -995424086: /*parent*/ return new Property("parent", "Reference(DeviceComponent)", "The link to the parent resource. For example: Channel is linked to its VMD parent.", 0, 1, parent); 1077 case -2103166364: /*operationalStatus*/ return new Property("operationalStatus", "CodeableConcept", "The current operational status of the device. For example: On, Off, Standby, etc.", 0, java.lang.Integer.MAX_VALUE, operationalStatus); 1078 case 1111110742: /*parameterGroup*/ return new Property("parameterGroup", "CodeableConcept", "The parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.", 0, 1, parameterGroup); 1079 case 24324384: /*measurementPrinciple*/ return new Property("measurementPrinciple", "code", "The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.", 0, 1, measurementPrinciple); 1080 case -455527222: /*productionSpecification*/ return new Property("productionSpecification", "", "The production specification such as component revision, serial number, etc.", 0, java.lang.Integer.MAX_VALUE, productionSpecification); 1081 case -2092349083: /*languageCode*/ return new Property("languageCode", "CodeableConcept", "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.", 0, 1, languageCode); 1082 default: return super.getNamedProperty(_hash, _name, _checkValid); 1083 } 1084 1085 } 1086 1087 @Override 1088 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1089 switch (hash) { 1090 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1091 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1092 case -2072475531: /*lastSystemChange*/ return this.lastSystemChange == null ? new Base[0] : new Base[] {this.lastSystemChange}; // InstantType 1093 case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Reference 1094 case -995424086: /*parent*/ return this.parent == null ? new Base[0] : new Base[] {this.parent}; // Reference 1095 case -2103166364: /*operationalStatus*/ return this.operationalStatus == null ? new Base[0] : this.operationalStatus.toArray(new Base[this.operationalStatus.size()]); // CodeableConcept 1096 case 1111110742: /*parameterGroup*/ return this.parameterGroup == null ? new Base[0] : new Base[] {this.parameterGroup}; // CodeableConcept 1097 case 24324384: /*measurementPrinciple*/ return this.measurementPrinciple == null ? new Base[0] : new Base[] {this.measurementPrinciple}; // Enumeration<MeasmntPrinciple> 1098 case -455527222: /*productionSpecification*/ return this.productionSpecification == null ? new Base[0] : this.productionSpecification.toArray(new Base[this.productionSpecification.size()]); // DeviceComponentProductionSpecificationComponent 1099 case -2092349083: /*languageCode*/ return this.languageCode == null ? new Base[0] : new Base[] {this.languageCode}; // CodeableConcept 1100 default: return super.getProperty(hash, name, checkValid); 1101 } 1102 1103 } 1104 1105 @Override 1106 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1107 switch (hash) { 1108 case -1618432855: // identifier 1109 this.identifier = castToIdentifier(value); // Identifier 1110 return value; 1111 case 3575610: // type 1112 this.type = castToCodeableConcept(value); // CodeableConcept 1113 return value; 1114 case -2072475531: // lastSystemChange 1115 this.lastSystemChange = castToInstant(value); // InstantType 1116 return value; 1117 case -896505829: // source 1118 this.source = castToReference(value); // Reference 1119 return value; 1120 case -995424086: // parent 1121 this.parent = castToReference(value); // Reference 1122 return value; 1123 case -2103166364: // operationalStatus 1124 this.getOperationalStatus().add(castToCodeableConcept(value)); // CodeableConcept 1125 return value; 1126 case 1111110742: // parameterGroup 1127 this.parameterGroup = castToCodeableConcept(value); // CodeableConcept 1128 return value; 1129 case 24324384: // measurementPrinciple 1130 value = new MeasmntPrincipleEnumFactory().fromType(castToCode(value)); 1131 this.measurementPrinciple = (Enumeration) value; // Enumeration<MeasmntPrinciple> 1132 return value; 1133 case -455527222: // productionSpecification 1134 this.getProductionSpecification().add((DeviceComponentProductionSpecificationComponent) value); // DeviceComponentProductionSpecificationComponent 1135 return value; 1136 case -2092349083: // languageCode 1137 this.languageCode = castToCodeableConcept(value); // CodeableConcept 1138 return value; 1139 default: return super.setProperty(hash, name, value); 1140 } 1141 1142 } 1143 1144 @Override 1145 public Base setProperty(String name, Base value) throws FHIRException { 1146 if (name.equals("identifier")) { 1147 this.identifier = castToIdentifier(value); // Identifier 1148 } else if (name.equals("type")) { 1149 this.type = castToCodeableConcept(value); // CodeableConcept 1150 } else if (name.equals("lastSystemChange")) { 1151 this.lastSystemChange = castToInstant(value); // InstantType 1152 } else if (name.equals("source")) { 1153 this.source = castToReference(value); // Reference 1154 } else if (name.equals("parent")) { 1155 this.parent = castToReference(value); // Reference 1156 } else if (name.equals("operationalStatus")) { 1157 this.getOperationalStatus().add(castToCodeableConcept(value)); 1158 } else if (name.equals("parameterGroup")) { 1159 this.parameterGroup = castToCodeableConcept(value); // CodeableConcept 1160 } else if (name.equals("measurementPrinciple")) { 1161 value = new MeasmntPrincipleEnumFactory().fromType(castToCode(value)); 1162 this.measurementPrinciple = (Enumeration) value; // Enumeration<MeasmntPrinciple> 1163 } else if (name.equals("productionSpecification")) { 1164 this.getProductionSpecification().add((DeviceComponentProductionSpecificationComponent) value); 1165 } else if (name.equals("languageCode")) { 1166 this.languageCode = castToCodeableConcept(value); // CodeableConcept 1167 } else 1168 return super.setProperty(name, value); 1169 return value; 1170 } 1171 1172 @Override 1173 public Base makeProperty(int hash, String name) throws FHIRException { 1174 switch (hash) { 1175 case -1618432855: return getIdentifier(); 1176 case 3575610: return getType(); 1177 case -2072475531: return getLastSystemChangeElement(); 1178 case -896505829: return getSource(); 1179 case -995424086: return getParent(); 1180 case -2103166364: return addOperationalStatus(); 1181 case 1111110742: return getParameterGroup(); 1182 case 24324384: return getMeasurementPrincipleElement(); 1183 case -455527222: return addProductionSpecification(); 1184 case -2092349083: return getLanguageCode(); 1185 default: return super.makeProperty(hash, name); 1186 } 1187 1188 } 1189 1190 @Override 1191 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1192 switch (hash) { 1193 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1194 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1195 case -2072475531: /*lastSystemChange*/ return new String[] {"instant"}; 1196 case -896505829: /*source*/ return new String[] {"Reference"}; 1197 case -995424086: /*parent*/ return new String[] {"Reference"}; 1198 case -2103166364: /*operationalStatus*/ return new String[] {"CodeableConcept"}; 1199 case 1111110742: /*parameterGroup*/ return new String[] {"CodeableConcept"}; 1200 case 24324384: /*measurementPrinciple*/ return new String[] {"code"}; 1201 case -455527222: /*productionSpecification*/ return new String[] {}; 1202 case -2092349083: /*languageCode*/ return new String[] {"CodeableConcept"}; 1203 default: return super.getTypesForProperty(hash, name); 1204 } 1205 1206 } 1207 1208 @Override 1209 public Base addChild(String name) throws FHIRException { 1210 if (name.equals("identifier")) { 1211 this.identifier = new Identifier(); 1212 return this.identifier; 1213 } 1214 else if (name.equals("type")) { 1215 this.type = new CodeableConcept(); 1216 return this.type; 1217 } 1218 else if (name.equals("lastSystemChange")) { 1219 throw new FHIRException("Cannot call addChild on a singleton property DeviceComponent.lastSystemChange"); 1220 } 1221 else if (name.equals("source")) { 1222 this.source = new Reference(); 1223 return this.source; 1224 } 1225 else if (name.equals("parent")) { 1226 this.parent = new Reference(); 1227 return this.parent; 1228 } 1229 else if (name.equals("operationalStatus")) { 1230 return addOperationalStatus(); 1231 } 1232 else if (name.equals("parameterGroup")) { 1233 this.parameterGroup = new CodeableConcept(); 1234 return this.parameterGroup; 1235 } 1236 else if (name.equals("measurementPrinciple")) { 1237 throw new FHIRException("Cannot call addChild on a singleton property DeviceComponent.measurementPrinciple"); 1238 } 1239 else if (name.equals("productionSpecification")) { 1240 return addProductionSpecification(); 1241 } 1242 else if (name.equals("languageCode")) { 1243 this.languageCode = new CodeableConcept(); 1244 return this.languageCode; 1245 } 1246 else 1247 return super.addChild(name); 1248 } 1249 1250 public String fhirType() { 1251 return "DeviceComponent"; 1252 1253 } 1254 1255 public DeviceComponent copy() { 1256 DeviceComponent dst = new DeviceComponent(); 1257 copyValues(dst); 1258 dst.identifier = identifier == null ? null : identifier.copy(); 1259 dst.type = type == null ? null : type.copy(); 1260 dst.lastSystemChange = lastSystemChange == null ? null : lastSystemChange.copy(); 1261 dst.source = source == null ? null : source.copy(); 1262 dst.parent = parent == null ? null : parent.copy(); 1263 if (operationalStatus != null) { 1264 dst.operationalStatus = new ArrayList<CodeableConcept>(); 1265 for (CodeableConcept i : operationalStatus) 1266 dst.operationalStatus.add(i.copy()); 1267 }; 1268 dst.parameterGroup = parameterGroup == null ? null : parameterGroup.copy(); 1269 dst.measurementPrinciple = measurementPrinciple == null ? null : measurementPrinciple.copy(); 1270 if (productionSpecification != null) { 1271 dst.productionSpecification = new ArrayList<DeviceComponentProductionSpecificationComponent>(); 1272 for (DeviceComponentProductionSpecificationComponent i : productionSpecification) 1273 dst.productionSpecification.add(i.copy()); 1274 }; 1275 dst.languageCode = languageCode == null ? null : languageCode.copy(); 1276 return dst; 1277 } 1278 1279 protected DeviceComponent typedCopy() { 1280 return copy(); 1281 } 1282 1283 @Override 1284 public boolean equalsDeep(Base other_) { 1285 if (!super.equalsDeep(other_)) 1286 return false; 1287 if (!(other_ instanceof DeviceComponent)) 1288 return false; 1289 DeviceComponent o = (DeviceComponent) other_; 1290 return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(lastSystemChange, o.lastSystemChange, true) 1291 && compareDeep(source, o.source, true) && compareDeep(parent, o.parent, true) && compareDeep(operationalStatus, o.operationalStatus, true) 1292 && compareDeep(parameterGroup, o.parameterGroup, true) && compareDeep(measurementPrinciple, o.measurementPrinciple, true) 1293 && compareDeep(productionSpecification, o.productionSpecification, true) && compareDeep(languageCode, o.languageCode, true) 1294 ; 1295 } 1296 1297 @Override 1298 public boolean equalsShallow(Base other_) { 1299 if (!super.equalsShallow(other_)) 1300 return false; 1301 if (!(other_ instanceof DeviceComponent)) 1302 return false; 1303 DeviceComponent o = (DeviceComponent) other_; 1304 return compareValues(lastSystemChange, o.lastSystemChange, true) && compareValues(measurementPrinciple, o.measurementPrinciple, true) 1305 ; 1306 } 1307 1308 public boolean isEmpty() { 1309 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, lastSystemChange 1310 , source, parent, operationalStatus, parameterGroup, measurementPrinciple, productionSpecification 1311 , languageCode); 1312 } 1313 1314 @Override 1315 public ResourceType getResourceType() { 1316 return ResourceType.DeviceComponent; 1317 } 1318 1319 /** 1320 * Search parameter: <b>parent</b> 1321 * <p> 1322 * Description: <b>The parent DeviceComponent resource</b><br> 1323 * Type: <b>reference</b><br> 1324 * Path: <b>DeviceComponent.parent</b><br> 1325 * </p> 1326 */ 1327 @SearchParamDefinition(name="parent", path="DeviceComponent.parent", description="The parent DeviceComponent resource", type="reference", target={DeviceComponent.class } ) 1328 public static final String SP_PARENT = "parent"; 1329 /** 1330 * <b>Fluent Client</b> search parameter constant for <b>parent</b> 1331 * <p> 1332 * Description: <b>The parent DeviceComponent resource</b><br> 1333 * Type: <b>reference</b><br> 1334 * Path: <b>DeviceComponent.parent</b><br> 1335 * </p> 1336 */ 1337 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARENT); 1338 1339/** 1340 * Constant for fluent queries to be used to add include statements. Specifies 1341 * the path value of "<b>DeviceComponent:parent</b>". 1342 */ 1343 public static final ca.uhn.fhir.model.api.Include INCLUDE_PARENT = new ca.uhn.fhir.model.api.Include("DeviceComponent:parent").toLocked(); 1344 1345 /** 1346 * Search parameter: <b>identifier</b> 1347 * <p> 1348 * Description: <b>The identifier of the component</b><br> 1349 * Type: <b>token</b><br> 1350 * Path: <b>DeviceComponent.identifier</b><br> 1351 * </p> 1352 */ 1353 @SearchParamDefinition(name="identifier", path="DeviceComponent.identifier", description="The identifier of the component", type="token" ) 1354 public static final String SP_IDENTIFIER = "identifier"; 1355 /** 1356 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1357 * <p> 1358 * Description: <b>The identifier of the component</b><br> 1359 * Type: <b>token</b><br> 1360 * Path: <b>DeviceComponent.identifier</b><br> 1361 * </p> 1362 */ 1363 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1364 1365 /** 1366 * Search parameter: <b>source</b> 1367 * <p> 1368 * Description: <b>The device source</b><br> 1369 * Type: <b>reference</b><br> 1370 * Path: <b>DeviceComponent.source</b><br> 1371 * </p> 1372 */ 1373 @SearchParamDefinition(name="source", path="DeviceComponent.source", description="The device source", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") }, target={Device.class } ) 1374 public static final String SP_SOURCE = "source"; 1375 /** 1376 * <b>Fluent Client</b> search parameter constant for <b>source</b> 1377 * <p> 1378 * Description: <b>The device source</b><br> 1379 * Type: <b>reference</b><br> 1380 * Path: <b>DeviceComponent.source</b><br> 1381 * </p> 1382 */ 1383 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SOURCE); 1384 1385/** 1386 * Constant for fluent queries to be used to add include statements. Specifies 1387 * the path value of "<b>DeviceComponent:source</b>". 1388 */ 1389 public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("DeviceComponent:source").toLocked(); 1390 1391 /** 1392 * Search parameter: <b>type</b> 1393 * <p> 1394 * Description: <b>The device component type</b><br> 1395 * Type: <b>token</b><br> 1396 * Path: <b>DeviceComponent.type</b><br> 1397 * </p> 1398 */ 1399 @SearchParamDefinition(name="type", path="DeviceComponent.type", description="The device component type", type="token" ) 1400 public static final String SP_TYPE = "type"; 1401 /** 1402 * <b>Fluent Client</b> search parameter constant for <b>type</b> 1403 * <p> 1404 * Description: <b>The device component type</b><br> 1405 * Type: <b>token</b><br> 1406 * Path: <b>DeviceComponent.type</b><br> 1407 * </p> 1408 */ 1409 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 1410 1411 1412}