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