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