001package org.hl7.fhir.r4b.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r4b.model.Enumerations.*; 039import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.ICompositeType; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.ChildOrder; 047import ca.uhn.fhir.model.api.annotation.Description; 048import ca.uhn.fhir.model.api.annotation.Block; 049 050/** 051 * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. 052 053The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. 054 */ 055@ResourceDef(name="MedicationStatement", profile="http://hl7.org/fhir/StructureDefinition/MedicationStatement") 056public class MedicationStatement extends DomainResource { 057 058 public enum MedicationStatusCodes { 059 /** 060 * The medication is still being taken. 061 */ 062 ACTIVE, 063 /** 064 * The medication is no longer being taken. 065 */ 066 COMPLETED, 067 /** 068 * Some of the actions that are implied by the medication statement may have occurred. For example, the patient may have taken some of the medication. Clinical decision support systems should take this status into account. 069 */ 070 ENTEREDINERROR, 071 /** 072 * The medication may be taken at some time in the future. 073 */ 074 INTENDED, 075 /** 076 * Actions implied by the statement have been permanently halted, before all of them occurred. This should not be used if the statement was entered in error. 077 */ 078 STOPPED, 079 /** 080 * Actions implied by the statement have been temporarily halted, but are expected to continue later. May also be called 'suspended'. 081 */ 082 ONHOLD, 083 /** 084 * The state of the medication use is not currently known. 085 */ 086 UNKNOWN, 087 /** 088 * The medication was not consumed by the patient 089 */ 090 NOTTAKEN, 091 /** 092 * added to help the parsers with the generic types 093 */ 094 NULL; 095 public static MedicationStatusCodes fromCode(String codeString) throws FHIRException { 096 if (codeString == null || "".equals(codeString)) 097 return null; 098 if ("active".equals(codeString)) 099 return ACTIVE; 100 if ("completed".equals(codeString)) 101 return COMPLETED; 102 if ("entered-in-error".equals(codeString)) 103 return ENTEREDINERROR; 104 if ("intended".equals(codeString)) 105 return INTENDED; 106 if ("stopped".equals(codeString)) 107 return STOPPED; 108 if ("on-hold".equals(codeString)) 109 return ONHOLD; 110 if ("unknown".equals(codeString)) 111 return UNKNOWN; 112 if ("not-taken".equals(codeString)) 113 return NOTTAKEN; 114 if (Configuration.isAcceptInvalidEnums()) 115 return null; 116 else 117 throw new FHIRException("Unknown MedicationStatusCodes code '"+codeString+"'"); 118 } 119 public String toCode() { 120 switch (this) { 121 case ACTIVE: return "active"; 122 case COMPLETED: return "completed"; 123 case ENTEREDINERROR: return "entered-in-error"; 124 case INTENDED: return "intended"; 125 case STOPPED: return "stopped"; 126 case ONHOLD: return "on-hold"; 127 case UNKNOWN: return "unknown"; 128 case NOTTAKEN: return "not-taken"; 129 case NULL: return null; 130 default: return "?"; 131 } 132 } 133 public String getSystem() { 134 switch (this) { 135 case ACTIVE: return "http://hl7.org/fhir/CodeSystem/medication-statement-status"; 136 case COMPLETED: return "http://hl7.org/fhir/CodeSystem/medication-statement-status"; 137 case ENTEREDINERROR: return "http://hl7.org/fhir/CodeSystem/medication-statement-status"; 138 case INTENDED: return "http://hl7.org/fhir/CodeSystem/medication-statement-status"; 139 case STOPPED: return "http://hl7.org/fhir/CodeSystem/medication-statement-status"; 140 case ONHOLD: return "http://hl7.org/fhir/CodeSystem/medication-statement-status"; 141 case UNKNOWN: return "http://hl7.org/fhir/CodeSystem/medication-statement-status"; 142 case NOTTAKEN: return "http://hl7.org/fhir/CodeSystem/medication-statement-status"; 143 case NULL: return null; 144 default: return "?"; 145 } 146 } 147 public String getDefinition() { 148 switch (this) { 149 case ACTIVE: return "The medication is still being taken."; 150 case COMPLETED: return "The medication is no longer being taken."; 151 case ENTEREDINERROR: return "Some of the actions that are implied by the medication statement may have occurred. For example, the patient may have taken some of the medication. Clinical decision support systems should take this status into account."; 152 case INTENDED: return "The medication may be taken at some time in the future."; 153 case STOPPED: return "Actions implied by the statement have been permanently halted, before all of them occurred. This should not be used if the statement was entered in error."; 154 case ONHOLD: return "Actions implied by the statement have been temporarily halted, but are expected to continue later. May also be called 'suspended'."; 155 case UNKNOWN: return "The state of the medication use is not currently known."; 156 case NOTTAKEN: return "The medication was not consumed by the patient"; 157 case NULL: return null; 158 default: return "?"; 159 } 160 } 161 public String getDisplay() { 162 switch (this) { 163 case ACTIVE: return "Active"; 164 case COMPLETED: return "Completed"; 165 case ENTEREDINERROR: return "Entered in Error"; 166 case INTENDED: return "Intended"; 167 case STOPPED: return "Stopped"; 168 case ONHOLD: return "On Hold"; 169 case UNKNOWN: return "Unknown"; 170 case NOTTAKEN: return "Not Taken"; 171 case NULL: return null; 172 default: return "?"; 173 } 174 } 175 } 176 177 public static class MedicationStatusCodesEnumFactory implements EnumFactory<MedicationStatusCodes> { 178 public MedicationStatusCodes fromCode(String codeString) throws IllegalArgumentException { 179 if (codeString == null || "".equals(codeString)) 180 if (codeString == null || "".equals(codeString)) 181 return null; 182 if ("active".equals(codeString)) 183 return MedicationStatusCodes.ACTIVE; 184 if ("completed".equals(codeString)) 185 return MedicationStatusCodes.COMPLETED; 186 if ("entered-in-error".equals(codeString)) 187 return MedicationStatusCodes.ENTEREDINERROR; 188 if ("intended".equals(codeString)) 189 return MedicationStatusCodes.INTENDED; 190 if ("stopped".equals(codeString)) 191 return MedicationStatusCodes.STOPPED; 192 if ("on-hold".equals(codeString)) 193 return MedicationStatusCodes.ONHOLD; 194 if ("unknown".equals(codeString)) 195 return MedicationStatusCodes.UNKNOWN; 196 if ("not-taken".equals(codeString)) 197 return MedicationStatusCodes.NOTTAKEN; 198 throw new IllegalArgumentException("Unknown MedicationStatusCodes code '"+codeString+"'"); 199 } 200 public Enumeration<MedicationStatusCodes> fromType(Base code) throws FHIRException { 201 if (code == null) 202 return null; 203 if (code.isEmpty()) 204 return new Enumeration<MedicationStatusCodes>(this); 205 String codeString = ((PrimitiveType) code).asStringValue(); 206 if (codeString == null || "".equals(codeString)) 207 return null; 208 if ("active".equals(codeString)) 209 return new Enumeration<MedicationStatusCodes>(this, MedicationStatusCodes.ACTIVE); 210 if ("completed".equals(codeString)) 211 return new Enumeration<MedicationStatusCodes>(this, MedicationStatusCodes.COMPLETED); 212 if ("entered-in-error".equals(codeString)) 213 return new Enumeration<MedicationStatusCodes>(this, MedicationStatusCodes.ENTEREDINERROR); 214 if ("intended".equals(codeString)) 215 return new Enumeration<MedicationStatusCodes>(this, MedicationStatusCodes.INTENDED); 216 if ("stopped".equals(codeString)) 217 return new Enumeration<MedicationStatusCodes>(this, MedicationStatusCodes.STOPPED); 218 if ("on-hold".equals(codeString)) 219 return new Enumeration<MedicationStatusCodes>(this, MedicationStatusCodes.ONHOLD); 220 if ("unknown".equals(codeString)) 221 return new Enumeration<MedicationStatusCodes>(this, MedicationStatusCodes.UNKNOWN); 222 if ("not-taken".equals(codeString)) 223 return new Enumeration<MedicationStatusCodes>(this, MedicationStatusCodes.NOTTAKEN); 224 throw new FHIRException("Unknown MedicationStatusCodes code '"+codeString+"'"); 225 } 226 public String toCode(MedicationStatusCodes code) { 227 if (code == MedicationStatusCodes.ACTIVE) 228 return "active"; 229 if (code == MedicationStatusCodes.COMPLETED) 230 return "completed"; 231 if (code == MedicationStatusCodes.ENTEREDINERROR) 232 return "entered-in-error"; 233 if (code == MedicationStatusCodes.INTENDED) 234 return "intended"; 235 if (code == MedicationStatusCodes.STOPPED) 236 return "stopped"; 237 if (code == MedicationStatusCodes.ONHOLD) 238 return "on-hold"; 239 if (code == MedicationStatusCodes.UNKNOWN) 240 return "unknown"; 241 if (code == MedicationStatusCodes.NOTTAKEN) 242 return "not-taken"; 243 return "?"; 244 } 245 public String toSystem(MedicationStatusCodes code) { 246 return code.getSystem(); 247 } 248 } 249 250 /** 251 * Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server. 252 */ 253 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 254 @Description(shortDefinition="External identifier", formalDefinition="Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." ) 255 protected List<Identifier> identifier; 256 257 /** 258 * A plan, proposal or order that is fulfilled in whole or in part by this event. 259 */ 260 @Child(name = "basedOn", type = {MedicationRequest.class, CarePlan.class, ServiceRequest.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 261 @Description(shortDefinition="Fulfils plan, proposal or order", formalDefinition="A plan, proposal or order that is fulfilled in whole or in part by this event." ) 262 protected List<Reference> basedOn; 263 264 /** 265 * A larger event of which this particular event is a component or step. 266 */ 267 @Child(name = "partOf", type = {MedicationAdministration.class, MedicationDispense.class, MedicationStatement.class, Procedure.class, Observation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 268 @Description(shortDefinition="Part of referenced event", formalDefinition="A larger event of which this particular event is a component or step." ) 269 protected List<Reference> partOf; 270 271 /** 272 * A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed. 273 */ 274 @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) 275 @Description(shortDefinition="active | completed | entered-in-error | intended | stopped | on-hold | unknown | not-taken", formalDefinition="A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed." ) 276 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-statement-status") 277 protected Enumeration<MedicationStatusCodes> status; 278 279 /** 280 * Captures the reason for the current state of the MedicationStatement. 281 */ 282 @Child(name = "statusReason", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 283 @Description(shortDefinition="Reason for current status", formalDefinition="Captures the reason for the current state of the MedicationStatement." ) 284 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/reason-medication-status-codes") 285 protected List<CodeableConcept> statusReason; 286 287 /** 288 * Indicates where the medication is expected to be consumed or administered. 289 */ 290 @Child(name = "category", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) 291 @Description(shortDefinition="Type of medication usage", formalDefinition="Indicates where the medication is expected to be consumed or administered." ) 292 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-statement-category") 293 protected CodeableConcept category; 294 295 /** 296 * Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. 297 */ 298 @Child(name = "medication", type = {CodeableConcept.class, Medication.class}, order=6, min=1, max=1, modifier=false, summary=true) 299 @Description(shortDefinition="What medication was taken", formalDefinition="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications." ) 300 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-codes") 301 protected DataType medication; 302 303 /** 304 * The person, animal or group who is/was taking the medication. 305 */ 306 @Child(name = "subject", type = {Patient.class, Group.class}, order=7, min=1, max=1, modifier=false, summary=true) 307 @Description(shortDefinition="Who is/was taking the medication", formalDefinition="The person, animal or group who is/was taking the medication." ) 308 protected Reference subject; 309 310 /** 311 * The encounter or episode of care that establishes the context for this MedicationStatement. 312 */ 313 @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=8, min=0, max=1, modifier=false, summary=true) 314 @Description(shortDefinition="Encounter / Episode associated with MedicationStatement", formalDefinition="The encounter or episode of care that establishes the context for this MedicationStatement." ) 315 protected Reference context; 316 317 /** 318 * The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No). 319 */ 320 @Child(name = "effective", type = {DateTimeType.class, Period.class}, order=9, min=0, max=1, modifier=false, summary=true) 321 @Description(shortDefinition="The date/time or interval when the medication is/was/will be taken", formalDefinition="The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No)." ) 322 protected DataType effective; 323 324 /** 325 * The date when the medication statement was asserted by the information source. 326 */ 327 @Child(name = "dateAsserted", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=true) 328 @Description(shortDefinition="When the statement was asserted?", formalDefinition="The date when the medication statement was asserted by the information source." ) 329 protected DateTimeType dateAsserted; 330 331 /** 332 * The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest. 333 */ 334 @Child(name = "informationSource", type = {Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Organization.class}, order=11, min=0, max=1, modifier=false, summary=false) 335 @Description(shortDefinition="Person or organization that provided the information about the taking of this medication", formalDefinition="The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest." ) 336 protected Reference informationSource; 337 338 /** 339 * Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement. 340 */ 341 @Child(name = "derivedFrom", type = {Reference.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 342 @Description(shortDefinition="Additional supporting information", formalDefinition="Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement." ) 343 protected List<Reference> derivedFrom; 344 345 /** 346 * A reason for why the medication is being/was taken. 347 */ 348 @Child(name = "reasonCode", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 349 @Description(shortDefinition="Reason for why the medication is being/was taken", formalDefinition="A reason for why the medication is being/was taken." ) 350 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code") 351 protected List<CodeableConcept> reasonCode; 352 353 /** 354 * Condition or observation that supports why the medication is being/was taken. 355 */ 356 @Child(name = "reasonReference", type = {Condition.class, Observation.class, DiagnosticReport.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 357 @Description(shortDefinition="Condition or observation that supports why the medication is being/was taken", formalDefinition="Condition or observation that supports why the medication is being/was taken." ) 358 protected List<Reference> reasonReference; 359 360 /** 361 * Provides extra information about the medication statement that is not conveyed by the other attributes. 362 */ 363 @Child(name = "note", type = {Annotation.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 364 @Description(shortDefinition="Further information about the statement", formalDefinition="Provides extra information about the medication statement that is not conveyed by the other attributes." ) 365 protected List<Annotation> note; 366 367 /** 368 * Indicates how the medication is/was or should be taken by the patient. 369 */ 370 @Child(name = "dosage", type = {Dosage.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 371 @Description(shortDefinition="Details of how medication is/was taken or should be taken", formalDefinition="Indicates how the medication is/was or should be taken by the patient." ) 372 protected List<Dosage> dosage; 373 374 private static final long serialVersionUID = -1704118134L; 375 376 /** 377 * Constructor 378 */ 379 public MedicationStatement() { 380 super(); 381 } 382 383 /** 384 * Constructor 385 */ 386 public MedicationStatement(MedicationStatusCodes status, DataType medication, Reference subject) { 387 super(); 388 this.setStatus(status); 389 this.setMedication(medication); 390 this.setSubject(subject); 391 } 392 393 /** 394 * @return {@link #identifier} (Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.) 395 */ 396 public List<Identifier> getIdentifier() { 397 if (this.identifier == null) 398 this.identifier = new ArrayList<Identifier>(); 399 return this.identifier; 400 } 401 402 /** 403 * @return Returns a reference to <code>this</code> for easy method chaining 404 */ 405 public MedicationStatement setIdentifier(List<Identifier> theIdentifier) { 406 this.identifier = theIdentifier; 407 return this; 408 } 409 410 public boolean hasIdentifier() { 411 if (this.identifier == null) 412 return false; 413 for (Identifier item : this.identifier) 414 if (!item.isEmpty()) 415 return true; 416 return false; 417 } 418 419 public Identifier addIdentifier() { //3 420 Identifier t = new Identifier(); 421 if (this.identifier == null) 422 this.identifier = new ArrayList<Identifier>(); 423 this.identifier.add(t); 424 return t; 425 } 426 427 public MedicationStatement addIdentifier(Identifier t) { //3 428 if (t == null) 429 return this; 430 if (this.identifier == null) 431 this.identifier = new ArrayList<Identifier>(); 432 this.identifier.add(t); 433 return this; 434 } 435 436 /** 437 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 438 */ 439 public Identifier getIdentifierFirstRep() { 440 if (getIdentifier().isEmpty()) { 441 addIdentifier(); 442 } 443 return getIdentifier().get(0); 444 } 445 446 /** 447 * @return {@link #basedOn} (A plan, proposal or order that is fulfilled in whole or in part by this event.) 448 */ 449 public List<Reference> getBasedOn() { 450 if (this.basedOn == null) 451 this.basedOn = new ArrayList<Reference>(); 452 return this.basedOn; 453 } 454 455 /** 456 * @return Returns a reference to <code>this</code> for easy method chaining 457 */ 458 public MedicationStatement setBasedOn(List<Reference> theBasedOn) { 459 this.basedOn = theBasedOn; 460 return this; 461 } 462 463 public boolean hasBasedOn() { 464 if (this.basedOn == null) 465 return false; 466 for (Reference item : this.basedOn) 467 if (!item.isEmpty()) 468 return true; 469 return false; 470 } 471 472 public Reference addBasedOn() { //3 473 Reference t = new Reference(); 474 if (this.basedOn == null) 475 this.basedOn = new ArrayList<Reference>(); 476 this.basedOn.add(t); 477 return t; 478 } 479 480 public MedicationStatement addBasedOn(Reference t) { //3 481 if (t == null) 482 return this; 483 if (this.basedOn == null) 484 this.basedOn = new ArrayList<Reference>(); 485 this.basedOn.add(t); 486 return this; 487 } 488 489 /** 490 * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3} 491 */ 492 public Reference getBasedOnFirstRep() { 493 if (getBasedOn().isEmpty()) { 494 addBasedOn(); 495 } 496 return getBasedOn().get(0); 497 } 498 499 /** 500 * @return {@link #partOf} (A larger event of which this particular event is a component or step.) 501 */ 502 public List<Reference> getPartOf() { 503 if (this.partOf == null) 504 this.partOf = new ArrayList<Reference>(); 505 return this.partOf; 506 } 507 508 /** 509 * @return Returns a reference to <code>this</code> for easy method chaining 510 */ 511 public MedicationStatement setPartOf(List<Reference> thePartOf) { 512 this.partOf = thePartOf; 513 return this; 514 } 515 516 public boolean hasPartOf() { 517 if (this.partOf == null) 518 return false; 519 for (Reference item : this.partOf) 520 if (!item.isEmpty()) 521 return true; 522 return false; 523 } 524 525 public Reference addPartOf() { //3 526 Reference t = new Reference(); 527 if (this.partOf == null) 528 this.partOf = new ArrayList<Reference>(); 529 this.partOf.add(t); 530 return t; 531 } 532 533 public MedicationStatement addPartOf(Reference t) { //3 534 if (t == null) 535 return this; 536 if (this.partOf == null) 537 this.partOf = new ArrayList<Reference>(); 538 this.partOf.add(t); 539 return this; 540 } 541 542 /** 543 * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3} 544 */ 545 public Reference getPartOfFirstRep() { 546 if (getPartOf().isEmpty()) { 547 addPartOf(); 548 } 549 return getPartOf().get(0); 550 } 551 552 /** 553 * @return {@link #status} (A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 554 */ 555 public Enumeration<MedicationStatusCodes> getStatusElement() { 556 if (this.status == null) 557 if (Configuration.errorOnAutoCreate()) 558 throw new Error("Attempt to auto-create MedicationStatement.status"); 559 else if (Configuration.doAutoCreate()) 560 this.status = new Enumeration<MedicationStatusCodes>(new MedicationStatusCodesEnumFactory()); // bb 561 return this.status; 562 } 563 564 public boolean hasStatusElement() { 565 return this.status != null && !this.status.isEmpty(); 566 } 567 568 public boolean hasStatus() { 569 return this.status != null && !this.status.isEmpty(); 570 } 571 572 /** 573 * @param value {@link #status} (A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 574 */ 575 public MedicationStatement setStatusElement(Enumeration<MedicationStatusCodes> value) { 576 this.status = value; 577 return this; 578 } 579 580 /** 581 * @return A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed. 582 */ 583 public MedicationStatusCodes getStatus() { 584 return this.status == null ? null : this.status.getValue(); 585 } 586 587 /** 588 * @param value A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed. 589 */ 590 public MedicationStatement setStatus(MedicationStatusCodes value) { 591 if (this.status == null) 592 this.status = new Enumeration<MedicationStatusCodes>(new MedicationStatusCodesEnumFactory()); 593 this.status.setValue(value); 594 return this; 595 } 596 597 /** 598 * @return {@link #statusReason} (Captures the reason for the current state of the MedicationStatement.) 599 */ 600 public List<CodeableConcept> getStatusReason() { 601 if (this.statusReason == null) 602 this.statusReason = new ArrayList<CodeableConcept>(); 603 return this.statusReason; 604 } 605 606 /** 607 * @return Returns a reference to <code>this</code> for easy method chaining 608 */ 609 public MedicationStatement setStatusReason(List<CodeableConcept> theStatusReason) { 610 this.statusReason = theStatusReason; 611 return this; 612 } 613 614 public boolean hasStatusReason() { 615 if (this.statusReason == null) 616 return false; 617 for (CodeableConcept item : this.statusReason) 618 if (!item.isEmpty()) 619 return true; 620 return false; 621 } 622 623 public CodeableConcept addStatusReason() { //3 624 CodeableConcept t = new CodeableConcept(); 625 if (this.statusReason == null) 626 this.statusReason = new ArrayList<CodeableConcept>(); 627 this.statusReason.add(t); 628 return t; 629 } 630 631 public MedicationStatement addStatusReason(CodeableConcept t) { //3 632 if (t == null) 633 return this; 634 if (this.statusReason == null) 635 this.statusReason = new ArrayList<CodeableConcept>(); 636 this.statusReason.add(t); 637 return this; 638 } 639 640 /** 641 * @return The first repetition of repeating field {@link #statusReason}, creating it if it does not already exist {3} 642 */ 643 public CodeableConcept getStatusReasonFirstRep() { 644 if (getStatusReason().isEmpty()) { 645 addStatusReason(); 646 } 647 return getStatusReason().get(0); 648 } 649 650 /** 651 * @return {@link #category} (Indicates where the medication is expected to be consumed or administered.) 652 */ 653 public CodeableConcept getCategory() { 654 if (this.category == null) 655 if (Configuration.errorOnAutoCreate()) 656 throw new Error("Attempt to auto-create MedicationStatement.category"); 657 else if (Configuration.doAutoCreate()) 658 this.category = new CodeableConcept(); // cc 659 return this.category; 660 } 661 662 public boolean hasCategory() { 663 return this.category != null && !this.category.isEmpty(); 664 } 665 666 /** 667 * @param value {@link #category} (Indicates where the medication is expected to be consumed or administered.) 668 */ 669 public MedicationStatement setCategory(CodeableConcept value) { 670 this.category = value; 671 return this; 672 } 673 674 /** 675 * @return {@link #medication} (Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) 676 */ 677 public DataType getMedication() { 678 return this.medication; 679 } 680 681 /** 682 * @return {@link #medication} (Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) 683 */ 684 public CodeableConcept getMedicationCodeableConcept() throws FHIRException { 685 if (this.medication == null) 686 this.medication = new CodeableConcept(); 687 if (!(this.medication instanceof CodeableConcept)) 688 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.medication.getClass().getName()+" was encountered"); 689 return (CodeableConcept) this.medication; 690 } 691 692 public boolean hasMedicationCodeableConcept() { 693 return this != null && this.medication instanceof CodeableConcept; 694 } 695 696 /** 697 * @return {@link #medication} (Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) 698 */ 699 public Reference getMedicationReference() throws FHIRException { 700 if (this.medication == null) 701 this.medication = new Reference(); 702 if (!(this.medication instanceof Reference)) 703 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.medication.getClass().getName()+" was encountered"); 704 return (Reference) this.medication; 705 } 706 707 public boolean hasMedicationReference() { 708 return this != null && this.medication instanceof Reference; 709 } 710 711 public boolean hasMedication() { 712 return this.medication != null && !this.medication.isEmpty(); 713 } 714 715 /** 716 * @param value {@link #medication} (Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.) 717 */ 718 public MedicationStatement setMedication(DataType value) { 719 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 720 throw new Error("Not the right type for MedicationStatement.medication[x]: "+value.fhirType()); 721 this.medication = value; 722 return this; 723 } 724 725 /** 726 * @return {@link #subject} (The person, animal or group who is/was taking the medication.) 727 */ 728 public Reference getSubject() { 729 if (this.subject == null) 730 if (Configuration.errorOnAutoCreate()) 731 throw new Error("Attempt to auto-create MedicationStatement.subject"); 732 else if (Configuration.doAutoCreate()) 733 this.subject = new Reference(); // cc 734 return this.subject; 735 } 736 737 public boolean hasSubject() { 738 return this.subject != null && !this.subject.isEmpty(); 739 } 740 741 /** 742 * @param value {@link #subject} (The person, animal or group who is/was taking the medication.) 743 */ 744 public MedicationStatement setSubject(Reference value) { 745 this.subject = value; 746 return this; 747 } 748 749 /** 750 * @return {@link #context} (The encounter or episode of care that establishes the context for this MedicationStatement.) 751 */ 752 public Reference getContext() { 753 if (this.context == null) 754 if (Configuration.errorOnAutoCreate()) 755 throw new Error("Attempt to auto-create MedicationStatement.context"); 756 else if (Configuration.doAutoCreate()) 757 this.context = new Reference(); // cc 758 return this.context; 759 } 760 761 public boolean hasContext() { 762 return this.context != null && !this.context.isEmpty(); 763 } 764 765 /** 766 * @param value {@link #context} (The encounter or episode of care that establishes the context for this MedicationStatement.) 767 */ 768 public MedicationStatement setContext(Reference value) { 769 this.context = value; 770 return this; 771 } 772 773 /** 774 * @return {@link #effective} (The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).) 775 */ 776 public DataType getEffective() { 777 return this.effective; 778 } 779 780 /** 781 * @return {@link #effective} (The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).) 782 */ 783 public DateTimeType getEffectiveDateTimeType() throws FHIRException { 784 if (this.effective == null) 785 this.effective = new DateTimeType(); 786 if (!(this.effective instanceof DateTimeType)) 787 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.effective.getClass().getName()+" was encountered"); 788 return (DateTimeType) this.effective; 789 } 790 791 public boolean hasEffectiveDateTimeType() { 792 return this != null && this.effective instanceof DateTimeType; 793 } 794 795 /** 796 * @return {@link #effective} (The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).) 797 */ 798 public Period getEffectivePeriod() throws FHIRException { 799 if (this.effective == null) 800 this.effective = new Period(); 801 if (!(this.effective instanceof Period)) 802 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.effective.getClass().getName()+" was encountered"); 803 return (Period) this.effective; 804 } 805 806 public boolean hasEffectivePeriod() { 807 return this != null && this.effective instanceof Period; 808 } 809 810 public boolean hasEffective() { 811 return this.effective != null && !this.effective.isEmpty(); 812 } 813 814 /** 815 * @param value {@link #effective} (The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).) 816 */ 817 public MedicationStatement setEffective(DataType value) { 818 if (value != null && !(value instanceof DateTimeType || value instanceof Period)) 819 throw new Error("Not the right type for MedicationStatement.effective[x]: "+value.fhirType()); 820 this.effective = value; 821 return this; 822 } 823 824 /** 825 * @return {@link #dateAsserted} (The date when the medication statement was asserted by the information source.). This is the underlying object with id, value and extensions. The accessor "getDateAsserted" gives direct access to the value 826 */ 827 public DateTimeType getDateAssertedElement() { 828 if (this.dateAsserted == null) 829 if (Configuration.errorOnAutoCreate()) 830 throw new Error("Attempt to auto-create MedicationStatement.dateAsserted"); 831 else if (Configuration.doAutoCreate()) 832 this.dateAsserted = new DateTimeType(); // bb 833 return this.dateAsserted; 834 } 835 836 public boolean hasDateAssertedElement() { 837 return this.dateAsserted != null && !this.dateAsserted.isEmpty(); 838 } 839 840 public boolean hasDateAsserted() { 841 return this.dateAsserted != null && !this.dateAsserted.isEmpty(); 842 } 843 844 /** 845 * @param value {@link #dateAsserted} (The date when the medication statement was asserted by the information source.). This is the underlying object with id, value and extensions. The accessor "getDateAsserted" gives direct access to the value 846 */ 847 public MedicationStatement setDateAssertedElement(DateTimeType value) { 848 this.dateAsserted = value; 849 return this; 850 } 851 852 /** 853 * @return The date when the medication statement was asserted by the information source. 854 */ 855 public Date getDateAsserted() { 856 return this.dateAsserted == null ? null : this.dateAsserted.getValue(); 857 } 858 859 /** 860 * @param value The date when the medication statement was asserted by the information source. 861 */ 862 public MedicationStatement setDateAsserted(Date value) { 863 if (value == null) 864 this.dateAsserted = null; 865 else { 866 if (this.dateAsserted == null) 867 this.dateAsserted = new DateTimeType(); 868 this.dateAsserted.setValue(value); 869 } 870 return this; 871 } 872 873 /** 874 * @return {@link #informationSource} (The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest.) 875 */ 876 public Reference getInformationSource() { 877 if (this.informationSource == null) 878 if (Configuration.errorOnAutoCreate()) 879 throw new Error("Attempt to auto-create MedicationStatement.informationSource"); 880 else if (Configuration.doAutoCreate()) 881 this.informationSource = new Reference(); // cc 882 return this.informationSource; 883 } 884 885 public boolean hasInformationSource() { 886 return this.informationSource != null && !this.informationSource.isEmpty(); 887 } 888 889 /** 890 * @param value {@link #informationSource} (The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest.) 891 */ 892 public MedicationStatement setInformationSource(Reference value) { 893 this.informationSource = value; 894 return this; 895 } 896 897 /** 898 * @return {@link #derivedFrom} (Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.) 899 */ 900 public List<Reference> getDerivedFrom() { 901 if (this.derivedFrom == null) 902 this.derivedFrom = new ArrayList<Reference>(); 903 return this.derivedFrom; 904 } 905 906 /** 907 * @return Returns a reference to <code>this</code> for easy method chaining 908 */ 909 public MedicationStatement setDerivedFrom(List<Reference> theDerivedFrom) { 910 this.derivedFrom = theDerivedFrom; 911 return this; 912 } 913 914 public boolean hasDerivedFrom() { 915 if (this.derivedFrom == null) 916 return false; 917 for (Reference item : this.derivedFrom) 918 if (!item.isEmpty()) 919 return true; 920 return false; 921 } 922 923 public Reference addDerivedFrom() { //3 924 Reference t = new Reference(); 925 if (this.derivedFrom == null) 926 this.derivedFrom = new ArrayList<Reference>(); 927 this.derivedFrom.add(t); 928 return t; 929 } 930 931 public MedicationStatement addDerivedFrom(Reference t) { //3 932 if (t == null) 933 return this; 934 if (this.derivedFrom == null) 935 this.derivedFrom = new ArrayList<Reference>(); 936 this.derivedFrom.add(t); 937 return this; 938 } 939 940 /** 941 * @return The first repetition of repeating field {@link #derivedFrom}, creating it if it does not already exist {3} 942 */ 943 public Reference getDerivedFromFirstRep() { 944 if (getDerivedFrom().isEmpty()) { 945 addDerivedFrom(); 946 } 947 return getDerivedFrom().get(0); 948 } 949 950 /** 951 * @return {@link #reasonCode} (A reason for why the medication is being/was taken.) 952 */ 953 public List<CodeableConcept> getReasonCode() { 954 if (this.reasonCode == null) 955 this.reasonCode = new ArrayList<CodeableConcept>(); 956 return this.reasonCode; 957 } 958 959 /** 960 * @return Returns a reference to <code>this</code> for easy method chaining 961 */ 962 public MedicationStatement setReasonCode(List<CodeableConcept> theReasonCode) { 963 this.reasonCode = theReasonCode; 964 return this; 965 } 966 967 public boolean hasReasonCode() { 968 if (this.reasonCode == null) 969 return false; 970 for (CodeableConcept item : this.reasonCode) 971 if (!item.isEmpty()) 972 return true; 973 return false; 974 } 975 976 public CodeableConcept addReasonCode() { //3 977 CodeableConcept t = new CodeableConcept(); 978 if (this.reasonCode == null) 979 this.reasonCode = new ArrayList<CodeableConcept>(); 980 this.reasonCode.add(t); 981 return t; 982 } 983 984 public MedicationStatement addReasonCode(CodeableConcept t) { //3 985 if (t == null) 986 return this; 987 if (this.reasonCode == null) 988 this.reasonCode = new ArrayList<CodeableConcept>(); 989 this.reasonCode.add(t); 990 return this; 991 } 992 993 /** 994 * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist {3} 995 */ 996 public CodeableConcept getReasonCodeFirstRep() { 997 if (getReasonCode().isEmpty()) { 998 addReasonCode(); 999 } 1000 return getReasonCode().get(0); 1001 } 1002 1003 /** 1004 * @return {@link #reasonReference} (Condition or observation that supports why the medication is being/was taken.) 1005 */ 1006 public List<Reference> getReasonReference() { 1007 if (this.reasonReference == null) 1008 this.reasonReference = new ArrayList<Reference>(); 1009 return this.reasonReference; 1010 } 1011 1012 /** 1013 * @return Returns a reference to <code>this</code> for easy method chaining 1014 */ 1015 public MedicationStatement setReasonReference(List<Reference> theReasonReference) { 1016 this.reasonReference = theReasonReference; 1017 return this; 1018 } 1019 1020 public boolean hasReasonReference() { 1021 if (this.reasonReference == null) 1022 return false; 1023 for (Reference item : this.reasonReference) 1024 if (!item.isEmpty()) 1025 return true; 1026 return false; 1027 } 1028 1029 public Reference addReasonReference() { //3 1030 Reference t = new Reference(); 1031 if (this.reasonReference == null) 1032 this.reasonReference = new ArrayList<Reference>(); 1033 this.reasonReference.add(t); 1034 return t; 1035 } 1036 1037 public MedicationStatement addReasonReference(Reference t) { //3 1038 if (t == null) 1039 return this; 1040 if (this.reasonReference == null) 1041 this.reasonReference = new ArrayList<Reference>(); 1042 this.reasonReference.add(t); 1043 return this; 1044 } 1045 1046 /** 1047 * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist {3} 1048 */ 1049 public Reference getReasonReferenceFirstRep() { 1050 if (getReasonReference().isEmpty()) { 1051 addReasonReference(); 1052 } 1053 return getReasonReference().get(0); 1054 } 1055 1056 /** 1057 * @return {@link #note} (Provides extra information about the medication statement that is not conveyed by the other attributes.) 1058 */ 1059 public List<Annotation> getNote() { 1060 if (this.note == null) 1061 this.note = new ArrayList<Annotation>(); 1062 return this.note; 1063 } 1064 1065 /** 1066 * @return Returns a reference to <code>this</code> for easy method chaining 1067 */ 1068 public MedicationStatement setNote(List<Annotation> theNote) { 1069 this.note = theNote; 1070 return this; 1071 } 1072 1073 public boolean hasNote() { 1074 if (this.note == null) 1075 return false; 1076 for (Annotation item : this.note) 1077 if (!item.isEmpty()) 1078 return true; 1079 return false; 1080 } 1081 1082 public Annotation addNote() { //3 1083 Annotation t = new Annotation(); 1084 if (this.note == null) 1085 this.note = new ArrayList<Annotation>(); 1086 this.note.add(t); 1087 return t; 1088 } 1089 1090 public MedicationStatement addNote(Annotation t) { //3 1091 if (t == null) 1092 return this; 1093 if (this.note == null) 1094 this.note = new ArrayList<Annotation>(); 1095 this.note.add(t); 1096 return this; 1097 } 1098 1099 /** 1100 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} 1101 */ 1102 public Annotation getNoteFirstRep() { 1103 if (getNote().isEmpty()) { 1104 addNote(); 1105 } 1106 return getNote().get(0); 1107 } 1108 1109 /** 1110 * @return {@link #dosage} (Indicates how the medication is/was or should be taken by the patient.) 1111 */ 1112 public List<Dosage> getDosage() { 1113 if (this.dosage == null) 1114 this.dosage = new ArrayList<Dosage>(); 1115 return this.dosage; 1116 } 1117 1118 /** 1119 * @return Returns a reference to <code>this</code> for easy method chaining 1120 */ 1121 public MedicationStatement setDosage(List<Dosage> theDosage) { 1122 this.dosage = theDosage; 1123 return this; 1124 } 1125 1126 public boolean hasDosage() { 1127 if (this.dosage == null) 1128 return false; 1129 for (Dosage item : this.dosage) 1130 if (!item.isEmpty()) 1131 return true; 1132 return false; 1133 } 1134 1135 public Dosage addDosage() { //3 1136 Dosage t = new Dosage(); 1137 if (this.dosage == null) 1138 this.dosage = new ArrayList<Dosage>(); 1139 this.dosage.add(t); 1140 return t; 1141 } 1142 1143 public MedicationStatement addDosage(Dosage t) { //3 1144 if (t == null) 1145 return this; 1146 if (this.dosage == null) 1147 this.dosage = new ArrayList<Dosage>(); 1148 this.dosage.add(t); 1149 return this; 1150 } 1151 1152 /** 1153 * @return The first repetition of repeating field {@link #dosage}, creating it if it does not already exist {3} 1154 */ 1155 public Dosage getDosageFirstRep() { 1156 if (getDosage().isEmpty()) { 1157 addDosage(); 1158 } 1159 return getDosage().get(0); 1160 } 1161 1162 protected void listChildren(List<Property> children) { 1163 super.listChildren(children); 1164 children.add(new Property("identifier", "Identifier", "Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1165 children.add(new Property("basedOn", "Reference(MedicationRequest|CarePlan|ServiceRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this event.", 0, java.lang.Integer.MAX_VALUE, basedOn)); 1166 children.add(new Property("partOf", "Reference(MedicationAdministration|MedicationDispense|MedicationStatement|Procedure|Observation)", "A larger event of which this particular event is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf)); 1167 children.add(new Property("status", "code", "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed.", 0, 1, status)); 1168 children.add(new Property("statusReason", "CodeableConcept", "Captures the reason for the current state of the MedicationStatement.", 0, java.lang.Integer.MAX_VALUE, statusReason)); 1169 children.add(new Property("category", "CodeableConcept", "Indicates where the medication is expected to be consumed or administered.", 0, 1, category)); 1170 children.add(new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", 0, 1, medication)); 1171 children.add(new Property("subject", "Reference(Patient|Group)", "The person, animal or group who is/was taking the medication.", 0, 1, subject)); 1172 children.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter or episode of care that establishes the context for this MedicationStatement.", 0, 1, context)); 1173 children.add(new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).", 0, 1, effective)); 1174 children.add(new Property("dateAsserted", "dateTime", "The date when the medication statement was asserted by the information source.", 0, 1, dateAsserted)); 1175 children.add(new Property("informationSource", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Organization)", "The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest.", 0, 1, informationSource)); 1176 children.add(new Property("derivedFrom", "Reference(Any)", "Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.", 0, java.lang.Integer.MAX_VALUE, derivedFrom)); 1177 children.add(new Property("reasonCode", "CodeableConcept", "A reason for why the medication is being/was taken.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); 1178 children.add(new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport)", "Condition or observation that supports why the medication is being/was taken.", 0, java.lang.Integer.MAX_VALUE, reasonReference)); 1179 children.add(new Property("note", "Annotation", "Provides extra information about the medication statement that is not conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note)); 1180 children.add(new Property("dosage", "Dosage", "Indicates how the medication is/was or should be taken by the patient.", 0, java.lang.Integer.MAX_VALUE, dosage)); 1181 } 1182 1183 @Override 1184 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1185 switch (_hash) { 1186 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier); 1187 case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(MedicationRequest|CarePlan|ServiceRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this event.", 0, java.lang.Integer.MAX_VALUE, basedOn); 1188 case -995410646: /*partOf*/ return new Property("partOf", "Reference(MedicationAdministration|MedicationDispense|MedicationStatement|Procedure|Observation)", "A larger event of which this particular event is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf); 1189 case -892481550: /*status*/ return new Property("status", "code", "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed.", 0, 1, status); 1190 case 2051346646: /*statusReason*/ return new Property("statusReason", "CodeableConcept", "Captures the reason for the current state of the MedicationStatement.", 0, java.lang.Integer.MAX_VALUE, statusReason); 1191 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Indicates where the medication is expected to be consumed or administered.", 0, 1, category); 1192 case 1458402129: /*medication[x]*/ return new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", 0, 1, medication); 1193 case 1998965455: /*medication*/ return new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", 0, 1, medication); 1194 case -209845038: /*medicationCodeableConcept*/ return new Property("medication[x]", "CodeableConcept", "Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", 0, 1, medication); 1195 case 2104315196: /*medicationReference*/ return new Property("medication[x]", "Reference(Medication)", "Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", 0, 1, medication); 1196 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The person, animal or group who is/was taking the medication.", 0, 1, subject); 1197 case 951530927: /*context*/ return new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter or episode of care that establishes the context for this MedicationStatement.", 0, 1, context); 1198 case 247104889: /*effective[x]*/ return new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).", 0, 1, effective); 1199 case -1468651097: /*effective*/ return new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).", 0, 1, effective); 1200 case -275306910: /*effectiveDateTime*/ return new Property("effective[x]", "dateTime", "The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).", 0, 1, effective); 1201 case -403934648: /*effectivePeriod*/ return new Property("effective[x]", "Period", "The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).", 0, 1, effective); 1202 case -1980855245: /*dateAsserted*/ return new Property("dateAsserted", "dateTime", "The date when the medication statement was asserted by the information source.", 0, 1, dateAsserted); 1203 case -2123220889: /*informationSource*/ return new Property("informationSource", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Organization)", "The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest.", 0, 1, informationSource); 1204 case 1077922663: /*derivedFrom*/ return new Property("derivedFrom", "Reference(Any)", "Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.", 0, java.lang.Integer.MAX_VALUE, derivedFrom); 1205 case 722137681: /*reasonCode*/ return new Property("reasonCode", "CodeableConcept", "A reason for why the medication is being/was taken.", 0, java.lang.Integer.MAX_VALUE, reasonCode); 1206 case -1146218137: /*reasonReference*/ return new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport)", "Condition or observation that supports why the medication is being/was taken.", 0, java.lang.Integer.MAX_VALUE, reasonReference); 1207 case 3387378: /*note*/ return new Property("note", "Annotation", "Provides extra information about the medication statement that is not conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note); 1208 case -1326018889: /*dosage*/ return new Property("dosage", "Dosage", "Indicates how the medication is/was or should be taken by the patient.", 0, java.lang.Integer.MAX_VALUE, dosage); 1209 default: return super.getNamedProperty(_hash, _name, _checkValid); 1210 } 1211 1212 } 1213 1214 @Override 1215 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1216 switch (hash) { 1217 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1218 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 1219 case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference 1220 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<MedicationStatusCodes> 1221 case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : this.statusReason.toArray(new Base[this.statusReason.size()]); // CodeableConcept 1222 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 1223 case 1998965455: /*medication*/ return this.medication == null ? new Base[0] : new Base[] {this.medication}; // DataType 1224 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 1225 case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // Reference 1226 case -1468651097: /*effective*/ return this.effective == null ? new Base[0] : new Base[] {this.effective}; // DataType 1227 case -1980855245: /*dateAsserted*/ return this.dateAsserted == null ? new Base[0] : new Base[] {this.dateAsserted}; // DateTimeType 1228 case -2123220889: /*informationSource*/ return this.informationSource == null ? new Base[0] : new Base[] {this.informationSource}; // Reference 1229 case 1077922663: /*derivedFrom*/ return this.derivedFrom == null ? new Base[0] : this.derivedFrom.toArray(new Base[this.derivedFrom.size()]); // Reference 1230 case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept 1231 case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference 1232 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 1233 case -1326018889: /*dosage*/ return this.dosage == null ? new Base[0] : this.dosage.toArray(new Base[this.dosage.size()]); // Dosage 1234 default: return super.getProperty(hash, name, checkValid); 1235 } 1236 1237 } 1238 1239 @Override 1240 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1241 switch (hash) { 1242 case -1618432855: // identifier 1243 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 1244 return value; 1245 case -332612366: // basedOn 1246 this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference 1247 return value; 1248 case -995410646: // partOf 1249 this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference 1250 return value; 1251 case -892481550: // status 1252 value = new MedicationStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 1253 this.status = (Enumeration) value; // Enumeration<MedicationStatusCodes> 1254 return value; 1255 case 2051346646: // statusReason 1256 this.getStatusReason().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1257 return value; 1258 case 50511102: // category 1259 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1260 return value; 1261 case 1998965455: // medication 1262 this.medication = TypeConvertor.castToType(value); // DataType 1263 return value; 1264 case -1867885268: // subject 1265 this.subject = TypeConvertor.castToReference(value); // Reference 1266 return value; 1267 case 951530927: // context 1268 this.context = TypeConvertor.castToReference(value); // Reference 1269 return value; 1270 case -1468651097: // effective 1271 this.effective = TypeConvertor.castToType(value); // DataType 1272 return value; 1273 case -1980855245: // dateAsserted 1274 this.dateAsserted = TypeConvertor.castToDateTime(value); // DateTimeType 1275 return value; 1276 case -2123220889: // informationSource 1277 this.informationSource = TypeConvertor.castToReference(value); // Reference 1278 return value; 1279 case 1077922663: // derivedFrom 1280 this.getDerivedFrom().add(TypeConvertor.castToReference(value)); // Reference 1281 return value; 1282 case 722137681: // reasonCode 1283 this.getReasonCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1284 return value; 1285 case -1146218137: // reasonReference 1286 this.getReasonReference().add(TypeConvertor.castToReference(value)); // Reference 1287 return value; 1288 case 3387378: // note 1289 this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation 1290 return value; 1291 case -1326018889: // dosage 1292 this.getDosage().add(TypeConvertor.castToDosage(value)); // Dosage 1293 return value; 1294 default: return super.setProperty(hash, name, value); 1295 } 1296 1297 } 1298 1299 @Override 1300 public Base setProperty(String name, Base value) throws FHIRException { 1301 if (name.equals("identifier")) { 1302 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 1303 } else if (name.equals("basedOn")) { 1304 this.getBasedOn().add(TypeConvertor.castToReference(value)); 1305 } else if (name.equals("partOf")) { 1306 this.getPartOf().add(TypeConvertor.castToReference(value)); 1307 } else if (name.equals("status")) { 1308 value = new MedicationStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 1309 this.status = (Enumeration) value; // Enumeration<MedicationStatusCodes> 1310 } else if (name.equals("statusReason")) { 1311 this.getStatusReason().add(TypeConvertor.castToCodeableConcept(value)); 1312 } else if (name.equals("category")) { 1313 this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1314 } else if (name.equals("medication[x]")) { 1315 this.medication = TypeConvertor.castToType(value); // DataType 1316 } else if (name.equals("subject")) { 1317 this.subject = TypeConvertor.castToReference(value); // Reference 1318 } else if (name.equals("context")) { 1319 this.context = TypeConvertor.castToReference(value); // Reference 1320 } else if (name.equals("effective[x]")) { 1321 this.effective = TypeConvertor.castToType(value); // DataType 1322 } else if (name.equals("dateAsserted")) { 1323 this.dateAsserted = TypeConvertor.castToDateTime(value); // DateTimeType 1324 } else if (name.equals("informationSource")) { 1325 this.informationSource = TypeConvertor.castToReference(value); // Reference 1326 } else if (name.equals("derivedFrom")) { 1327 this.getDerivedFrom().add(TypeConvertor.castToReference(value)); 1328 } else if (name.equals("reasonCode")) { 1329 this.getReasonCode().add(TypeConvertor.castToCodeableConcept(value)); 1330 } else if (name.equals("reasonReference")) { 1331 this.getReasonReference().add(TypeConvertor.castToReference(value)); 1332 } else if (name.equals("note")) { 1333 this.getNote().add(TypeConvertor.castToAnnotation(value)); 1334 } else if (name.equals("dosage")) { 1335 this.getDosage().add(TypeConvertor.castToDosage(value)); 1336 } else 1337 return super.setProperty(name, value); 1338 return value; 1339 } 1340 1341 @Override 1342 public Base makeProperty(int hash, String name) throws FHIRException { 1343 switch (hash) { 1344 case -1618432855: return addIdentifier(); 1345 case -332612366: return addBasedOn(); 1346 case -995410646: return addPartOf(); 1347 case -892481550: return getStatusElement(); 1348 case 2051346646: return addStatusReason(); 1349 case 50511102: return getCategory(); 1350 case 1458402129: return getMedication(); 1351 case 1998965455: return getMedication(); 1352 case -1867885268: return getSubject(); 1353 case 951530927: return getContext(); 1354 case 247104889: return getEffective(); 1355 case -1468651097: return getEffective(); 1356 case -1980855245: return getDateAssertedElement(); 1357 case -2123220889: return getInformationSource(); 1358 case 1077922663: return addDerivedFrom(); 1359 case 722137681: return addReasonCode(); 1360 case -1146218137: return addReasonReference(); 1361 case 3387378: return addNote(); 1362 case -1326018889: return addDosage(); 1363 default: return super.makeProperty(hash, name); 1364 } 1365 1366 } 1367 1368 @Override 1369 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1370 switch (hash) { 1371 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1372 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 1373 case -995410646: /*partOf*/ return new String[] {"Reference"}; 1374 case -892481550: /*status*/ return new String[] {"code"}; 1375 case 2051346646: /*statusReason*/ return new String[] {"CodeableConcept"}; 1376 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 1377 case 1998965455: /*medication*/ return new String[] {"CodeableConcept", "Reference"}; 1378 case -1867885268: /*subject*/ return new String[] {"Reference"}; 1379 case 951530927: /*context*/ return new String[] {"Reference"}; 1380 case -1468651097: /*effective*/ return new String[] {"dateTime", "Period"}; 1381 case -1980855245: /*dateAsserted*/ return new String[] {"dateTime"}; 1382 case -2123220889: /*informationSource*/ return new String[] {"Reference"}; 1383 case 1077922663: /*derivedFrom*/ return new String[] {"Reference"}; 1384 case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; 1385 case -1146218137: /*reasonReference*/ return new String[] {"Reference"}; 1386 case 3387378: /*note*/ return new String[] {"Annotation"}; 1387 case -1326018889: /*dosage*/ return new String[] {"Dosage"}; 1388 default: return super.getTypesForProperty(hash, name); 1389 } 1390 1391 } 1392 1393 @Override 1394 public Base addChild(String name) throws FHIRException { 1395 if (name.equals("identifier")) { 1396 return addIdentifier(); 1397 } 1398 else if (name.equals("basedOn")) { 1399 return addBasedOn(); 1400 } 1401 else if (name.equals("partOf")) { 1402 return addPartOf(); 1403 } 1404 else if (name.equals("status")) { 1405 throw new FHIRException("Cannot call addChild on a primitive type MedicationStatement.status"); 1406 } 1407 else if (name.equals("statusReason")) { 1408 return addStatusReason(); 1409 } 1410 else if (name.equals("category")) { 1411 this.category = new CodeableConcept(); 1412 return this.category; 1413 } 1414 else if (name.equals("medicationCodeableConcept")) { 1415 this.medication = new CodeableConcept(); 1416 return this.medication; 1417 } 1418 else if (name.equals("medicationReference")) { 1419 this.medication = new Reference(); 1420 return this.medication; 1421 } 1422 else if (name.equals("subject")) { 1423 this.subject = new Reference(); 1424 return this.subject; 1425 } 1426 else if (name.equals("context")) { 1427 this.context = new Reference(); 1428 return this.context; 1429 } 1430 else if (name.equals("effectiveDateTime")) { 1431 this.effective = new DateTimeType(); 1432 return this.effective; 1433 } 1434 else if (name.equals("effectivePeriod")) { 1435 this.effective = new Period(); 1436 return this.effective; 1437 } 1438 else if (name.equals("dateAsserted")) { 1439 throw new FHIRException("Cannot call addChild on a primitive type MedicationStatement.dateAsserted"); 1440 } 1441 else if (name.equals("informationSource")) { 1442 this.informationSource = new Reference(); 1443 return this.informationSource; 1444 } 1445 else if (name.equals("derivedFrom")) { 1446 return addDerivedFrom(); 1447 } 1448 else if (name.equals("reasonCode")) { 1449 return addReasonCode(); 1450 } 1451 else if (name.equals("reasonReference")) { 1452 return addReasonReference(); 1453 } 1454 else if (name.equals("note")) { 1455 return addNote(); 1456 } 1457 else if (name.equals("dosage")) { 1458 return addDosage(); 1459 } 1460 else 1461 return super.addChild(name); 1462 } 1463 1464 public String fhirType() { 1465 return "MedicationStatement"; 1466 1467 } 1468 1469 public MedicationStatement copy() { 1470 MedicationStatement dst = new MedicationStatement(); 1471 copyValues(dst); 1472 return dst; 1473 } 1474 1475 public void copyValues(MedicationStatement dst) { 1476 super.copyValues(dst); 1477 if (identifier != null) { 1478 dst.identifier = new ArrayList<Identifier>(); 1479 for (Identifier i : identifier) 1480 dst.identifier.add(i.copy()); 1481 }; 1482 if (basedOn != null) { 1483 dst.basedOn = new ArrayList<Reference>(); 1484 for (Reference i : basedOn) 1485 dst.basedOn.add(i.copy()); 1486 }; 1487 if (partOf != null) { 1488 dst.partOf = new ArrayList<Reference>(); 1489 for (Reference i : partOf) 1490 dst.partOf.add(i.copy()); 1491 }; 1492 dst.status = status == null ? null : status.copy(); 1493 if (statusReason != null) { 1494 dst.statusReason = new ArrayList<CodeableConcept>(); 1495 for (CodeableConcept i : statusReason) 1496 dst.statusReason.add(i.copy()); 1497 }; 1498 dst.category = category == null ? null : category.copy(); 1499 dst.medication = medication == null ? null : medication.copy(); 1500 dst.subject = subject == null ? null : subject.copy(); 1501 dst.context = context == null ? null : context.copy(); 1502 dst.effective = effective == null ? null : effective.copy(); 1503 dst.dateAsserted = dateAsserted == null ? null : dateAsserted.copy(); 1504 dst.informationSource = informationSource == null ? null : informationSource.copy(); 1505 if (derivedFrom != null) { 1506 dst.derivedFrom = new ArrayList<Reference>(); 1507 for (Reference i : derivedFrom) 1508 dst.derivedFrom.add(i.copy()); 1509 }; 1510 if (reasonCode != null) { 1511 dst.reasonCode = new ArrayList<CodeableConcept>(); 1512 for (CodeableConcept i : reasonCode) 1513 dst.reasonCode.add(i.copy()); 1514 }; 1515 if (reasonReference != null) { 1516 dst.reasonReference = new ArrayList<Reference>(); 1517 for (Reference i : reasonReference) 1518 dst.reasonReference.add(i.copy()); 1519 }; 1520 if (note != null) { 1521 dst.note = new ArrayList<Annotation>(); 1522 for (Annotation i : note) 1523 dst.note.add(i.copy()); 1524 }; 1525 if (dosage != null) { 1526 dst.dosage = new ArrayList<Dosage>(); 1527 for (Dosage i : dosage) 1528 dst.dosage.add(i.copy()); 1529 }; 1530 } 1531 1532 protected MedicationStatement typedCopy() { 1533 return copy(); 1534 } 1535 1536 @Override 1537 public boolean equalsDeep(Base other_) { 1538 if (!super.equalsDeep(other_)) 1539 return false; 1540 if (!(other_ instanceof MedicationStatement)) 1541 return false; 1542 MedicationStatement o = (MedicationStatement) other_; 1543 return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(partOf, o.partOf, true) 1544 && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true) && compareDeep(category, o.category, true) 1545 && compareDeep(medication, o.medication, true) && compareDeep(subject, o.subject, true) && compareDeep(context, o.context, true) 1546 && compareDeep(effective, o.effective, true) && compareDeep(dateAsserted, o.dateAsserted, true) 1547 && compareDeep(informationSource, o.informationSource, true) && compareDeep(derivedFrom, o.derivedFrom, true) 1548 && compareDeep(reasonCode, o.reasonCode, true) && compareDeep(reasonReference, o.reasonReference, true) 1549 && compareDeep(note, o.note, true) && compareDeep(dosage, o.dosage, true); 1550 } 1551 1552 @Override 1553 public boolean equalsShallow(Base other_) { 1554 if (!super.equalsShallow(other_)) 1555 return false; 1556 if (!(other_ instanceof MedicationStatement)) 1557 return false; 1558 MedicationStatement o = (MedicationStatement) other_; 1559 return compareValues(status, o.status, true) && compareValues(dateAsserted, o.dateAsserted, true); 1560 } 1561 1562 public boolean isEmpty() { 1563 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, partOf 1564 , status, statusReason, category, medication, subject, context, effective, dateAsserted 1565 , informationSource, derivedFrom, reasonCode, reasonReference, note, dosage); 1566 } 1567 1568 @Override 1569 public ResourceType getResourceType() { 1570 return ResourceType.MedicationStatement; 1571 } 1572 1573 /** 1574 * Search parameter: <b>category</b> 1575 * <p> 1576 * Description: <b>Returns statements of this category of medicationstatement</b><br> 1577 * Type: <b>token</b><br> 1578 * Path: <b>MedicationStatement.category</b><br> 1579 * </p> 1580 */ 1581 @SearchParamDefinition(name="category", path="MedicationStatement.category", description="Returns statements of this category of medicationstatement", type="token" ) 1582 public static final String SP_CATEGORY = "category"; 1583 /** 1584 * <b>Fluent Client</b> search parameter constant for <b>category</b> 1585 * <p> 1586 * Description: <b>Returns statements of this category of medicationstatement</b><br> 1587 * Type: <b>token</b><br> 1588 * Path: <b>MedicationStatement.category</b><br> 1589 * </p> 1590 */ 1591 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY); 1592 1593 /** 1594 * Search parameter: <b>context</b> 1595 * <p> 1596 * Description: <b>Returns statements for a specific context (episode or episode of Care).</b><br> 1597 * Type: <b>reference</b><br> 1598 * Path: <b>MedicationStatement.context</b><br> 1599 * </p> 1600 */ 1601 @SearchParamDefinition(name="context", path="MedicationStatement.context", description="Returns statements for a specific context (episode or episode of Care).", type="reference", target={Encounter.class, EpisodeOfCare.class } ) 1602 public static final String SP_CONTEXT = "context"; 1603 /** 1604 * <b>Fluent Client</b> search parameter constant for <b>context</b> 1605 * <p> 1606 * Description: <b>Returns statements for a specific context (episode or episode of Care).</b><br> 1607 * Type: <b>reference</b><br> 1608 * Path: <b>MedicationStatement.context</b><br> 1609 * </p> 1610 */ 1611 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONTEXT); 1612 1613/** 1614 * Constant for fluent queries to be used to add include statements. Specifies 1615 * the path value of "<b>MedicationStatement:context</b>". 1616 */ 1617 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONTEXT = new ca.uhn.fhir.model.api.Include("MedicationStatement:context").toLocked(); 1618 1619 /** 1620 * Search parameter: <b>effective</b> 1621 * <p> 1622 * Description: <b>Date when patient was taking (or not taking) the medication</b><br> 1623 * Type: <b>date</b><br> 1624 * Path: <b>MedicationStatement.effective</b><br> 1625 * </p> 1626 */ 1627 @SearchParamDefinition(name="effective", path="MedicationStatement.effective", description="Date when patient was taking (or not taking) the medication", type="date" ) 1628 public static final String SP_EFFECTIVE = "effective"; 1629 /** 1630 * <b>Fluent Client</b> search parameter constant for <b>effective</b> 1631 * <p> 1632 * Description: <b>Date when patient was taking (or not taking) the medication</b><br> 1633 * Type: <b>date</b><br> 1634 * Path: <b>MedicationStatement.effective</b><br> 1635 * </p> 1636 */ 1637 public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EFFECTIVE); 1638 1639 /** 1640 * Search parameter: <b>part-of</b> 1641 * <p> 1642 * Description: <b>Returns statements that are part of another event.</b><br> 1643 * Type: <b>reference</b><br> 1644 * Path: <b>MedicationStatement.partOf</b><br> 1645 * </p> 1646 */ 1647 @SearchParamDefinition(name="part-of", path="MedicationStatement.partOf", description="Returns statements that are part of another event.", type="reference", target={MedicationAdministration.class, MedicationDispense.class, MedicationStatement.class, Observation.class, Procedure.class } ) 1648 public static final String SP_PART_OF = "part-of"; 1649 /** 1650 * <b>Fluent Client</b> search parameter constant for <b>part-of</b> 1651 * <p> 1652 * Description: <b>Returns statements that are part of another event.</b><br> 1653 * Type: <b>reference</b><br> 1654 * Path: <b>MedicationStatement.partOf</b><br> 1655 * </p> 1656 */ 1657 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PART_OF); 1658 1659/** 1660 * Constant for fluent queries to be used to add include statements. Specifies 1661 * the path value of "<b>MedicationStatement:part-of</b>". 1662 */ 1663 public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include("MedicationStatement:part-of").toLocked(); 1664 1665 /** 1666 * Search parameter: <b>source</b> 1667 * <p> 1668 * Description: <b>Who or where the information in the statement came from</b><br> 1669 * Type: <b>reference</b><br> 1670 * Path: <b>MedicationStatement.informationSource</b><br> 1671 * </p> 1672 */ 1673 @SearchParamDefinition(name="source", path="MedicationStatement.informationSource", description="Who or where the information in the statement came from", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 1674 public static final String SP_SOURCE = "source"; 1675 /** 1676 * <b>Fluent Client</b> search parameter constant for <b>source</b> 1677 * <p> 1678 * Description: <b>Who or where the information in the statement came from</b><br> 1679 * Type: <b>reference</b><br> 1680 * Path: <b>MedicationStatement.informationSource</b><br> 1681 * </p> 1682 */ 1683 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SOURCE); 1684 1685/** 1686 * Constant for fluent queries to be used to add include statements. Specifies 1687 * the path value of "<b>MedicationStatement:source</b>". 1688 */ 1689 public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("MedicationStatement:source").toLocked(); 1690 1691 /** 1692 * Search parameter: <b>subject</b> 1693 * <p> 1694 * Description: <b>The identity of a patient, animal or group to list statements for</b><br> 1695 * Type: <b>reference</b><br> 1696 * Path: <b>MedicationStatement.subject</b><br> 1697 * </p> 1698 */ 1699 @SearchParamDefinition(name="subject", path="MedicationStatement.subject", description="The identity of a patient, animal or group to list statements for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Group.class, Patient.class } ) 1700 public static final String SP_SUBJECT = "subject"; 1701 /** 1702 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 1703 * <p> 1704 * Description: <b>The identity of a patient, animal or group to list statements for</b><br> 1705 * Type: <b>reference</b><br> 1706 * Path: <b>MedicationStatement.subject</b><br> 1707 * </p> 1708 */ 1709 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 1710 1711/** 1712 * Constant for fluent queries to be used to add include statements. Specifies 1713 * the path value of "<b>MedicationStatement:subject</b>". 1714 */ 1715 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("MedicationStatement:subject").toLocked(); 1716 1717 /** 1718 * Search parameter: <b>code</b> 1719 * <p> 1720 * Description: <b>Multiple Resources: 1721 1722* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance 1723* [Condition](condition.html): Code for the condition 1724* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered 1725* [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 1726* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code 1727* [List](list.html): What the purpose of this list is 1728* [Medication](medication.html): Returns medications for a specific code 1729* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code 1730* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code 1731* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code 1732* [MedicationStatement](medicationstatement.html): Return statements of this medication code 1733* [Observation](observation.html): The code of the observation type 1734* [Procedure](procedure.html): A code to identify a procedure 1735* [ServiceRequest](servicerequest.html): What is being requested/ordered 1736</b><br> 1737 * Type: <b>token</b><br> 1738 * Path: <b>AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code</b><br> 1739 * </p> 1740 */ 1741 @SearchParamDefinition(name="code", path="AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance\r\n* [Condition](condition.html): Code for the condition\r\n* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered\r\n* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code\r\n* [List](list.html): What the purpose of this list is\r\n* [Medication](medication.html): Returns medications for a specific code\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication code\r\n* [Observation](observation.html): The code of the observation type\r\n* [Procedure](procedure.html): A code to identify a procedure\r\n* [ServiceRequest](servicerequest.html): What is being requested/ordered\r\n", type="token" ) 1742 public static final String SP_CODE = "code"; 1743 /** 1744 * <b>Fluent Client</b> search parameter constant for <b>code</b> 1745 * <p> 1746 * Description: <b>Multiple Resources: 1747 1748* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance 1749* [Condition](condition.html): Code for the condition 1750* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered 1751* [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 1752* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code 1753* [List](list.html): What the purpose of this list is 1754* [Medication](medication.html): Returns medications for a specific code 1755* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code 1756* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code 1757* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code 1758* [MedicationStatement](medicationstatement.html): Return statements of this medication code 1759* [Observation](observation.html): The code of the observation type 1760* [Procedure](procedure.html): A code to identify a procedure 1761* [ServiceRequest](servicerequest.html): What is being requested/ordered 1762</b><br> 1763 * Type: <b>token</b><br> 1764 * Path: <b>AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code</b><br> 1765 * </p> 1766 */ 1767 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 1768 1769 /** 1770 * Search parameter: <b>identifier</b> 1771 * <p> 1772 * Description: <b>Multiple Resources: 1773 1774* [AllergyIntolerance](allergyintolerance.html): External ids for this item 1775* [CarePlan](careplan.html): External Ids for this plan 1776* [CareTeam](careteam.html): External Ids for this team 1777* [Composition](composition.html): Version-independent identifier for the Composition 1778* [Condition](condition.html): A unique identifier of the condition record 1779* [Consent](consent.html): Identifier for this record (external references) 1780* [DetectedIssue](detectedissue.html): Unique id for the detected issue 1781* [DeviceRequest](devicerequest.html): Business identifier for request/order 1782* [DiagnosticReport](diagnosticreport.html): An identifier for the report 1783* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents 1784* [DocumentReference](documentreference.html): Master Version Specific Identifier 1785* [Encounter](encounter.html): Identifier(s) by which this encounter is known 1786* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 1787* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 1788* [Goal](goal.html): External Ids for this goal 1789* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number 1790* [Immunization](immunization.html): Business identifier 1791* [List](list.html): Business identifier 1792* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 1793* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 1794* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 1795* [MedicationStatement](medicationstatement.html): Return statements with this external identifier 1796* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 1797* [Observation](observation.html): The unique id for a particular observation 1798* [Procedure](procedure.html): A unique identifier for a procedure 1799* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 1800* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 1801* [SupplyDelivery](supplydelivery.html): External identifier 1802* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 1803* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 1804</b><br> 1805 * Type: <b>token</b><br> 1806 * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br> 1807 * </p> 1808 */ 1809 @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\r\n* [DocumentReference](documentreference.html): Master Version Specific Identifier\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) 1810 public static final String SP_IDENTIFIER = "identifier"; 1811 /** 1812 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1813 * <p> 1814 * Description: <b>Multiple Resources: 1815 1816* [AllergyIntolerance](allergyintolerance.html): External ids for this item 1817* [CarePlan](careplan.html): External Ids for this plan 1818* [CareTeam](careteam.html): External Ids for this team 1819* [Composition](composition.html): Version-independent identifier for the Composition 1820* [Condition](condition.html): A unique identifier of the condition record 1821* [Consent](consent.html): Identifier for this record (external references) 1822* [DetectedIssue](detectedissue.html): Unique id for the detected issue 1823* [DeviceRequest](devicerequest.html): Business identifier for request/order 1824* [DiagnosticReport](diagnosticreport.html): An identifier for the report 1825* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents 1826* [DocumentReference](documentreference.html): Master Version Specific Identifier 1827* [Encounter](encounter.html): Identifier(s) by which this encounter is known 1828* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 1829* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 1830* [Goal](goal.html): External Ids for this goal 1831* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number 1832* [Immunization](immunization.html): Business identifier 1833* [List](list.html): Business identifier 1834* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 1835* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 1836* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 1837* [MedicationStatement](medicationstatement.html): Return statements with this external identifier 1838* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 1839* [Observation](observation.html): The unique id for a particular observation 1840* [Procedure](procedure.html): A unique identifier for a procedure 1841* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 1842* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 1843* [SupplyDelivery](supplydelivery.html): External identifier 1844* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 1845* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 1846</b><br> 1847 * Type: <b>token</b><br> 1848 * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br> 1849 * </p> 1850 */ 1851 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1852 1853 /** 1854 * Search parameter: <b>patient</b> 1855 * <p> 1856 * Description: <b>Multiple Resources: 1857 1858* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 1859* [CarePlan](careplan.html): Who the care plan is for 1860* [CareTeam](careteam.html): Who care team is for 1861* [ClinicalImpression](clinicalimpression.html): Patient or group assessed 1862* [Composition](composition.html): Who and/or what the composition is about 1863* [Condition](condition.html): Who has the condition? 1864* [Consent](consent.html): Who the consent applies to 1865* [DetectedIssue](detectedissue.html): Associated patient 1866* [DeviceRequest](devicerequest.html): Individual the service is ordered for 1867* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient 1868* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 1869* [DocumentManifest](documentmanifest.html): The subject of the set of documents 1870* [DocumentReference](documentreference.html): Who/what is the subject of the document 1871* [Encounter](encounter.html): The patient or group present at the encounter 1872* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 1873* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 1874* [Flag](flag.html): The identity of a subject to list flags for 1875* [Goal](goal.html): Who this goal is intended for 1876* [ImagingStudy](imagingstudy.html): Who the study is about 1877* [Immunization](immunization.html): The patient for the vaccination record 1878* [List](list.html): If all resources have the same subject 1879* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 1880* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 1881* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 1882* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. 1883* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement 1884* [Observation](observation.html): The subject that the observation is about (if patient) 1885* [Procedure](procedure.html): Search by subject - a patient 1886* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 1887* [ServiceRequest](servicerequest.html): Search by subject - a patient 1888* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 1889* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 1890</b><br> 1891 * Type: <b>reference</b><br> 1892 * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject.where(resolve() is Patient) | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br> 1893 * </p> 1894 */ 1895 @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject.where(resolve() is Patient) | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient or group assessed\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient or group present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Media.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchDefinition.class, ResearchElementDefinition.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } ) 1896 public static final String SP_PATIENT = "patient"; 1897 /** 1898 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 1899 * <p> 1900 * Description: <b>Multiple Resources: 1901 1902* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 1903* [CarePlan](careplan.html): Who the care plan is for 1904* [CareTeam](careteam.html): Who care team is for 1905* [ClinicalImpression](clinicalimpression.html): Patient or group assessed 1906* [Composition](composition.html): Who and/or what the composition is about 1907* [Condition](condition.html): Who has the condition? 1908* [Consent](consent.html): Who the consent applies to 1909* [DetectedIssue](detectedissue.html): Associated patient 1910* [DeviceRequest](devicerequest.html): Individual the service is ordered for 1911* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient 1912* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 1913* [DocumentManifest](documentmanifest.html): The subject of the set of documents 1914* [DocumentReference](documentreference.html): Who/what is the subject of the document 1915* [Encounter](encounter.html): The patient or group present at the encounter 1916* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 1917* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 1918* [Flag](flag.html): The identity of a subject to list flags for 1919* [Goal](goal.html): Who this goal is intended for 1920* [ImagingStudy](imagingstudy.html): Who the study is about 1921* [Immunization](immunization.html): The patient for the vaccination record 1922* [List](list.html): If all resources have the same subject 1923* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 1924* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 1925* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 1926* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. 1927* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement 1928* [Observation](observation.html): The subject that the observation is about (if patient) 1929* [Procedure](procedure.html): Search by subject - a patient 1930* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 1931* [ServiceRequest](servicerequest.html): Search by subject - a patient 1932* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 1933* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 1934</b><br> 1935 * Type: <b>reference</b><br> 1936 * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject.where(resolve() is Patient) | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br> 1937 * </p> 1938 */ 1939 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 1940 1941/** 1942 * Constant for fluent queries to be used to add include statements. Specifies 1943 * the path value of "<b>MedicationStatement:patient</b>". 1944 */ 1945 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("MedicationStatement:patient").toLocked(); 1946 1947 /** 1948 * Search parameter: <b>medication</b> 1949 * <p> 1950 * Description: <b>Multiple Resources: 1951 1952* [MedicationAdministration](medicationadministration.html): Return administrations of this medication resource 1953* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource 1954* [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference 1955* [MedicationStatement](medicationstatement.html): Return statements of this medication reference 1956</b><br> 1957 * Type: <b>reference</b><br> 1958 * Path: <b>(MedicationAdministration.medication as Reference) | (MedicationDispense.medication as Reference) | (MedicationRequest.medication as Reference) | (MedicationStatement.medication as Reference)</b><br> 1959 * </p> 1960 */ 1961 @SearchParamDefinition(name="medication", path="(MedicationAdministration.medication as Reference) | (MedicationDispense.medication as Reference) | (MedicationRequest.medication as Reference) | (MedicationStatement.medication as Reference)", description="Multiple Resources: \r\n\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication resource\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication reference\r\n", type="reference", target={Medication.class } ) 1962 public static final String SP_MEDICATION = "medication"; 1963 /** 1964 * <b>Fluent Client</b> search parameter constant for <b>medication</b> 1965 * <p> 1966 * Description: <b>Multiple Resources: 1967 1968* [MedicationAdministration](medicationadministration.html): Return administrations of this medication resource 1969* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource 1970* [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference 1971* [MedicationStatement](medicationstatement.html): Return statements of this medication reference 1972</b><br> 1973 * Type: <b>reference</b><br> 1974 * Path: <b>(MedicationAdministration.medication as Reference) | (MedicationDispense.medication as Reference) | (MedicationRequest.medication as Reference) | (MedicationStatement.medication as Reference)</b><br> 1975 * </p> 1976 */ 1977 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MEDICATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MEDICATION); 1978 1979/** 1980 * Constant for fluent queries to be used to add include statements. Specifies 1981 * the path value of "<b>MedicationStatement:medication</b>". 1982 */ 1983 public static final ca.uhn.fhir.model.api.Include INCLUDE_MEDICATION = new ca.uhn.fhir.model.api.Include("MedicationStatement:medication").toLocked(); 1984 1985 /** 1986 * Search parameter: <b>status</b> 1987 * <p> 1988 * Description: <b>Multiple Resources: 1989 1990* [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) 1991* [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status 1992* [MedicationRequest](medicationrequest.html): Status of the prescription 1993* [MedicationStatement](medicationstatement.html): Return statements that match the given status 1994</b><br> 1995 * Type: <b>token</b><br> 1996 * Path: <b>MedicationAdministration.status | MedicationDispense.status | MedicationRequest.status | MedicationStatement.status</b><br> 1997 * </p> 1998 */ 1999 @SearchParamDefinition(name="status", path="MedicationAdministration.status | MedicationDispense.status | MedicationRequest.status | MedicationStatement.status", description="Multiple Resources: \r\n\r\n* [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified)\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status\r\n* [MedicationRequest](medicationrequest.html): Status of the prescription\r\n* [MedicationStatement](medicationstatement.html): Return statements that match the given status\r\n", type="token" ) 2000 public static final String SP_STATUS = "status"; 2001 /** 2002 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2003 * <p> 2004 * Description: <b>Multiple Resources: 2005 2006* [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) 2007* [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status 2008* [MedicationRequest](medicationrequest.html): Status of the prescription 2009* [MedicationStatement](medicationstatement.html): Return statements that match the given status 2010</b><br> 2011 * Type: <b>token</b><br> 2012 * Path: <b>MedicationAdministration.status | MedicationDispense.status | MedicationRequest.status | MedicationStatement.status</b><br> 2013 * </p> 2014 */ 2015 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2016 2017 2018} 2019