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