001package org.hl7.fhir.r4.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 Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 033 034import java.util.*; 035 036import java.math.*; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r4.model.Enumerations.*; 039import ca.uhn.fhir.model.api.annotation.ResourceDef; 040import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 041import ca.uhn.fhir.model.api.annotation.Child; 042import ca.uhn.fhir.model.api.annotation.ChildOrder; 043import ca.uhn.fhir.model.api.annotation.Description; 044import ca.uhn.fhir.model.api.annotation.Block; 045import org.hl7.fhir.instance.model.api.*; 046import org.hl7.fhir.exceptions.FHIRException; 047/** 048 * A person's work information, structured to facilitate individual, population, and public health use; not intended to support billing. 049 */ 050@ResourceDef(name="OccupationalData", profile="http://hl7.org/fhir/Profile/OccupationalData") 051public class OccupationalData extends DomainResource { 052 053 @Block() 054 public static class OccupationalDataEmploymentStatusComponent extends BackboneElement implements IBaseBackboneElement { 055 /** 056 * A code that represents a person's current economic relationship to a job. 057 */ 058 @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 059 @Description(shortDefinition="Employment status code", formalDefinition="A code that represents a person's current economic relationship to a job." ) 060 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/employment-status-odh") 061 protected CodeableConcept code; 062 063 /** 064 * The start and end dates for a person's current economic relationship to a job. 065 */ 066 @Child(name = "effective", type = {Period.class}, order=2, min=1, max=1, modifier=false, summary=true) 067 @Description(shortDefinition="Employment status effective time period", formalDefinition="The start and end dates for a person's current economic relationship to a job." ) 068 protected Period effective; 069 070 private static final long serialVersionUID = -6533436L; 071 072 /** 073 * Constructor 074 */ 075 public OccupationalDataEmploymentStatusComponent() { 076 super(); 077 } 078 079 /** 080 * Constructor 081 */ 082 public OccupationalDataEmploymentStatusComponent(CodeableConcept code, Period effective) { 083 super(); 084 this.code = code; 085 this.effective = effective; 086 } 087 088 /** 089 * @return {@link #code} (A code that represents a person's current economic relationship to a job.) 090 */ 091 public CodeableConcept getCode() { 092 if (this.code == null) 093 if (Configuration.errorOnAutoCreate()) 094 throw new Error("Attempt to auto-create OccupationalDataEmploymentStatusComponent.code"); 095 else if (Configuration.doAutoCreate()) 096 this.code = new CodeableConcept(); // cc 097 return this.code; 098 } 099 100 public boolean hasCode() { 101 return this.code != null && !this.code.isEmpty(); 102 } 103 104 /** 105 * @param value {@link #code} (A code that represents a person's current economic relationship to a job.) 106 */ 107 public OccupationalDataEmploymentStatusComponent setCode(CodeableConcept value) { 108 this.code = value; 109 return this; 110 } 111 112 /** 113 * @return {@link #effective} (The start and end dates for a person's current economic relationship to a job.) 114 */ 115 public Period getEffective() { 116 if (this.effective == null) 117 if (Configuration.errorOnAutoCreate()) 118 throw new Error("Attempt to auto-create OccupationalDataEmploymentStatusComponent.effective"); 119 else if (Configuration.doAutoCreate()) 120 this.effective = new Period(); // cc 121 return this.effective; 122 } 123 124 public boolean hasEffective() { 125 return this.effective != null && !this.effective.isEmpty(); 126 } 127 128 /** 129 * @param value {@link #effective} (The start and end dates for a person's current economic relationship to a job.) 130 */ 131 public OccupationalDataEmploymentStatusComponent setEffective(Period value) { 132 this.effective = value; 133 return this; 134 } 135 136 protected void listChildren(List<Property> children) { 137 super.listChildren(children); 138 children.add(new Property("code", "CodeableConcept", "A code that represents a person's current economic relationship to a job.", 0, 1, code)); 139 children.add(new Property("effective", "Period", "The start and end dates for a person's current economic relationship to a job.", 0, 1, effective)); 140 } 141 142 @Override 143 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 144 switch (_hash) { 145 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A code that represents a person's current economic relationship to a job.", 0, 1, code); 146 case -1468651097: /*effective*/ return new Property("effective", "Period", "The start and end dates for a person's current economic relationship to a job.", 0, 1, effective); 147 default: return super.getNamedProperty(_hash, _name, _checkValid); 148 } 149 150 } 151 152 @Override 153 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 154 switch (hash) { 155 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 156 case -1468651097: /*effective*/ return this.effective == null ? new Base[0] : new Base[] {this.effective}; // Period 157 default: return super.getProperty(hash, name, checkValid); 158 } 159 160 } 161 162 @Override 163 public Base setProperty(int hash, String name, Base value) throws FHIRException { 164 switch (hash) { 165 case 3059181: // code 166 this.code = castToCodeableConcept(value); // CodeableConcept 167 return value; 168 case -1468651097: // effective 169 this.effective = castToPeriod(value); // Period 170 return value; 171 default: return super.setProperty(hash, name, value); 172 } 173 174 } 175 176 @Override 177 public Base setProperty(String name, Base value) throws FHIRException { 178 if (name.equals("code")) { 179 this.code = castToCodeableConcept(value); // CodeableConcept 180 } else if (name.equals("effective")) { 181 this.effective = castToPeriod(value); // Period 182 } else 183 return super.setProperty(name, value); 184 return value; 185 } 186 187 @Override 188 public Base makeProperty(int hash, String name) throws FHIRException { 189 switch (hash) { 190 case 3059181: return getCode(); 191 case -1468651097: return getEffective(); 192 default: return super.makeProperty(hash, name); 193 } 194 195 } 196 197 @Override 198 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 199 switch (hash) { 200 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 201 case -1468651097: /*effective*/ return new String[] {"Period"}; 202 default: return super.getTypesForProperty(hash, name); 203 } 204 205 } 206 207 @Override 208 public Base addChild(String name) throws FHIRException { 209 if (name.equals("code")) { 210 this.code = new CodeableConcept(); 211 return this.code; 212 } 213 else if (name.equals("effective")) { 214 this.effective = new Period(); 215 return this.effective; 216 } 217 else 218 return super.addChild(name); 219 } 220 221 public OccupationalDataEmploymentStatusComponent copy() { 222 OccupationalDataEmploymentStatusComponent dst = new OccupationalDataEmploymentStatusComponent(); 223 copyValues(dst); 224 dst.code = code == null ? null : code.copy(); 225 dst.effective = effective == null ? null : effective.copy(); 226 return dst; 227 } 228 229 @Override 230 public boolean equalsDeep(Base other_) { 231 if (!super.equalsDeep(other_)) 232 return false; 233 if (!(other_ instanceof OccupationalDataEmploymentStatusComponent)) 234 return false; 235 OccupationalDataEmploymentStatusComponent o = (OccupationalDataEmploymentStatusComponent) other_; 236 return compareDeep(code, o.code, true) && compareDeep(effective, o.effective, true); 237 } 238 239 @Override 240 public boolean equalsShallow(Base other_) { 241 if (!super.equalsShallow(other_)) 242 return false; 243 if (!(other_ instanceof OccupationalDataEmploymentStatusComponent)) 244 return false; 245 OccupationalDataEmploymentStatusComponent o = (OccupationalDataEmploymentStatusComponent) other_; 246 return true; 247 } 248 249 public boolean isEmpty() { 250 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, effective); 251 } 252 253 public String fhirType() { 254 return "OccupationalData.employmentStatus"; 255 256 } 257 258 } 259 260 @Block() 261 public static class OccupationalDataUsualWorkComponent extends BackboneElement implements IBaseBackboneElement { 262 /** 263 * A code that represents the type of work a person has held for the longest amount of time during his or her life. 264 */ 265 @Child(name = "occupation", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 266 @Description(shortDefinition="Usual Work occupation", formalDefinition="A code that represents the type of work a person has held for the longest amount of time during his or her life." ) 267 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/occupation-cdc-census-2010") 268 protected CodeableConcept occupation; 269 270 /** 271 * A code that represents the type of business a person has worked in for the longest total time while in the usual occupation. 272 */ 273 @Child(name = "industry", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true) 274 @Description(shortDefinition="Usual Work industry", formalDefinition="A code that represents the type of business a person has worked in for the longest total time while in the usual occupation." ) 275 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/industry-cdc-census-2010") 276 protected CodeableConcept industry; 277 278 /** 279 * The date when a person first started working in their usual occupation. 280 */ 281 @Child(name = "start", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) 282 @Description(shortDefinition="Usual Work start time", formalDefinition="The date when a person first started working in their usual occupation." ) 283 protected DateTimeType start; 284 285 /** 286 * Total of all periods of time a person has spent in the usual occupation, not including intermittent period(s) where the person was not working in that occupation. 287 */ 288 @Child(name = "duration", type = {Duration.class}, order=4, min=0, max=1, modifier=false, summary=true) 289 @Description(shortDefinition="Usual Work duration", formalDefinition="Total of all periods of time a person has spent in the usual occupation, not including intermittent period(s) where the person was not working in that occupation." ) 290 protected Duration duration; 291 292 private static final long serialVersionUID = -1952160116L; 293 294 /** 295 * Constructor 296 */ 297 public OccupationalDataUsualWorkComponent() { 298 super(); 299 } 300 301 /** 302 * Constructor 303 */ 304 public OccupationalDataUsualWorkComponent(CodeableConcept occupation, CodeableConcept industry) { 305 super(); 306 this.occupation = occupation; 307 this.industry = industry; 308 } 309 310 /** 311 * @return {@link #occupation} (A code that represents the type of work a person has held for the longest amount of time during his or her life.) 312 */ 313 public CodeableConcept getOccupation() { 314 if (this.occupation == null) 315 if (Configuration.errorOnAutoCreate()) 316 throw new Error("Attempt to auto-create OccupationalDataUsualWorkComponent.occupation"); 317 else if (Configuration.doAutoCreate()) 318 this.occupation = new CodeableConcept(); // cc 319 return this.occupation; 320 } 321 322 public boolean hasOccupation() { 323 return this.occupation != null && !this.occupation.isEmpty(); 324 } 325 326 /** 327 * @param value {@link #occupation} (A code that represents the type of work a person has held for the longest amount of time during his or her life.) 328 */ 329 public OccupationalDataUsualWorkComponent setOccupation(CodeableConcept value) { 330 this.occupation = value; 331 return this; 332 } 333 334 /** 335 * @return {@link #industry} (A code that represents the type of business a person has worked in for the longest total time while in the usual occupation.) 336 */ 337 public CodeableConcept getIndustry() { 338 if (this.industry == null) 339 if (Configuration.errorOnAutoCreate()) 340 throw new Error("Attempt to auto-create OccupationalDataUsualWorkComponent.industry"); 341 else if (Configuration.doAutoCreate()) 342 this.industry = new CodeableConcept(); // cc 343 return this.industry; 344 } 345 346 public boolean hasIndustry() { 347 return this.industry != null && !this.industry.isEmpty(); 348 } 349 350 /** 351 * @param value {@link #industry} (A code that represents the type of business a person has worked in for the longest total time while in the usual occupation.) 352 */ 353 public OccupationalDataUsualWorkComponent setIndustry(CodeableConcept value) { 354 this.industry = value; 355 return this; 356 } 357 358 /** 359 * @return {@link #start} (The date when a person first started working in their usual occupation.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value 360 */ 361 public DateTimeType getStartElement() { 362 if (this.start == null) 363 if (Configuration.errorOnAutoCreate()) 364 throw new Error("Attempt to auto-create OccupationalDataUsualWorkComponent.start"); 365 else if (Configuration.doAutoCreate()) 366 this.start = new DateTimeType(); // bb 367 return this.start; 368 } 369 370 public boolean hasStartElement() { 371 return this.start != null && !this.start.isEmpty(); 372 } 373 374 public boolean hasStart() { 375 return this.start != null && !this.start.isEmpty(); 376 } 377 378 /** 379 * @param value {@link #start} (The date when a person first started working in their usual occupation.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value 380 */ 381 public OccupationalDataUsualWorkComponent setStartElement(DateTimeType value) { 382 this.start = value; 383 return this; 384 } 385 386 /** 387 * @return The date when a person first started working in their usual occupation. 388 */ 389 public Date getStart() { 390 return this.start == null ? null : this.start.getValue(); 391 } 392 393 /** 394 * @param value The date when a person first started working in their usual occupation. 395 */ 396 public OccupationalDataUsualWorkComponent setStart(Date value) { 397 if (value == null) 398 this.start = null; 399 else { 400 if (this.start == null) 401 this.start = new DateTimeType(); 402 this.start.setValue(value); 403 } 404 return this; 405 } 406 407 /** 408 * @return {@link #duration} (Total of all periods of time a person has spent in the usual occupation, not including intermittent period(s) where the person was not working in that occupation.) 409 */ 410 public Duration getDuration() { 411 if (this.duration == null) 412 if (Configuration.errorOnAutoCreate()) 413 throw new Error("Attempt to auto-create OccupationalDataUsualWorkComponent.duration"); 414 else if (Configuration.doAutoCreate()) 415 this.duration = new Duration(); // cc 416 return this.duration; 417 } 418 419 public boolean hasDuration() { 420 return this.duration != null && !this.duration.isEmpty(); 421 } 422 423 /** 424 * @param value {@link #duration} (Total of all periods of time a person has spent in the usual occupation, not including intermittent period(s) where the person was not working in that occupation.) 425 */ 426 public OccupationalDataUsualWorkComponent setDuration(Duration value) { 427 this.duration = value; 428 return this; 429 } 430 431 protected void listChildren(List<Property> children) { 432 super.listChildren(children); 433 children.add(new Property("occupation", "CodeableConcept", "A code that represents the type of work a person has held for the longest amount of time during his or her life.", 0, 1, occupation)); 434 children.add(new Property("industry", "CodeableConcept", "A code that represents the type of business a person has worked in for the longest total time while in the usual occupation.", 0, 1, industry)); 435 children.add(new Property("start", "dateTime", "The date when a person first started working in their usual occupation.", 0, 1, start)); 436 children.add(new Property("duration", "Duration", "Total of all periods of time a person has spent in the usual occupation, not including intermittent period(s) where the person was not working in that occupation.", 0, 1, duration)); 437 } 438 439 @Override 440 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 441 switch (_hash) { 442 case 1615358283: /*occupation*/ return new Property("occupation", "CodeableConcept", "A code that represents the type of work a person has held for the longest amount of time during his or her life.", 0, 1, occupation); 443 case 127156702: /*industry*/ return new Property("industry", "CodeableConcept", "A code that represents the type of business a person has worked in for the longest total time while in the usual occupation.", 0, 1, industry); 444 case 109757538: /*start*/ return new Property("start", "dateTime", "The date when a person first started working in their usual occupation.", 0, 1, start); 445 case -1992012396: /*duration*/ return new Property("duration", "Duration", "Total of all periods of time a person has spent in the usual occupation, not including intermittent period(s) where the person was not working in that occupation.", 0, 1, duration); 446 default: return super.getNamedProperty(_hash, _name, _checkValid); 447 } 448 449 } 450 451 @Override 452 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 453 switch (hash) { 454 case 1615358283: /*occupation*/ return this.occupation == null ? new Base[0] : new Base[] {this.occupation}; // CodeableConcept 455 case 127156702: /*industry*/ return this.industry == null ? new Base[0] : new Base[] {this.industry}; // CodeableConcept 456 case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // DateTimeType 457 case -1992012396: /*duration*/ return this.duration == null ? new Base[0] : new Base[] {this.duration}; // Duration 458 default: return super.getProperty(hash, name, checkValid); 459 } 460 461 } 462 463 @Override 464 public Base setProperty(int hash, String name, Base value) throws FHIRException { 465 switch (hash) { 466 case 1615358283: // occupation 467 this.occupation = castToCodeableConcept(value); // CodeableConcept 468 return value; 469 case 127156702: // industry 470 this.industry = castToCodeableConcept(value); // CodeableConcept 471 return value; 472 case 109757538: // start 473 this.start = castToDateTime(value); // DateTimeType 474 return value; 475 case -1992012396: // duration 476 this.duration = castToDuration(value); // Duration 477 return value; 478 default: return super.setProperty(hash, name, value); 479 } 480 481 } 482 483 @Override 484 public Base setProperty(String name, Base value) throws FHIRException { 485 if (name.equals("occupation")) { 486 this.occupation = castToCodeableConcept(value); // CodeableConcept 487 } else if (name.equals("industry")) { 488 this.industry = castToCodeableConcept(value); // CodeableConcept 489 } else if (name.equals("start")) { 490 this.start = castToDateTime(value); // DateTimeType 491 } else if (name.equals("duration")) { 492 this.duration = castToDuration(value); // Duration 493 } else 494 return super.setProperty(name, value); 495 return value; 496 } 497 498 @Override 499 public Base makeProperty(int hash, String name) throws FHIRException { 500 switch (hash) { 501 case 1615358283: return getOccupation(); 502 case 127156702: return getIndustry(); 503 case 109757538: return getStartElement(); 504 case -1992012396: return getDuration(); 505 default: return super.makeProperty(hash, name); 506 } 507 508 } 509 510 @Override 511 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 512 switch (hash) { 513 case 1615358283: /*occupation*/ return new String[] {"CodeableConcept"}; 514 case 127156702: /*industry*/ return new String[] {"CodeableConcept"}; 515 case 109757538: /*start*/ return new String[] {"dateTime"}; 516 case -1992012396: /*duration*/ return new String[] {"Duration"}; 517 default: return super.getTypesForProperty(hash, name); 518 } 519 520 } 521 522 @Override 523 public Base addChild(String name) throws FHIRException { 524 if (name.equals("occupation")) { 525 this.occupation = new CodeableConcept(); 526 return this.occupation; 527 } 528 else if (name.equals("industry")) { 529 this.industry = new CodeableConcept(); 530 return this.industry; 531 } 532 else if (name.equals("start")) { 533 throw new FHIRException("Cannot call addChild on a primitive type OccupationalData.start"); 534 } 535 else if (name.equals("duration")) { 536 this.duration = new Duration(); 537 return this.duration; 538 } 539 else 540 return super.addChild(name); 541 } 542 543 public OccupationalDataUsualWorkComponent copy() { 544 OccupationalDataUsualWorkComponent dst = new OccupationalDataUsualWorkComponent(); 545 copyValues(dst); 546 dst.occupation = occupation == null ? null : occupation.copy(); 547 dst.industry = industry == null ? null : industry.copy(); 548 dst.start = start == null ? null : start.copy(); 549 dst.duration = duration == null ? null : duration.copy(); 550 return dst; 551 } 552 553 @Override 554 public boolean equalsDeep(Base other_) { 555 if (!super.equalsDeep(other_)) 556 return false; 557 if (!(other_ instanceof OccupationalDataUsualWorkComponent)) 558 return false; 559 OccupationalDataUsualWorkComponent o = (OccupationalDataUsualWorkComponent) other_; 560 return compareDeep(occupation, o.occupation, true) && compareDeep(industry, o.industry, true) && compareDeep(start, o.start, true) 561 && compareDeep(duration, o.duration, true); 562 } 563 564 @Override 565 public boolean equalsShallow(Base other_) { 566 if (!super.equalsShallow(other_)) 567 return false; 568 if (!(other_ instanceof OccupationalDataUsualWorkComponent)) 569 return false; 570 OccupationalDataUsualWorkComponent o = (OccupationalDataUsualWorkComponent) other_; 571 return compareValues(start, o.start, true); 572 } 573 574 public boolean isEmpty() { 575 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(occupation, industry, start 576 , duration); 577 } 578 579 public String fhirType() { 580 return "OccupationalData.usualWork"; 581 582 } 583 584 } 585 586 @Block() 587 public static class OccupationalDataPastOrPresentJobComponent extends BackboneElement implements IBaseBackboneElement { 588 /** 589 * A code that represents the type of work done by a person at one job. 590 */ 591 @Child(name = "occupation", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 592 @Description(shortDefinition="Past or Present Job occupation", formalDefinition="A code that represents the type of work done by a person at one job." ) 593 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/occupation-cdc-census-2010") 594 protected CodeableConcept occupation; 595 596 /** 597 * A code that represents the type of business associated with a person's Past or Present Job; i.e., for one job. A change in industry indicates a change in job. 598 */ 599 @Child(name = "industry", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true) 600 @Description(shortDefinition="Past or Present Job industry", formalDefinition="A code that represents the type of business associated with a person's Past or Present Job; i.e., for one job. A change in industry indicates a change in job." ) 601 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/industry-cdc-census-2010") 602 protected CodeableConcept industry; 603 604 /** 605 * The start and end dates for one job. A change in occupation, supervisory level, industry, employer, or employer location is considered a new job. 606 */ 607 @Child(name = "effective", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=true) 608 @Description(shortDefinition="Past or Present Job effective time period", formalDefinition="The start and end dates for one job. A change in occupation, supervisory level, industry, employer, or employer location is considered a new job." ) 609 protected Period effective; 610 611 /** 612 * The party, be it an individual or an organization, responsible for providing compensation to a person performing work, or in the case of unpaid work, the party responsible for engaging the person in a position. For military occupations, this refers to the name of the person's military home base; the person's Branch of Service is recorded as industry. A change in employer or employer location indicates a change in job. 613 */ 614 @Child(name = "employer", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) 615 @Description(shortDefinition="Past or Present Job employer", formalDefinition="The party, be it an individual or an organization, responsible for providing compensation to a person performing work, or in the case of unpaid work, the party responsible for engaging the person in a position. For military occupations, this refers to the name of the person's military home base; the person's Branch of Service is recorded as industry. A change in employer or employer location indicates a change in job." ) 616 protected Reference employer; 617 618 /** 619 * The actual object that is the target of the reference (The party, be it an individual or an organization, responsible for providing compensation to a person performing work, or in the case of unpaid work, the party responsible for engaging the person in a position. For military occupations, this refers to the name of the person's military home base; the person's Branch of Service is recorded as industry. A change in employer or employer location indicates a change in job.) 620 */ 621 protected Organization employerTarget; 622 623 /** 624 * The classification of a person's job (one job) as defined by compensation and sector (e.g. paid, unpaid, self-employed, government, etc.). This is different from employment status: a person who is a volunteer (work classification) may have chosen not to be in the labor force (employment status). 625 */ 626 @Child(name = "workClassification", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) 627 @Description(shortDefinition="Past or Present Job work classification", formalDefinition="The classification of a person's job (one job) as defined by compensation and sector (e.g. paid, unpaid, self-employed, government, etc.). This is different from employment status: a person who is a volunteer (work classification) may have chosen not to be in the labor force (employment status)." ) 628 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/work-classification-odh") 629 protected CodeableConcept workClassification; 630 631 /** 632 * Reflects the amount of supervisory or management responsibilities of a person at one job. For military jobs, pay grade is used as a proxy because it can be interpreted across branches of service. A change in supervisory level is considered a new job. 633 */ 634 @Child(name = "supervisoryLevel", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) 635 @Description(shortDefinition="Past or Present Job supervisory level", formalDefinition="Reflects the amount of supervisory or management responsibilities of a person at one job. For military jobs, pay grade is used as a proxy because it can be interpreted across branches of service. A change in supervisory level is considered a new job." ) 636 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supervisory-level-odh-us") 637 protected CodeableConcept supervisoryLevel; 638 639 /** 640 * A regular action performed at a single job. 641 */ 642 @Child(name = "jobDuty", type = {StringType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 643 @Description(shortDefinition="Past or Present Job job duty", formalDefinition="A regular action performed at a single job." ) 644 protected List<StringType> jobDuty; 645 646 /** 647 * A hazard that is specific to a person's work or work environment for a single job and with which the person might come in contact. A hazard is a source of potential harm to an individual's physical or mental health (e.g., biological, chemical, physical, psychological, radiological). 648 */ 649 @Child(name = "occupationalHazard", type = {StringType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 650 @Description(shortDefinition="Past or Present Job occupational hazard", formalDefinition="A hazard that is specific to a person's work or work environment for a single job and with which the person might come in contact. A hazard is a source of potential harm to an individual's physical or mental health (e.g., biological, chemical, physical, psychological, radiological)." ) 651 protected List<StringType> occupationalHazard; 652 653 /** 654 * Describes a person's typical arrangement of working hours for one job. 655 */ 656 @Child(name = "workSchedule", type = {}, order=9, min=0, max=1, modifier=false, summary=true) 657 @Description(shortDefinition="Past or Present Job work schedule", formalDefinition="Describes a person's typical arrangement of working hours for one job." ) 658 protected OccupationalDataPastOrPresentJobWorkScheduleComponent workSchedule; 659 660 private static final long serialVersionUID = 354602497L; 661 662 /** 663 * Constructor 664 */ 665 public OccupationalDataPastOrPresentJobComponent() { 666 super(); 667 } 668 669 /** 670 * Constructor 671 */ 672 public OccupationalDataPastOrPresentJobComponent(CodeableConcept occupation, CodeableConcept industry) { 673 super(); 674 this.occupation = occupation; 675 this.industry = industry; 676 } 677 678 /** 679 * @return {@link #occupation} (A code that represents the type of work done by a person at one job.) 680 */ 681 public CodeableConcept getOccupation() { 682 if (this.occupation == null) 683 if (Configuration.errorOnAutoCreate()) 684 throw new Error("Attempt to auto-create OccupationalDataPastOrPresentJobComponent.occupation"); 685 else if (Configuration.doAutoCreate()) 686 this.occupation = new CodeableConcept(); // cc 687 return this.occupation; 688 } 689 690 public boolean hasOccupation() { 691 return this.occupation != null && !this.occupation.isEmpty(); 692 } 693 694 /** 695 * @param value {@link #occupation} (A code that represents the type of work done by a person at one job.) 696 */ 697 public OccupationalDataPastOrPresentJobComponent setOccupation(CodeableConcept value) { 698 this.occupation = value; 699 return this; 700 } 701 702 /** 703 * @return {@link #industry} (A code that represents the type of business associated with a person's Past or Present Job; i.e., for one job. A change in industry indicates a change in job.) 704 */ 705 public CodeableConcept getIndustry() { 706 if (this.industry == null) 707 if (Configuration.errorOnAutoCreate()) 708 throw new Error("Attempt to auto-create OccupationalDataPastOrPresentJobComponent.industry"); 709 else if (Configuration.doAutoCreate()) 710 this.industry = new CodeableConcept(); // cc 711 return this.industry; 712 } 713 714 public boolean hasIndustry() { 715 return this.industry != null && !this.industry.isEmpty(); 716 } 717 718 /** 719 * @param value {@link #industry} (A code that represents the type of business associated with a person's Past or Present Job; i.e., for one job. A change in industry indicates a change in job.) 720 */ 721 public OccupationalDataPastOrPresentJobComponent setIndustry(CodeableConcept value) { 722 this.industry = value; 723 return this; 724 } 725 726 /** 727 * @return {@link #effective} (The start and end dates for one job. A change in occupation, supervisory level, industry, employer, or employer location is considered a new job.) 728 */ 729 public Period getEffective() { 730 if (this.effective == null) 731 if (Configuration.errorOnAutoCreate()) 732 throw new Error("Attempt to auto-create OccupationalDataPastOrPresentJobComponent.effective"); 733 else if (Configuration.doAutoCreate()) 734 this.effective = new Period(); // cc 735 return this.effective; 736 } 737 738 public boolean hasEffective() { 739 return this.effective != null && !this.effective.isEmpty(); 740 } 741 742 /** 743 * @param value {@link #effective} (The start and end dates for one job. A change in occupation, supervisory level, industry, employer, or employer location is considered a new job.) 744 */ 745 public OccupationalDataPastOrPresentJobComponent setEffective(Period value) { 746 this.effective = value; 747 return this; 748 } 749 750 /** 751 * @return {@link #employer} (The party, be it an individual or an organization, responsible for providing compensation to a person performing work, or in the case of unpaid work, the party responsible for engaging the person in a position. For military occupations, this refers to the name of the person's military home base; the person's Branch of Service is recorded as industry. A change in employer or employer location indicates a change in job.) 752 */ 753 public Reference getEmployer() { 754 if (this.employer == null) 755 if (Configuration.errorOnAutoCreate()) 756 throw new Error("Attempt to auto-create OccupationalDataPastOrPresentJobComponent.employer"); 757 else if (Configuration.doAutoCreate()) 758 this.employer = new Reference(); // cc 759 return this.employer; 760 } 761 762 public boolean hasEmployer() { 763 return this.employer != null && !this.employer.isEmpty(); 764 } 765 766 /** 767 * @param value {@link #employer} (The party, be it an individual or an organization, responsible for providing compensation to a person performing work, or in the case of unpaid work, the party responsible for engaging the person in a position. For military occupations, this refers to the name of the person's military home base; the person's Branch of Service is recorded as industry. A change in employer or employer location indicates a change in job.) 768 */ 769 public OccupationalDataPastOrPresentJobComponent setEmployer(Reference value) { 770 this.employer = value; 771 return this; 772 } 773 774 /** 775 * @return {@link #employer} 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 party, be it an individual or an organization, responsible for providing compensation to a person performing work, or in the case of unpaid work, the party responsible for engaging the person in a position. For military occupations, this refers to the name of the person's military home base; the person's Branch of Service is recorded as industry. A change in employer or employer location indicates a change in job.) 776 */ 777 public Organization getEmployerTarget() { 778 if (this.employerTarget == null) 779 if (Configuration.errorOnAutoCreate()) 780 throw new Error("Attempt to auto-create OccupationalDataPastOrPresentJobComponent.employer"); 781 else if (Configuration.doAutoCreate()) 782 this.employerTarget = new Organization(); // aa 783 return this.employerTarget; 784 } 785 786 /** 787 * @param value {@link #employer} 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 party, be it an individual or an organization, responsible for providing compensation to a person performing work, or in the case of unpaid work, the party responsible for engaging the person in a position. For military occupations, this refers to the name of the person's military home base; the person's Branch of Service is recorded as industry. A change in employer or employer location indicates a change in job.) 788 */ 789 public OccupationalDataPastOrPresentJobComponent setEmployerTarget(Organization value) { 790 this.employerTarget = value; 791 return this; 792 } 793 794 /** 795 * @return {@link #workClassification} (The classification of a person's job (one job) as defined by compensation and sector (e.g. paid, unpaid, self-employed, government, etc.). This is different from employment status: a person who is a volunteer (work classification) may have chosen not to be in the labor force (employment status).) 796 */ 797 public CodeableConcept getWorkClassification() { 798 if (this.workClassification == null) 799 if (Configuration.errorOnAutoCreate()) 800 throw new Error("Attempt to auto-create OccupationalDataPastOrPresentJobComponent.workClassification"); 801 else if (Configuration.doAutoCreate()) 802 this.workClassification = new CodeableConcept(); // cc 803 return this.workClassification; 804 } 805 806 public boolean hasWorkClassification() { 807 return this.workClassification != null && !this.workClassification.isEmpty(); 808 } 809 810 /** 811 * @param value {@link #workClassification} (The classification of a person's job (one job) as defined by compensation and sector (e.g. paid, unpaid, self-employed, government, etc.). This is different from employment status: a person who is a volunteer (work classification) may have chosen not to be in the labor force (employment status).) 812 */ 813 public OccupationalDataPastOrPresentJobComponent setWorkClassification(CodeableConcept value) { 814 this.workClassification = value; 815 return this; 816 } 817 818 /** 819 * @return {@link #supervisoryLevel} (Reflects the amount of supervisory or management responsibilities of a person at one job. For military jobs, pay grade is used as a proxy because it can be interpreted across branches of service. A change in supervisory level is considered a new job.) 820 */ 821 public CodeableConcept getSupervisoryLevel() { 822 if (this.supervisoryLevel == null) 823 if (Configuration.errorOnAutoCreate()) 824 throw new Error("Attempt to auto-create OccupationalDataPastOrPresentJobComponent.supervisoryLevel"); 825 else if (Configuration.doAutoCreate()) 826 this.supervisoryLevel = new CodeableConcept(); // cc 827 return this.supervisoryLevel; 828 } 829 830 public boolean hasSupervisoryLevel() { 831 return this.supervisoryLevel != null && !this.supervisoryLevel.isEmpty(); 832 } 833 834 /** 835 * @param value {@link #supervisoryLevel} (Reflects the amount of supervisory or management responsibilities of a person at one job. For military jobs, pay grade is used as a proxy because it can be interpreted across branches of service. A change in supervisory level is considered a new job.) 836 */ 837 public OccupationalDataPastOrPresentJobComponent setSupervisoryLevel(CodeableConcept value) { 838 this.supervisoryLevel = value; 839 return this; 840 } 841 842 /** 843 * @return {@link #jobDuty} (A regular action performed at a single job.) 844 */ 845 public List<StringType> getJobDuty() { 846 if (this.jobDuty == null) 847 this.jobDuty = new ArrayList<StringType>(); 848 return this.jobDuty; 849 } 850 851 /** 852 * @return Returns a reference to <code>this</code> for easy method chaining 853 */ 854 public OccupationalDataPastOrPresentJobComponent setJobDuty(List<StringType> theJobDuty) { 855 this.jobDuty = theJobDuty; 856 return this; 857 } 858 859 public boolean hasJobDuty() { 860 if (this.jobDuty == null) 861 return false; 862 for (StringType item : this.jobDuty) 863 if (!item.isEmpty()) 864 return true; 865 return false; 866 } 867 868 /** 869 * @return {@link #jobDuty} (A regular action performed at a single job.) 870 */ 871 public StringType addJobDutyElement() {//2 872 StringType t = new StringType(); 873 if (this.jobDuty == null) 874 this.jobDuty = new ArrayList<StringType>(); 875 this.jobDuty.add(t); 876 return t; 877 } 878 879 /** 880 * @param value {@link #jobDuty} (A regular action performed at a single job.) 881 */ 882 public OccupationalDataPastOrPresentJobComponent addJobDuty(String value) { //1 883 StringType t = new StringType(); 884 t.setValue(value); 885 if (this.jobDuty == null) 886 this.jobDuty = new ArrayList<StringType>(); 887 this.jobDuty.add(t); 888 return this; 889 } 890 891 /** 892 * @param value {@link #jobDuty} (A regular action performed at a single job.) 893 */ 894 public boolean hasJobDuty(String value) { 895 if (this.jobDuty == null) 896 return false; 897 for (StringType v : this.jobDuty) 898 if (v.getValue().equals(value)) // string 899 return true; 900 return false; 901 } 902 903 /** 904 * @return {@link #occupationalHazard} (A hazard that is specific to a person's work or work environment for a single job and with which the person might come in contact. A hazard is a source of potential harm to an individual's physical or mental health (e.g., biological, chemical, physical, psychological, radiological).) 905 */ 906 public List<StringType> getOccupationalHazard() { 907 if (this.occupationalHazard == null) 908 this.occupationalHazard = new ArrayList<StringType>(); 909 return this.occupationalHazard; 910 } 911 912 /** 913 * @return Returns a reference to <code>this</code> for easy method chaining 914 */ 915 public OccupationalDataPastOrPresentJobComponent setOccupationalHazard(List<StringType> theOccupationalHazard) { 916 this.occupationalHazard = theOccupationalHazard; 917 return this; 918 } 919 920 public boolean hasOccupationalHazard() { 921 if (this.occupationalHazard == null) 922 return false; 923 for (StringType item : this.occupationalHazard) 924 if (!item.isEmpty()) 925 return true; 926 return false; 927 } 928 929 /** 930 * @return {@link #occupationalHazard} (A hazard that is specific to a person's work or work environment for a single job and with which the person might come in contact. A hazard is a source of potential harm to an individual's physical or mental health (e.g., biological, chemical, physical, psychological, radiological).) 931 */ 932 public StringType addOccupationalHazardElement() {//2 933 StringType t = new StringType(); 934 if (this.occupationalHazard == null) 935 this.occupationalHazard = new ArrayList<StringType>(); 936 this.occupationalHazard.add(t); 937 return t; 938 } 939 940 /** 941 * @param value {@link #occupationalHazard} (A hazard that is specific to a person's work or work environment for a single job and with which the person might come in contact. A hazard is a source of potential harm to an individual's physical or mental health (e.g., biological, chemical, physical, psychological, radiological).) 942 */ 943 public OccupationalDataPastOrPresentJobComponent addOccupationalHazard(String value) { //1 944 StringType t = new StringType(); 945 t.setValue(value); 946 if (this.occupationalHazard == null) 947 this.occupationalHazard = new ArrayList<StringType>(); 948 this.occupationalHazard.add(t); 949 return this; 950 } 951 952 /** 953 * @param value {@link #occupationalHazard} (A hazard that is specific to a person's work or work environment for a single job and with which the person might come in contact. A hazard is a source of potential harm to an individual's physical or mental health (e.g., biological, chemical, physical, psychological, radiological).) 954 */ 955 public boolean hasOccupationalHazard(String value) { 956 if (this.occupationalHazard == null) 957 return false; 958 for (StringType v : this.occupationalHazard) 959 if (v.getValue().equals(value)) // string 960 return true; 961 return false; 962 } 963 964 /** 965 * @return {@link #workSchedule} (Describes a person's typical arrangement of working hours for one job.) 966 */ 967 public OccupationalDataPastOrPresentJobWorkScheduleComponent getWorkSchedule() { 968 if (this.workSchedule == null) 969 if (Configuration.errorOnAutoCreate()) 970 throw new Error("Attempt to auto-create OccupationalDataPastOrPresentJobComponent.workSchedule"); 971 else if (Configuration.doAutoCreate()) 972 this.workSchedule = new OccupationalDataPastOrPresentJobWorkScheduleComponent(); // cc 973 return this.workSchedule; 974 } 975 976 public boolean hasWorkSchedule() { 977 return this.workSchedule != null && !this.workSchedule.isEmpty(); 978 } 979 980 /** 981 * @param value {@link #workSchedule} (Describes a person's typical arrangement of working hours for one job.) 982 */ 983 public OccupationalDataPastOrPresentJobComponent setWorkSchedule(OccupationalDataPastOrPresentJobWorkScheduleComponent value) { 984 this.workSchedule = value; 985 return this; 986 } 987 988 protected void listChildren(List<Property> children) { 989 super.listChildren(children); 990 children.add(new Property("occupation", "CodeableConcept", "A code that represents the type of work done by a person at one job.", 0, 1, occupation)); 991 children.add(new Property("industry", "CodeableConcept", "A code that represents the type of business associated with a person's Past or Present Job; i.e., for one job. A change in industry indicates a change in job.", 0, 1, industry)); 992 children.add(new Property("effective", "Period", "The start and end dates for one job. A change in occupation, supervisory level, industry, employer, or employer location is considered a new job.", 0, 1, effective)); 993 children.add(new Property("employer", "Reference(Organization)", "The party, be it an individual or an organization, responsible for providing compensation to a person performing work, or in the case of unpaid work, the party responsible for engaging the person in a position. For military occupations, this refers to the name of the person's military home base; the person's Branch of Service is recorded as industry. A change in employer or employer location indicates a change in job.", 0, 1, employer)); 994 children.add(new Property("workClassification", "CodeableConcept", "The classification of a person's job (one job) as defined by compensation and sector (e.g. paid, unpaid, self-employed, government, etc.). This is different from employment status: a person who is a volunteer (work classification) may have chosen not to be in the labor force (employment status).", 0, 1, workClassification)); 995 children.add(new Property("supervisoryLevel", "CodeableConcept", "Reflects the amount of supervisory or management responsibilities of a person at one job. For military jobs, pay grade is used as a proxy because it can be interpreted across branches of service. A change in supervisory level is considered a new job.", 0, 1, supervisoryLevel)); 996 children.add(new Property("jobDuty", "string", "A regular action performed at a single job.", 0, java.lang.Integer.MAX_VALUE, jobDuty)); 997 children.add(new Property("occupationalHazard", "string", "A hazard that is specific to a person's work or work environment for a single job and with which the person might come in contact. A hazard is a source of potential harm to an individual's physical or mental health (e.g., biological, chemical, physical, psychological, radiological).", 0, java.lang.Integer.MAX_VALUE, occupationalHazard)); 998 children.add(new Property("workSchedule", "", "Describes a person's typical arrangement of working hours for one job.", 0, 1, workSchedule)); 999 } 1000 1001 @Override 1002 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1003 switch (_hash) { 1004 case 1615358283: /*occupation*/ return new Property("occupation", "CodeableConcept", "A code that represents the type of work done by a person at one job.", 0, 1, occupation); 1005 case 127156702: /*industry*/ return new Property("industry", "CodeableConcept", "A code that represents the type of business associated with a person's Past or Present Job; i.e., for one job. A change in industry indicates a change in job.", 0, 1, industry); 1006 case -1468651097: /*effective*/ return new Property("effective", "Period", "The start and end dates for one job. A change in occupation, supervisory level, industry, employer, or employer location is considered a new job.", 0, 1, effective); 1007 case 1193469627: /*employer*/ return new Property("employer", "Reference(Organization)", "The party, be it an individual or an organization, responsible for providing compensation to a person performing work, or in the case of unpaid work, the party responsible for engaging the person in a position. For military occupations, this refers to the name of the person's military home base; the person's Branch of Service is recorded as industry. A change in employer or employer location indicates a change in job.", 0, 1, employer); 1008 case 909284695: /*workClassification*/ return new Property("workClassification", "CodeableConcept", "The classification of a person's job (one job) as defined by compensation and sector (e.g. paid, unpaid, self-employed, government, etc.). This is different from employment status: a person who is a volunteer (work classification) may have chosen not to be in the labor force (employment status).", 0, 1, workClassification); 1009 case -1746062349: /*supervisoryLevel*/ return new Property("supervisoryLevel", "CodeableConcept", "Reflects the amount of supervisory or management responsibilities of a person at one job. For military jobs, pay grade is used as a proxy because it can be interpreted across branches of service. A change in supervisory level is considered a new job.", 0, 1, supervisoryLevel); 1010 case -1438374861: /*jobDuty*/ return new Property("jobDuty", "string", "A regular action performed at a single job.", 0, java.lang.Integer.MAX_VALUE, jobDuty); 1011 case 1203483240: /*occupationalHazard*/ return new Property("occupationalHazard", "string", "A hazard that is specific to a person's work or work environment for a single job and with which the person might come in contact. A hazard is a source of potential harm to an individual's physical or mental health (e.g., biological, chemical, physical, psychological, radiological).", 0, java.lang.Integer.MAX_VALUE, occupationalHazard); 1012 case -1102242616: /*workSchedule*/ return new Property("workSchedule", "", "Describes a person's typical arrangement of working hours for one job.", 0, 1, workSchedule); 1013 default: return super.getNamedProperty(_hash, _name, _checkValid); 1014 } 1015 1016 } 1017 1018 @Override 1019 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1020 switch (hash) { 1021 case 1615358283: /*occupation*/ return this.occupation == null ? new Base[0] : new Base[] {this.occupation}; // CodeableConcept 1022 case 127156702: /*industry*/ return this.industry == null ? new Base[0] : new Base[] {this.industry}; // CodeableConcept 1023 case -1468651097: /*effective*/ return this.effective == null ? new Base[0] : new Base[] {this.effective}; // Period 1024 case 1193469627: /*employer*/ return this.employer == null ? new Base[0] : new Base[] {this.employer}; // Reference 1025 case 909284695: /*workClassification*/ return this.workClassification == null ? new Base[0] : new Base[] {this.workClassification}; // CodeableConcept 1026 case -1746062349: /*supervisoryLevel*/ return this.supervisoryLevel == null ? new Base[0] : new Base[] {this.supervisoryLevel}; // CodeableConcept 1027 case -1438374861: /*jobDuty*/ return this.jobDuty == null ? new Base[0] : this.jobDuty.toArray(new Base[this.jobDuty.size()]); // StringType 1028 case 1203483240: /*occupationalHazard*/ return this.occupationalHazard == null ? new Base[0] : this.occupationalHazard.toArray(new Base[this.occupationalHazard.size()]); // StringType 1029 case -1102242616: /*workSchedule*/ return this.workSchedule == null ? new Base[0] : new Base[] {this.workSchedule}; // OccupationalDataPastOrPresentJobWorkScheduleComponent 1030 default: return super.getProperty(hash, name, checkValid); 1031 } 1032 1033 } 1034 1035 @Override 1036 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1037 switch (hash) { 1038 case 1615358283: // occupation 1039 this.occupation = castToCodeableConcept(value); // CodeableConcept 1040 return value; 1041 case 127156702: // industry 1042 this.industry = castToCodeableConcept(value); // CodeableConcept 1043 return value; 1044 case -1468651097: // effective 1045 this.effective = castToPeriod(value); // Period 1046 return value; 1047 case 1193469627: // employer 1048 this.employer = castToReference(value); // Reference 1049 return value; 1050 case 909284695: // workClassification 1051 this.workClassification = castToCodeableConcept(value); // CodeableConcept 1052 return value; 1053 case -1746062349: // supervisoryLevel 1054 this.supervisoryLevel = castToCodeableConcept(value); // CodeableConcept 1055 return value; 1056 case -1438374861: // jobDuty 1057 this.getJobDuty().add(castToString(value)); // StringType 1058 return value; 1059 case 1203483240: // occupationalHazard 1060 this.getOccupationalHazard().add(castToString(value)); // StringType 1061 return value; 1062 case -1102242616: // workSchedule 1063 this.workSchedule = (OccupationalDataPastOrPresentJobWorkScheduleComponent) value; // OccupationalDataPastOrPresentJobWorkScheduleComponent 1064 return value; 1065 default: return super.setProperty(hash, name, value); 1066 } 1067 1068 } 1069 1070 @Override 1071 public Base setProperty(String name, Base value) throws FHIRException { 1072 if (name.equals("occupation")) { 1073 this.occupation = castToCodeableConcept(value); // CodeableConcept 1074 } else if (name.equals("industry")) { 1075 this.industry = castToCodeableConcept(value); // CodeableConcept 1076 } else if (name.equals("effective")) { 1077 this.effective = castToPeriod(value); // Period 1078 } else if (name.equals("employer")) { 1079 this.employer = castToReference(value); // Reference 1080 } else if (name.equals("workClassification")) { 1081 this.workClassification = castToCodeableConcept(value); // CodeableConcept 1082 } else if (name.equals("supervisoryLevel")) { 1083 this.supervisoryLevel = castToCodeableConcept(value); // CodeableConcept 1084 } else if (name.equals("jobDuty")) { 1085 this.getJobDuty().add(castToString(value)); 1086 } else if (name.equals("occupationalHazard")) { 1087 this.getOccupationalHazard().add(castToString(value)); 1088 } else if (name.equals("workSchedule")) { 1089 this.workSchedule = (OccupationalDataPastOrPresentJobWorkScheduleComponent) value; // OccupationalDataPastOrPresentJobWorkScheduleComponent 1090 } else 1091 return super.setProperty(name, value); 1092 return value; 1093 } 1094 1095 @Override 1096 public Base makeProperty(int hash, String name) throws FHIRException { 1097 switch (hash) { 1098 case 1615358283: return getOccupation(); 1099 case 127156702: return getIndustry(); 1100 case -1468651097: return getEffective(); 1101 case 1193469627: return getEmployer(); 1102 case 909284695: return getWorkClassification(); 1103 case -1746062349: return getSupervisoryLevel(); 1104 case -1438374861: return addJobDutyElement(); 1105 case 1203483240: return addOccupationalHazardElement(); 1106 case -1102242616: return getWorkSchedule(); 1107 default: return super.makeProperty(hash, name); 1108 } 1109 1110 } 1111 1112 @Override 1113 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1114 switch (hash) { 1115 case 1615358283: /*occupation*/ return new String[] {"CodeableConcept"}; 1116 case 127156702: /*industry*/ return new String[] {"CodeableConcept"}; 1117 case -1468651097: /*effective*/ return new String[] {"Period"}; 1118 case 1193469627: /*employer*/ return new String[] {"Reference"}; 1119 case 909284695: /*workClassification*/ return new String[] {"CodeableConcept"}; 1120 case -1746062349: /*supervisoryLevel*/ return new String[] {"CodeableConcept"}; 1121 case -1438374861: /*jobDuty*/ return new String[] {"string"}; 1122 case 1203483240: /*occupationalHazard*/ return new String[] {"string"}; 1123 case -1102242616: /*workSchedule*/ return new String[] {}; 1124 default: return super.getTypesForProperty(hash, name); 1125 } 1126 1127 } 1128 1129 @Override 1130 public Base addChild(String name) throws FHIRException { 1131 if (name.equals("occupation")) { 1132 this.occupation = new CodeableConcept(); 1133 return this.occupation; 1134 } 1135 else if (name.equals("industry")) { 1136 this.industry = new CodeableConcept(); 1137 return this.industry; 1138 } 1139 else if (name.equals("effective")) { 1140 this.effective = new Period(); 1141 return this.effective; 1142 } 1143 else if (name.equals("employer")) { 1144 this.employer = new Reference(); 1145 return this.employer; 1146 } 1147 else if (name.equals("workClassification")) { 1148 this.workClassification = new CodeableConcept(); 1149 return this.workClassification; 1150 } 1151 else if (name.equals("supervisoryLevel")) { 1152 this.supervisoryLevel = new CodeableConcept(); 1153 return this.supervisoryLevel; 1154 } 1155 else if (name.equals("jobDuty")) { 1156 throw new FHIRException("Cannot call addChild on a primitive type OccupationalData.jobDuty"); 1157 } 1158 else if (name.equals("occupationalHazard")) { 1159 throw new FHIRException("Cannot call addChild on a primitive type OccupationalData.occupationalHazard"); 1160 } 1161 else if (name.equals("workSchedule")) { 1162 this.workSchedule = new OccupationalDataPastOrPresentJobWorkScheduleComponent(); 1163 return this.workSchedule; 1164 } 1165 else 1166 return super.addChild(name); 1167 } 1168 1169 public OccupationalDataPastOrPresentJobComponent copy() { 1170 OccupationalDataPastOrPresentJobComponent dst = new OccupationalDataPastOrPresentJobComponent(); 1171 copyValues(dst); 1172 dst.occupation = occupation == null ? null : occupation.copy(); 1173 dst.industry = industry == null ? null : industry.copy(); 1174 dst.effective = effective == null ? null : effective.copy(); 1175 dst.employer = employer == null ? null : employer.copy(); 1176 dst.workClassification = workClassification == null ? null : workClassification.copy(); 1177 dst.supervisoryLevel = supervisoryLevel == null ? null : supervisoryLevel.copy(); 1178 if (jobDuty != null) { 1179 dst.jobDuty = new ArrayList<StringType>(); 1180 for (StringType i : jobDuty) 1181 dst.jobDuty.add(i.copy()); 1182 }; 1183 if (occupationalHazard != null) { 1184 dst.occupationalHazard = new ArrayList<StringType>(); 1185 for (StringType i : occupationalHazard) 1186 dst.occupationalHazard.add(i.copy()); 1187 }; 1188 dst.workSchedule = workSchedule == null ? null : workSchedule.copy(); 1189 return dst; 1190 } 1191 1192 @Override 1193 public boolean equalsDeep(Base other_) { 1194 if (!super.equalsDeep(other_)) 1195 return false; 1196 if (!(other_ instanceof OccupationalDataPastOrPresentJobComponent)) 1197 return false; 1198 OccupationalDataPastOrPresentJobComponent o = (OccupationalDataPastOrPresentJobComponent) other_; 1199 return compareDeep(occupation, o.occupation, true) && compareDeep(industry, o.industry, true) && compareDeep(effective, o.effective, true) 1200 && compareDeep(employer, o.employer, true) && compareDeep(workClassification, o.workClassification, true) 1201 && compareDeep(supervisoryLevel, o.supervisoryLevel, true) && compareDeep(jobDuty, o.jobDuty, true) 1202 && compareDeep(occupationalHazard, o.occupationalHazard, true) && compareDeep(workSchedule, o.workSchedule, true) 1203 ; 1204 } 1205 1206 @Override 1207 public boolean equalsShallow(Base other_) { 1208 if (!super.equalsShallow(other_)) 1209 return false; 1210 if (!(other_ instanceof OccupationalDataPastOrPresentJobComponent)) 1211 return false; 1212 OccupationalDataPastOrPresentJobComponent o = (OccupationalDataPastOrPresentJobComponent) other_; 1213 return compareValues(jobDuty, o.jobDuty, true) && compareValues(occupationalHazard, o.occupationalHazard, true) 1214 ; 1215 } 1216 1217 public boolean isEmpty() { 1218 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(occupation, industry, effective 1219 , employer, workClassification, supervisoryLevel, jobDuty, occupationalHazard, workSchedule 1220 ); 1221 } 1222 1223 public String fhirType() { 1224 return "OccupationalData.pastOrPresentJob"; 1225 1226 } 1227 1228 } 1229 1230 @Block() 1231 public static class OccupationalDataPastOrPresentJobWorkScheduleComponent extends BackboneElement implements IBaseBackboneElement { 1232 /** 1233 * A code that represents a person's typical arrangement of working hours for one job. 1234 */ 1235 @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) 1236 @Description(shortDefinition="Past or Present Job work schedule code", formalDefinition="A code that represents a person's typical arrangement of working hours for one job." ) 1237 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/work-schedule-odh") 1238 protected CodeableConcept code; 1239 1240 /** 1241 * The typical number of days worked in a week by a person at one job. 1242 */ 1243 @Child(name = "weeklyWorkDays", type = {DecimalType.class}, order=2, min=0, max=1, modifier=false, summary=true) 1244 @Description(shortDefinition="Past or Present Job work schedule weekly work days", formalDefinition="The typical number of days worked in a week by a person at one job." ) 1245 protected DecimalType weeklyWorkDays; 1246 1247 /** 1248 * The number of hours worked in a day or shift at one job by a person. For those working a split shift (divided into two parts that are separated by an interval longer than a normal rest period), it is the total of both periods of time in a shift. 1249 */ 1250 @Child(name = "dailyWorkHours", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) 1251 @Description(shortDefinition="Past or Present Job work schedule daily work hours", formalDefinition="The number of hours worked in a day or shift at one job by a person. For those working a split shift (divided into two parts that are separated by an interval longer than a normal rest period), it is the total of both periods of time in a shift." ) 1252 protected DecimalType dailyWorkHours; 1253 1254 private static final long serialVersionUID = -253812674L; 1255 1256 /** 1257 * Constructor 1258 */ 1259 public OccupationalDataPastOrPresentJobWorkScheduleComponent() { 1260 super(); 1261 } 1262 1263 /** 1264 * Constructor 1265 */ 1266 public OccupationalDataPastOrPresentJobWorkScheduleComponent(CodeableConcept code) { 1267 super(); 1268 this.code = code; 1269 } 1270 1271 /** 1272 * @return {@link #code} (A code that represents a person's typical arrangement of working hours for one job.) 1273 */ 1274 public CodeableConcept getCode() { 1275 if (this.code == null) 1276 if (Configuration.errorOnAutoCreate()) 1277 throw new Error("Attempt to auto-create OccupationalDataPastOrPresentJobWorkScheduleComponent.code"); 1278 else if (Configuration.doAutoCreate()) 1279 this.code = new CodeableConcept(); // cc 1280 return this.code; 1281 } 1282 1283 public boolean hasCode() { 1284 return this.code != null && !this.code.isEmpty(); 1285 } 1286 1287 /** 1288 * @param value {@link #code} (A code that represents a person's typical arrangement of working hours for one job.) 1289 */ 1290 public OccupationalDataPastOrPresentJobWorkScheduleComponent setCode(CodeableConcept value) { 1291 this.code = value; 1292 return this; 1293 } 1294 1295 /** 1296 * @return {@link #weeklyWorkDays} (The typical number of days worked in a week by a person at one job.). This is the underlying object with id, value and extensions. The accessor "getWeeklyWorkDays" gives direct access to the value 1297 */ 1298 public DecimalType getWeeklyWorkDaysElement() { 1299 if (this.weeklyWorkDays == null) 1300 if (Configuration.errorOnAutoCreate()) 1301 throw new Error("Attempt to auto-create OccupationalDataPastOrPresentJobWorkScheduleComponent.weeklyWorkDays"); 1302 else if (Configuration.doAutoCreate()) 1303 this.weeklyWorkDays = new DecimalType(); // bb 1304 return this.weeklyWorkDays; 1305 } 1306 1307 public boolean hasWeeklyWorkDaysElement() { 1308 return this.weeklyWorkDays != null && !this.weeklyWorkDays.isEmpty(); 1309 } 1310 1311 public boolean hasWeeklyWorkDays() { 1312 return this.weeklyWorkDays != null && !this.weeklyWorkDays.isEmpty(); 1313 } 1314 1315 /** 1316 * @param value {@link #weeklyWorkDays} (The typical number of days worked in a week by a person at one job.). This is the underlying object with id, value and extensions. The accessor "getWeeklyWorkDays" gives direct access to the value 1317 */ 1318 public OccupationalDataPastOrPresentJobWorkScheduleComponent setWeeklyWorkDaysElement(DecimalType value) { 1319 this.weeklyWorkDays = value; 1320 return this; 1321 } 1322 1323 /** 1324 * @return The typical number of days worked in a week by a person at one job. 1325 */ 1326 public BigDecimal getWeeklyWorkDays() { 1327 return this.weeklyWorkDays == null ? null : this.weeklyWorkDays.getValue(); 1328 } 1329 1330 /** 1331 * @param value The typical number of days worked in a week by a person at one job. 1332 */ 1333 public OccupationalDataPastOrPresentJobWorkScheduleComponent setWeeklyWorkDays(BigDecimal value) { 1334 if (value == null) 1335 this.weeklyWorkDays = null; 1336 else { 1337 if (this.weeklyWorkDays == null) 1338 this.weeklyWorkDays = new DecimalType(); 1339 this.weeklyWorkDays.setValue(value); 1340 } 1341 return this; 1342 } 1343 1344 /** 1345 * @param value The typical number of days worked in a week by a person at one job. 1346 */ 1347 public OccupationalDataPastOrPresentJobWorkScheduleComponent setWeeklyWorkDays(long value) { 1348 this.weeklyWorkDays = new DecimalType(); 1349 this.weeklyWorkDays.setValue(value); 1350 return this; 1351 } 1352 1353 /** 1354 * @param value The typical number of days worked in a week by a person at one job. 1355 */ 1356 public OccupationalDataPastOrPresentJobWorkScheduleComponent setWeeklyWorkDays(double value) { 1357 this.weeklyWorkDays = new DecimalType(); 1358 this.weeklyWorkDays.setValue(value); 1359 return this; 1360 } 1361 1362 /** 1363 * @return {@link #dailyWorkHours} (The number of hours worked in a day or shift at one job by a person. For those working a split shift (divided into two parts that are separated by an interval longer than a normal rest period), it is the total of both periods of time in a shift.). This is the underlying object with id, value and extensions. The accessor "getDailyWorkHours" gives direct access to the value 1364 */ 1365 public DecimalType getDailyWorkHoursElement() { 1366 if (this.dailyWorkHours == null) 1367 if (Configuration.errorOnAutoCreate()) 1368 throw new Error("Attempt to auto-create OccupationalDataPastOrPresentJobWorkScheduleComponent.dailyWorkHours"); 1369 else if (Configuration.doAutoCreate()) 1370 this.dailyWorkHours = new DecimalType(); // bb 1371 return this.dailyWorkHours; 1372 } 1373 1374 public boolean hasDailyWorkHoursElement() { 1375 return this.dailyWorkHours != null && !this.dailyWorkHours.isEmpty(); 1376 } 1377 1378 public boolean hasDailyWorkHours() { 1379 return this.dailyWorkHours != null && !this.dailyWorkHours.isEmpty(); 1380 } 1381 1382 /** 1383 * @param value {@link #dailyWorkHours} (The number of hours worked in a day or shift at one job by a person. For those working a split shift (divided into two parts that are separated by an interval longer than a normal rest period), it is the total of both periods of time in a shift.). This is the underlying object with id, value and extensions. The accessor "getDailyWorkHours" gives direct access to the value 1384 */ 1385 public OccupationalDataPastOrPresentJobWorkScheduleComponent setDailyWorkHoursElement(DecimalType value) { 1386 this.dailyWorkHours = value; 1387 return this; 1388 } 1389 1390 /** 1391 * @return The number of hours worked in a day or shift at one job by a person. For those working a split shift (divided into two parts that are separated by an interval longer than a normal rest period), it is the total of both periods of time in a shift. 1392 */ 1393 public BigDecimal getDailyWorkHours() { 1394 return this.dailyWorkHours == null ? null : this.dailyWorkHours.getValue(); 1395 } 1396 1397 /** 1398 * @param value The number of hours worked in a day or shift at one job by a person. For those working a split shift (divided into two parts that are separated by an interval longer than a normal rest period), it is the total of both periods of time in a shift. 1399 */ 1400 public OccupationalDataPastOrPresentJobWorkScheduleComponent setDailyWorkHours(BigDecimal value) { 1401 if (value == null) 1402 this.dailyWorkHours = null; 1403 else { 1404 if (this.dailyWorkHours == null) 1405 this.dailyWorkHours = new DecimalType(); 1406 this.dailyWorkHours.setValue(value); 1407 } 1408 return this; 1409 } 1410 1411 /** 1412 * @param value The number of hours worked in a day or shift at one job by a person. For those working a split shift (divided into two parts that are separated by an interval longer than a normal rest period), it is the total of both periods of time in a shift. 1413 */ 1414 public OccupationalDataPastOrPresentJobWorkScheduleComponent setDailyWorkHours(long value) { 1415 this.dailyWorkHours = new DecimalType(); 1416 this.dailyWorkHours.setValue(value); 1417 return this; 1418 } 1419 1420 /** 1421 * @param value The number of hours worked in a day or shift at one job by a person. For those working a split shift (divided into two parts that are separated by an interval longer than a normal rest period), it is the total of both periods of time in a shift. 1422 */ 1423 public OccupationalDataPastOrPresentJobWorkScheduleComponent setDailyWorkHours(double value) { 1424 this.dailyWorkHours = new DecimalType(); 1425 this.dailyWorkHours.setValue(value); 1426 return this; 1427 } 1428 1429 protected void listChildren(List<Property> children) { 1430 super.listChildren(children); 1431 children.add(new Property("code", "CodeableConcept", "A code that represents a person's typical arrangement of working hours for one job.", 0, 1, code)); 1432 children.add(new Property("weeklyWorkDays", "decimal", "The typical number of days worked in a week by a person at one job.", 0, 1, weeklyWorkDays)); 1433 children.add(new Property("dailyWorkHours", "decimal", "The number of hours worked in a day or shift at one job by a person. For those working a split shift (divided into two parts that are separated by an interval longer than a normal rest period), it is the total of both periods of time in a shift.", 0, 1, dailyWorkHours)); 1434 } 1435 1436 @Override 1437 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1438 switch (_hash) { 1439 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A code that represents a person's typical arrangement of working hours for one job.", 0, 1, code); 1440 case -2051928407: /*weeklyWorkDays*/ return new Property("weeklyWorkDays", "decimal", "The typical number of days worked in a week by a person at one job.", 0, 1, weeklyWorkDays); 1441 case -1065164699: /*dailyWorkHours*/ return new Property("dailyWorkHours", "decimal", "The number of hours worked in a day or shift at one job by a person. For those working a split shift (divided into two parts that are separated by an interval longer than a normal rest period), it is the total of both periods of time in a shift.", 0, 1, dailyWorkHours); 1442 default: return super.getNamedProperty(_hash, _name, _checkValid); 1443 } 1444 1445 } 1446 1447 @Override 1448 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1449 switch (hash) { 1450 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 1451 case -2051928407: /*weeklyWorkDays*/ return this.weeklyWorkDays == null ? new Base[0] : new Base[] {this.weeklyWorkDays}; // DecimalType 1452 case -1065164699: /*dailyWorkHours*/ return this.dailyWorkHours == null ? new Base[0] : new Base[] {this.dailyWorkHours}; // DecimalType 1453 default: return super.getProperty(hash, name, checkValid); 1454 } 1455 1456 } 1457 1458 @Override 1459 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1460 switch (hash) { 1461 case 3059181: // code 1462 this.code = castToCodeableConcept(value); // CodeableConcept 1463 return value; 1464 case -2051928407: // weeklyWorkDays 1465 this.weeklyWorkDays = castToDecimal(value); // DecimalType 1466 return value; 1467 case -1065164699: // dailyWorkHours 1468 this.dailyWorkHours = castToDecimal(value); // DecimalType 1469 return value; 1470 default: return super.setProperty(hash, name, value); 1471 } 1472 1473 } 1474 1475 @Override 1476 public Base setProperty(String name, Base value) throws FHIRException { 1477 if (name.equals("code")) { 1478 this.code = castToCodeableConcept(value); // CodeableConcept 1479 } else if (name.equals("weeklyWorkDays")) { 1480 this.weeklyWorkDays = castToDecimal(value); // DecimalType 1481 } else if (name.equals("dailyWorkHours")) { 1482 this.dailyWorkHours = castToDecimal(value); // DecimalType 1483 } else 1484 return super.setProperty(name, value); 1485 return value; 1486 } 1487 1488 @Override 1489 public Base makeProperty(int hash, String name) throws FHIRException { 1490 switch (hash) { 1491 case 3059181: return getCode(); 1492 case -2051928407: return getWeeklyWorkDaysElement(); 1493 case -1065164699: return getDailyWorkHoursElement(); 1494 default: return super.makeProperty(hash, name); 1495 } 1496 1497 } 1498 1499 @Override 1500 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1501 switch (hash) { 1502 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 1503 case -2051928407: /*weeklyWorkDays*/ return new String[] {"decimal"}; 1504 case -1065164699: /*dailyWorkHours*/ return new String[] {"decimal"}; 1505 default: return super.getTypesForProperty(hash, name); 1506 } 1507 1508 } 1509 1510 @Override 1511 public Base addChild(String name) throws FHIRException { 1512 if (name.equals("code")) { 1513 this.code = new CodeableConcept(); 1514 return this.code; 1515 } 1516 else if (name.equals("weeklyWorkDays")) { 1517 throw new FHIRException("Cannot call addChild on a primitive type OccupationalData.weeklyWorkDays"); 1518 } 1519 else if (name.equals("dailyWorkHours")) { 1520 throw new FHIRException("Cannot call addChild on a primitive type OccupationalData.dailyWorkHours"); 1521 } 1522 else 1523 return super.addChild(name); 1524 } 1525 1526 public OccupationalDataPastOrPresentJobWorkScheduleComponent copy() { 1527 OccupationalDataPastOrPresentJobWorkScheduleComponent dst = new OccupationalDataPastOrPresentJobWorkScheduleComponent(); 1528 copyValues(dst); 1529 dst.code = code == null ? null : code.copy(); 1530 dst.weeklyWorkDays = weeklyWorkDays == null ? null : weeklyWorkDays.copy(); 1531 dst.dailyWorkHours = dailyWorkHours == null ? null : dailyWorkHours.copy(); 1532 return dst; 1533 } 1534 1535 @Override 1536 public boolean equalsDeep(Base other_) { 1537 if (!super.equalsDeep(other_)) 1538 return false; 1539 if (!(other_ instanceof OccupationalDataPastOrPresentJobWorkScheduleComponent)) 1540 return false; 1541 OccupationalDataPastOrPresentJobWorkScheduleComponent o = (OccupationalDataPastOrPresentJobWorkScheduleComponent) other_; 1542 return compareDeep(code, o.code, true) && compareDeep(weeklyWorkDays, o.weeklyWorkDays, true) && compareDeep(dailyWorkHours, o.dailyWorkHours, true) 1543 ; 1544 } 1545 1546 @Override 1547 public boolean equalsShallow(Base other_) { 1548 if (!super.equalsShallow(other_)) 1549 return false; 1550 if (!(other_ instanceof OccupationalDataPastOrPresentJobWorkScheduleComponent)) 1551 return false; 1552 OccupationalDataPastOrPresentJobWorkScheduleComponent o = (OccupationalDataPastOrPresentJobWorkScheduleComponent) other_; 1553 return compareValues(weeklyWorkDays, o.weeklyWorkDays, true) && compareValues(dailyWorkHours, o.dailyWorkHours, true) 1554 ; 1555 } 1556 1557 public boolean isEmpty() { 1558 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, weeklyWorkDays, dailyWorkHours 1559 ); 1560 } 1561 1562 public String fhirType() { 1563 return "OccupationalData.pastOrPresentJob.workSchedule"; 1564 1565 } 1566 1567 } 1568 1569 /** 1570 * Business identifier assigned to the occupational data record. 1571 */ 1572 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=false) 1573 @Description(shortDefinition="Unique identifier for the occupational data (ODH) record", formalDefinition="Business identifier assigned to the occupational data record." ) 1574 protected Identifier identifier; 1575 1576 /** 1577 * The status of this ODH. Enables tracking the life-cycle of the content. 1578 */ 1579 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 1580 @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The status of this ODH. Enables tracking the life-cycle of the content." ) 1581 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status") 1582 protected Enumeration<PublicationStatus> status; 1583 1584 /** 1585 * The occupational data record is about this person (e.g., the patient, a parent of a minor child). 1586 */ 1587 @Child(name = "subject", type = {Patient.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=true) 1588 @Description(shortDefinition="Who the occupational data (ODH) is collected about", formalDefinition="The occupational data record is about this person (e.g., the patient, a parent of a minor child)." ) 1589 protected Reference subject; 1590 1591 /** 1592 * The actual object that is the target of the reference (The occupational data record is about this person (e.g., the patient, a parent of a minor child).) 1593 */ 1594 protected Resource subjectTarget; 1595 1596 /** 1597 * The date of creation or updating of the occupational data record. 1598 */ 1599 @Child(name = "date", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1600 @Description(shortDefinition="Occupational Data (ODH) recording time", formalDefinition="The date of creation or updating of the occupational data record." ) 1601 protected DateTimeType date; 1602 1603 /** 1604 * The person who created or last updated the occupational data record. 1605 */ 1606 @Child(name = "recorder", type = {Practitioner.class, PractitionerRole.class, Patient.class, RelatedPerson.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1607 @Description(shortDefinition="Occupational Data (ODH) recorder", formalDefinition="The person who created or last updated the occupational data record." ) 1608 protected List<Reference> recorder; 1609 /** 1610 * The actual objects that are the target of the reference (The person who created or last updated the occupational data record.) 1611 */ 1612 protected List<Resource> recorderTarget; 1613 1614 1615 /** 1616 * The person who provided the subject's health-related occupational data. 1617 */ 1618 @Child(name = "informant", type = {Patient.class, RelatedPerson.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1619 @Description(shortDefinition="Occupational Data (ODH) informant", formalDefinition="The person who provided the subject's health-related occupational data." ) 1620 protected List<Reference> informant; 1621 /** 1622 * The actual objects that are the target of the reference (The person who provided the subject's health-related occupational data.) 1623 */ 1624 protected List<Resource> informantTarget; 1625 1626 1627 /** 1628 * A person's current economic relationship to a job. Employment status refers to whether a person is currently working for compensation, is unemployed (i.e., searching for work for compensation), or is not in the labor force (e.g. disabled, homemaker, chooses not to work, etc.). Employment status is not the same as classification of work. 1629 */ 1630 @Child(name = "employmentStatus", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1631 @Description(shortDefinition="Employment status", formalDefinition="A person's current economic relationship to a job. Employment status refers to whether a person is currently working for compensation, is unemployed (i.e., searching for work for compensation), or is not in the labor force (e.g. disabled, homemaker, chooses not to work, etc.). Employment status is not the same as classification of work." ) 1632 protected List<OccupationalDataEmploymentStatusComponent> employmentStatus; 1633 1634 /** 1635 * A person's self-identified retirement date. A person may retire multiple times. 1636 */ 1637 @Child(name = "retirementDate", type = {DateTimeType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1638 @Description(shortDefinition="Retirement date", formalDefinition="A person's self-identified retirement date. A person may retire multiple times." ) 1639 protected List<DateTimeType> retirementDate; 1640 1641 /** 1642 * The start and end dates for the period of time a person's work is or was in a combat zone. In addition to military personnel, civilians also may work or have worked in a combat zone. 1643 */ 1644 @Child(name = "combatZonePeriod", type = {Period.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1645 @Description(shortDefinition="Combat Zone Work period", formalDefinition="The start and end dates for the period of time a person's work is or was in a combat zone. In addition to military personnel, civilians also may work or have worked in a combat zone." ) 1646 protected List<Period> combatZonePeriod; 1647 1648 /** 1649 * The type of work a person has held for the longest amount of time during his or her life, regardless of the occupation currently held and regardless of whether or not it has been held for a continuous time. 1650 */ 1651 @Child(name = "usualWork", type = {}, order=9, min=0, max=1, modifier=false, summary=true) 1652 @Description(shortDefinition="Usual Work", formalDefinition="The type of work a person has held for the longest amount of time during his or her life, regardless of the occupation currently held and regardless of whether or not it has been held for a continuous time." ) 1653 protected OccupationalDataUsualWorkComponent usualWork; 1654 1655 /** 1656 * The type of work done by a person during a current or past job. A job is defined by the sum of all the data related to the occupation. A change in occupation, supervisory level, industry, employer, or employer location is considered a new job. 1657 */ 1658 @Child(name = "pastOrPresentJob", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1659 @Description(shortDefinition="Past or Present Job", formalDefinition="The type of work done by a person during a current or past job. A job is defined by the sum of all the data related to the occupation. A change in occupation, supervisory level, industry, employer, or employer location is considered a new job." ) 1660 protected List<OccupationalDataPastOrPresentJobComponent> pastOrPresentJob; 1661 1662 private static final long serialVersionUID = -1765327023L; 1663 1664 /** 1665 * Constructor 1666 */ 1667 public OccupationalData() { 1668 super(); 1669 } 1670 1671 /** 1672 * Constructor 1673 */ 1674 public OccupationalData(Enumeration<PublicationStatus> status) { 1675 super(); 1676 this.status = status; 1677 } 1678 1679 /** 1680 * @return {@link #identifier} (Business identifier assigned to the occupational data record.) 1681 */ 1682 public Identifier getIdentifier() { 1683 if (this.identifier == null) 1684 if (Configuration.errorOnAutoCreate()) 1685 throw new Error("Attempt to auto-create OccupationalData.identifier"); 1686 else if (Configuration.doAutoCreate()) 1687 this.identifier = new Identifier(); // cc 1688 return this.identifier; 1689 } 1690 1691 public boolean hasIdentifier() { 1692 return this.identifier != null && !this.identifier.isEmpty(); 1693 } 1694 1695 /** 1696 * @param value {@link #identifier} (Business identifier assigned to the occupational data record.) 1697 */ 1698 public OccupationalData setIdentifier(Identifier value) { 1699 this.identifier = value; 1700 return this; 1701 } 1702 1703 /** 1704 * @return {@link #status} (The status of this ODH. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1705 */ 1706 public Enumeration<PublicationStatus> getStatusElement() { 1707 if (this.status == null) 1708 if (Configuration.errorOnAutoCreate()) 1709 throw new Error("Attempt to auto-create OccupationalData.status"); 1710 else if (Configuration.doAutoCreate()) 1711 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 1712 return this.status; 1713 } 1714 1715 public boolean hasStatusElement() { 1716 return this.status != null && !this.status.isEmpty(); 1717 } 1718 1719 public boolean hasStatus() { 1720 return this.status != null && !this.status.isEmpty(); 1721 } 1722 1723 /** 1724 * @param value {@link #status} (The status of this ODH. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1725 */ 1726 public OccupationalData setStatusElement(Enumeration<PublicationStatus> value) { 1727 this.status = value; 1728 return this; 1729 } 1730 1731 /** 1732 * @return The status of this ODH. Enables tracking the life-cycle of the content. 1733 */ 1734 public PublicationStatus getStatus() { 1735 return this.status == null ? null : this.status.getValue(); 1736 } 1737 1738 /** 1739 * @param value The status of this ODH. Enables tracking the life-cycle of the content. 1740 */ 1741 public OccupationalData setStatus(PublicationStatus value) { 1742 if (this.status == null) 1743 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 1744 this.status.setValue(value); 1745 return this; 1746 } 1747 1748 /** 1749 * @return {@link #subject} (The occupational data record is about this person (e.g., the patient, a parent of a minor child).) 1750 */ 1751 public Reference getSubject() { 1752 if (this.subject == null) 1753 if (Configuration.errorOnAutoCreate()) 1754 throw new Error("Attempt to auto-create OccupationalData.subject"); 1755 else if (Configuration.doAutoCreate()) 1756 this.subject = new Reference(); // cc 1757 return this.subject; 1758 } 1759 1760 public boolean hasSubject() { 1761 return this.subject != null && !this.subject.isEmpty(); 1762 } 1763 1764 /** 1765 * @param value {@link #subject} (The occupational data record is about this person (e.g., the patient, a parent of a minor child).) 1766 */ 1767 public OccupationalData setSubject(Reference value) { 1768 this.subject = value; 1769 return this; 1770 } 1771 1772 /** 1773 * @return {@link #subject} 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 occupational data record is about this person (e.g., the patient, a parent of a minor child).) 1774 */ 1775 public Resource getSubjectTarget() { 1776 return this.subjectTarget; 1777 } 1778 1779 /** 1780 * @param value {@link #subject} 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 occupational data record is about this person (e.g., the patient, a parent of a minor child).) 1781 */ 1782 public OccupationalData setSubjectTarget(Resource value) { 1783 this.subjectTarget = value; 1784 return this; 1785 } 1786 1787 /** 1788 * @return {@link #date} (The date of creation or updating of the occupational data record.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1789 */ 1790 public DateTimeType getDateElement() { 1791 if (this.date == null) 1792 if (Configuration.errorOnAutoCreate()) 1793 throw new Error("Attempt to auto-create OccupationalData.date"); 1794 else if (Configuration.doAutoCreate()) 1795 this.date = new DateTimeType(); // bb 1796 return this.date; 1797 } 1798 1799 public boolean hasDateElement() { 1800 return this.date != null && !this.date.isEmpty(); 1801 } 1802 1803 public boolean hasDate() { 1804 return this.date != null && !this.date.isEmpty(); 1805 } 1806 1807 /** 1808 * @param value {@link #date} (The date of creation or updating of the occupational data record.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1809 */ 1810 public OccupationalData setDateElement(DateTimeType value) { 1811 this.date = value; 1812 return this; 1813 } 1814 1815 /** 1816 * @return The date of creation or updating of the occupational data record. 1817 */ 1818 public Date getDate() { 1819 return this.date == null ? null : this.date.getValue(); 1820 } 1821 1822 /** 1823 * @param value The date of creation or updating of the occupational data record. 1824 */ 1825 public OccupationalData setDate(Date value) { 1826 if (value == null) 1827 this.date = null; 1828 else { 1829 if (this.date == null) 1830 this.date = new DateTimeType(); 1831 this.date.setValue(value); 1832 } 1833 return this; 1834 } 1835 1836 /** 1837 * @return {@link #recorder} (The person who created or last updated the occupational data record.) 1838 */ 1839 public List<Reference> getRecorder() { 1840 if (this.recorder == null) 1841 this.recorder = new ArrayList<Reference>(); 1842 return this.recorder; 1843 } 1844 1845 /** 1846 * @return Returns a reference to <code>this</code> for easy method chaining 1847 */ 1848 public OccupationalData setRecorder(List<Reference> theRecorder) { 1849 this.recorder = theRecorder; 1850 return this; 1851 } 1852 1853 public boolean hasRecorder() { 1854 if (this.recorder == null) 1855 return false; 1856 for (Reference item : this.recorder) 1857 if (!item.isEmpty()) 1858 return true; 1859 return false; 1860 } 1861 1862 public Reference addRecorder() { //3 1863 Reference t = new Reference(); 1864 if (this.recorder == null) 1865 this.recorder = new ArrayList<Reference>(); 1866 this.recorder.add(t); 1867 return t; 1868 } 1869 1870 public OccupationalData addRecorder(Reference t) { //3 1871 if (t == null) 1872 return this; 1873 if (this.recorder == null) 1874 this.recorder = new ArrayList<Reference>(); 1875 this.recorder.add(t); 1876 return this; 1877 } 1878 1879 /** 1880 * @return The first repetition of repeating field {@link #recorder}, creating it if it does not already exist 1881 */ 1882 public Reference getRecorderFirstRep() { 1883 if (getRecorder().isEmpty()) { 1884 addRecorder(); 1885 } 1886 return getRecorder().get(0); 1887 } 1888 1889 /** 1890 * @deprecated Use Reference#setResource(IBaseResource) instead 1891 */ 1892 @Deprecated 1893 public List<Resource> getRecorderTarget() { 1894 if (this.recorderTarget == null) 1895 this.recorderTarget = new ArrayList<Resource>(); 1896 return this.recorderTarget; 1897 } 1898 1899 /** 1900 * @return {@link #informant} (The person who provided the subject's health-related occupational data.) 1901 */ 1902 public List<Reference> getInformant() { 1903 if (this.informant == null) 1904 this.informant = new ArrayList<Reference>(); 1905 return this.informant; 1906 } 1907 1908 /** 1909 * @return Returns a reference to <code>this</code> for easy method chaining 1910 */ 1911 public OccupationalData setInformant(List<Reference> theInformant) { 1912 this.informant = theInformant; 1913 return this; 1914 } 1915 1916 public boolean hasInformant() { 1917 if (this.informant == null) 1918 return false; 1919 for (Reference item : this.informant) 1920 if (!item.isEmpty()) 1921 return true; 1922 return false; 1923 } 1924 1925 public Reference addInformant() { //3 1926 Reference t = new Reference(); 1927 if (this.informant == null) 1928 this.informant = new ArrayList<Reference>(); 1929 this.informant.add(t); 1930 return t; 1931 } 1932 1933 public OccupationalData addInformant(Reference t) { //3 1934 if (t == null) 1935 return this; 1936 if (this.informant == null) 1937 this.informant = new ArrayList<Reference>(); 1938 this.informant.add(t); 1939 return this; 1940 } 1941 1942 /** 1943 * @return The first repetition of repeating field {@link #informant}, creating it if it does not already exist 1944 */ 1945 public Reference getInformantFirstRep() { 1946 if (getInformant().isEmpty()) { 1947 addInformant(); 1948 } 1949 return getInformant().get(0); 1950 } 1951 1952 /** 1953 * @deprecated Use Reference#setResource(IBaseResource) instead 1954 */ 1955 @Deprecated 1956 public List<Resource> getInformantTarget() { 1957 if (this.informantTarget == null) 1958 this.informantTarget = new ArrayList<Resource>(); 1959 return this.informantTarget; 1960 } 1961 1962 /** 1963 * @return {@link #employmentStatus} (A person's current economic relationship to a job. Employment status refers to whether a person is currently working for compensation, is unemployed (i.e., searching for work for compensation), or is not in the labor force (e.g. disabled, homemaker, chooses not to work, etc.). Employment status is not the same as classification of work.) 1964 */ 1965 public List<OccupationalDataEmploymentStatusComponent> getEmploymentStatus() { 1966 if (this.employmentStatus == null) 1967 this.employmentStatus = new ArrayList<OccupationalDataEmploymentStatusComponent>(); 1968 return this.employmentStatus; 1969 } 1970 1971 /** 1972 * @return Returns a reference to <code>this</code> for easy method chaining 1973 */ 1974 public OccupationalData setEmploymentStatus(List<OccupationalDataEmploymentStatusComponent> theEmploymentStatus) { 1975 this.employmentStatus = theEmploymentStatus; 1976 return this; 1977 } 1978 1979 public boolean hasEmploymentStatus() { 1980 if (this.employmentStatus == null) 1981 return false; 1982 for (OccupationalDataEmploymentStatusComponent item : this.employmentStatus) 1983 if (!item.isEmpty()) 1984 return true; 1985 return false; 1986 } 1987 1988 public OccupationalDataEmploymentStatusComponent addEmploymentStatus() { //3 1989 OccupationalDataEmploymentStatusComponent t = new OccupationalDataEmploymentStatusComponent(); 1990 if (this.employmentStatus == null) 1991 this.employmentStatus = new ArrayList<OccupationalDataEmploymentStatusComponent>(); 1992 this.employmentStatus.add(t); 1993 return t; 1994 } 1995 1996 public OccupationalData addEmploymentStatus(OccupationalDataEmploymentStatusComponent t) { //3 1997 if (t == null) 1998 return this; 1999 if (this.employmentStatus == null) 2000 this.employmentStatus = new ArrayList<OccupationalDataEmploymentStatusComponent>(); 2001 this.employmentStatus.add(t); 2002 return this; 2003 } 2004 2005 /** 2006 * @return The first repetition of repeating field {@link #employmentStatus}, creating it if it does not already exist 2007 */ 2008 public OccupationalDataEmploymentStatusComponent getEmploymentStatusFirstRep() { 2009 if (getEmploymentStatus().isEmpty()) { 2010 addEmploymentStatus(); 2011 } 2012 return getEmploymentStatus().get(0); 2013 } 2014 2015 /** 2016 * @return {@link #retirementDate} (A person's self-identified retirement date. A person may retire multiple times.) 2017 */ 2018 public List<DateTimeType> getRetirementDate() { 2019 if (this.retirementDate == null) 2020 this.retirementDate = new ArrayList<DateTimeType>(); 2021 return this.retirementDate; 2022 } 2023 2024 /** 2025 * @return Returns a reference to <code>this</code> for easy method chaining 2026 */ 2027 public OccupationalData setRetirementDate(List<DateTimeType> theRetirementDate) { 2028 this.retirementDate = theRetirementDate; 2029 return this; 2030 } 2031 2032 public boolean hasRetirementDate() { 2033 if (this.retirementDate == null) 2034 return false; 2035 for (DateTimeType item : this.retirementDate) 2036 if (!item.isEmpty()) 2037 return true; 2038 return false; 2039 } 2040 2041 /** 2042 * @return {@link #retirementDate} (A person's self-identified retirement date. A person may retire multiple times.) 2043 */ 2044 public DateTimeType addRetirementDateElement() {//2 2045 DateTimeType t = new DateTimeType(); 2046 if (this.retirementDate == null) 2047 this.retirementDate = new ArrayList<DateTimeType>(); 2048 this.retirementDate.add(t); 2049 return t; 2050 } 2051 2052 /** 2053 * @param value {@link #retirementDate} (A person's self-identified retirement date. A person may retire multiple times.) 2054 */ 2055 public OccupationalData addRetirementDate(Date value) { //1 2056 DateTimeType t = new DateTimeType(); 2057 t.setValue(value); 2058 if (this.retirementDate == null) 2059 this.retirementDate = new ArrayList<DateTimeType>(); 2060 this.retirementDate.add(t); 2061 return this; 2062 } 2063 2064 /** 2065 * @param value {@link #retirementDate} (A person's self-identified retirement date. A person may retire multiple times.) 2066 */ 2067 public boolean hasRetirementDate(Date value) { 2068 if (this.retirementDate == null) 2069 return false; 2070 for (DateTimeType v : this.retirementDate) 2071 if (v.getValue().equals(value)) // dateTime 2072 return true; 2073 return false; 2074 } 2075 2076 /** 2077 * @return {@link #combatZonePeriod} (The start and end dates for the period of time a person's work is or was in a combat zone. In addition to military personnel, civilians also may work or have worked in a combat zone.) 2078 */ 2079 public List<Period> getCombatZonePeriod() { 2080 if (this.combatZonePeriod == null) 2081 this.combatZonePeriod = new ArrayList<Period>(); 2082 return this.combatZonePeriod; 2083 } 2084 2085 /** 2086 * @return Returns a reference to <code>this</code> for easy method chaining 2087 */ 2088 public OccupationalData setCombatZonePeriod(List<Period> theCombatZonePeriod) { 2089 this.combatZonePeriod = theCombatZonePeriod; 2090 return this; 2091 } 2092 2093 public boolean hasCombatZonePeriod() { 2094 if (this.combatZonePeriod == null) 2095 return false; 2096 for (Period item : this.combatZonePeriod) 2097 if (!item.isEmpty()) 2098 return true; 2099 return false; 2100 } 2101 2102 public Period addCombatZonePeriod() { //3 2103 Period t = new Period(); 2104 if (this.combatZonePeriod == null) 2105 this.combatZonePeriod = new ArrayList<Period>(); 2106 this.combatZonePeriod.add(t); 2107 return t; 2108 } 2109 2110 public OccupationalData addCombatZonePeriod(Period t) { //3 2111 if (t == null) 2112 return this; 2113 if (this.combatZonePeriod == null) 2114 this.combatZonePeriod = new ArrayList<Period>(); 2115 this.combatZonePeriod.add(t); 2116 return this; 2117 } 2118 2119 /** 2120 * @return The first repetition of repeating field {@link #combatZonePeriod}, creating it if it does not already exist 2121 */ 2122 public Period getCombatZonePeriodFirstRep() { 2123 if (getCombatZonePeriod().isEmpty()) { 2124 addCombatZonePeriod(); 2125 } 2126 return getCombatZonePeriod().get(0); 2127 } 2128 2129 /** 2130 * @return {@link #usualWork} (The type of work a person has held for the longest amount of time during his or her life, regardless of the occupation currently held and regardless of whether or not it has been held for a continuous time.) 2131 */ 2132 public OccupationalDataUsualWorkComponent getUsualWork() { 2133 if (this.usualWork == null) 2134 if (Configuration.errorOnAutoCreate()) 2135 throw new Error("Attempt to auto-create OccupationalData.usualWork"); 2136 else if (Configuration.doAutoCreate()) 2137 this.usualWork = new OccupationalDataUsualWorkComponent(); // cc 2138 return this.usualWork; 2139 } 2140 2141 public boolean hasUsualWork() { 2142 return this.usualWork != null && !this.usualWork.isEmpty(); 2143 } 2144 2145 /** 2146 * @param value {@link #usualWork} (The type of work a person has held for the longest amount of time during his or her life, regardless of the occupation currently held and regardless of whether or not it has been held for a continuous time.) 2147 */ 2148 public OccupationalData setUsualWork(OccupationalDataUsualWorkComponent value) { 2149 this.usualWork = value; 2150 return this; 2151 } 2152 2153 /** 2154 * @return {@link #pastOrPresentJob} (The type of work done by a person during a current or past job. A job is defined by the sum of all the data related to the occupation. A change in occupation, supervisory level, industry, employer, or employer location is considered a new job.) 2155 */ 2156 public List<OccupationalDataPastOrPresentJobComponent> getPastOrPresentJob() { 2157 if (this.pastOrPresentJob == null) 2158 this.pastOrPresentJob = new ArrayList<OccupationalDataPastOrPresentJobComponent>(); 2159 return this.pastOrPresentJob; 2160 } 2161 2162 /** 2163 * @return Returns a reference to <code>this</code> for easy method chaining 2164 */ 2165 public OccupationalData setPastOrPresentJob(List<OccupationalDataPastOrPresentJobComponent> thePastOrPresentJob) { 2166 this.pastOrPresentJob = thePastOrPresentJob; 2167 return this; 2168 } 2169 2170 public boolean hasPastOrPresentJob() { 2171 if (this.pastOrPresentJob == null) 2172 return false; 2173 for (OccupationalDataPastOrPresentJobComponent item : this.pastOrPresentJob) 2174 if (!item.isEmpty()) 2175 return true; 2176 return false; 2177 } 2178 2179 public OccupationalDataPastOrPresentJobComponent addPastOrPresentJob() { //3 2180 OccupationalDataPastOrPresentJobComponent t = new OccupationalDataPastOrPresentJobComponent(); 2181 if (this.pastOrPresentJob == null) 2182 this.pastOrPresentJob = new ArrayList<OccupationalDataPastOrPresentJobComponent>(); 2183 this.pastOrPresentJob.add(t); 2184 return t; 2185 } 2186 2187 public OccupationalData addPastOrPresentJob(OccupationalDataPastOrPresentJobComponent t) { //3 2188 if (t == null) 2189 return this; 2190 if (this.pastOrPresentJob == null) 2191 this.pastOrPresentJob = new ArrayList<OccupationalDataPastOrPresentJobComponent>(); 2192 this.pastOrPresentJob.add(t); 2193 return this; 2194 } 2195 2196 /** 2197 * @return The first repetition of repeating field {@link #pastOrPresentJob}, creating it if it does not already exist 2198 */ 2199 public OccupationalDataPastOrPresentJobComponent getPastOrPresentJobFirstRep() { 2200 if (getPastOrPresentJob().isEmpty()) { 2201 addPastOrPresentJob(); 2202 } 2203 return getPastOrPresentJob().get(0); 2204 } 2205 2206 protected void listChildren(List<Property> children) { 2207 super.listChildren(children); 2208 children.add(new Property("identifier", "Identifier", "Business identifier assigned to the occupational data record.", 0, 1, identifier)); 2209 children.add(new Property("status", "code", "The status of this ODH. Enables tracking the life-cycle of the content.", 0, 1, status)); 2210 children.add(new Property("subject", "Reference(Patient|RelatedPerson)", "The occupational data record is about this person (e.g., the patient, a parent of a minor child).", 0, 1, subject)); 2211 children.add(new Property("date", "dateTime", "The date of creation or updating of the occupational data record.", 0, 1, date)); 2212 children.add(new Property("recorder", "Reference(Practitioner|PractitionerRole|Patient|RelatedPerson)", "The person who created or last updated the occupational data record.", 0, java.lang.Integer.MAX_VALUE, recorder)); 2213 children.add(new Property("informant", "Reference(Patient|RelatedPerson)", "The person who provided the subject's health-related occupational data.", 0, java.lang.Integer.MAX_VALUE, informant)); 2214 children.add(new Property("employmentStatus", "", "A person's current economic relationship to a job. Employment status refers to whether a person is currently working for compensation, is unemployed (i.e., searching for work for compensation), or is not in the labor force (e.g. disabled, homemaker, chooses not to work, etc.). Employment status is not the same as classification of work.", 0, java.lang.Integer.MAX_VALUE, employmentStatus)); 2215 children.add(new Property("retirementDate", "dateTime", "A person's self-identified retirement date. A person may retire multiple times.", 0, java.lang.Integer.MAX_VALUE, retirementDate)); 2216 children.add(new Property("combatZonePeriod", "Period", "The start and end dates for the period of time a person's work is or was in a combat zone. In addition to military personnel, civilians also may work or have worked in a combat zone.", 0, java.lang.Integer.MAX_VALUE, combatZonePeriod)); 2217 children.add(new Property("usualWork", "", "The type of work a person has held for the longest amount of time during his or her life, regardless of the occupation currently held and regardless of whether or not it has been held for a continuous time.", 0, 1, usualWork)); 2218 children.add(new Property("pastOrPresentJob", "", "The type of work done by a person during a current or past job. A job is defined by the sum of all the data related to the occupation. A change in occupation, supervisory level, industry, employer, or employer location is considered a new job.", 0, java.lang.Integer.MAX_VALUE, pastOrPresentJob)); 2219 } 2220 2221 @Override 2222 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2223 switch (_hash) { 2224 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Business identifier assigned to the occupational data record.", 0, 1, identifier); 2225 case -892481550: /*status*/ return new Property("status", "code", "The status of this ODH. Enables tracking the life-cycle of the content.", 0, 1, status); 2226 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|RelatedPerson)", "The occupational data record is about this person (e.g., the patient, a parent of a minor child).", 0, 1, subject); 2227 case 3076014: /*date*/ return new Property("date", "dateTime", "The date of creation or updating of the occupational data record.", 0, 1, date); 2228 case -799233858: /*recorder*/ return new Property("recorder", "Reference(Practitioner|PractitionerRole|Patient|RelatedPerson)", "The person who created or last updated the occupational data record.", 0, java.lang.Integer.MAX_VALUE, recorder); 2229 case 1248974302: /*informant*/ return new Property("informant", "Reference(Patient|RelatedPerson)", "The person who provided the subject's health-related occupational data.", 0, java.lang.Integer.MAX_VALUE, informant); 2230 case 418561790: /*employmentStatus*/ return new Property("employmentStatus", "", "A person's current economic relationship to a job. Employment status refers to whether a person is currently working for compensation, is unemployed (i.e., searching for work for compensation), or is not in the labor force (e.g. disabled, homemaker, chooses not to work, etc.). Employment status is not the same as classification of work.", 0, java.lang.Integer.MAX_VALUE, employmentStatus); 2231 case 1617125191: /*retirementDate*/ return new Property("retirementDate", "dateTime", "A person's self-identified retirement date. A person may retire multiple times.", 0, java.lang.Integer.MAX_VALUE, retirementDate); 2232 case 1215352481: /*combatZonePeriod*/ return new Property("combatZonePeriod", "Period", "The start and end dates for the period of time a person's work is or was in a combat zone. In addition to military personnel, civilians also may work or have worked in a combat zone.", 0, java.lang.Integer.MAX_VALUE, combatZonePeriod); 2233 case 1179136563: /*usualWork*/ return new Property("usualWork", "", "The type of work a person has held for the longest amount of time during his or her life, regardless of the occupation currently held and regardless of whether or not it has been held for a continuous time.", 0, 1, usualWork); 2234 case -1024719753: /*pastOrPresentJob*/ return new Property("pastOrPresentJob", "", "The type of work done by a person during a current or past job. A job is defined by the sum of all the data related to the occupation. A change in occupation, supervisory level, industry, employer, or employer location is considered a new job.", 0, java.lang.Integer.MAX_VALUE, pastOrPresentJob); 2235 default: return super.getNamedProperty(_hash, _name, _checkValid); 2236 } 2237 2238 } 2239 2240 @Override 2241 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2242 switch (hash) { 2243 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 2244 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 2245 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 2246 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 2247 case -799233858: /*recorder*/ return this.recorder == null ? new Base[0] : this.recorder.toArray(new Base[this.recorder.size()]); // Reference 2248 case 1248974302: /*informant*/ return this.informant == null ? new Base[0] : this.informant.toArray(new Base[this.informant.size()]); // Reference 2249 case 418561790: /*employmentStatus*/ return this.employmentStatus == null ? new Base[0] : this.employmentStatus.toArray(new Base[this.employmentStatus.size()]); // OccupationalDataEmploymentStatusComponent 2250 case 1617125191: /*retirementDate*/ return this.retirementDate == null ? new Base[0] : this.retirementDate.toArray(new Base[this.retirementDate.size()]); // DateTimeType 2251 case 1215352481: /*combatZonePeriod*/ return this.combatZonePeriod == null ? new Base[0] : this.combatZonePeriod.toArray(new Base[this.combatZonePeriod.size()]); // Period 2252 case 1179136563: /*usualWork*/ return this.usualWork == null ? new Base[0] : new Base[] {this.usualWork}; // OccupationalDataUsualWorkComponent 2253 case -1024719753: /*pastOrPresentJob*/ return this.pastOrPresentJob == null ? new Base[0] : this.pastOrPresentJob.toArray(new Base[this.pastOrPresentJob.size()]); // OccupationalDataPastOrPresentJobComponent 2254 default: return super.getProperty(hash, name, checkValid); 2255 } 2256 2257 } 2258 2259 @Override 2260 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2261 switch (hash) { 2262 case -1618432855: // identifier 2263 this.identifier = castToIdentifier(value); // Identifier 2264 return value; 2265 case -892481550: // status 2266 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 2267 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 2268 return value; 2269 case -1867885268: // subject 2270 this.subject = castToReference(value); // Reference 2271 return value; 2272 case 3076014: // date 2273 this.date = castToDateTime(value); // DateTimeType 2274 return value; 2275 case -799233858: // recorder 2276 this.getRecorder().add(castToReference(value)); // Reference 2277 return value; 2278 case 1248974302: // informant 2279 this.getInformant().add(castToReference(value)); // Reference 2280 return value; 2281 case 418561790: // employmentStatus 2282 this.getEmploymentStatus().add((OccupationalDataEmploymentStatusComponent) value); // OccupationalDataEmploymentStatusComponent 2283 return value; 2284 case 1617125191: // retirementDate 2285 this.getRetirementDate().add(castToDateTime(value)); // DateTimeType 2286 return value; 2287 case 1215352481: // combatZonePeriod 2288 this.getCombatZonePeriod().add(castToPeriod(value)); // Period 2289 return value; 2290 case 1179136563: // usualWork 2291 this.usualWork = (OccupationalDataUsualWorkComponent) value; // OccupationalDataUsualWorkComponent 2292 return value; 2293 case -1024719753: // pastOrPresentJob 2294 this.getPastOrPresentJob().add((OccupationalDataPastOrPresentJobComponent) value); // OccupationalDataPastOrPresentJobComponent 2295 return value; 2296 default: return super.setProperty(hash, name, value); 2297 } 2298 2299 } 2300 2301 @Override 2302 public Base setProperty(String name, Base value) throws FHIRException { 2303 if (name.equals("identifier")) { 2304 this.identifier = castToIdentifier(value); // Identifier 2305 } else if (name.equals("status")) { 2306 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 2307 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 2308 } else if (name.equals("subject")) { 2309 this.subject = castToReference(value); // Reference 2310 } else if (name.equals("date")) { 2311 this.date = castToDateTime(value); // DateTimeType 2312 } else if (name.equals("recorder")) { 2313 this.getRecorder().add(castToReference(value)); 2314 } else if (name.equals("informant")) { 2315 this.getInformant().add(castToReference(value)); 2316 } else if (name.equals("employmentStatus")) { 2317 this.getEmploymentStatus().add((OccupationalDataEmploymentStatusComponent) value); 2318 } else if (name.equals("retirementDate")) { 2319 this.getRetirementDate().add(castToDateTime(value)); 2320 } else if (name.equals("combatZonePeriod")) { 2321 this.getCombatZonePeriod().add(castToPeriod(value)); 2322 } else if (name.equals("usualWork")) { 2323 this.usualWork = (OccupationalDataUsualWorkComponent) value; // OccupationalDataUsualWorkComponent 2324 } else if (name.equals("pastOrPresentJob")) { 2325 this.getPastOrPresentJob().add((OccupationalDataPastOrPresentJobComponent) value); 2326 } else 2327 return super.setProperty(name, value); 2328 return value; 2329 } 2330 2331 @Override 2332 public Base makeProperty(int hash, String name) throws FHIRException { 2333 switch (hash) { 2334 case -1618432855: return getIdentifier(); 2335 case -892481550: return getStatusElement(); 2336 case -1867885268: return getSubject(); 2337 case 3076014: return getDateElement(); 2338 case -799233858: return addRecorder(); 2339 case 1248974302: return addInformant(); 2340 case 418561790: return addEmploymentStatus(); 2341 case 1617125191: return addRetirementDateElement(); 2342 case 1215352481: return addCombatZonePeriod(); 2343 case 1179136563: return getUsualWork(); 2344 case -1024719753: return addPastOrPresentJob(); 2345 default: return super.makeProperty(hash, name); 2346 } 2347 2348 } 2349 2350 @Override 2351 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2352 switch (hash) { 2353 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2354 case -892481550: /*status*/ return new String[] {"code"}; 2355 case -1867885268: /*subject*/ return new String[] {"Reference"}; 2356 case 3076014: /*date*/ return new String[] {"dateTime"}; 2357 case -799233858: /*recorder*/ return new String[] {"Reference"}; 2358 case 1248974302: /*informant*/ return new String[] {"Reference"}; 2359 case 418561790: /*employmentStatus*/ return new String[] {}; 2360 case 1617125191: /*retirementDate*/ return new String[] {"dateTime"}; 2361 case 1215352481: /*combatZonePeriod*/ return new String[] {"Period"}; 2362 case 1179136563: /*usualWork*/ return new String[] {}; 2363 case -1024719753: /*pastOrPresentJob*/ return new String[] {}; 2364 default: return super.getTypesForProperty(hash, name); 2365 } 2366 2367 } 2368 2369 @Override 2370 public Base addChild(String name) throws FHIRException { 2371 if (name.equals("identifier")) { 2372 this.identifier = new Identifier(); 2373 return this.identifier; 2374 } 2375 else if (name.equals("status")) { 2376 throw new FHIRException("Cannot call addChild on a primitive type OccupationalData.status"); 2377 } 2378 else if (name.equals("subject")) { 2379 this.subject = new Reference(); 2380 return this.subject; 2381 } 2382 else if (name.equals("date")) { 2383 throw new FHIRException("Cannot call addChild on a primitive type OccupationalData.date"); 2384 } 2385 else if (name.equals("recorder")) { 2386 return addRecorder(); 2387 } 2388 else if (name.equals("informant")) { 2389 return addInformant(); 2390 } 2391 else if (name.equals("employmentStatus")) { 2392 return addEmploymentStatus(); 2393 } 2394 else if (name.equals("retirementDate")) { 2395 throw new FHIRException("Cannot call addChild on a primitive type OccupationalData.retirementDate"); 2396 } 2397 else if (name.equals("combatZonePeriod")) { 2398 return addCombatZonePeriod(); 2399 } 2400 else if (name.equals("usualWork")) { 2401 this.usualWork = new OccupationalDataUsualWorkComponent(); 2402 return this.usualWork; 2403 } 2404 else if (name.equals("pastOrPresentJob")) { 2405 return addPastOrPresentJob(); 2406 } 2407 else 2408 return super.addChild(name); 2409 } 2410 2411 public String fhirType() { 2412 return "OccupationalData"; 2413 2414 } 2415 2416 public OccupationalData copy() { 2417 OccupationalData dst = new OccupationalData(); 2418 copyValues(dst); 2419 dst.identifier = identifier == null ? null : identifier.copy(); 2420 dst.status = status == null ? null : status.copy(); 2421 dst.subject = subject == null ? null : subject.copy(); 2422 dst.date = date == null ? null : date.copy(); 2423 if (recorder != null) { 2424 dst.recorder = new ArrayList<Reference>(); 2425 for (Reference i : recorder) 2426 dst.recorder.add(i.copy()); 2427 }; 2428 if (informant != null) { 2429 dst.informant = new ArrayList<Reference>(); 2430 for (Reference i : informant) 2431 dst.informant.add(i.copy()); 2432 }; 2433 if (employmentStatus != null) { 2434 dst.employmentStatus = new ArrayList<OccupationalDataEmploymentStatusComponent>(); 2435 for (OccupationalDataEmploymentStatusComponent i : employmentStatus) 2436 dst.employmentStatus.add(i.copy()); 2437 }; 2438 if (retirementDate != null) { 2439 dst.retirementDate = new ArrayList<DateTimeType>(); 2440 for (DateTimeType i : retirementDate) 2441 dst.retirementDate.add(i.copy()); 2442 }; 2443 if (combatZonePeriod != null) { 2444 dst.combatZonePeriod = new ArrayList<Period>(); 2445 for (Period i : combatZonePeriod) 2446 dst.combatZonePeriod.add(i.copy()); 2447 }; 2448 dst.usualWork = usualWork == null ? null : usualWork.copy(); 2449 if (pastOrPresentJob != null) { 2450 dst.pastOrPresentJob = new ArrayList<OccupationalDataPastOrPresentJobComponent>(); 2451 for (OccupationalDataPastOrPresentJobComponent i : pastOrPresentJob) 2452 dst.pastOrPresentJob.add(i.copy()); 2453 }; 2454 return dst; 2455 } 2456 2457 protected OccupationalData typedCopy() { 2458 return copy(); 2459 } 2460 2461 @Override 2462 public boolean equalsDeep(Base other_) { 2463 if (!super.equalsDeep(other_)) 2464 return false; 2465 if (!(other_ instanceof OccupationalData)) 2466 return false; 2467 OccupationalData o = (OccupationalData) other_; 2468 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(subject, o.subject, true) 2469 && compareDeep(date, o.date, true) && compareDeep(recorder, o.recorder, true) && compareDeep(informant, o.informant, true) 2470 && compareDeep(employmentStatus, o.employmentStatus, true) && compareDeep(retirementDate, o.retirementDate, true) 2471 && compareDeep(combatZonePeriod, o.combatZonePeriod, true) && compareDeep(usualWork, o.usualWork, true) 2472 && compareDeep(pastOrPresentJob, o.pastOrPresentJob, true); 2473 } 2474 2475 @Override 2476 public boolean equalsShallow(Base other_) { 2477 if (!super.equalsShallow(other_)) 2478 return false; 2479 if (!(other_ instanceof OccupationalData)) 2480 return false; 2481 OccupationalData o = (OccupationalData) other_; 2482 return compareValues(status, o.status, true) && compareValues(date, o.date, true) && compareValues(retirementDate, o.retirementDate, true) 2483 ; 2484 } 2485 2486 public boolean isEmpty() { 2487 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, subject 2488 , date, recorder, informant, employmentStatus, retirementDate, combatZonePeriod 2489 , usualWork, pastOrPresentJob); 2490 } 2491 2492 @Override 2493 public ResourceType getResourceType() { 2494 return ResourceType.OccupationalData; 2495 } 2496 2497 /** 2498 * Search parameter: <b>date</b> 2499 * <p> 2500 * Description: <b>Obtained date/time. If the obtained element is a period, a date that falls in the period</b><br> 2501 * Type: <b>date</b><br> 2502 * Path: <b>OccupationalData.date</b><br> 2503 * </p> 2504 */ 2505 @SearchParamDefinition(name="date", path="OccupationalData.date", description="Obtained date/time. If the obtained element is a period, a date that falls in the period", type="date" ) 2506 public static final String SP_DATE = "date"; 2507 /** 2508 * <b>Fluent Client</b> search parameter constant for <b>date</b> 2509 * <p> 2510 * Description: <b>Obtained date/time. If the obtained element is a period, a date that falls in the period</b><br> 2511 * Type: <b>date</b><br> 2512 * Path: <b>OccupationalData.date</b><br> 2513 * </p> 2514 */ 2515 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 2516 2517 /** 2518 * Search parameter: <b>identifier</b> 2519 * <p> 2520 * Description: <b>A business identifier for a particular occupational data record</b><br> 2521 * Type: <b>token</b><br> 2522 * Path: <b>OccupationalData.identifier</b><br> 2523 * </p> 2524 */ 2525 @SearchParamDefinition(name="identifier", path="OccupationalData.identifier", description="A business identifier for a particular occupational data record", type="token" ) 2526 public static final String SP_IDENTIFIER = "identifier"; 2527 /** 2528 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2529 * <p> 2530 * Description: <b>A business identifier for a particular occupational data record</b><br> 2531 * Type: <b>token</b><br> 2532 * Path: <b>OccupationalData.identifier</b><br> 2533 * </p> 2534 */ 2535 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2536 2537 /** 2538 * Search parameter: <b>recorder</b> 2539 * <p> 2540 * Description: <b>The person who recorded or updated the occupational data record</b><br> 2541 * Type: <b>reference</b><br> 2542 * Path: <b>OccupationalData.recorder</b><br> 2543 * </p> 2544 */ 2545 @SearchParamDefinition(name="recorder", path="OccupationalData.recorder", description="The person who recorded or updated the occupational data record", type="reference", target={Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 2546 public static final String SP_RECORDER = "recorder"; 2547 /** 2548 * <b>Fluent Client</b> search parameter constant for <b>recorder</b> 2549 * <p> 2550 * Description: <b>The person who recorded or updated the occupational data record</b><br> 2551 * Type: <b>reference</b><br> 2552 * Path: <b>OccupationalData.recorder</b><br> 2553 * </p> 2554 */ 2555 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RECORDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RECORDER); 2556 2557/** 2558 * Constant for fluent queries to be used to add include statements. Specifies 2559 * the path value of "<b>OccupationalData:recorder</b>". 2560 */ 2561 public static final ca.uhn.fhir.model.api.Include INCLUDE_RECORDER = new ca.uhn.fhir.model.api.Include("OccupationalData:recorder").toLocked(); 2562 2563 /** 2564 * Search parameter: <b>subject</b> 2565 * <p> 2566 * Description: <b>The subject that the occupational data record is about</b><br> 2567 * Type: <b>reference</b><br> 2568 * Path: <b>OccupationalData.subject</b><br> 2569 * </p> 2570 */ 2571 @SearchParamDefinition(name="subject", path="OccupationalData.subject", description="The subject that the occupational data record is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class, RelatedPerson.class } ) 2572 public static final String SP_SUBJECT = "subject"; 2573 /** 2574 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 2575 * <p> 2576 * Description: <b>The subject that the occupational data record is about</b><br> 2577 * Type: <b>reference</b><br> 2578 * Path: <b>OccupationalData.subject</b><br> 2579 * </p> 2580 */ 2581 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 2582 2583/** 2584 * Constant for fluent queries to be used to add include statements. Specifies 2585 * the path value of "<b>OccupationalData:subject</b>". 2586 */ 2587 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("OccupationalData:subject").toLocked(); 2588 2589 /** 2590 * Search parameter: <b>status</b> 2591 * <p> 2592 * Description: <b>The status of the occupational data record</b><br> 2593 * Type: <b>token</b><br> 2594 * Path: <b>OccupationalData.status</b><br> 2595 * </p> 2596 */ 2597 @SearchParamDefinition(name="status", path="OccupationalData.status", description="The status of the occupational data record", type="token" ) 2598 public static final String SP_STATUS = "status"; 2599 /** 2600 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2601 * <p> 2602 * Description: <b>The status of the occupational data record</b><br> 2603 * Type: <b>token</b><br> 2604 * Path: <b>OccupationalData.status</b><br> 2605 * </p> 2606 */ 2607 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2608 2609 /** 2610 * Search parameter: <b>informant</b> 2611 * <p> 2612 * Description: <b>The person who provided the subject's health-related occupational data.</b><br> 2613 * Type: <b>reference</b><br> 2614 * Path: <b>OccupationalData.informant</b><br> 2615 * </p> 2616 */ 2617 @SearchParamDefinition(name="informant", path="OccupationalData.informant", description="The person who provided the subject's health-related occupational data.", type="reference", target={Patient.class, RelatedPerson.class } ) 2618 public static final String SP_INFORMANT = "informant"; 2619 /** 2620 * <b>Fluent Client</b> search parameter constant for <b>informant</b> 2621 * <p> 2622 * Description: <b>The person who provided the subject's health-related occupational data.</b><br> 2623 * Type: <b>reference</b><br> 2624 * Path: <b>OccupationalData.informant</b><br> 2625 * </p> 2626 */ 2627 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INFORMANT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INFORMANT); 2628 2629/** 2630 * Constant for fluent queries to be used to add include statements. Specifies 2631 * the path value of "<b>OccupationalData:informant</b>". 2632 */ 2633 public static final ca.uhn.fhir.model.api.Include INCLUDE_INFORMANT = new ca.uhn.fhir.model.api.Include("OccupationalData:informant").toLocked(); 2634 2635 2636} 2637