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