001package org.hl7.fhir.dstu3.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import org.hl7.fhir.dstu3.model.Enumerations.*; 038import ca.uhn.fhir.model.api.annotation.ResourceDef; 039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 040import ca.uhn.fhir.model.api.annotation.Child; 041import ca.uhn.fhir.model.api.annotation.ChildOrder; 042import ca.uhn.fhir.model.api.annotation.Description; 043import ca.uhn.fhir.model.api.annotation.Block; 044import org.hl7.fhir.instance.model.api.*; 045import org.hl7.fhir.exceptions.FHIRException; 046import org.hl7.fhir.exceptions.FHIRFormatError; 047/** 048 * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient. 049 */ 050@ResourceDef(name="FamilyMemberHistory", profile="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory") 051public class FamilyMemberHistory extends DomainResource { 052 053 public enum FamilyHistoryStatus { 054 /** 055 * Some health information is known and captured, but not complete - see notes for details. 056 */ 057 PARTIAL, 058 /** 059 * All available related health information is captured as of the date (and possibly time) when the family member history was taken. 060 */ 061 COMPLETED, 062 /** 063 * This instance should not have been part of this patient's medical record. 064 */ 065 ENTEREDINERROR, 066 /** 067 * Health information for this individual is unavailable/unknown. 068 */ 069 HEALTHUNKNOWN, 070 /** 071 * added to help the parsers with the generic types 072 */ 073 NULL; 074 public static FamilyHistoryStatus fromCode(String codeString) throws FHIRException { 075 if (codeString == null || "".equals(codeString)) 076 return null; 077 if ("partial".equals(codeString)) 078 return PARTIAL; 079 if ("completed".equals(codeString)) 080 return COMPLETED; 081 if ("entered-in-error".equals(codeString)) 082 return ENTEREDINERROR; 083 if ("health-unknown".equals(codeString)) 084 return HEALTHUNKNOWN; 085 if (Configuration.isAcceptInvalidEnums()) 086 return null; 087 else 088 throw new FHIRException("Unknown FamilyHistoryStatus code '"+codeString+"'"); 089 } 090 public String toCode() { 091 switch (this) { 092 case PARTIAL: return "partial"; 093 case COMPLETED: return "completed"; 094 case ENTEREDINERROR: return "entered-in-error"; 095 case HEALTHUNKNOWN: return "health-unknown"; 096 default: return "?"; 097 } 098 } 099 public String getSystem() { 100 switch (this) { 101 case PARTIAL: return "http://hl7.org/fhir/history-status"; 102 case COMPLETED: return "http://hl7.org/fhir/history-status"; 103 case ENTEREDINERROR: return "http://hl7.org/fhir/history-status"; 104 case HEALTHUNKNOWN: return "http://hl7.org/fhir/history-status"; 105 default: return "?"; 106 } 107 } 108 public String getDefinition() { 109 switch (this) { 110 case PARTIAL: return "Some health information is known and captured, but not complete - see notes for details."; 111 case COMPLETED: return "All available related health information is captured as of the date (and possibly time) when the family member history was taken."; 112 case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; 113 case HEALTHUNKNOWN: return "Health information for this individual is unavailable/unknown."; 114 default: return "?"; 115 } 116 } 117 public String getDisplay() { 118 switch (this) { 119 case PARTIAL: return "Partial"; 120 case COMPLETED: return "Completed"; 121 case ENTEREDINERROR: return "Entered in error"; 122 case HEALTHUNKNOWN: return "Health unknown"; 123 default: return "?"; 124 } 125 } 126 } 127 128 public static class FamilyHistoryStatusEnumFactory implements EnumFactory<FamilyHistoryStatus> { 129 public FamilyHistoryStatus fromCode(String codeString) throws IllegalArgumentException { 130 if (codeString == null || "".equals(codeString)) 131 if (codeString == null || "".equals(codeString)) 132 return null; 133 if ("partial".equals(codeString)) 134 return FamilyHistoryStatus.PARTIAL; 135 if ("completed".equals(codeString)) 136 return FamilyHistoryStatus.COMPLETED; 137 if ("entered-in-error".equals(codeString)) 138 return FamilyHistoryStatus.ENTEREDINERROR; 139 if ("health-unknown".equals(codeString)) 140 return FamilyHistoryStatus.HEALTHUNKNOWN; 141 throw new IllegalArgumentException("Unknown FamilyHistoryStatus code '"+codeString+"'"); 142 } 143 public Enumeration<FamilyHistoryStatus> fromType(Base code) throws FHIRException { 144 if (code == null) 145 return null; 146 if (code.isEmpty()) 147 return new Enumeration<FamilyHistoryStatus>(this); 148 String codeString = ((PrimitiveType) code).asStringValue(); 149 if (codeString == null || "".equals(codeString)) 150 return null; 151 if ("partial".equals(codeString)) 152 return new Enumeration<FamilyHistoryStatus>(this, FamilyHistoryStatus.PARTIAL); 153 if ("completed".equals(codeString)) 154 return new Enumeration<FamilyHistoryStatus>(this, FamilyHistoryStatus.COMPLETED); 155 if ("entered-in-error".equals(codeString)) 156 return new Enumeration<FamilyHistoryStatus>(this, FamilyHistoryStatus.ENTEREDINERROR); 157 if ("health-unknown".equals(codeString)) 158 return new Enumeration<FamilyHistoryStatus>(this, FamilyHistoryStatus.HEALTHUNKNOWN); 159 throw new FHIRException("Unknown FamilyHistoryStatus code '"+codeString+"'"); 160 } 161 public String toCode(FamilyHistoryStatus code) { 162 if (code == FamilyHistoryStatus.PARTIAL) 163 return "partial"; 164 if (code == FamilyHistoryStatus.COMPLETED) 165 return "completed"; 166 if (code == FamilyHistoryStatus.ENTEREDINERROR) 167 return "entered-in-error"; 168 if (code == FamilyHistoryStatus.HEALTHUNKNOWN) 169 return "health-unknown"; 170 return "?"; 171 } 172 public String toSystem(FamilyHistoryStatus code) { 173 return code.getSystem(); 174 } 175 } 176 177 @Block() 178 public static class FamilyMemberHistoryConditionComponent extends BackboneElement implements IBaseBackboneElement { 179 /** 180 * The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system. 181 */ 182 @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 183 @Description(shortDefinition="Condition suffered by relation", formalDefinition="The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system." ) 184 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code") 185 protected CodeableConcept code; 186 187 /** 188 * Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation. 189 */ 190 @Child(name = "outcome", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 191 @Description(shortDefinition="deceased | permanent disability | etc.", formalDefinition="Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation." ) 192 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-outcome") 193 protected CodeableConcept outcome; 194 195 /** 196 * Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence. 197 */ 198 @Child(name = "onset", type = {Age.class, Range.class, Period.class, StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 199 @Description(shortDefinition="When condition first manifested", formalDefinition="Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence." ) 200 protected Type onset; 201 202 /** 203 * An area where general notes can be placed about this specific condition. 204 */ 205 @Child(name = "note", type = {Annotation.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 206 @Description(shortDefinition="Extra information about condition", formalDefinition="An area where general notes can be placed about this specific condition." ) 207 protected List<Annotation> note; 208 209 private static final long serialVersionUID = 598309281L; 210 211 /** 212 * Constructor 213 */ 214 public FamilyMemberHistoryConditionComponent() { 215 super(); 216 } 217 218 /** 219 * Constructor 220 */ 221 public FamilyMemberHistoryConditionComponent(CodeableConcept code) { 222 super(); 223 this.code = code; 224 } 225 226 /** 227 * @return {@link #code} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.) 228 */ 229 public CodeableConcept getCode() { 230 if (this.code == null) 231 if (Configuration.errorOnAutoCreate()) 232 throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.code"); 233 else if (Configuration.doAutoCreate()) 234 this.code = new CodeableConcept(); // cc 235 return this.code; 236 } 237 238 public boolean hasCode() { 239 return this.code != null && !this.code.isEmpty(); 240 } 241 242 /** 243 * @param value {@link #code} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.) 244 */ 245 public FamilyMemberHistoryConditionComponent setCode(CodeableConcept value) { 246 this.code = value; 247 return this; 248 } 249 250 /** 251 * @return {@link #outcome} (Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.) 252 */ 253 public CodeableConcept getOutcome() { 254 if (this.outcome == null) 255 if (Configuration.errorOnAutoCreate()) 256 throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.outcome"); 257 else if (Configuration.doAutoCreate()) 258 this.outcome = new CodeableConcept(); // cc 259 return this.outcome; 260 } 261 262 public boolean hasOutcome() { 263 return this.outcome != null && !this.outcome.isEmpty(); 264 } 265 266 /** 267 * @param value {@link #outcome} (Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.) 268 */ 269 public FamilyMemberHistoryConditionComponent setOutcome(CodeableConcept value) { 270 this.outcome = value; 271 return this; 272 } 273 274 /** 275 * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) 276 */ 277 public Type getOnset() { 278 return this.onset; 279 } 280 281 /** 282 * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) 283 */ 284 public Age getOnsetAge() throws FHIRException { 285 if (this.onset == null) 286 return null; 287 if (!(this.onset instanceof Age)) 288 throw new FHIRException("Type mismatch: the type Age was expected, but "+this.onset.getClass().getName()+" was encountered"); 289 return (Age) this.onset; 290 } 291 292 public boolean hasOnsetAge() { 293 return this != null && this.onset instanceof Age; 294 } 295 296 /** 297 * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) 298 */ 299 public Range getOnsetRange() throws FHIRException { 300 if (this.onset == null) 301 return null; 302 if (!(this.onset instanceof Range)) 303 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.onset.getClass().getName()+" was encountered"); 304 return (Range) this.onset; 305 } 306 307 public boolean hasOnsetRange() { 308 return this != null && this.onset instanceof Range; 309 } 310 311 /** 312 * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) 313 */ 314 public Period getOnsetPeriod() throws FHIRException { 315 if (this.onset == null) 316 return null; 317 if (!(this.onset instanceof Period)) 318 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.onset.getClass().getName()+" was encountered"); 319 return (Period) this.onset; 320 } 321 322 public boolean hasOnsetPeriod() { 323 return this != null && this.onset instanceof Period; 324 } 325 326 /** 327 * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) 328 */ 329 public StringType getOnsetStringType() throws FHIRException { 330 if (this.onset == null) 331 return null; 332 if (!(this.onset instanceof StringType)) 333 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.onset.getClass().getName()+" was encountered"); 334 return (StringType) this.onset; 335 } 336 337 public boolean hasOnsetStringType() { 338 return this != null && this.onset instanceof StringType; 339 } 340 341 public boolean hasOnset() { 342 return this.onset != null && !this.onset.isEmpty(); 343 } 344 345 /** 346 * @param value {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) 347 */ 348 public FamilyMemberHistoryConditionComponent setOnset(Type value) throws FHIRFormatError { 349 if (value != null && !(value instanceof Age || value instanceof Range || value instanceof Period || value instanceof StringType)) 350 throw new FHIRFormatError("Not the right type for FamilyMemberHistory.condition.onset[x]: "+value.fhirType()); 351 this.onset = value; 352 return this; 353 } 354 355 /** 356 * @return {@link #note} (An area where general notes can be placed about this specific condition.) 357 */ 358 public List<Annotation> getNote() { 359 if (this.note == null) 360 this.note = new ArrayList<Annotation>(); 361 return this.note; 362 } 363 364 /** 365 * @return Returns a reference to <code>this</code> for easy method chaining 366 */ 367 public FamilyMemberHistoryConditionComponent setNote(List<Annotation> theNote) { 368 this.note = theNote; 369 return this; 370 } 371 372 public boolean hasNote() { 373 if (this.note == null) 374 return false; 375 for (Annotation item : this.note) 376 if (!item.isEmpty()) 377 return true; 378 return false; 379 } 380 381 public Annotation addNote() { //3 382 Annotation t = new Annotation(); 383 if (this.note == null) 384 this.note = new ArrayList<Annotation>(); 385 this.note.add(t); 386 return t; 387 } 388 389 public FamilyMemberHistoryConditionComponent addNote(Annotation t) { //3 390 if (t == null) 391 return this; 392 if (this.note == null) 393 this.note = new ArrayList<Annotation>(); 394 this.note.add(t); 395 return this; 396 } 397 398 /** 399 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 400 */ 401 public Annotation getNoteFirstRep() { 402 if (getNote().isEmpty()) { 403 addNote(); 404 } 405 return getNote().get(0); 406 } 407 408 protected void listChildren(List<Property> children) { 409 super.listChildren(children); 410 children.add(new Property("code", "CodeableConcept", "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", 0, 1, code)); 411 children.add(new Property("outcome", "CodeableConcept", "Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.", 0, 1, outcome)); 412 children.add(new Property("onset[x]", "Age|Range|Period|string", "Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset)); 413 children.add(new Property("note", "Annotation", "An area where general notes can be placed about this specific condition.", 0, java.lang.Integer.MAX_VALUE, note)); 414 } 415 416 @Override 417 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 418 switch (_hash) { 419 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", 0, 1, code); 420 case -1106507950: /*outcome*/ return new Property("outcome", "CodeableConcept", "Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.", 0, 1, outcome); 421 case -1886216323: /*onset[x]*/ return new Property("onset[x]", "Age|Range|Period|string", "Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset); 422 case 105901603: /*onset*/ return new Property("onset[x]", "Age|Range|Period|string", "Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset); 423 case -1886241828: /*onsetAge*/ return new Property("onset[x]", "Age|Range|Period|string", "Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset); 424 case -186664742: /*onsetRange*/ return new Property("onset[x]", "Age|Range|Period|string", "Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset); 425 case -1545082428: /*onsetPeriod*/ return new Property("onset[x]", "Age|Range|Period|string", "Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset); 426 case -1445342188: /*onsetString*/ return new Property("onset[x]", "Age|Range|Period|string", "Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset); 427 case 3387378: /*note*/ return new Property("note", "Annotation", "An area where general notes can be placed about this specific condition.", 0, java.lang.Integer.MAX_VALUE, note); 428 default: return super.getNamedProperty(_hash, _name, _checkValid); 429 } 430 431 } 432 433 @Override 434 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 435 switch (hash) { 436 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 437 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept 438 case 105901603: /*onset*/ return this.onset == null ? new Base[0] : new Base[] {this.onset}; // Type 439 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 440 default: return super.getProperty(hash, name, checkValid); 441 } 442 443 } 444 445 @Override 446 public Base setProperty(int hash, String name, Base value) throws FHIRException { 447 switch (hash) { 448 case 3059181: // code 449 this.code = castToCodeableConcept(value); // CodeableConcept 450 return value; 451 case -1106507950: // outcome 452 this.outcome = castToCodeableConcept(value); // CodeableConcept 453 return value; 454 case 105901603: // onset 455 this.onset = castToType(value); // Type 456 return value; 457 case 3387378: // note 458 this.getNote().add(castToAnnotation(value)); // Annotation 459 return value; 460 default: return super.setProperty(hash, name, value); 461 } 462 463 } 464 465 @Override 466 public Base setProperty(String name, Base value) throws FHIRException { 467 if (name.equals("code")) { 468 this.code = castToCodeableConcept(value); // CodeableConcept 469 } else if (name.equals("outcome")) { 470 this.outcome = castToCodeableConcept(value); // CodeableConcept 471 } else if (name.equals("onset[x]")) { 472 this.onset = castToType(value); // Type 473 } else if (name.equals("note")) { 474 this.getNote().add(castToAnnotation(value)); 475 } else 476 return super.setProperty(name, value); 477 return value; 478 } 479 480 @Override 481 public Base makeProperty(int hash, String name) throws FHIRException { 482 switch (hash) { 483 case 3059181: return getCode(); 484 case -1106507950: return getOutcome(); 485 case -1886216323: return getOnset(); 486 case 105901603: return getOnset(); 487 case 3387378: return addNote(); 488 default: return super.makeProperty(hash, name); 489 } 490 491 } 492 493 @Override 494 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 495 switch (hash) { 496 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 497 case -1106507950: /*outcome*/ return new String[] {"CodeableConcept"}; 498 case 105901603: /*onset*/ return new String[] {"Age", "Range", "Period", "string"}; 499 case 3387378: /*note*/ return new String[] {"Annotation"}; 500 default: return super.getTypesForProperty(hash, name); 501 } 502 503 } 504 505 @Override 506 public Base addChild(String name) throws FHIRException { 507 if (name.equals("code")) { 508 this.code = new CodeableConcept(); 509 return this.code; 510 } 511 else if (name.equals("outcome")) { 512 this.outcome = new CodeableConcept(); 513 return this.outcome; 514 } 515 else if (name.equals("onsetAge")) { 516 this.onset = new Age(); 517 return this.onset; 518 } 519 else if (name.equals("onsetRange")) { 520 this.onset = new Range(); 521 return this.onset; 522 } 523 else if (name.equals("onsetPeriod")) { 524 this.onset = new Period(); 525 return this.onset; 526 } 527 else if (name.equals("onsetString")) { 528 this.onset = new StringType(); 529 return this.onset; 530 } 531 else if (name.equals("note")) { 532 return addNote(); 533 } 534 else 535 return super.addChild(name); 536 } 537 538 public FamilyMemberHistoryConditionComponent copy() { 539 FamilyMemberHistoryConditionComponent dst = new FamilyMemberHistoryConditionComponent(); 540 copyValues(dst); 541 dst.code = code == null ? null : code.copy(); 542 dst.outcome = outcome == null ? null : outcome.copy(); 543 dst.onset = onset == null ? null : onset.copy(); 544 if (note != null) { 545 dst.note = new ArrayList<Annotation>(); 546 for (Annotation i : note) 547 dst.note.add(i.copy()); 548 }; 549 return dst; 550 } 551 552 @Override 553 public boolean equalsDeep(Base other_) { 554 if (!super.equalsDeep(other_)) 555 return false; 556 if (!(other_ instanceof FamilyMemberHistoryConditionComponent)) 557 return false; 558 FamilyMemberHistoryConditionComponent o = (FamilyMemberHistoryConditionComponent) other_; 559 return compareDeep(code, o.code, true) && compareDeep(outcome, o.outcome, true) && compareDeep(onset, o.onset, true) 560 && compareDeep(note, o.note, true); 561 } 562 563 @Override 564 public boolean equalsShallow(Base other_) { 565 if (!super.equalsShallow(other_)) 566 return false; 567 if (!(other_ instanceof FamilyMemberHistoryConditionComponent)) 568 return false; 569 FamilyMemberHistoryConditionComponent o = (FamilyMemberHistoryConditionComponent) other_; 570 return true; 571 } 572 573 public boolean isEmpty() { 574 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, outcome, onset, note 575 ); 576 } 577 578 public String fhirType() { 579 return "FamilyMemberHistory.condition"; 580 581 } 582 583 } 584 585 /** 586 * This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). 587 */ 588 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 589 @Description(shortDefinition="External Id(s) for this record", formalDefinition="This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) 590 protected List<Identifier> identifier; 591 592 /** 593 * A protocol or questionnaire that was adhered to in whole or in part by this event. 594 */ 595 @Child(name = "definition", type = {PlanDefinition.class, Questionnaire.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 596 @Description(shortDefinition="Instantiates protocol or definition", formalDefinition="A protocol or questionnaire that was adhered to in whole or in part by this event." ) 597 protected List<Reference> definition; 598 /** 599 * The actual objects that are the target of the reference (A protocol or questionnaire that was adhered to in whole or in part by this event.) 600 */ 601 protected List<Resource> definitionTarget; 602 603 604 /** 605 * A code specifying the status of the record of the family history of a specific family member. 606 */ 607 @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) 608 @Description(shortDefinition="partial | completed | entered-in-error | health-unknown", formalDefinition="A code specifying the status of the record of the family history of a specific family member." ) 609 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/history-status") 610 protected Enumeration<FamilyHistoryStatus> status; 611 612 /** 613 * If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition. 614 */ 615 @Child(name = "notDone", type = {BooleanType.class}, order=3, min=0, max=1, modifier=true, summary=true) 616 @Description(shortDefinition="The taking of a family member's history did not occur", formalDefinition="If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition." ) 617 protected BooleanType notDone; 618 619 /** 620 * Describes why the family member's history is absent. 621 */ 622 @Child(name = "notDoneReason", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) 623 @Description(shortDefinition="subject-unknown | withheld | unable-to-obtain | deferred", formalDefinition="Describes why the family member's history is absent." ) 624 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/history-not-done-reason") 625 protected CodeableConcept notDoneReason; 626 627 /** 628 * The person who this history concerns. 629 */ 630 @Child(name = "patient", type = {Patient.class}, order=5, min=1, max=1, modifier=false, summary=true) 631 @Description(shortDefinition="Patient history is about", formalDefinition="The person who this history concerns." ) 632 protected Reference patient; 633 634 /** 635 * The actual object that is the target of the reference (The person who this history concerns.) 636 */ 637 protected Patient patientTarget; 638 639 /** 640 * The date (and possibly time) when the family member history was taken. 641 */ 642 @Child(name = "date", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) 643 @Description(shortDefinition="When history was captured/updated", formalDefinition="The date (and possibly time) when the family member history was taken." ) 644 protected DateTimeType date; 645 646 /** 647 * This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair". 648 */ 649 @Child(name = "name", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) 650 @Description(shortDefinition="The family member described", formalDefinition="This will either be a name or a description; e.g. \"Aunt Susan\", \"my cousin with the red hair\"." ) 651 protected StringType name; 652 653 /** 654 * The type of relationship this person has to the patient (father, mother, brother etc.). 655 */ 656 @Child(name = "relationship", type = {CodeableConcept.class}, order=8, min=1, max=1, modifier=false, summary=true) 657 @Description(shortDefinition="Relationship to the subject", formalDefinition="The type of relationship this person has to the patient (father, mother, brother etc.)." ) 658 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/v3-FamilyMember") 659 protected CodeableConcept relationship; 660 661 /** 662 * Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes. 663 */ 664 @Child(name = "gender", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=true) 665 @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes." ) 666 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/administrative-gender") 667 protected Enumeration<AdministrativeGender> gender; 668 669 /** 670 * The actual or approximate date of birth of the relative. 671 */ 672 @Child(name = "born", type = {Period.class, DateType.class, StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 673 @Description(shortDefinition="(approximate) date of birth", formalDefinition="The actual or approximate date of birth of the relative." ) 674 protected Type born; 675 676 /** 677 * The age of the relative at the time the family member history is recorded. 678 */ 679 @Child(name = "age", type = {Age.class, Range.class, StringType.class}, order=11, min=0, max=1, modifier=false, summary=true) 680 @Description(shortDefinition="(approximate) age", formalDefinition="The age of the relative at the time the family member history is recorded." ) 681 protected Type age; 682 683 /** 684 * If true, indicates that the age value specified is an estimated value. 685 */ 686 @Child(name = "estimatedAge", type = {BooleanType.class}, order=12, min=0, max=1, modifier=true, summary=true) 687 @Description(shortDefinition="Age is estimated?", formalDefinition="If true, indicates that the age value specified is an estimated value." ) 688 protected BooleanType estimatedAge; 689 690 /** 691 * Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record. 692 */ 693 @Child(name = "deceased", type = {BooleanType.class, Age.class, Range.class, DateType.class, StringType.class}, order=13, min=0, max=1, modifier=false, summary=true) 694 @Description(shortDefinition="Dead? How old/when?", formalDefinition="Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record." ) 695 protected Type deceased; 696 697 /** 698 * Describes why the family member history occurred in coded or textual form. 699 */ 700 @Child(name = "reasonCode", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 701 @Description(shortDefinition="Why was family member history performed?", formalDefinition="Describes why the family member history occurred in coded or textual form." ) 702 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings") 703 protected List<CodeableConcept> reasonCode; 704 705 /** 706 * Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event. 707 */ 708 @Child(name = "reasonReference", type = {Condition.class, Observation.class, AllergyIntolerance.class, QuestionnaireResponse.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 709 @Description(shortDefinition="Why was family member history performed?", formalDefinition="Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event." ) 710 protected List<Reference> reasonReference; 711 /** 712 * The actual objects that are the target of the reference (Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.) 713 */ 714 protected List<Resource> reasonReferenceTarget; 715 716 717 /** 718 * This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible. 719 */ 720 @Child(name = "note", type = {Annotation.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 721 @Description(shortDefinition="General note about related person", formalDefinition="This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible." ) 722 protected List<Annotation> note; 723 724 /** 725 * The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition. 726 */ 727 @Child(name = "condition", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 728 @Description(shortDefinition="Condition that the related person had", formalDefinition="The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition." ) 729 protected List<FamilyMemberHistoryConditionComponent> condition; 730 731 private static final long serialVersionUID = 388742645L; 732 733 /** 734 * Constructor 735 */ 736 public FamilyMemberHistory() { 737 super(); 738 } 739 740 /** 741 * Constructor 742 */ 743 public FamilyMemberHistory(Enumeration<FamilyHistoryStatus> status, Reference patient, CodeableConcept relationship) { 744 super(); 745 this.status = status; 746 this.patient = patient; 747 this.relationship = relationship; 748 } 749 750 /** 751 * @return {@link #identifier} (This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) 752 */ 753 public List<Identifier> getIdentifier() { 754 if (this.identifier == null) 755 this.identifier = new ArrayList<Identifier>(); 756 return this.identifier; 757 } 758 759 /** 760 * @return Returns a reference to <code>this</code> for easy method chaining 761 */ 762 public FamilyMemberHistory setIdentifier(List<Identifier> theIdentifier) { 763 this.identifier = theIdentifier; 764 return this; 765 } 766 767 public boolean hasIdentifier() { 768 if (this.identifier == null) 769 return false; 770 for (Identifier item : this.identifier) 771 if (!item.isEmpty()) 772 return true; 773 return false; 774 } 775 776 public Identifier addIdentifier() { //3 777 Identifier t = new Identifier(); 778 if (this.identifier == null) 779 this.identifier = new ArrayList<Identifier>(); 780 this.identifier.add(t); 781 return t; 782 } 783 784 public FamilyMemberHistory addIdentifier(Identifier t) { //3 785 if (t == null) 786 return this; 787 if (this.identifier == null) 788 this.identifier = new ArrayList<Identifier>(); 789 this.identifier.add(t); 790 return this; 791 } 792 793 /** 794 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 795 */ 796 public Identifier getIdentifierFirstRep() { 797 if (getIdentifier().isEmpty()) { 798 addIdentifier(); 799 } 800 return getIdentifier().get(0); 801 } 802 803 /** 804 * @return {@link #definition} (A protocol or questionnaire that was adhered to in whole or in part by this event.) 805 */ 806 public List<Reference> getDefinition() { 807 if (this.definition == null) 808 this.definition = new ArrayList<Reference>(); 809 return this.definition; 810 } 811 812 /** 813 * @return Returns a reference to <code>this</code> for easy method chaining 814 */ 815 public FamilyMemberHistory setDefinition(List<Reference> theDefinition) { 816 this.definition = theDefinition; 817 return this; 818 } 819 820 public boolean hasDefinition() { 821 if (this.definition == null) 822 return false; 823 for (Reference item : this.definition) 824 if (!item.isEmpty()) 825 return true; 826 return false; 827 } 828 829 public Reference addDefinition() { //3 830 Reference t = new Reference(); 831 if (this.definition == null) 832 this.definition = new ArrayList<Reference>(); 833 this.definition.add(t); 834 return t; 835 } 836 837 public FamilyMemberHistory addDefinition(Reference t) { //3 838 if (t == null) 839 return this; 840 if (this.definition == null) 841 this.definition = new ArrayList<Reference>(); 842 this.definition.add(t); 843 return this; 844 } 845 846 /** 847 * @return The first repetition of repeating field {@link #definition}, creating it if it does not already exist 848 */ 849 public Reference getDefinitionFirstRep() { 850 if (getDefinition().isEmpty()) { 851 addDefinition(); 852 } 853 return getDefinition().get(0); 854 } 855 856 /** 857 * @deprecated Use Reference#setResource(IBaseResource) instead 858 */ 859 @Deprecated 860 public List<Resource> getDefinitionTarget() { 861 if (this.definitionTarget == null) 862 this.definitionTarget = new ArrayList<Resource>(); 863 return this.definitionTarget; 864 } 865 866 /** 867 * @return {@link #status} (A code specifying the status of the record of the family history of a specific family member.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 868 */ 869 public Enumeration<FamilyHistoryStatus> getStatusElement() { 870 if (this.status == null) 871 if (Configuration.errorOnAutoCreate()) 872 throw new Error("Attempt to auto-create FamilyMemberHistory.status"); 873 else if (Configuration.doAutoCreate()) 874 this.status = new Enumeration<FamilyHistoryStatus>(new FamilyHistoryStatusEnumFactory()); // bb 875 return this.status; 876 } 877 878 public boolean hasStatusElement() { 879 return this.status != null && !this.status.isEmpty(); 880 } 881 882 public boolean hasStatus() { 883 return this.status != null && !this.status.isEmpty(); 884 } 885 886 /** 887 * @param value {@link #status} (A code specifying the status of the record of the family history of a specific family member.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 888 */ 889 public FamilyMemberHistory setStatusElement(Enumeration<FamilyHistoryStatus> value) { 890 this.status = value; 891 return this; 892 } 893 894 /** 895 * @return A code specifying the status of the record of the family history of a specific family member. 896 */ 897 public FamilyHistoryStatus getStatus() { 898 return this.status == null ? null : this.status.getValue(); 899 } 900 901 /** 902 * @param value A code specifying the status of the record of the family history of a specific family member. 903 */ 904 public FamilyMemberHistory setStatus(FamilyHistoryStatus value) { 905 if (this.status == null) 906 this.status = new Enumeration<FamilyHistoryStatus>(new FamilyHistoryStatusEnumFactory()); 907 this.status.setValue(value); 908 return this; 909 } 910 911 /** 912 * @return {@link #notDone} (If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition.). This is the underlying object with id, value and extensions. The accessor "getNotDone" gives direct access to the value 913 */ 914 public BooleanType getNotDoneElement() { 915 if (this.notDone == null) 916 if (Configuration.errorOnAutoCreate()) 917 throw new Error("Attempt to auto-create FamilyMemberHistory.notDone"); 918 else if (Configuration.doAutoCreate()) 919 this.notDone = new BooleanType(); // bb 920 return this.notDone; 921 } 922 923 public boolean hasNotDoneElement() { 924 return this.notDone != null && !this.notDone.isEmpty(); 925 } 926 927 public boolean hasNotDone() { 928 return this.notDone != null && !this.notDone.isEmpty(); 929 } 930 931 /** 932 * @param value {@link #notDone} (If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition.). This is the underlying object with id, value and extensions. The accessor "getNotDone" gives direct access to the value 933 */ 934 public FamilyMemberHistory setNotDoneElement(BooleanType value) { 935 this.notDone = value; 936 return this; 937 } 938 939 /** 940 * @return If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition. 941 */ 942 public boolean getNotDone() { 943 return this.notDone == null || this.notDone.isEmpty() ? false : this.notDone.getValue(); 944 } 945 946 /** 947 * @param value If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition. 948 */ 949 public FamilyMemberHistory setNotDone(boolean value) { 950 if (this.notDone == null) 951 this.notDone = new BooleanType(); 952 this.notDone.setValue(value); 953 return this; 954 } 955 956 /** 957 * @return {@link #notDoneReason} (Describes why the family member's history is absent.) 958 */ 959 public CodeableConcept getNotDoneReason() { 960 if (this.notDoneReason == null) 961 if (Configuration.errorOnAutoCreate()) 962 throw new Error("Attempt to auto-create FamilyMemberHistory.notDoneReason"); 963 else if (Configuration.doAutoCreate()) 964 this.notDoneReason = new CodeableConcept(); // cc 965 return this.notDoneReason; 966 } 967 968 public boolean hasNotDoneReason() { 969 return this.notDoneReason != null && !this.notDoneReason.isEmpty(); 970 } 971 972 /** 973 * @param value {@link #notDoneReason} (Describes why the family member's history is absent.) 974 */ 975 public FamilyMemberHistory setNotDoneReason(CodeableConcept value) { 976 this.notDoneReason = value; 977 return this; 978 } 979 980 /** 981 * @return {@link #patient} (The person who this history concerns.) 982 */ 983 public Reference getPatient() { 984 if (this.patient == null) 985 if (Configuration.errorOnAutoCreate()) 986 throw new Error("Attempt to auto-create FamilyMemberHistory.patient"); 987 else if (Configuration.doAutoCreate()) 988 this.patient = new Reference(); // cc 989 return this.patient; 990 } 991 992 public boolean hasPatient() { 993 return this.patient != null && !this.patient.isEmpty(); 994 } 995 996 /** 997 * @param value {@link #patient} (The person who this history concerns.) 998 */ 999 public FamilyMemberHistory setPatient(Reference value) { 1000 this.patient = value; 1001 return this; 1002 } 1003 1004 /** 1005 * @return {@link #patient} 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 person who this history concerns.) 1006 */ 1007 public Patient getPatientTarget() { 1008 if (this.patientTarget == null) 1009 if (Configuration.errorOnAutoCreate()) 1010 throw new Error("Attempt to auto-create FamilyMemberHistory.patient"); 1011 else if (Configuration.doAutoCreate()) 1012 this.patientTarget = new Patient(); // aa 1013 return this.patientTarget; 1014 } 1015 1016 /** 1017 * @param value {@link #patient} 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 person who this history concerns.) 1018 */ 1019 public FamilyMemberHistory setPatientTarget(Patient value) { 1020 this.patientTarget = value; 1021 return this; 1022 } 1023 1024 /** 1025 * @return {@link #date} (The date (and possibly time) when the family member history was taken.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1026 */ 1027 public DateTimeType getDateElement() { 1028 if (this.date == null) 1029 if (Configuration.errorOnAutoCreate()) 1030 throw new Error("Attempt to auto-create FamilyMemberHistory.date"); 1031 else if (Configuration.doAutoCreate()) 1032 this.date = new DateTimeType(); // bb 1033 return this.date; 1034 } 1035 1036 public boolean hasDateElement() { 1037 return this.date != null && !this.date.isEmpty(); 1038 } 1039 1040 public boolean hasDate() { 1041 return this.date != null && !this.date.isEmpty(); 1042 } 1043 1044 /** 1045 * @param value {@link #date} (The date (and possibly time) when the family member history was taken.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1046 */ 1047 public FamilyMemberHistory setDateElement(DateTimeType value) { 1048 this.date = value; 1049 return this; 1050 } 1051 1052 /** 1053 * @return The date (and possibly time) when the family member history was taken. 1054 */ 1055 public Date getDate() { 1056 return this.date == null ? null : this.date.getValue(); 1057 } 1058 1059 /** 1060 * @param value The date (and possibly time) when the family member history was taken. 1061 */ 1062 public FamilyMemberHistory setDate(Date value) { 1063 if (value == null) 1064 this.date = null; 1065 else { 1066 if (this.date == null) 1067 this.date = new DateTimeType(); 1068 this.date.setValue(value); 1069 } 1070 return this; 1071 } 1072 1073 /** 1074 * @return {@link #name} (This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair".). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1075 */ 1076 public StringType getNameElement() { 1077 if (this.name == null) 1078 if (Configuration.errorOnAutoCreate()) 1079 throw new Error("Attempt to auto-create FamilyMemberHistory.name"); 1080 else if (Configuration.doAutoCreate()) 1081 this.name = new StringType(); // bb 1082 return this.name; 1083 } 1084 1085 public boolean hasNameElement() { 1086 return this.name != null && !this.name.isEmpty(); 1087 } 1088 1089 public boolean hasName() { 1090 return this.name != null && !this.name.isEmpty(); 1091 } 1092 1093 /** 1094 * @param value {@link #name} (This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair".). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1095 */ 1096 public FamilyMemberHistory setNameElement(StringType value) { 1097 this.name = value; 1098 return this; 1099 } 1100 1101 /** 1102 * @return This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair". 1103 */ 1104 public String getName() { 1105 return this.name == null ? null : this.name.getValue(); 1106 } 1107 1108 /** 1109 * @param value This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair". 1110 */ 1111 public FamilyMemberHistory setName(String value) { 1112 if (Utilities.noString(value)) 1113 this.name = null; 1114 else { 1115 if (this.name == null) 1116 this.name = new StringType(); 1117 this.name.setValue(value); 1118 } 1119 return this; 1120 } 1121 1122 /** 1123 * @return {@link #relationship} (The type of relationship this person has to the patient (father, mother, brother etc.).) 1124 */ 1125 public CodeableConcept getRelationship() { 1126 if (this.relationship == null) 1127 if (Configuration.errorOnAutoCreate()) 1128 throw new Error("Attempt to auto-create FamilyMemberHistory.relationship"); 1129 else if (Configuration.doAutoCreate()) 1130 this.relationship = new CodeableConcept(); // cc 1131 return this.relationship; 1132 } 1133 1134 public boolean hasRelationship() { 1135 return this.relationship != null && !this.relationship.isEmpty(); 1136 } 1137 1138 /** 1139 * @param value {@link #relationship} (The type of relationship this person has to the patient (father, mother, brother etc.).) 1140 */ 1141 public FamilyMemberHistory setRelationship(CodeableConcept value) { 1142 this.relationship = value; 1143 return this; 1144 } 1145 1146 /** 1147 * @return {@link #gender} (Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value 1148 */ 1149 public Enumeration<AdministrativeGender> getGenderElement() { 1150 if (this.gender == null) 1151 if (Configuration.errorOnAutoCreate()) 1152 throw new Error("Attempt to auto-create FamilyMemberHistory.gender"); 1153 else if (Configuration.doAutoCreate()) 1154 this.gender = new Enumeration<AdministrativeGender>(new AdministrativeGenderEnumFactory()); // bb 1155 return this.gender; 1156 } 1157 1158 public boolean hasGenderElement() { 1159 return this.gender != null && !this.gender.isEmpty(); 1160 } 1161 1162 public boolean hasGender() { 1163 return this.gender != null && !this.gender.isEmpty(); 1164 } 1165 1166 /** 1167 * @param value {@link #gender} (Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value 1168 */ 1169 public FamilyMemberHistory setGenderElement(Enumeration<AdministrativeGender> value) { 1170 this.gender = value; 1171 return this; 1172 } 1173 1174 /** 1175 * @return Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes. 1176 */ 1177 public AdministrativeGender getGender() { 1178 return this.gender == null ? null : this.gender.getValue(); 1179 } 1180 1181 /** 1182 * @param value Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes. 1183 */ 1184 public FamilyMemberHistory setGender(AdministrativeGender value) { 1185 if (value == null) 1186 this.gender = null; 1187 else { 1188 if (this.gender == null) 1189 this.gender = new Enumeration<AdministrativeGender>(new AdministrativeGenderEnumFactory()); 1190 this.gender.setValue(value); 1191 } 1192 return this; 1193 } 1194 1195 /** 1196 * @return {@link #born} (The actual or approximate date of birth of the relative.) 1197 */ 1198 public Type getBorn() { 1199 return this.born; 1200 } 1201 1202 /** 1203 * @return {@link #born} (The actual or approximate date of birth of the relative.) 1204 */ 1205 public Period getBornPeriod() throws FHIRException { 1206 if (this.born == null) 1207 return null; 1208 if (!(this.born instanceof Period)) 1209 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.born.getClass().getName()+" was encountered"); 1210 return (Period) this.born; 1211 } 1212 1213 public boolean hasBornPeriod() { 1214 return this != null && this.born instanceof Period; 1215 } 1216 1217 /** 1218 * @return {@link #born} (The actual or approximate date of birth of the relative.) 1219 */ 1220 public DateType getBornDateType() throws FHIRException { 1221 if (this.born == null) 1222 return null; 1223 if (!(this.born instanceof DateType)) 1224 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.born.getClass().getName()+" was encountered"); 1225 return (DateType) this.born; 1226 } 1227 1228 public boolean hasBornDateType() { 1229 return this != null && this.born instanceof DateType; 1230 } 1231 1232 /** 1233 * @return {@link #born} (The actual or approximate date of birth of the relative.) 1234 */ 1235 public StringType getBornStringType() throws FHIRException { 1236 if (this.born == null) 1237 return null; 1238 if (!(this.born instanceof StringType)) 1239 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.born.getClass().getName()+" was encountered"); 1240 return (StringType) this.born; 1241 } 1242 1243 public boolean hasBornStringType() { 1244 return this != null && this.born instanceof StringType; 1245 } 1246 1247 public boolean hasBorn() { 1248 return this.born != null && !this.born.isEmpty(); 1249 } 1250 1251 /** 1252 * @param value {@link #born} (The actual or approximate date of birth of the relative.) 1253 */ 1254 public FamilyMemberHistory setBorn(Type value) throws FHIRFormatError { 1255 if (value != null && !(value instanceof Period || value instanceof DateType || value instanceof StringType)) 1256 throw new FHIRFormatError("Not the right type for FamilyMemberHistory.born[x]: "+value.fhirType()); 1257 this.born = value; 1258 return this; 1259 } 1260 1261 /** 1262 * @return {@link #age} (The age of the relative at the time the family member history is recorded.) 1263 */ 1264 public Type getAge() { 1265 return this.age; 1266 } 1267 1268 /** 1269 * @return {@link #age} (The age of the relative at the time the family member history is recorded.) 1270 */ 1271 public Age getAgeAge() throws FHIRException { 1272 if (this.age == null) 1273 return null; 1274 if (!(this.age instanceof Age)) 1275 throw new FHIRException("Type mismatch: the type Age was expected, but "+this.age.getClass().getName()+" was encountered"); 1276 return (Age) this.age; 1277 } 1278 1279 public boolean hasAgeAge() { 1280 return this != null && this.age instanceof Age; 1281 } 1282 1283 /** 1284 * @return {@link #age} (The age of the relative at the time the family member history is recorded.) 1285 */ 1286 public Range getAgeRange() throws FHIRException { 1287 if (this.age == null) 1288 return null; 1289 if (!(this.age instanceof Range)) 1290 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.age.getClass().getName()+" was encountered"); 1291 return (Range) this.age; 1292 } 1293 1294 public boolean hasAgeRange() { 1295 return this != null && this.age instanceof Range; 1296 } 1297 1298 /** 1299 * @return {@link #age} (The age of the relative at the time the family member history is recorded.) 1300 */ 1301 public StringType getAgeStringType() throws FHIRException { 1302 if (this.age == null) 1303 return null; 1304 if (!(this.age instanceof StringType)) 1305 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.age.getClass().getName()+" was encountered"); 1306 return (StringType) this.age; 1307 } 1308 1309 public boolean hasAgeStringType() { 1310 return this != null && this.age instanceof StringType; 1311 } 1312 1313 public boolean hasAge() { 1314 return this.age != null && !this.age.isEmpty(); 1315 } 1316 1317 /** 1318 * @param value {@link #age} (The age of the relative at the time the family member history is recorded.) 1319 */ 1320 public FamilyMemberHistory setAge(Type value) throws FHIRFormatError { 1321 if (value != null && !(value instanceof Age || value instanceof Range || value instanceof StringType)) 1322 throw new FHIRFormatError("Not the right type for FamilyMemberHistory.age[x]: "+value.fhirType()); 1323 this.age = value; 1324 return this; 1325 } 1326 1327 /** 1328 * @return {@link #estimatedAge} (If true, indicates that the age value specified is an estimated value.). This is the underlying object with id, value and extensions. The accessor "getEstimatedAge" gives direct access to the value 1329 */ 1330 public BooleanType getEstimatedAgeElement() { 1331 if (this.estimatedAge == null) 1332 if (Configuration.errorOnAutoCreate()) 1333 throw new Error("Attempt to auto-create FamilyMemberHistory.estimatedAge"); 1334 else if (Configuration.doAutoCreate()) 1335 this.estimatedAge = new BooleanType(); // bb 1336 return this.estimatedAge; 1337 } 1338 1339 public boolean hasEstimatedAgeElement() { 1340 return this.estimatedAge != null && !this.estimatedAge.isEmpty(); 1341 } 1342 1343 public boolean hasEstimatedAge() { 1344 return this.estimatedAge != null && !this.estimatedAge.isEmpty(); 1345 } 1346 1347 /** 1348 * @param value {@link #estimatedAge} (If true, indicates that the age value specified is an estimated value.). This is the underlying object with id, value and extensions. The accessor "getEstimatedAge" gives direct access to the value 1349 */ 1350 public FamilyMemberHistory setEstimatedAgeElement(BooleanType value) { 1351 this.estimatedAge = value; 1352 return this; 1353 } 1354 1355 /** 1356 * @return If true, indicates that the age value specified is an estimated value. 1357 */ 1358 public boolean getEstimatedAge() { 1359 return this.estimatedAge == null || this.estimatedAge.isEmpty() ? false : this.estimatedAge.getValue(); 1360 } 1361 1362 /** 1363 * @param value If true, indicates that the age value specified is an estimated value. 1364 */ 1365 public FamilyMemberHistory setEstimatedAge(boolean value) { 1366 if (this.estimatedAge == null) 1367 this.estimatedAge = new BooleanType(); 1368 this.estimatedAge.setValue(value); 1369 return this; 1370 } 1371 1372 /** 1373 * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) 1374 */ 1375 public Type getDeceased() { 1376 return this.deceased; 1377 } 1378 1379 /** 1380 * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) 1381 */ 1382 public BooleanType getDeceasedBooleanType() throws FHIRException { 1383 if (this.deceased == null) 1384 return null; 1385 if (!(this.deceased instanceof BooleanType)) 1386 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.deceased.getClass().getName()+" was encountered"); 1387 return (BooleanType) this.deceased; 1388 } 1389 1390 public boolean hasDeceasedBooleanType() { 1391 return this != null && this.deceased instanceof BooleanType; 1392 } 1393 1394 /** 1395 * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) 1396 */ 1397 public Age getDeceasedAge() throws FHIRException { 1398 if (this.deceased == null) 1399 return null; 1400 if (!(this.deceased instanceof Age)) 1401 throw new FHIRException("Type mismatch: the type Age was expected, but "+this.deceased.getClass().getName()+" was encountered"); 1402 return (Age) this.deceased; 1403 } 1404 1405 public boolean hasDeceasedAge() { 1406 return this != null && this.deceased instanceof Age; 1407 } 1408 1409 /** 1410 * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) 1411 */ 1412 public Range getDeceasedRange() throws FHIRException { 1413 if (this.deceased == null) 1414 return null; 1415 if (!(this.deceased instanceof Range)) 1416 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.deceased.getClass().getName()+" was encountered"); 1417 return (Range) this.deceased; 1418 } 1419 1420 public boolean hasDeceasedRange() { 1421 return this != null && this.deceased instanceof Range; 1422 } 1423 1424 /** 1425 * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) 1426 */ 1427 public DateType getDeceasedDateType() throws FHIRException { 1428 if (this.deceased == null) 1429 return null; 1430 if (!(this.deceased instanceof DateType)) 1431 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.deceased.getClass().getName()+" was encountered"); 1432 return (DateType) this.deceased; 1433 } 1434 1435 public boolean hasDeceasedDateType() { 1436 return this != null && this.deceased instanceof DateType; 1437 } 1438 1439 /** 1440 * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) 1441 */ 1442 public StringType getDeceasedStringType() throws FHIRException { 1443 if (this.deceased == null) 1444 return null; 1445 if (!(this.deceased instanceof StringType)) 1446 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.deceased.getClass().getName()+" was encountered"); 1447 return (StringType) this.deceased; 1448 } 1449 1450 public boolean hasDeceasedStringType() { 1451 return this != null && this.deceased instanceof StringType; 1452 } 1453 1454 public boolean hasDeceased() { 1455 return this.deceased != null && !this.deceased.isEmpty(); 1456 } 1457 1458 /** 1459 * @param value {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.) 1460 */ 1461 public FamilyMemberHistory setDeceased(Type value) throws FHIRFormatError { 1462 if (value != null && !(value instanceof BooleanType || value instanceof Age || value instanceof Range || value instanceof DateType || value instanceof StringType)) 1463 throw new FHIRFormatError("Not the right type for FamilyMemberHistory.deceased[x]: "+value.fhirType()); 1464 this.deceased = value; 1465 return this; 1466 } 1467 1468 /** 1469 * @return {@link #reasonCode} (Describes why the family member history occurred in coded or textual form.) 1470 */ 1471 public List<CodeableConcept> getReasonCode() { 1472 if (this.reasonCode == null) 1473 this.reasonCode = new ArrayList<CodeableConcept>(); 1474 return this.reasonCode; 1475 } 1476 1477 /** 1478 * @return Returns a reference to <code>this</code> for easy method chaining 1479 */ 1480 public FamilyMemberHistory setReasonCode(List<CodeableConcept> theReasonCode) { 1481 this.reasonCode = theReasonCode; 1482 return this; 1483 } 1484 1485 public boolean hasReasonCode() { 1486 if (this.reasonCode == null) 1487 return false; 1488 for (CodeableConcept item : this.reasonCode) 1489 if (!item.isEmpty()) 1490 return true; 1491 return false; 1492 } 1493 1494 public CodeableConcept addReasonCode() { //3 1495 CodeableConcept t = new CodeableConcept(); 1496 if (this.reasonCode == null) 1497 this.reasonCode = new ArrayList<CodeableConcept>(); 1498 this.reasonCode.add(t); 1499 return t; 1500 } 1501 1502 public FamilyMemberHistory addReasonCode(CodeableConcept t) { //3 1503 if (t == null) 1504 return this; 1505 if (this.reasonCode == null) 1506 this.reasonCode = new ArrayList<CodeableConcept>(); 1507 this.reasonCode.add(t); 1508 return this; 1509 } 1510 1511 /** 1512 * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist 1513 */ 1514 public CodeableConcept getReasonCodeFirstRep() { 1515 if (getReasonCode().isEmpty()) { 1516 addReasonCode(); 1517 } 1518 return getReasonCode().get(0); 1519 } 1520 1521 /** 1522 * @return {@link #reasonReference} (Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.) 1523 */ 1524 public List<Reference> getReasonReference() { 1525 if (this.reasonReference == null) 1526 this.reasonReference = new ArrayList<Reference>(); 1527 return this.reasonReference; 1528 } 1529 1530 /** 1531 * @return Returns a reference to <code>this</code> for easy method chaining 1532 */ 1533 public FamilyMemberHistory setReasonReference(List<Reference> theReasonReference) { 1534 this.reasonReference = theReasonReference; 1535 return this; 1536 } 1537 1538 public boolean hasReasonReference() { 1539 if (this.reasonReference == null) 1540 return false; 1541 for (Reference item : this.reasonReference) 1542 if (!item.isEmpty()) 1543 return true; 1544 return false; 1545 } 1546 1547 public Reference addReasonReference() { //3 1548 Reference t = new Reference(); 1549 if (this.reasonReference == null) 1550 this.reasonReference = new ArrayList<Reference>(); 1551 this.reasonReference.add(t); 1552 return t; 1553 } 1554 1555 public FamilyMemberHistory addReasonReference(Reference t) { //3 1556 if (t == null) 1557 return this; 1558 if (this.reasonReference == null) 1559 this.reasonReference = new ArrayList<Reference>(); 1560 this.reasonReference.add(t); 1561 return this; 1562 } 1563 1564 /** 1565 * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist 1566 */ 1567 public Reference getReasonReferenceFirstRep() { 1568 if (getReasonReference().isEmpty()) { 1569 addReasonReference(); 1570 } 1571 return getReasonReference().get(0); 1572 } 1573 1574 /** 1575 * @deprecated Use Reference#setResource(IBaseResource) instead 1576 */ 1577 @Deprecated 1578 public List<Resource> getReasonReferenceTarget() { 1579 if (this.reasonReferenceTarget == null) 1580 this.reasonReferenceTarget = new ArrayList<Resource>(); 1581 return this.reasonReferenceTarget; 1582 } 1583 1584 /** 1585 * @return {@link #note} (This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.) 1586 */ 1587 public List<Annotation> getNote() { 1588 if (this.note == null) 1589 this.note = new ArrayList<Annotation>(); 1590 return this.note; 1591 } 1592 1593 /** 1594 * @return Returns a reference to <code>this</code> for easy method chaining 1595 */ 1596 public FamilyMemberHistory setNote(List<Annotation> theNote) { 1597 this.note = theNote; 1598 return this; 1599 } 1600 1601 public boolean hasNote() { 1602 if (this.note == null) 1603 return false; 1604 for (Annotation item : this.note) 1605 if (!item.isEmpty()) 1606 return true; 1607 return false; 1608 } 1609 1610 public Annotation addNote() { //3 1611 Annotation t = new Annotation(); 1612 if (this.note == null) 1613 this.note = new ArrayList<Annotation>(); 1614 this.note.add(t); 1615 return t; 1616 } 1617 1618 public FamilyMemberHistory addNote(Annotation t) { //3 1619 if (t == null) 1620 return this; 1621 if (this.note == null) 1622 this.note = new ArrayList<Annotation>(); 1623 this.note.add(t); 1624 return this; 1625 } 1626 1627 /** 1628 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 1629 */ 1630 public Annotation getNoteFirstRep() { 1631 if (getNote().isEmpty()) { 1632 addNote(); 1633 } 1634 return getNote().get(0); 1635 } 1636 1637 /** 1638 * @return {@link #condition} (The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.) 1639 */ 1640 public List<FamilyMemberHistoryConditionComponent> getCondition() { 1641 if (this.condition == null) 1642 this.condition = new ArrayList<FamilyMemberHistoryConditionComponent>(); 1643 return this.condition; 1644 } 1645 1646 /** 1647 * @return Returns a reference to <code>this</code> for easy method chaining 1648 */ 1649 public FamilyMemberHistory setCondition(List<FamilyMemberHistoryConditionComponent> theCondition) { 1650 this.condition = theCondition; 1651 return this; 1652 } 1653 1654 public boolean hasCondition() { 1655 if (this.condition == null) 1656 return false; 1657 for (FamilyMemberHistoryConditionComponent item : this.condition) 1658 if (!item.isEmpty()) 1659 return true; 1660 return false; 1661 } 1662 1663 public FamilyMemberHistoryConditionComponent addCondition() { //3 1664 FamilyMemberHistoryConditionComponent t = new FamilyMemberHistoryConditionComponent(); 1665 if (this.condition == null) 1666 this.condition = new ArrayList<FamilyMemberHistoryConditionComponent>(); 1667 this.condition.add(t); 1668 return t; 1669 } 1670 1671 public FamilyMemberHistory addCondition(FamilyMemberHistoryConditionComponent t) { //3 1672 if (t == null) 1673 return this; 1674 if (this.condition == null) 1675 this.condition = new ArrayList<FamilyMemberHistoryConditionComponent>(); 1676 this.condition.add(t); 1677 return this; 1678 } 1679 1680 /** 1681 * @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist 1682 */ 1683 public FamilyMemberHistoryConditionComponent getConditionFirstRep() { 1684 if (getCondition().isEmpty()) { 1685 addCondition(); 1686 } 1687 return getCondition().get(0); 1688 } 1689 1690 protected void listChildren(List<Property> children) { 1691 super.listChildren(children); 1692 children.add(new Property("identifier", "Identifier", "This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); 1693 children.add(new Property("definition", "Reference(PlanDefinition|Questionnaire)", "A protocol or questionnaire that was adhered to in whole or in part by this event.", 0, java.lang.Integer.MAX_VALUE, definition)); 1694 children.add(new Property("status", "code", "A code specifying the status of the record of the family history of a specific family member.", 0, 1, status)); 1695 children.add(new Property("notDone", "boolean", "If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition.", 0, 1, notDone)); 1696 children.add(new Property("notDoneReason", "CodeableConcept", "Describes why the family member's history is absent.", 0, 1, notDoneReason)); 1697 children.add(new Property("patient", "Reference(Patient)", "The person who this history concerns.", 0, 1, patient)); 1698 children.add(new Property("date", "dateTime", "The date (and possibly time) when the family member history was taken.", 0, 1, date)); 1699 children.add(new Property("name", "string", "This will either be a name or a description; e.g. \"Aunt Susan\", \"my cousin with the red hair\".", 0, 1, name)); 1700 children.add(new Property("relationship", "CodeableConcept", "The type of relationship this person has to the patient (father, mother, brother etc.).", 0, 1, relationship)); 1701 children.add(new Property("gender", "code", "Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.", 0, 1, gender)); 1702 children.add(new Property("born[x]", "Period|date|string", "The actual or approximate date of birth of the relative.", 0, 1, born)); 1703 children.add(new Property("age[x]", "Age|Range|string", "The age of the relative at the time the family member history is recorded.", 0, 1, age)); 1704 children.add(new Property("estimatedAge", "boolean", "If true, indicates that the age value specified is an estimated value.", 0, 1, estimatedAge)); 1705 children.add(new Property("deceased[x]", "boolean|Age|Range|date|string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased)); 1706 children.add(new Property("reasonCode", "CodeableConcept", "Describes why the family member history occurred in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); 1707 children.add(new Property("reasonReference", "Reference(Condition|Observation|AllergyIntolerance|QuestionnaireResponse)", "Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.", 0, java.lang.Integer.MAX_VALUE, reasonReference)); 1708 children.add(new Property("note", "Annotation", "This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.", 0, java.lang.Integer.MAX_VALUE, note)); 1709 children.add(new Property("condition", "", "The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.", 0, java.lang.Integer.MAX_VALUE, condition)); 1710 } 1711 1712 @Override 1713 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1714 switch (_hash) { 1715 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier); 1716 case -1014418093: /*definition*/ return new Property("definition", "Reference(PlanDefinition|Questionnaire)", "A protocol or questionnaire that was adhered to in whole or in part by this event.", 0, java.lang.Integer.MAX_VALUE, definition); 1717 case -892481550: /*status*/ return new Property("status", "code", "A code specifying the status of the record of the family history of a specific family member.", 0, 1, status); 1718 case 2128257269: /*notDone*/ return new Property("notDone", "boolean", "If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition.", 0, 1, notDone); 1719 case -1973169255: /*notDoneReason*/ return new Property("notDoneReason", "CodeableConcept", "Describes why the family member's history is absent.", 0, 1, notDoneReason); 1720 case -791418107: /*patient*/ return new Property("patient", "Reference(Patient)", "The person who this history concerns.", 0, 1, patient); 1721 case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and possibly time) when the family member history was taken.", 0, 1, date); 1722 case 3373707: /*name*/ return new Property("name", "string", "This will either be a name or a description; e.g. \"Aunt Susan\", \"my cousin with the red hair\".", 0, 1, name); 1723 case -261851592: /*relationship*/ return new Property("relationship", "CodeableConcept", "The type of relationship this person has to the patient (father, mother, brother etc.).", 0, 1, relationship); 1724 case -1249512767: /*gender*/ return new Property("gender", "code", "Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.", 0, 1, gender); 1725 case 67532951: /*born[x]*/ return new Property("born[x]", "Period|date|string", "The actual or approximate date of birth of the relative.", 0, 1, born); 1726 case 3029833: /*born*/ return new Property("born[x]", "Period|date|string", "The actual or approximate date of birth of the relative.", 0, 1, born); 1727 case 1497711210: /*bornPeriod*/ return new Property("born[x]", "Period|date|string", "The actual or approximate date of birth of the relative.", 0, 1, born); 1728 case 2092814999: /*bornDate*/ return new Property("born[x]", "Period|date|string", "The actual or approximate date of birth of the relative.", 0, 1, born); 1729 case 1597451450: /*bornString*/ return new Property("born[x]", "Period|date|string", "The actual or approximate date of birth of the relative.", 0, 1, born); 1730 case -1419716831: /*age[x]*/ return new Property("age[x]", "Age|Range|string", "The age of the relative at the time the family member history is recorded.", 0, 1, age); 1731 case 96511: /*age*/ return new Property("age[x]", "Age|Range|string", "The age of the relative at the time the family member history is recorded.", 0, 1, age); 1732 case -1419742336: /*ageAge*/ return new Property("age[x]", "Age|Range|string", "The age of the relative at the time the family member history is recorded.", 0, 1, age); 1733 case 1442748286: /*ageRange*/ return new Property("age[x]", "Age|Range|string", "The age of the relative at the time the family member history is recorded.", 0, 1, age); 1734 case 1821821424: /*ageString*/ return new Property("age[x]", "Age|Range|string", "The age of the relative at the time the family member history is recorded.", 0, 1, age); 1735 case 2130167587: /*estimatedAge*/ return new Property("estimatedAge", "boolean", "If true, indicates that the age value specified is an estimated value.", 0, 1, estimatedAge); 1736 case -1311442804: /*deceased[x]*/ return new Property("deceased[x]", "boolean|Age|Range|date|string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased); 1737 case 561497972: /*deceased*/ return new Property("deceased[x]", "boolean|Age|Range|date|string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased); 1738 case 497463828: /*deceasedBoolean*/ return new Property("deceased[x]", "boolean|Age|Range|date|string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased); 1739 case -1311468309: /*deceasedAge*/ return new Property("deceased[x]", "boolean|Age|Range|date|string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased); 1740 case -1880094167: /*deceasedRange*/ return new Property("deceased[x]", "boolean|Age|Range|date|string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased); 1741 case -2000727742: /*deceasedDate*/ return new Property("deceased[x]", "boolean|Age|Range|date|string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased); 1742 case 1892920485: /*deceasedString*/ return new Property("deceased[x]", "boolean|Age|Range|date|string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased); 1743 case 722137681: /*reasonCode*/ return new Property("reasonCode", "CodeableConcept", "Describes why the family member history occurred in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reasonCode); 1744 case -1146218137: /*reasonReference*/ return new Property("reasonReference", "Reference(Condition|Observation|AllergyIntolerance|QuestionnaireResponse)", "Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.", 0, java.lang.Integer.MAX_VALUE, reasonReference); 1745 case 3387378: /*note*/ return new Property("note", "Annotation", "This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.", 0, java.lang.Integer.MAX_VALUE, note); 1746 case -861311717: /*condition*/ return new Property("condition", "", "The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.", 0, java.lang.Integer.MAX_VALUE, condition); 1747 default: return super.getNamedProperty(_hash, _name, _checkValid); 1748 } 1749 1750 } 1751 1752 @Override 1753 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1754 switch (hash) { 1755 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1756 case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : this.definition.toArray(new Base[this.definition.size()]); // Reference 1757 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<FamilyHistoryStatus> 1758 case 2128257269: /*notDone*/ return this.notDone == null ? new Base[0] : new Base[] {this.notDone}; // BooleanType 1759 case -1973169255: /*notDoneReason*/ return this.notDoneReason == null ? new Base[0] : new Base[] {this.notDoneReason}; // CodeableConcept 1760 case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference 1761 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 1762 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1763 case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // CodeableConcept 1764 case -1249512767: /*gender*/ return this.gender == null ? new Base[0] : new Base[] {this.gender}; // Enumeration<AdministrativeGender> 1765 case 3029833: /*born*/ return this.born == null ? new Base[0] : new Base[] {this.born}; // Type 1766 case 96511: /*age*/ return this.age == null ? new Base[0] : new Base[] {this.age}; // Type 1767 case 2130167587: /*estimatedAge*/ return this.estimatedAge == null ? new Base[0] : new Base[] {this.estimatedAge}; // BooleanType 1768 case 561497972: /*deceased*/ return this.deceased == null ? new Base[0] : new Base[] {this.deceased}; // Type 1769 case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept 1770 case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference 1771 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 1772 case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // FamilyMemberHistoryConditionComponent 1773 default: return super.getProperty(hash, name, checkValid); 1774 } 1775 1776 } 1777 1778 @Override 1779 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1780 switch (hash) { 1781 case -1618432855: // identifier 1782 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1783 return value; 1784 case -1014418093: // definition 1785 this.getDefinition().add(castToReference(value)); // Reference 1786 return value; 1787 case -892481550: // status 1788 value = new FamilyHistoryStatusEnumFactory().fromType(castToCode(value)); 1789 this.status = (Enumeration) value; // Enumeration<FamilyHistoryStatus> 1790 return value; 1791 case 2128257269: // notDone 1792 this.notDone = castToBoolean(value); // BooleanType 1793 return value; 1794 case -1973169255: // notDoneReason 1795 this.notDoneReason = castToCodeableConcept(value); // CodeableConcept 1796 return value; 1797 case -791418107: // patient 1798 this.patient = castToReference(value); // Reference 1799 return value; 1800 case 3076014: // date 1801 this.date = castToDateTime(value); // DateTimeType 1802 return value; 1803 case 3373707: // name 1804 this.name = castToString(value); // StringType 1805 return value; 1806 case -261851592: // relationship 1807 this.relationship = castToCodeableConcept(value); // CodeableConcept 1808 return value; 1809 case -1249512767: // gender 1810 value = new AdministrativeGenderEnumFactory().fromType(castToCode(value)); 1811 this.gender = (Enumeration) value; // Enumeration<AdministrativeGender> 1812 return value; 1813 case 3029833: // born 1814 this.born = castToType(value); // Type 1815 return value; 1816 case 96511: // age 1817 this.age = castToType(value); // Type 1818 return value; 1819 case 2130167587: // estimatedAge 1820 this.estimatedAge = castToBoolean(value); // BooleanType 1821 return value; 1822 case 561497972: // deceased 1823 this.deceased = castToType(value); // Type 1824 return value; 1825 case 722137681: // reasonCode 1826 this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept 1827 return value; 1828 case -1146218137: // reasonReference 1829 this.getReasonReference().add(castToReference(value)); // Reference 1830 return value; 1831 case 3387378: // note 1832 this.getNote().add(castToAnnotation(value)); // Annotation 1833 return value; 1834 case -861311717: // condition 1835 this.getCondition().add((FamilyMemberHistoryConditionComponent) value); // FamilyMemberHistoryConditionComponent 1836 return value; 1837 default: return super.setProperty(hash, name, value); 1838 } 1839 1840 } 1841 1842 @Override 1843 public Base setProperty(String name, Base value) throws FHIRException { 1844 if (name.equals("identifier")) { 1845 this.getIdentifier().add(castToIdentifier(value)); 1846 } else if (name.equals("definition")) { 1847 this.getDefinition().add(castToReference(value)); 1848 } else if (name.equals("status")) { 1849 value = new FamilyHistoryStatusEnumFactory().fromType(castToCode(value)); 1850 this.status = (Enumeration) value; // Enumeration<FamilyHistoryStatus> 1851 } else if (name.equals("notDone")) { 1852 this.notDone = castToBoolean(value); // BooleanType 1853 } else if (name.equals("notDoneReason")) { 1854 this.notDoneReason = castToCodeableConcept(value); // CodeableConcept 1855 } else if (name.equals("patient")) { 1856 this.patient = castToReference(value); // Reference 1857 } else if (name.equals("date")) { 1858 this.date = castToDateTime(value); // DateTimeType 1859 } else if (name.equals("name")) { 1860 this.name = castToString(value); // StringType 1861 } else if (name.equals("relationship")) { 1862 this.relationship = castToCodeableConcept(value); // CodeableConcept 1863 } else if (name.equals("gender")) { 1864 value = new AdministrativeGenderEnumFactory().fromType(castToCode(value)); 1865 this.gender = (Enumeration) value; // Enumeration<AdministrativeGender> 1866 } else if (name.equals("born[x]")) { 1867 this.born = castToType(value); // Type 1868 } else if (name.equals("age[x]")) { 1869 this.age = castToType(value); // Type 1870 } else if (name.equals("estimatedAge")) { 1871 this.estimatedAge = castToBoolean(value); // BooleanType 1872 } else if (name.equals("deceased[x]")) { 1873 this.deceased = castToType(value); // Type 1874 } else if (name.equals("reasonCode")) { 1875 this.getReasonCode().add(castToCodeableConcept(value)); 1876 } else if (name.equals("reasonReference")) { 1877 this.getReasonReference().add(castToReference(value)); 1878 } else if (name.equals("note")) { 1879 this.getNote().add(castToAnnotation(value)); 1880 } else if (name.equals("condition")) { 1881 this.getCondition().add((FamilyMemberHistoryConditionComponent) value); 1882 } else 1883 return super.setProperty(name, value); 1884 return value; 1885 } 1886 1887 @Override 1888 public Base makeProperty(int hash, String name) throws FHIRException { 1889 switch (hash) { 1890 case -1618432855: return addIdentifier(); 1891 case -1014418093: return addDefinition(); 1892 case -892481550: return getStatusElement(); 1893 case 2128257269: return getNotDoneElement(); 1894 case -1973169255: return getNotDoneReason(); 1895 case -791418107: return getPatient(); 1896 case 3076014: return getDateElement(); 1897 case 3373707: return getNameElement(); 1898 case -261851592: return getRelationship(); 1899 case -1249512767: return getGenderElement(); 1900 case 67532951: return getBorn(); 1901 case 3029833: return getBorn(); 1902 case -1419716831: return getAge(); 1903 case 96511: return getAge(); 1904 case 2130167587: return getEstimatedAgeElement(); 1905 case -1311442804: return getDeceased(); 1906 case 561497972: return getDeceased(); 1907 case 722137681: return addReasonCode(); 1908 case -1146218137: return addReasonReference(); 1909 case 3387378: return addNote(); 1910 case -861311717: return addCondition(); 1911 default: return super.makeProperty(hash, name); 1912 } 1913 1914 } 1915 1916 @Override 1917 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1918 switch (hash) { 1919 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1920 case -1014418093: /*definition*/ return new String[] {"Reference"}; 1921 case -892481550: /*status*/ return new String[] {"code"}; 1922 case 2128257269: /*notDone*/ return new String[] {"boolean"}; 1923 case -1973169255: /*notDoneReason*/ return new String[] {"CodeableConcept"}; 1924 case -791418107: /*patient*/ return new String[] {"Reference"}; 1925 case 3076014: /*date*/ return new String[] {"dateTime"}; 1926 case 3373707: /*name*/ return new String[] {"string"}; 1927 case -261851592: /*relationship*/ return new String[] {"CodeableConcept"}; 1928 case -1249512767: /*gender*/ return new String[] {"code"}; 1929 case 3029833: /*born*/ return new String[] {"Period", "date", "string"}; 1930 case 96511: /*age*/ return new String[] {"Age", "Range", "string"}; 1931 case 2130167587: /*estimatedAge*/ return new String[] {"boolean"}; 1932 case 561497972: /*deceased*/ return new String[] {"boolean", "Age", "Range", "date", "string"}; 1933 case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; 1934 case -1146218137: /*reasonReference*/ return new String[] {"Reference"}; 1935 case 3387378: /*note*/ return new String[] {"Annotation"}; 1936 case -861311717: /*condition*/ return new String[] {}; 1937 default: return super.getTypesForProperty(hash, name); 1938 } 1939 1940 } 1941 1942 @Override 1943 public Base addChild(String name) throws FHIRException { 1944 if (name.equals("identifier")) { 1945 return addIdentifier(); 1946 } 1947 else if (name.equals("definition")) { 1948 return addDefinition(); 1949 } 1950 else if (name.equals("status")) { 1951 throw new FHIRException("Cannot call addChild on a primitive type FamilyMemberHistory.status"); 1952 } 1953 else if (name.equals("notDone")) { 1954 throw new FHIRException("Cannot call addChild on a primitive type FamilyMemberHistory.notDone"); 1955 } 1956 else if (name.equals("notDoneReason")) { 1957 this.notDoneReason = new CodeableConcept(); 1958 return this.notDoneReason; 1959 } 1960 else if (name.equals("patient")) { 1961 this.patient = new Reference(); 1962 return this.patient; 1963 } 1964 else if (name.equals("date")) { 1965 throw new FHIRException("Cannot call addChild on a primitive type FamilyMemberHistory.date"); 1966 } 1967 else if (name.equals("name")) { 1968 throw new FHIRException("Cannot call addChild on a primitive type FamilyMemberHistory.name"); 1969 } 1970 else if (name.equals("relationship")) { 1971 this.relationship = new CodeableConcept(); 1972 return this.relationship; 1973 } 1974 else if (name.equals("gender")) { 1975 throw new FHIRException("Cannot call addChild on a primitive type FamilyMemberHistory.gender"); 1976 } 1977 else if (name.equals("bornPeriod")) { 1978 this.born = new Period(); 1979 return this.born; 1980 } 1981 else if (name.equals("bornDate")) { 1982 this.born = new DateType(); 1983 return this.born; 1984 } 1985 else if (name.equals("bornString")) { 1986 this.born = new StringType(); 1987 return this.born; 1988 } 1989 else if (name.equals("ageAge")) { 1990 this.age = new Age(); 1991 return this.age; 1992 } 1993 else if (name.equals("ageRange")) { 1994 this.age = new Range(); 1995 return this.age; 1996 } 1997 else if (name.equals("ageString")) { 1998 this.age = new StringType(); 1999 return this.age; 2000 } 2001 else if (name.equals("estimatedAge")) { 2002 throw new FHIRException("Cannot call addChild on a primitive type FamilyMemberHistory.estimatedAge"); 2003 } 2004 else if (name.equals("deceasedBoolean")) { 2005 this.deceased = new BooleanType(); 2006 return this.deceased; 2007 } 2008 else if (name.equals("deceasedAge")) { 2009 this.deceased = new Age(); 2010 return this.deceased; 2011 } 2012 else if (name.equals("deceasedRange")) { 2013 this.deceased = new Range(); 2014 return this.deceased; 2015 } 2016 else if (name.equals("deceasedDate")) { 2017 this.deceased = new DateType(); 2018 return this.deceased; 2019 } 2020 else if (name.equals("deceasedString")) { 2021 this.deceased = new StringType(); 2022 return this.deceased; 2023 } 2024 else if (name.equals("reasonCode")) { 2025 return addReasonCode(); 2026 } 2027 else if (name.equals("reasonReference")) { 2028 return addReasonReference(); 2029 } 2030 else if (name.equals("note")) { 2031 return addNote(); 2032 } 2033 else if (name.equals("condition")) { 2034 return addCondition(); 2035 } 2036 else 2037 return super.addChild(name); 2038 } 2039 2040 public String fhirType() { 2041 return "FamilyMemberHistory"; 2042 2043 } 2044 2045 public FamilyMemberHistory copy() { 2046 FamilyMemberHistory dst = new FamilyMemberHistory(); 2047 copyValues(dst); 2048 if (identifier != null) { 2049 dst.identifier = new ArrayList<Identifier>(); 2050 for (Identifier i : identifier) 2051 dst.identifier.add(i.copy()); 2052 }; 2053 if (definition != null) { 2054 dst.definition = new ArrayList<Reference>(); 2055 for (Reference i : definition) 2056 dst.definition.add(i.copy()); 2057 }; 2058 dst.status = status == null ? null : status.copy(); 2059 dst.notDone = notDone == null ? null : notDone.copy(); 2060 dst.notDoneReason = notDoneReason == null ? null : notDoneReason.copy(); 2061 dst.patient = patient == null ? null : patient.copy(); 2062 dst.date = date == null ? null : date.copy(); 2063 dst.name = name == null ? null : name.copy(); 2064 dst.relationship = relationship == null ? null : relationship.copy(); 2065 dst.gender = gender == null ? null : gender.copy(); 2066 dst.born = born == null ? null : born.copy(); 2067 dst.age = age == null ? null : age.copy(); 2068 dst.estimatedAge = estimatedAge == null ? null : estimatedAge.copy(); 2069 dst.deceased = deceased == null ? null : deceased.copy(); 2070 if (reasonCode != null) { 2071 dst.reasonCode = new ArrayList<CodeableConcept>(); 2072 for (CodeableConcept i : reasonCode) 2073 dst.reasonCode.add(i.copy()); 2074 }; 2075 if (reasonReference != null) { 2076 dst.reasonReference = new ArrayList<Reference>(); 2077 for (Reference i : reasonReference) 2078 dst.reasonReference.add(i.copy()); 2079 }; 2080 if (note != null) { 2081 dst.note = new ArrayList<Annotation>(); 2082 for (Annotation i : note) 2083 dst.note.add(i.copy()); 2084 }; 2085 if (condition != null) { 2086 dst.condition = new ArrayList<FamilyMemberHistoryConditionComponent>(); 2087 for (FamilyMemberHistoryConditionComponent i : condition) 2088 dst.condition.add(i.copy()); 2089 }; 2090 return dst; 2091 } 2092 2093 protected FamilyMemberHistory typedCopy() { 2094 return copy(); 2095 } 2096 2097 @Override 2098 public boolean equalsDeep(Base other_) { 2099 if (!super.equalsDeep(other_)) 2100 return false; 2101 if (!(other_ instanceof FamilyMemberHistory)) 2102 return false; 2103 FamilyMemberHistory o = (FamilyMemberHistory) other_; 2104 return compareDeep(identifier, o.identifier, true) && compareDeep(definition, o.definition, true) 2105 && compareDeep(status, o.status, true) && compareDeep(notDone, o.notDone, true) && compareDeep(notDoneReason, o.notDoneReason, true) 2106 && compareDeep(patient, o.patient, true) && compareDeep(date, o.date, true) && compareDeep(name, o.name, true) 2107 && compareDeep(relationship, o.relationship, true) && compareDeep(gender, o.gender, true) && compareDeep(born, o.born, true) 2108 && compareDeep(age, o.age, true) && compareDeep(estimatedAge, o.estimatedAge, true) && compareDeep(deceased, o.deceased, true) 2109 && compareDeep(reasonCode, o.reasonCode, true) && compareDeep(reasonReference, o.reasonReference, true) 2110 && compareDeep(note, o.note, true) && compareDeep(condition, o.condition, true); 2111 } 2112 2113 @Override 2114 public boolean equalsShallow(Base other_) { 2115 if (!super.equalsShallow(other_)) 2116 return false; 2117 if (!(other_ instanceof FamilyMemberHistory)) 2118 return false; 2119 FamilyMemberHistory o = (FamilyMemberHistory) other_; 2120 return compareValues(status, o.status, true) && compareValues(notDone, o.notDone, true) && compareValues(date, o.date, true) 2121 && compareValues(name, o.name, true) && compareValues(gender, o.gender, true) && compareValues(estimatedAge, o.estimatedAge, true) 2122 ; 2123 } 2124 2125 public boolean isEmpty() { 2126 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, definition, status 2127 , notDone, notDoneReason, patient, date, name, relationship, gender, born, age 2128 , estimatedAge, deceased, reasonCode, reasonReference, note, condition); 2129 } 2130 2131 @Override 2132 public ResourceType getResourceType() { 2133 return ResourceType.FamilyMemberHistory; 2134 } 2135 2136 /** 2137 * Search parameter: <b>date</b> 2138 * <p> 2139 * Description: <b>When history was captured/updated</b><br> 2140 * Type: <b>date</b><br> 2141 * Path: <b>FamilyMemberHistory.date</b><br> 2142 * </p> 2143 */ 2144 @SearchParamDefinition(name="date", path="FamilyMemberHistory.date", description="When history was captured/updated", type="date" ) 2145 public static final String SP_DATE = "date"; 2146 /** 2147 * <b>Fluent Client</b> search parameter constant for <b>date</b> 2148 * <p> 2149 * Description: <b>When history was captured/updated</b><br> 2150 * Type: <b>date</b><br> 2151 * Path: <b>FamilyMemberHistory.date</b><br> 2152 * </p> 2153 */ 2154 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 2155 2156 /** 2157 * Search parameter: <b>identifier</b> 2158 * <p> 2159 * Description: <b>A search by a record identifier</b><br> 2160 * Type: <b>token</b><br> 2161 * Path: <b>FamilyMemberHistory.identifier</b><br> 2162 * </p> 2163 */ 2164 @SearchParamDefinition(name="identifier", path="FamilyMemberHistory.identifier", description="A search by a record identifier", type="token" ) 2165 public static final String SP_IDENTIFIER = "identifier"; 2166 /** 2167 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2168 * <p> 2169 * Description: <b>A search by a record identifier</b><br> 2170 * Type: <b>token</b><br> 2171 * Path: <b>FamilyMemberHistory.identifier</b><br> 2172 * </p> 2173 */ 2174 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2175 2176 /** 2177 * Search parameter: <b>code</b> 2178 * <p> 2179 * Description: <b>A search by a condition code</b><br> 2180 * Type: <b>token</b><br> 2181 * Path: <b>FamilyMemberHistory.condition.code</b><br> 2182 * </p> 2183 */ 2184 @SearchParamDefinition(name="code", path="FamilyMemberHistory.condition.code", description="A search by a condition code", type="token" ) 2185 public static final String SP_CODE = "code"; 2186 /** 2187 * <b>Fluent Client</b> search parameter constant for <b>code</b> 2188 * <p> 2189 * Description: <b>A search by a condition code</b><br> 2190 * Type: <b>token</b><br> 2191 * Path: <b>FamilyMemberHistory.condition.code</b><br> 2192 * </p> 2193 */ 2194 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 2195 2196 /** 2197 * Search parameter: <b>gender</b> 2198 * <p> 2199 * Description: <b>A search by a gender code of a family member</b><br> 2200 * Type: <b>token</b><br> 2201 * Path: <b>FamilyMemberHistory.gender</b><br> 2202 * </p> 2203 */ 2204 @SearchParamDefinition(name="gender", path="FamilyMemberHistory.gender", description="A search by a gender code of a family member", type="token" ) 2205 public static final String SP_GENDER = "gender"; 2206 /** 2207 * <b>Fluent Client</b> search parameter constant for <b>gender</b> 2208 * <p> 2209 * Description: <b>A search by a gender code of a family member</b><br> 2210 * Type: <b>token</b><br> 2211 * Path: <b>FamilyMemberHistory.gender</b><br> 2212 * </p> 2213 */ 2214 public static final ca.uhn.fhir.rest.gclient.TokenClientParam GENDER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_GENDER); 2215 2216 /** 2217 * Search parameter: <b>patient</b> 2218 * <p> 2219 * Description: <b>The identity of a subject to list family member history items for</b><br> 2220 * Type: <b>reference</b><br> 2221 * Path: <b>FamilyMemberHistory.patient</b><br> 2222 * </p> 2223 */ 2224 @SearchParamDefinition(name="patient", path="FamilyMemberHistory.patient", description="The identity of a subject to list family member history items for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } ) 2225 public static final String SP_PATIENT = "patient"; 2226 /** 2227 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 2228 * <p> 2229 * Description: <b>The identity of a subject to list family member history items for</b><br> 2230 * Type: <b>reference</b><br> 2231 * Path: <b>FamilyMemberHistory.patient</b><br> 2232 * </p> 2233 */ 2234 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 2235 2236/** 2237 * Constant for fluent queries to be used to add include statements. Specifies 2238 * the path value of "<b>FamilyMemberHistory:patient</b>". 2239 */ 2240 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("FamilyMemberHistory:patient").toLocked(); 2241 2242 /** 2243 * Search parameter: <b>definition</b> 2244 * <p> 2245 * Description: <b>Instantiates protocol or definition</b><br> 2246 * Type: <b>reference</b><br> 2247 * Path: <b>FamilyMemberHistory.definition</b><br> 2248 * </p> 2249 */ 2250 @SearchParamDefinition(name="definition", path="FamilyMemberHistory.definition", description="Instantiates protocol or definition", type="reference", target={PlanDefinition.class, Questionnaire.class } ) 2251 public static final String SP_DEFINITION = "definition"; 2252 /** 2253 * <b>Fluent Client</b> search parameter constant for <b>definition</b> 2254 * <p> 2255 * Description: <b>Instantiates protocol or definition</b><br> 2256 * Type: <b>reference</b><br> 2257 * Path: <b>FamilyMemberHistory.definition</b><br> 2258 * </p> 2259 */ 2260 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEFINITION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEFINITION); 2261 2262/** 2263 * Constant for fluent queries to be used to add include statements. Specifies 2264 * the path value of "<b>FamilyMemberHistory:definition</b>". 2265 */ 2266 public static final ca.uhn.fhir.model.api.Include INCLUDE_DEFINITION = new ca.uhn.fhir.model.api.Include("FamilyMemberHistory:definition").toLocked(); 2267 2268 /** 2269 * Search parameter: <b>relationship</b> 2270 * <p> 2271 * Description: <b>A search by a relationship type</b><br> 2272 * Type: <b>token</b><br> 2273 * Path: <b>FamilyMemberHistory.relationship</b><br> 2274 * </p> 2275 */ 2276 @SearchParamDefinition(name="relationship", path="FamilyMemberHistory.relationship", description="A search by a relationship type", type="token" ) 2277 public static final String SP_RELATIONSHIP = "relationship"; 2278 /** 2279 * <b>Fluent Client</b> search parameter constant for <b>relationship</b> 2280 * <p> 2281 * Description: <b>A search by a relationship type</b><br> 2282 * Type: <b>token</b><br> 2283 * Path: <b>FamilyMemberHistory.relationship</b><br> 2284 * </p> 2285 */ 2286 public static final ca.uhn.fhir.rest.gclient.TokenClientParam RELATIONSHIP = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RELATIONSHIP); 2287 2288 /** 2289 * Search parameter: <b>status</b> 2290 * <p> 2291 * Description: <b>partial | completed | entered-in-error | health-unknown</b><br> 2292 * Type: <b>token</b><br> 2293 * Path: <b>FamilyMemberHistory.status</b><br> 2294 * </p> 2295 */ 2296 @SearchParamDefinition(name="status", path="FamilyMemberHistory.status", description="partial | completed | entered-in-error | health-unknown", type="token" ) 2297 public static final String SP_STATUS = "status"; 2298 /** 2299 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2300 * <p> 2301 * Description: <b>partial | completed | entered-in-error | health-unknown</b><br> 2302 * Type: <b>token</b><br> 2303 * Path: <b>FamilyMemberHistory.status</b><br> 2304 * </p> 2305 */ 2306 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2307 2308 2309} 2310