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