001package org.hl7.fhir.r5.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 Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.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.r5.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 * This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use. 052 */ 053@ResourceDef(name="Medication", profile="http://hl7.org/fhir/StructureDefinition/Medication") 054public class Medication extends DomainResource { 055 056 public enum MedicationStatusCodes { 057 /** 058 * The medication record is current and is appropriate for reference in new instances. 059 */ 060 ACTIVE, 061 /** 062 * The medication record is not current and is not is appropriate for reference in new instances. 063 */ 064 INACTIVE, 065 /** 066 * The medication record was created erroneously and is not appropriated for reference in new instances. 067 */ 068 ENTEREDINERROR, 069 /** 070 * added to help the parsers with the generic types 071 */ 072 NULL; 073 public static MedicationStatusCodes fromCode(String codeString) throws FHIRException { 074 if (codeString == null || "".equals(codeString)) 075 return null; 076 if ("active".equals(codeString)) 077 return ACTIVE; 078 if ("inactive".equals(codeString)) 079 return INACTIVE; 080 if ("entered-in-error".equals(codeString)) 081 return ENTEREDINERROR; 082 if (Configuration.isAcceptInvalidEnums()) 083 return null; 084 else 085 throw new FHIRException("Unknown MedicationStatusCodes code '"+codeString+"'"); 086 } 087 public String toCode() { 088 switch (this) { 089 case ACTIVE: return "active"; 090 case INACTIVE: return "inactive"; 091 case ENTEREDINERROR: return "entered-in-error"; 092 default: return "?"; 093 } 094 } 095 public String getSystem() { 096 switch (this) { 097 case ACTIVE: return "http://hl7.org/fhir/CodeSystem/medication-status"; 098 case INACTIVE: return "http://hl7.org/fhir/CodeSystem/medication-status"; 099 case ENTEREDINERROR: return "http://hl7.org/fhir/CodeSystem/medication-status"; 100 default: return "?"; 101 } 102 } 103 public String getDefinition() { 104 switch (this) { 105 case ACTIVE: return "The medication record is current and is appropriate for reference in new instances."; 106 case INACTIVE: return "The medication record is not current and is not is appropriate for reference in new instances."; 107 case ENTEREDINERROR: return "The medication record was created erroneously and is not appropriated for reference in new instances."; 108 default: return "?"; 109 } 110 } 111 public String getDisplay() { 112 switch (this) { 113 case ACTIVE: return "Active"; 114 case INACTIVE: return "Inactive"; 115 case ENTEREDINERROR: return "Entered in Error"; 116 default: return "?"; 117 } 118 } 119 } 120 121 public static class MedicationStatusCodesEnumFactory implements EnumFactory<MedicationStatusCodes> { 122 public MedicationStatusCodes fromCode(String codeString) throws IllegalArgumentException { 123 if (codeString == null || "".equals(codeString)) 124 if (codeString == null || "".equals(codeString)) 125 return null; 126 if ("active".equals(codeString)) 127 return MedicationStatusCodes.ACTIVE; 128 if ("inactive".equals(codeString)) 129 return MedicationStatusCodes.INACTIVE; 130 if ("entered-in-error".equals(codeString)) 131 return MedicationStatusCodes.ENTEREDINERROR; 132 throw new IllegalArgumentException("Unknown MedicationStatusCodes code '"+codeString+"'"); 133 } 134 public Enumeration<MedicationStatusCodes> fromType(Base code) throws FHIRException { 135 if (code == null) 136 return null; 137 if (code.isEmpty()) 138 return new Enumeration<MedicationStatusCodes>(this); 139 String codeString = ((PrimitiveType) code).asStringValue(); 140 if (codeString == null || "".equals(codeString)) 141 return null; 142 if ("active".equals(codeString)) 143 return new Enumeration<MedicationStatusCodes>(this, MedicationStatusCodes.ACTIVE); 144 if ("inactive".equals(codeString)) 145 return new Enumeration<MedicationStatusCodes>(this, MedicationStatusCodes.INACTIVE); 146 if ("entered-in-error".equals(codeString)) 147 return new Enumeration<MedicationStatusCodes>(this, MedicationStatusCodes.ENTEREDINERROR); 148 throw new FHIRException("Unknown MedicationStatusCodes code '"+codeString+"'"); 149 } 150 public String toCode(MedicationStatusCodes code) { 151 if (code == MedicationStatusCodes.ACTIVE) 152 return "active"; 153 if (code == MedicationStatusCodes.INACTIVE) 154 return "inactive"; 155 if (code == MedicationStatusCodes.ENTEREDINERROR) 156 return "entered-in-error"; 157 return "?"; 158 } 159 public String toSystem(MedicationStatusCodes code) { 160 return code.getSystem(); 161 } 162 } 163 164 @Block() 165 public static class MedicationIngredientComponent extends BackboneElement implements IBaseBackboneElement { 166 /** 167 * The ingredient (substance or medication) that the ingredient.strength relates to. This is represented as a concept from a code system or described in another resource (Substance or Medication). 168 */ 169 @Child(name = "item", type = {CodeableReference.class}, order=1, min=1, max=1, modifier=false, summary=false) 170 @Description(shortDefinition="The ingredient (substance or medication) that the ingredient.strength relates to", formalDefinition="The ingredient (substance or medication) that the ingredient.strength relates to. This is represented as a concept from a code system or described in another resource (Substance or Medication)." ) 171 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-codes") 172 protected CodeableReference item; 173 174 /** 175 * Indication of whether this ingredient affects the therapeutic action of the drug. 176 */ 177 @Child(name = "isActive", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 178 @Description(shortDefinition="Active ingredient indicator", formalDefinition="Indication of whether this ingredient affects the therapeutic action of the drug." ) 179 protected BooleanType isActive; 180 181 /** 182 * Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet. 183 */ 184 @Child(name = "strength", type = {Ratio.class, CodeableConcept.class, Quantity.class}, order=3, min=0, max=1, modifier=false, summary=false) 185 @Description(shortDefinition="Quantity of ingredient present", formalDefinition="Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet." ) 186 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-ingredientstrength") 187 protected DataType strength; 188 189 private static final long serialVersionUID = -979760018L; 190 191 /** 192 * Constructor 193 */ 194 public MedicationIngredientComponent() { 195 super(); 196 } 197 198 /** 199 * Constructor 200 */ 201 public MedicationIngredientComponent(CodeableReference item) { 202 super(); 203 this.setItem(item); 204 } 205 206 /** 207 * @return {@link #item} (The ingredient (substance or medication) that the ingredient.strength relates to. This is represented as a concept from a code system or described in another resource (Substance or Medication).) 208 */ 209 public CodeableReference getItem() { 210 if (this.item == null) 211 if (Configuration.errorOnAutoCreate()) 212 throw new Error("Attempt to auto-create MedicationIngredientComponent.item"); 213 else if (Configuration.doAutoCreate()) 214 this.item = new CodeableReference(); // cc 215 return this.item; 216 } 217 218 public boolean hasItem() { 219 return this.item != null && !this.item.isEmpty(); 220 } 221 222 /** 223 * @param value {@link #item} (The ingredient (substance or medication) that the ingredient.strength relates to. This is represented as a concept from a code system or described in another resource (Substance or Medication).) 224 */ 225 public MedicationIngredientComponent setItem(CodeableReference value) { 226 this.item = value; 227 return this; 228 } 229 230 /** 231 * @return {@link #isActive} (Indication of whether this ingredient affects the therapeutic action of the drug.). This is the underlying object with id, value and extensions. The accessor "getIsActive" gives direct access to the value 232 */ 233 public BooleanType getIsActiveElement() { 234 if (this.isActive == null) 235 if (Configuration.errorOnAutoCreate()) 236 throw new Error("Attempt to auto-create MedicationIngredientComponent.isActive"); 237 else if (Configuration.doAutoCreate()) 238 this.isActive = new BooleanType(); // bb 239 return this.isActive; 240 } 241 242 public boolean hasIsActiveElement() { 243 return this.isActive != null && !this.isActive.isEmpty(); 244 } 245 246 public boolean hasIsActive() { 247 return this.isActive != null && !this.isActive.isEmpty(); 248 } 249 250 /** 251 * @param value {@link #isActive} (Indication of whether this ingredient affects the therapeutic action of the drug.). This is the underlying object with id, value and extensions. The accessor "getIsActive" gives direct access to the value 252 */ 253 public MedicationIngredientComponent setIsActiveElement(BooleanType value) { 254 this.isActive = value; 255 return this; 256 } 257 258 /** 259 * @return Indication of whether this ingredient affects the therapeutic action of the drug. 260 */ 261 public boolean getIsActive() { 262 return this.isActive == null || this.isActive.isEmpty() ? false : this.isActive.getValue(); 263 } 264 265 /** 266 * @param value Indication of whether this ingredient affects the therapeutic action of the drug. 267 */ 268 public MedicationIngredientComponent setIsActive(boolean value) { 269 if (this.isActive == null) 270 this.isActive = new BooleanType(); 271 this.isActive.setValue(value); 272 return this; 273 } 274 275 /** 276 * @return {@link #strength} (Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.) 277 */ 278 public DataType getStrength() { 279 return this.strength; 280 } 281 282 /** 283 * @return {@link #strength} (Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.) 284 */ 285 public Ratio getStrengthRatio() throws FHIRException { 286 if (this.strength == null) 287 this.strength = new Ratio(); 288 if (!(this.strength instanceof Ratio)) 289 throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.strength.getClass().getName()+" was encountered"); 290 return (Ratio) this.strength; 291 } 292 293 public boolean hasStrengthRatio() { 294 return this != null && this.strength instanceof Ratio; 295 } 296 297 /** 298 * @return {@link #strength} (Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.) 299 */ 300 public CodeableConcept getStrengthCodeableConcept() throws FHIRException { 301 if (this.strength == null) 302 this.strength = new CodeableConcept(); 303 if (!(this.strength instanceof CodeableConcept)) 304 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.strength.getClass().getName()+" was encountered"); 305 return (CodeableConcept) this.strength; 306 } 307 308 public boolean hasStrengthCodeableConcept() { 309 return this != null && this.strength instanceof CodeableConcept; 310 } 311 312 /** 313 * @return {@link #strength} (Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.) 314 */ 315 public Quantity getStrengthQuantity() throws FHIRException { 316 if (this.strength == null) 317 this.strength = new Quantity(); 318 if (!(this.strength instanceof Quantity)) 319 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.strength.getClass().getName()+" was encountered"); 320 return (Quantity) this.strength; 321 } 322 323 public boolean hasStrengthQuantity() { 324 return this != null && this.strength instanceof Quantity; 325 } 326 327 public boolean hasStrength() { 328 return this.strength != null && !this.strength.isEmpty(); 329 } 330 331 /** 332 * @param value {@link #strength} (Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.) 333 */ 334 public MedicationIngredientComponent setStrength(DataType value) { 335 if (value != null && !(value instanceof Ratio || value instanceof CodeableConcept || value instanceof Quantity)) 336 throw new Error("Not the right type for Medication.ingredient.strength[x]: "+value.fhirType()); 337 this.strength = value; 338 return this; 339 } 340 341 protected void listChildren(List<Property> children) { 342 super.listChildren(children); 343 children.add(new Property("item", "CodeableReference(Substance|Medication)", "The ingredient (substance or medication) that the ingredient.strength relates to. This is represented as a concept from a code system or described in another resource (Substance or Medication).", 0, 1, item)); 344 children.add(new Property("isActive", "boolean", "Indication of whether this ingredient affects the therapeutic action of the drug.", 0, 1, isActive)); 345 children.add(new Property("strength[x]", "Ratio|CodeableConcept|Quantity", "Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.", 0, 1, strength)); 346 } 347 348 @Override 349 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 350 switch (_hash) { 351 case 3242771: /*item*/ return new Property("item", "CodeableReference(Substance|Medication)", "The ingredient (substance or medication) that the ingredient.strength relates to. This is represented as a concept from a code system or described in another resource (Substance or Medication).", 0, 1, item); 352 case -748916528: /*isActive*/ return new Property("isActive", "boolean", "Indication of whether this ingredient affects the therapeutic action of the drug.", 0, 1, isActive); 353 case 127377567: /*strength[x]*/ return new Property("strength[x]", "Ratio|CodeableConcept|Quantity", "Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.", 0, 1, strength); 354 case 1791316033: /*strength*/ return new Property("strength[x]", "Ratio|CodeableConcept|Quantity", "Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.", 0, 1, strength); 355 case 2141786186: /*strengthRatio*/ return new Property("strength[x]", "Ratio", "Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.", 0, 1, strength); 356 case -1455903456: /*strengthCodeableConcept*/ return new Property("strength[x]", "CodeableConcept", "Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.", 0, 1, strength); 357 case -1793570836: /*strengthQuantity*/ return new Property("strength[x]", "Quantity", "Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet but can also be expressed a quantity when the denominator is assumed to be 1 tablet.", 0, 1, strength); 358 default: return super.getNamedProperty(_hash, _name, _checkValid); 359 } 360 361 } 362 363 @Override 364 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 365 switch (hash) { 366 case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // CodeableReference 367 case -748916528: /*isActive*/ return this.isActive == null ? new Base[0] : new Base[] {this.isActive}; // BooleanType 368 case 1791316033: /*strength*/ return this.strength == null ? new Base[0] : new Base[] {this.strength}; // DataType 369 default: return super.getProperty(hash, name, checkValid); 370 } 371 372 } 373 374 @Override 375 public Base setProperty(int hash, String name, Base value) throws FHIRException { 376 switch (hash) { 377 case 3242771: // item 378 this.item = TypeConvertor.castToCodeableReference(value); // CodeableReference 379 return value; 380 case -748916528: // isActive 381 this.isActive = TypeConvertor.castToBoolean(value); // BooleanType 382 return value; 383 case 1791316033: // strength 384 this.strength = TypeConvertor.castToType(value); // DataType 385 return value; 386 default: return super.setProperty(hash, name, value); 387 } 388 389 } 390 391 @Override 392 public Base setProperty(String name, Base value) throws FHIRException { 393 if (name.equals("item")) { 394 this.item = TypeConvertor.castToCodeableReference(value); // CodeableReference 395 } else if (name.equals("isActive")) { 396 this.isActive = TypeConvertor.castToBoolean(value); // BooleanType 397 } else if (name.equals("strength[x]")) { 398 this.strength = TypeConvertor.castToType(value); // DataType 399 } else 400 return super.setProperty(name, value); 401 return value; 402 } 403 404 @Override 405 public Base makeProperty(int hash, String name) throws FHIRException { 406 switch (hash) { 407 case 3242771: return getItem(); 408 case -748916528: return getIsActiveElement(); 409 case 127377567: return getStrength(); 410 case 1791316033: return getStrength(); 411 default: return super.makeProperty(hash, name); 412 } 413 414 } 415 416 @Override 417 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 418 switch (hash) { 419 case 3242771: /*item*/ return new String[] {"CodeableReference"}; 420 case -748916528: /*isActive*/ return new String[] {"boolean"}; 421 case 1791316033: /*strength*/ return new String[] {"Ratio", "CodeableConcept", "Quantity"}; 422 default: return super.getTypesForProperty(hash, name); 423 } 424 425 } 426 427 @Override 428 public Base addChild(String name) throws FHIRException { 429 if (name.equals("item")) { 430 this.item = new CodeableReference(); 431 return this.item; 432 } 433 else if (name.equals("isActive")) { 434 throw new FHIRException("Cannot call addChild on a primitive type Medication.ingredient.isActive"); 435 } 436 else if (name.equals("strengthRatio")) { 437 this.strength = new Ratio(); 438 return this.strength; 439 } 440 else if (name.equals("strengthCodeableConcept")) { 441 this.strength = new CodeableConcept(); 442 return this.strength; 443 } 444 else if (name.equals("strengthQuantity")) { 445 this.strength = new Quantity(); 446 return this.strength; 447 } 448 else 449 return super.addChild(name); 450 } 451 452 public MedicationIngredientComponent copy() { 453 MedicationIngredientComponent dst = new MedicationIngredientComponent(); 454 copyValues(dst); 455 return dst; 456 } 457 458 public void copyValues(MedicationIngredientComponent dst) { 459 super.copyValues(dst); 460 dst.item = item == null ? null : item.copy(); 461 dst.isActive = isActive == null ? null : isActive.copy(); 462 dst.strength = strength == null ? null : strength.copy(); 463 } 464 465 @Override 466 public boolean equalsDeep(Base other_) { 467 if (!super.equalsDeep(other_)) 468 return false; 469 if (!(other_ instanceof MedicationIngredientComponent)) 470 return false; 471 MedicationIngredientComponent o = (MedicationIngredientComponent) other_; 472 return compareDeep(item, o.item, true) && compareDeep(isActive, o.isActive, true) && compareDeep(strength, o.strength, true) 473 ; 474 } 475 476 @Override 477 public boolean equalsShallow(Base other_) { 478 if (!super.equalsShallow(other_)) 479 return false; 480 if (!(other_ instanceof MedicationIngredientComponent)) 481 return false; 482 MedicationIngredientComponent o = (MedicationIngredientComponent) other_; 483 return compareValues(isActive, o.isActive, true); 484 } 485 486 public boolean isEmpty() { 487 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(item, isActive, strength 488 ); 489 } 490 491 public String fhirType() { 492 return "Medication.ingredient"; 493 494 } 495 496 } 497 498 @Block() 499 public static class MedicationBatchComponent extends BackboneElement implements IBaseBackboneElement { 500 /** 501 * The assigned lot number of a batch of the specified product. 502 */ 503 @Child(name = "lotNumber", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 504 @Description(shortDefinition="Identifier assigned to batch", formalDefinition="The assigned lot number of a batch of the specified product." ) 505 protected StringType lotNumber; 506 507 /** 508 * When this specific batch of product will expire. 509 */ 510 @Child(name = "expirationDate", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 511 @Description(shortDefinition="When batch will expire", formalDefinition="When this specific batch of product will expire." ) 512 protected DateTimeType expirationDate; 513 514 private static final long serialVersionUID = 1982738755L; 515 516 /** 517 * Constructor 518 */ 519 public MedicationBatchComponent() { 520 super(); 521 } 522 523 /** 524 * @return {@link #lotNumber} (The assigned lot number of a batch of the specified product.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value 525 */ 526 public StringType getLotNumberElement() { 527 if (this.lotNumber == null) 528 if (Configuration.errorOnAutoCreate()) 529 throw new Error("Attempt to auto-create MedicationBatchComponent.lotNumber"); 530 else if (Configuration.doAutoCreate()) 531 this.lotNumber = new StringType(); // bb 532 return this.lotNumber; 533 } 534 535 public boolean hasLotNumberElement() { 536 return this.lotNumber != null && !this.lotNumber.isEmpty(); 537 } 538 539 public boolean hasLotNumber() { 540 return this.lotNumber != null && !this.lotNumber.isEmpty(); 541 } 542 543 /** 544 * @param value {@link #lotNumber} (The assigned lot number of a batch of the specified product.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value 545 */ 546 public MedicationBatchComponent setLotNumberElement(StringType value) { 547 this.lotNumber = value; 548 return this; 549 } 550 551 /** 552 * @return The assigned lot number of a batch of the specified product. 553 */ 554 public String getLotNumber() { 555 return this.lotNumber == null ? null : this.lotNumber.getValue(); 556 } 557 558 /** 559 * @param value The assigned lot number of a batch of the specified product. 560 */ 561 public MedicationBatchComponent setLotNumber(String value) { 562 if (Utilities.noString(value)) 563 this.lotNumber = null; 564 else { 565 if (this.lotNumber == null) 566 this.lotNumber = new StringType(); 567 this.lotNumber.setValue(value); 568 } 569 return this; 570 } 571 572 /** 573 * @return {@link #expirationDate} (When this specific batch of product will expire.). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value 574 */ 575 public DateTimeType getExpirationDateElement() { 576 if (this.expirationDate == null) 577 if (Configuration.errorOnAutoCreate()) 578 throw new Error("Attempt to auto-create MedicationBatchComponent.expirationDate"); 579 else if (Configuration.doAutoCreate()) 580 this.expirationDate = new DateTimeType(); // bb 581 return this.expirationDate; 582 } 583 584 public boolean hasExpirationDateElement() { 585 return this.expirationDate != null && !this.expirationDate.isEmpty(); 586 } 587 588 public boolean hasExpirationDate() { 589 return this.expirationDate != null && !this.expirationDate.isEmpty(); 590 } 591 592 /** 593 * @param value {@link #expirationDate} (When this specific batch of product will expire.). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value 594 */ 595 public MedicationBatchComponent setExpirationDateElement(DateTimeType value) { 596 this.expirationDate = value; 597 return this; 598 } 599 600 /** 601 * @return When this specific batch of product will expire. 602 */ 603 public Date getExpirationDate() { 604 return this.expirationDate == null ? null : this.expirationDate.getValue(); 605 } 606 607 /** 608 * @param value When this specific batch of product will expire. 609 */ 610 public MedicationBatchComponent setExpirationDate(Date value) { 611 if (value == null) 612 this.expirationDate = null; 613 else { 614 if (this.expirationDate == null) 615 this.expirationDate = new DateTimeType(); 616 this.expirationDate.setValue(value); 617 } 618 return this; 619 } 620 621 protected void listChildren(List<Property> children) { 622 super.listChildren(children); 623 children.add(new Property("lotNumber", "string", "The assigned lot number of a batch of the specified product.", 0, 1, lotNumber)); 624 children.add(new Property("expirationDate", "dateTime", "When this specific batch of product will expire.", 0, 1, expirationDate)); 625 } 626 627 @Override 628 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 629 switch (_hash) { 630 case 462547450: /*lotNumber*/ return new Property("lotNumber", "string", "The assigned lot number of a batch of the specified product.", 0, 1, lotNumber); 631 case -668811523: /*expirationDate*/ return new Property("expirationDate", "dateTime", "When this specific batch of product will expire.", 0, 1, expirationDate); 632 default: return super.getNamedProperty(_hash, _name, _checkValid); 633 } 634 635 } 636 637 @Override 638 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 639 switch (hash) { 640 case 462547450: /*lotNumber*/ return this.lotNumber == null ? new Base[0] : new Base[] {this.lotNumber}; // StringType 641 case -668811523: /*expirationDate*/ return this.expirationDate == null ? new Base[0] : new Base[] {this.expirationDate}; // DateTimeType 642 default: return super.getProperty(hash, name, checkValid); 643 } 644 645 } 646 647 @Override 648 public Base setProperty(int hash, String name, Base value) throws FHIRException { 649 switch (hash) { 650 case 462547450: // lotNumber 651 this.lotNumber = TypeConvertor.castToString(value); // StringType 652 return value; 653 case -668811523: // expirationDate 654 this.expirationDate = TypeConvertor.castToDateTime(value); // DateTimeType 655 return value; 656 default: return super.setProperty(hash, name, value); 657 } 658 659 } 660 661 @Override 662 public Base setProperty(String name, Base value) throws FHIRException { 663 if (name.equals("lotNumber")) { 664 this.lotNumber = TypeConvertor.castToString(value); // StringType 665 } else if (name.equals("expirationDate")) { 666 this.expirationDate = TypeConvertor.castToDateTime(value); // DateTimeType 667 } else 668 return super.setProperty(name, value); 669 return value; 670 } 671 672 @Override 673 public Base makeProperty(int hash, String name) throws FHIRException { 674 switch (hash) { 675 case 462547450: return getLotNumberElement(); 676 case -668811523: return getExpirationDateElement(); 677 default: return super.makeProperty(hash, name); 678 } 679 680 } 681 682 @Override 683 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 684 switch (hash) { 685 case 462547450: /*lotNumber*/ return new String[] {"string"}; 686 case -668811523: /*expirationDate*/ return new String[] {"dateTime"}; 687 default: return super.getTypesForProperty(hash, name); 688 } 689 690 } 691 692 @Override 693 public Base addChild(String name) throws FHIRException { 694 if (name.equals("lotNumber")) { 695 throw new FHIRException("Cannot call addChild on a primitive type Medication.batch.lotNumber"); 696 } 697 else if (name.equals("expirationDate")) { 698 throw new FHIRException("Cannot call addChild on a primitive type Medication.batch.expirationDate"); 699 } 700 else 701 return super.addChild(name); 702 } 703 704 public MedicationBatchComponent copy() { 705 MedicationBatchComponent dst = new MedicationBatchComponent(); 706 copyValues(dst); 707 return dst; 708 } 709 710 public void copyValues(MedicationBatchComponent dst) { 711 super.copyValues(dst); 712 dst.lotNumber = lotNumber == null ? null : lotNumber.copy(); 713 dst.expirationDate = expirationDate == null ? null : expirationDate.copy(); 714 } 715 716 @Override 717 public boolean equalsDeep(Base other_) { 718 if (!super.equalsDeep(other_)) 719 return false; 720 if (!(other_ instanceof MedicationBatchComponent)) 721 return false; 722 MedicationBatchComponent o = (MedicationBatchComponent) other_; 723 return compareDeep(lotNumber, o.lotNumber, true) && compareDeep(expirationDate, o.expirationDate, true) 724 ; 725 } 726 727 @Override 728 public boolean equalsShallow(Base other_) { 729 if (!super.equalsShallow(other_)) 730 return false; 731 if (!(other_ instanceof MedicationBatchComponent)) 732 return false; 733 MedicationBatchComponent o = (MedicationBatchComponent) other_; 734 return compareValues(lotNumber, o.lotNumber, true) && compareValues(expirationDate, o.expirationDate, true) 735 ; 736 } 737 738 public boolean isEmpty() { 739 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(lotNumber, expirationDate 740 ); 741 } 742 743 public String fhirType() { 744 return "Medication.batch"; 745 746 } 747 748 } 749 750 /** 751 * Business identifier for this medication. 752 */ 753 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 754 @Description(shortDefinition="Business identifier for this medication", formalDefinition="Business identifier for this medication." ) 755 protected List<Identifier> identifier; 756 757 /** 758 * A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems. 759 */ 760 @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 761 @Description(shortDefinition="Codes that identify this medication", formalDefinition="A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems." ) 762 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-codes") 763 protected CodeableConcept code; 764 765 /** 766 * A code to indicate if the medication is in active use. 767 */ 768 @Child(name = "status", type = {CodeType.class}, order=2, min=0, max=1, modifier=true, summary=true) 769 @Description(shortDefinition="active | inactive | entered-in-error", formalDefinition="A code to indicate if the medication is in active use." ) 770 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-status") 771 protected Enumeration<MedicationStatusCodes> status; 772 773 /** 774 * Describes the organization that is responsible for the manufacturing of the item and holds the registration to market the product in a jurisdiction. This might not be the company that physically manufactures the product. May be known as "Sponsor" and is commonly called "Manufacturer". 775 */ 776 @Child(name = "marketingAuthorizationHolder", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=true) 777 @Description(shortDefinition="Organization responsible for manufacturing the item", formalDefinition="Describes the organization that is responsible for the manufacturing of the item and holds the registration to market the product in a jurisdiction. This might not be the company that physically manufactures the product. May be known as \"Sponsor\" and is commonly called \"Manufacturer\"." ) 778 protected Reference marketingAuthorizationHolder; 779 780 /** 781 * Describes the form of the item. Powder; tablets; capsule. 782 */ 783 @Child(name = "doseForm", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 784 @Description(shortDefinition="powder | tablets | capsule +", formalDefinition="Describes the form of the item. Powder; tablets; capsule." ) 785 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-form-codes") 786 protected CodeableConcept doseForm; 787 788 /** 789 * When the specified product code does not infer a package size, this is the specific amount of drug in the product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.). 790 */ 791 @Child(name = "totalVolume", type = {Ratio.class}, order=5, min=0, max=1, modifier=false, summary=true) 792 @Description(shortDefinition="When the specified product code does not infer a package size, this is the specific amount of drug in the product", formalDefinition="When the specified product code does not infer a package size, this is the specific amount of drug in the product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.)." ) 793 protected Ratio totalVolume; 794 795 /** 796 * Identifies a particular constituent of interest in the product. 797 */ 798 @Child(name = "ingredient", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 799 @Description(shortDefinition="Active or inactive ingredient", formalDefinition="Identifies a particular constituent of interest in the product." ) 800 protected List<MedicationIngredientComponent> ingredient; 801 802 /** 803 * Information that only applies to packages (not products). 804 */ 805 @Child(name = "batch", type = {}, order=7, min=0, max=1, modifier=false, summary=false) 806 @Description(shortDefinition="Details about packaged medications", formalDefinition="Information that only applies to packages (not products)." ) 807 protected MedicationBatchComponent batch; 808 809 private static final long serialVersionUID = -528893053L; 810 811 /** 812 * Constructor 813 */ 814 public Medication() { 815 super(); 816 } 817 818 /** 819 * @return {@link #identifier} (Business identifier for this medication.) 820 */ 821 public List<Identifier> getIdentifier() { 822 if (this.identifier == null) 823 this.identifier = new ArrayList<Identifier>(); 824 return this.identifier; 825 } 826 827 /** 828 * @return Returns a reference to <code>this</code> for easy method chaining 829 */ 830 public Medication setIdentifier(List<Identifier> theIdentifier) { 831 this.identifier = theIdentifier; 832 return this; 833 } 834 835 public boolean hasIdentifier() { 836 if (this.identifier == null) 837 return false; 838 for (Identifier item : this.identifier) 839 if (!item.isEmpty()) 840 return true; 841 return false; 842 } 843 844 public Identifier addIdentifier() { //3 845 Identifier t = new Identifier(); 846 if (this.identifier == null) 847 this.identifier = new ArrayList<Identifier>(); 848 this.identifier.add(t); 849 return t; 850 } 851 852 public Medication addIdentifier(Identifier t) { //3 853 if (t == null) 854 return this; 855 if (this.identifier == null) 856 this.identifier = new ArrayList<Identifier>(); 857 this.identifier.add(t); 858 return this; 859 } 860 861 /** 862 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 863 */ 864 public Identifier getIdentifierFirstRep() { 865 if (getIdentifier().isEmpty()) { 866 addIdentifier(); 867 } 868 return getIdentifier().get(0); 869 } 870 871 /** 872 * @return {@link #code} (A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.) 873 */ 874 public CodeableConcept getCode() { 875 if (this.code == null) 876 if (Configuration.errorOnAutoCreate()) 877 throw new Error("Attempt to auto-create Medication.code"); 878 else if (Configuration.doAutoCreate()) 879 this.code = new CodeableConcept(); // cc 880 return this.code; 881 } 882 883 public boolean hasCode() { 884 return this.code != null && !this.code.isEmpty(); 885 } 886 887 /** 888 * @param value {@link #code} (A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.) 889 */ 890 public Medication setCode(CodeableConcept value) { 891 this.code = value; 892 return this; 893 } 894 895 /** 896 * @return {@link #status} (A code to indicate if the medication is in active use.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 897 */ 898 public Enumeration<MedicationStatusCodes> getStatusElement() { 899 if (this.status == null) 900 if (Configuration.errorOnAutoCreate()) 901 throw new Error("Attempt to auto-create Medication.status"); 902 else if (Configuration.doAutoCreate()) 903 this.status = new Enumeration<MedicationStatusCodes>(new MedicationStatusCodesEnumFactory()); // bb 904 return this.status; 905 } 906 907 public boolean hasStatusElement() { 908 return this.status != null && !this.status.isEmpty(); 909 } 910 911 public boolean hasStatus() { 912 return this.status != null && !this.status.isEmpty(); 913 } 914 915 /** 916 * @param value {@link #status} (A code to indicate if the medication is in active use.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 917 */ 918 public Medication setStatusElement(Enumeration<MedicationStatusCodes> value) { 919 this.status = value; 920 return this; 921 } 922 923 /** 924 * @return A code to indicate if the medication is in active use. 925 */ 926 public MedicationStatusCodes getStatus() { 927 return this.status == null ? null : this.status.getValue(); 928 } 929 930 /** 931 * @param value A code to indicate if the medication is in active use. 932 */ 933 public Medication setStatus(MedicationStatusCodes value) { 934 if (value == null) 935 this.status = null; 936 else { 937 if (this.status == null) 938 this.status = new Enumeration<MedicationStatusCodes>(new MedicationStatusCodesEnumFactory()); 939 this.status.setValue(value); 940 } 941 return this; 942 } 943 944 /** 945 * @return {@link #marketingAuthorizationHolder} (Describes the organization that is responsible for the manufacturing of the item and holds the registration to market the product in a jurisdiction. This might not be the company that physically manufactures the product. May be known as "Sponsor" and is commonly called "Manufacturer".) 946 */ 947 public Reference getMarketingAuthorizationHolder() { 948 if (this.marketingAuthorizationHolder == null) 949 if (Configuration.errorOnAutoCreate()) 950 throw new Error("Attempt to auto-create Medication.marketingAuthorizationHolder"); 951 else if (Configuration.doAutoCreate()) 952 this.marketingAuthorizationHolder = new Reference(); // cc 953 return this.marketingAuthorizationHolder; 954 } 955 956 public boolean hasMarketingAuthorizationHolder() { 957 return this.marketingAuthorizationHolder != null && !this.marketingAuthorizationHolder.isEmpty(); 958 } 959 960 /** 961 * @param value {@link #marketingAuthorizationHolder} (Describes the organization that is responsible for the manufacturing of the item and holds the registration to market the product in a jurisdiction. This might not be the company that physically manufactures the product. May be known as "Sponsor" and is commonly called "Manufacturer".) 962 */ 963 public Medication setMarketingAuthorizationHolder(Reference value) { 964 this.marketingAuthorizationHolder = value; 965 return this; 966 } 967 968 /** 969 * @return {@link #doseForm} (Describes the form of the item. Powder; tablets; capsule.) 970 */ 971 public CodeableConcept getDoseForm() { 972 if (this.doseForm == null) 973 if (Configuration.errorOnAutoCreate()) 974 throw new Error("Attempt to auto-create Medication.doseForm"); 975 else if (Configuration.doAutoCreate()) 976 this.doseForm = new CodeableConcept(); // cc 977 return this.doseForm; 978 } 979 980 public boolean hasDoseForm() { 981 return this.doseForm != null && !this.doseForm.isEmpty(); 982 } 983 984 /** 985 * @param value {@link #doseForm} (Describes the form of the item. Powder; tablets; capsule.) 986 */ 987 public Medication setDoseForm(CodeableConcept value) { 988 this.doseForm = value; 989 return this; 990 } 991 992 /** 993 * @return {@link #totalVolume} (When the specified product code does not infer a package size, this is the specific amount of drug in the product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).) 994 */ 995 public Ratio getTotalVolume() { 996 if (this.totalVolume == null) 997 if (Configuration.errorOnAutoCreate()) 998 throw new Error("Attempt to auto-create Medication.totalVolume"); 999 else if (Configuration.doAutoCreate()) 1000 this.totalVolume = new Ratio(); // cc 1001 return this.totalVolume; 1002 } 1003 1004 public boolean hasTotalVolume() { 1005 return this.totalVolume != null && !this.totalVolume.isEmpty(); 1006 } 1007 1008 /** 1009 * @param value {@link #totalVolume} (When the specified product code does not infer a package size, this is the specific amount of drug in the product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).) 1010 */ 1011 public Medication setTotalVolume(Ratio value) { 1012 this.totalVolume = value; 1013 return this; 1014 } 1015 1016 /** 1017 * @return {@link #ingredient} (Identifies a particular constituent of interest in the product.) 1018 */ 1019 public List<MedicationIngredientComponent> getIngredient() { 1020 if (this.ingredient == null) 1021 this.ingredient = new ArrayList<MedicationIngredientComponent>(); 1022 return this.ingredient; 1023 } 1024 1025 /** 1026 * @return Returns a reference to <code>this</code> for easy method chaining 1027 */ 1028 public Medication setIngredient(List<MedicationIngredientComponent> theIngredient) { 1029 this.ingredient = theIngredient; 1030 return this; 1031 } 1032 1033 public boolean hasIngredient() { 1034 if (this.ingredient == null) 1035 return false; 1036 for (MedicationIngredientComponent item : this.ingredient) 1037 if (!item.isEmpty()) 1038 return true; 1039 return false; 1040 } 1041 1042 public MedicationIngredientComponent addIngredient() { //3 1043 MedicationIngredientComponent t = new MedicationIngredientComponent(); 1044 if (this.ingredient == null) 1045 this.ingredient = new ArrayList<MedicationIngredientComponent>(); 1046 this.ingredient.add(t); 1047 return t; 1048 } 1049 1050 public Medication addIngredient(MedicationIngredientComponent t) { //3 1051 if (t == null) 1052 return this; 1053 if (this.ingredient == null) 1054 this.ingredient = new ArrayList<MedicationIngredientComponent>(); 1055 this.ingredient.add(t); 1056 return this; 1057 } 1058 1059 /** 1060 * @return The first repetition of repeating field {@link #ingredient}, creating it if it does not already exist {3} 1061 */ 1062 public MedicationIngredientComponent getIngredientFirstRep() { 1063 if (getIngredient().isEmpty()) { 1064 addIngredient(); 1065 } 1066 return getIngredient().get(0); 1067 } 1068 1069 /** 1070 * @return {@link #batch} (Information that only applies to packages (not products).) 1071 */ 1072 public MedicationBatchComponent getBatch() { 1073 if (this.batch == null) 1074 if (Configuration.errorOnAutoCreate()) 1075 throw new Error("Attempt to auto-create Medication.batch"); 1076 else if (Configuration.doAutoCreate()) 1077 this.batch = new MedicationBatchComponent(); // cc 1078 return this.batch; 1079 } 1080 1081 public boolean hasBatch() { 1082 return this.batch != null && !this.batch.isEmpty(); 1083 } 1084 1085 /** 1086 * @param value {@link #batch} (Information that only applies to packages (not products).) 1087 */ 1088 public Medication setBatch(MedicationBatchComponent value) { 1089 this.batch = value; 1090 return this; 1091 } 1092 1093 protected void listChildren(List<Property> children) { 1094 super.listChildren(children); 1095 children.add(new Property("identifier", "Identifier", "Business identifier for this medication.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1096 children.add(new Property("code", "CodeableConcept", "A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.", 0, 1, code)); 1097 children.add(new Property("status", "code", "A code to indicate if the medication is in active use.", 0, 1, status)); 1098 children.add(new Property("marketingAuthorizationHolder", "Reference(Organization)", "Describes the organization that is responsible for the manufacturing of the item and holds the registration to market the product in a jurisdiction. This might not be the company that physically manufactures the product. May be known as \"Sponsor\" and is commonly called \"Manufacturer\".", 0, 1, marketingAuthorizationHolder)); 1099 children.add(new Property("doseForm", "CodeableConcept", "Describes the form of the item. Powder; tablets; capsule.", 0, 1, doseForm)); 1100 children.add(new Property("totalVolume", "Ratio", "When the specified product code does not infer a package size, this is the specific amount of drug in the product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).", 0, 1, totalVolume)); 1101 children.add(new Property("ingredient", "", "Identifies a particular constituent of interest in the product.", 0, java.lang.Integer.MAX_VALUE, ingredient)); 1102 children.add(new Property("batch", "", "Information that only applies to packages (not products).", 0, 1, batch)); 1103 } 1104 1105 @Override 1106 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1107 switch (_hash) { 1108 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Business identifier for this medication.", 0, java.lang.Integer.MAX_VALUE, identifier); 1109 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.", 0, 1, code); 1110 case -892481550: /*status*/ return new Property("status", "code", "A code to indicate if the medication is in active use.", 0, 1, status); 1111 case -1565971585: /*marketingAuthorizationHolder*/ return new Property("marketingAuthorizationHolder", "Reference(Organization)", "Describes the organization that is responsible for the manufacturing of the item and holds the registration to market the product in a jurisdiction. This might not be the company that physically manufactures the product. May be known as \"Sponsor\" and is commonly called \"Manufacturer\".", 0, 1, marketingAuthorizationHolder); 1112 case 1303858817: /*doseForm*/ return new Property("doseForm", "CodeableConcept", "Describes the form of the item. Powder; tablets; capsule.", 0, 1, doseForm); 1113 case -654431362: /*totalVolume*/ return new Property("totalVolume", "Ratio", "When the specified product code does not infer a package size, this is the specific amount of drug in the product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).", 0, 1, totalVolume); 1114 case -206409263: /*ingredient*/ return new Property("ingredient", "", "Identifies a particular constituent of interest in the product.", 0, java.lang.Integer.MAX_VALUE, ingredient); 1115 case 93509434: /*batch*/ return new Property("batch", "", "Information that only applies to packages (not products).", 0, 1, batch); 1116 default: return super.getNamedProperty(_hash, _name, _checkValid); 1117 } 1118 1119 } 1120 1121 @Override 1122 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1123 switch (hash) { 1124 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1125 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 1126 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<MedicationStatusCodes> 1127 case -1565971585: /*marketingAuthorizationHolder*/ return this.marketingAuthorizationHolder == null ? new Base[0] : new Base[] {this.marketingAuthorizationHolder}; // Reference 1128 case 1303858817: /*doseForm*/ return this.doseForm == null ? new Base[0] : new Base[] {this.doseForm}; // CodeableConcept 1129 case -654431362: /*totalVolume*/ return this.totalVolume == null ? new Base[0] : new Base[] {this.totalVolume}; // Ratio 1130 case -206409263: /*ingredient*/ return this.ingredient == null ? new Base[0] : this.ingredient.toArray(new Base[this.ingredient.size()]); // MedicationIngredientComponent 1131 case 93509434: /*batch*/ return this.batch == null ? new Base[0] : new Base[] {this.batch}; // MedicationBatchComponent 1132 default: return super.getProperty(hash, name, checkValid); 1133 } 1134 1135 } 1136 1137 @Override 1138 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1139 switch (hash) { 1140 case -1618432855: // identifier 1141 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 1142 return value; 1143 case 3059181: // code 1144 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1145 return value; 1146 case -892481550: // status 1147 value = new MedicationStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 1148 this.status = (Enumeration) value; // Enumeration<MedicationStatusCodes> 1149 return value; 1150 case -1565971585: // marketingAuthorizationHolder 1151 this.marketingAuthorizationHolder = TypeConvertor.castToReference(value); // Reference 1152 return value; 1153 case 1303858817: // doseForm 1154 this.doseForm = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1155 return value; 1156 case -654431362: // totalVolume 1157 this.totalVolume = TypeConvertor.castToRatio(value); // Ratio 1158 return value; 1159 case -206409263: // ingredient 1160 this.getIngredient().add((MedicationIngredientComponent) value); // MedicationIngredientComponent 1161 return value; 1162 case 93509434: // batch 1163 this.batch = (MedicationBatchComponent) value; // MedicationBatchComponent 1164 return value; 1165 default: return super.setProperty(hash, name, value); 1166 } 1167 1168 } 1169 1170 @Override 1171 public Base setProperty(String name, Base value) throws FHIRException { 1172 if (name.equals("identifier")) { 1173 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 1174 } else if (name.equals("code")) { 1175 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1176 } else if (name.equals("status")) { 1177 value = new MedicationStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 1178 this.status = (Enumeration) value; // Enumeration<MedicationStatusCodes> 1179 } else if (name.equals("marketingAuthorizationHolder")) { 1180 this.marketingAuthorizationHolder = TypeConvertor.castToReference(value); // Reference 1181 } else if (name.equals("doseForm")) { 1182 this.doseForm = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1183 } else if (name.equals("totalVolume")) { 1184 this.totalVolume = TypeConvertor.castToRatio(value); // Ratio 1185 } else if (name.equals("ingredient")) { 1186 this.getIngredient().add((MedicationIngredientComponent) value); 1187 } else if (name.equals("batch")) { 1188 this.batch = (MedicationBatchComponent) value; // MedicationBatchComponent 1189 } else 1190 return super.setProperty(name, value); 1191 return value; 1192 } 1193 1194 @Override 1195 public Base makeProperty(int hash, String name) throws FHIRException { 1196 switch (hash) { 1197 case -1618432855: return addIdentifier(); 1198 case 3059181: return getCode(); 1199 case -892481550: return getStatusElement(); 1200 case -1565971585: return getMarketingAuthorizationHolder(); 1201 case 1303858817: return getDoseForm(); 1202 case -654431362: return getTotalVolume(); 1203 case -206409263: return addIngredient(); 1204 case 93509434: return getBatch(); 1205 default: return super.makeProperty(hash, name); 1206 } 1207 1208 } 1209 1210 @Override 1211 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1212 switch (hash) { 1213 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1214 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 1215 case -892481550: /*status*/ return new String[] {"code"}; 1216 case -1565971585: /*marketingAuthorizationHolder*/ return new String[] {"Reference"}; 1217 case 1303858817: /*doseForm*/ return new String[] {"CodeableConcept"}; 1218 case -654431362: /*totalVolume*/ return new String[] {"Ratio"}; 1219 case -206409263: /*ingredient*/ return new String[] {}; 1220 case 93509434: /*batch*/ return new String[] {}; 1221 default: return super.getTypesForProperty(hash, name); 1222 } 1223 1224 } 1225 1226 @Override 1227 public Base addChild(String name) throws FHIRException { 1228 if (name.equals("identifier")) { 1229 return addIdentifier(); 1230 } 1231 else if (name.equals("code")) { 1232 this.code = new CodeableConcept(); 1233 return this.code; 1234 } 1235 else if (name.equals("status")) { 1236 throw new FHIRException("Cannot call addChild on a primitive type Medication.status"); 1237 } 1238 else if (name.equals("marketingAuthorizationHolder")) { 1239 this.marketingAuthorizationHolder = new Reference(); 1240 return this.marketingAuthorizationHolder; 1241 } 1242 else if (name.equals("doseForm")) { 1243 this.doseForm = new CodeableConcept(); 1244 return this.doseForm; 1245 } 1246 else if (name.equals("totalVolume")) { 1247 this.totalVolume = new Ratio(); 1248 return this.totalVolume; 1249 } 1250 else if (name.equals("ingredient")) { 1251 return addIngredient(); 1252 } 1253 else if (name.equals("batch")) { 1254 this.batch = new MedicationBatchComponent(); 1255 return this.batch; 1256 } 1257 else 1258 return super.addChild(name); 1259 } 1260 1261 public String fhirType() { 1262 return "Medication"; 1263 1264 } 1265 1266 public Medication copy() { 1267 Medication dst = new Medication(); 1268 copyValues(dst); 1269 return dst; 1270 } 1271 1272 public void copyValues(Medication dst) { 1273 super.copyValues(dst); 1274 if (identifier != null) { 1275 dst.identifier = new ArrayList<Identifier>(); 1276 for (Identifier i : identifier) 1277 dst.identifier.add(i.copy()); 1278 }; 1279 dst.code = code == null ? null : code.copy(); 1280 dst.status = status == null ? null : status.copy(); 1281 dst.marketingAuthorizationHolder = marketingAuthorizationHolder == null ? null : marketingAuthorizationHolder.copy(); 1282 dst.doseForm = doseForm == null ? null : doseForm.copy(); 1283 dst.totalVolume = totalVolume == null ? null : totalVolume.copy(); 1284 if (ingredient != null) { 1285 dst.ingredient = new ArrayList<MedicationIngredientComponent>(); 1286 for (MedicationIngredientComponent i : ingredient) 1287 dst.ingredient.add(i.copy()); 1288 }; 1289 dst.batch = batch == null ? null : batch.copy(); 1290 } 1291 1292 protected Medication typedCopy() { 1293 return copy(); 1294 } 1295 1296 @Override 1297 public boolean equalsDeep(Base other_) { 1298 if (!super.equalsDeep(other_)) 1299 return false; 1300 if (!(other_ instanceof Medication)) 1301 return false; 1302 Medication o = (Medication) other_; 1303 return compareDeep(identifier, o.identifier, true) && compareDeep(code, o.code, true) && compareDeep(status, o.status, true) 1304 && compareDeep(marketingAuthorizationHolder, o.marketingAuthorizationHolder, true) && compareDeep(doseForm, o.doseForm, true) 1305 && compareDeep(totalVolume, o.totalVolume, true) && compareDeep(ingredient, o.ingredient, true) 1306 && compareDeep(batch, o.batch, true); 1307 } 1308 1309 @Override 1310 public boolean equalsShallow(Base other_) { 1311 if (!super.equalsShallow(other_)) 1312 return false; 1313 if (!(other_ instanceof Medication)) 1314 return false; 1315 Medication o = (Medication) other_; 1316 return compareValues(status, o.status, true); 1317 } 1318 1319 public boolean isEmpty() { 1320 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, code, status 1321 , marketingAuthorizationHolder, doseForm, totalVolume, ingredient, batch); 1322 } 1323 1324 @Override 1325 public ResourceType getResourceType() { 1326 return ResourceType.Medication; 1327 } 1328 1329 /** 1330 * Search parameter: <b>expiration-date</b> 1331 * <p> 1332 * Description: <b>Returns medications in a batch with this expiration date</b><br> 1333 * Type: <b>date</b><br> 1334 * Path: <b>Medication.batch.expirationDate</b><br> 1335 * </p> 1336 */ 1337 @SearchParamDefinition(name="expiration-date", path="Medication.batch.expirationDate", description="Returns medications in a batch with this expiration date", type="date" ) 1338 public static final String SP_EXPIRATION_DATE = "expiration-date"; 1339 /** 1340 * <b>Fluent Client</b> search parameter constant for <b>expiration-date</b> 1341 * <p> 1342 * Description: <b>Returns medications in a batch with this expiration date</b><br> 1343 * Type: <b>date</b><br> 1344 * Path: <b>Medication.batch.expirationDate</b><br> 1345 * </p> 1346 */ 1347 public static final ca.uhn.fhir.rest.gclient.DateClientParam EXPIRATION_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EXPIRATION_DATE); 1348 1349 /** 1350 * Search parameter: <b>form</b> 1351 * <p> 1352 * Description: <b>Returns medications for a specific dose form</b><br> 1353 * Type: <b>token</b><br> 1354 * Path: <b>null</b><br> 1355 * </p> 1356 */ 1357 @SearchParamDefinition(name="form", path="", description="Returns medications for a specific dose form", type="token" ) 1358 public static final String SP_FORM = "form"; 1359 /** 1360 * <b>Fluent Client</b> search parameter constant for <b>form</b> 1361 * <p> 1362 * Description: <b>Returns medications for a specific dose form</b><br> 1363 * Type: <b>token</b><br> 1364 * Path: <b>null</b><br> 1365 * </p> 1366 */ 1367 public static final ca.uhn.fhir.rest.gclient.TokenClientParam FORM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FORM); 1368 1369 /** 1370 * Search parameter: <b>identifier</b> 1371 * <p> 1372 * Description: <b>Returns medications with this external identifier</b><br> 1373 * Type: <b>token</b><br> 1374 * Path: <b>Medication.identifier</b><br> 1375 * </p> 1376 */ 1377 @SearchParamDefinition(name="identifier", path="Medication.identifier", description="Returns medications with this external identifier", type="token" ) 1378 public static final String SP_IDENTIFIER = "identifier"; 1379 /** 1380 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1381 * <p> 1382 * Description: <b>Returns medications with this external identifier</b><br> 1383 * Type: <b>token</b><br> 1384 * Path: <b>Medication.identifier</b><br> 1385 * </p> 1386 */ 1387 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1388 1389 /** 1390 * Search parameter: <b>ingredient-code</b> 1391 * <p> 1392 * Description: <b>Returns medications for this ingredient code</b><br> 1393 * Type: <b>token</b><br> 1394 * Path: <b>Medication.ingredient.item.concept</b><br> 1395 * </p> 1396 */ 1397 @SearchParamDefinition(name="ingredient-code", path="Medication.ingredient.item.concept", description="Returns medications for this ingredient code", type="token" ) 1398 public static final String SP_INGREDIENT_CODE = "ingredient-code"; 1399 /** 1400 * <b>Fluent Client</b> search parameter constant for <b>ingredient-code</b> 1401 * <p> 1402 * Description: <b>Returns medications for this ingredient code</b><br> 1403 * Type: <b>token</b><br> 1404 * Path: <b>Medication.ingredient.item.concept</b><br> 1405 * </p> 1406 */ 1407 public static final ca.uhn.fhir.rest.gclient.TokenClientParam INGREDIENT_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INGREDIENT_CODE); 1408 1409 /** 1410 * Search parameter: <b>ingredient</b> 1411 * <p> 1412 * Description: <b>Returns medications for this ingredient reference</b><br> 1413 * Type: <b>reference</b><br> 1414 * Path: <b>Medication.ingredient.item.reference</b><br> 1415 * </p> 1416 */ 1417 @SearchParamDefinition(name="ingredient", path="Medication.ingredient.item.reference", description="Returns medications for this ingredient reference", type="reference" ) 1418 public static final String SP_INGREDIENT = "ingredient"; 1419 /** 1420 * <b>Fluent Client</b> search parameter constant for <b>ingredient</b> 1421 * <p> 1422 * Description: <b>Returns medications for this ingredient reference</b><br> 1423 * Type: <b>reference</b><br> 1424 * Path: <b>Medication.ingredient.item.reference</b><br> 1425 * </p> 1426 */ 1427 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INGREDIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INGREDIENT); 1428 1429/** 1430 * Constant for fluent queries to be used to add include statements. Specifies 1431 * the path value of "<b>Medication:ingredient</b>". 1432 */ 1433 public static final ca.uhn.fhir.model.api.Include INCLUDE_INGREDIENT = new ca.uhn.fhir.model.api.Include("Medication:ingredient").toLocked(); 1434 1435 /** 1436 * Search parameter: <b>lot-number</b> 1437 * <p> 1438 * Description: <b>Returns medications in a batch with this lot number</b><br> 1439 * Type: <b>token</b><br> 1440 * Path: <b>Medication.batch.lotNumber</b><br> 1441 * </p> 1442 */ 1443 @SearchParamDefinition(name="lot-number", path="Medication.batch.lotNumber", description="Returns medications in a batch with this lot number", type="token" ) 1444 public static final String SP_LOT_NUMBER = "lot-number"; 1445 /** 1446 * <b>Fluent Client</b> search parameter constant for <b>lot-number</b> 1447 * <p> 1448 * Description: <b>Returns medications in a batch with this lot number</b><br> 1449 * Type: <b>token</b><br> 1450 * Path: <b>Medication.batch.lotNumber</b><br> 1451 * </p> 1452 */ 1453 public static final ca.uhn.fhir.rest.gclient.TokenClientParam LOT_NUMBER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_LOT_NUMBER); 1454 1455 /** 1456 * Search parameter: <b>marketingauthorizationholder</b> 1457 * <p> 1458 * Description: <b>Returns medications made or sold for this marketing authorization holder</b><br> 1459 * Type: <b>reference</b><br> 1460 * Path: <b>Medication.marketingAuthorizationHolder</b><br> 1461 * </p> 1462 */ 1463 @SearchParamDefinition(name="marketingauthorizationholder", path="Medication.marketingAuthorizationHolder", description="Returns medications made or sold for this marketing authorization holder", type="reference", target={Organization.class } ) 1464 public static final String SP_MARKETINGAUTHORIZATIONHOLDER = "marketingauthorizationholder"; 1465 /** 1466 * <b>Fluent Client</b> search parameter constant for <b>marketingauthorizationholder</b> 1467 * <p> 1468 * Description: <b>Returns medications made or sold for this marketing authorization holder</b><br> 1469 * Type: <b>reference</b><br> 1470 * Path: <b>Medication.marketingAuthorizationHolder</b><br> 1471 * </p> 1472 */ 1473 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MARKETINGAUTHORIZATIONHOLDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MARKETINGAUTHORIZATIONHOLDER); 1474 1475/** 1476 * Constant for fluent queries to be used to add include statements. Specifies 1477 * the path value of "<b>Medication:marketingauthorizationholder</b>". 1478 */ 1479 public static final ca.uhn.fhir.model.api.Include INCLUDE_MARKETINGAUTHORIZATIONHOLDER = new ca.uhn.fhir.model.api.Include("Medication:marketingauthorizationholder").toLocked(); 1480 1481 /** 1482 * Search parameter: <b>status</b> 1483 * <p> 1484 * Description: <b>Returns medications for this status</b><br> 1485 * Type: <b>token</b><br> 1486 * Path: <b>Medication.status</b><br> 1487 * </p> 1488 */ 1489 @SearchParamDefinition(name="status", path="Medication.status", description="Returns medications for this status", type="token" ) 1490 public static final String SP_STATUS = "status"; 1491 /** 1492 * <b>Fluent Client</b> search parameter constant for <b>status</b> 1493 * <p> 1494 * Description: <b>Returns medications for this status</b><br> 1495 * Type: <b>token</b><br> 1496 * Path: <b>Medication.status</b><br> 1497 * </p> 1498 */ 1499 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 1500 1501 /** 1502 * Search parameter: <b>code</b> 1503 * <p> 1504 * Description: <b>Multiple Resources: 1505 1506* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance 1507* [Condition](condition.html): Code for the condition 1508* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered 1509* [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 1510* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code 1511* [List](list.html): What the purpose of this list is 1512* [Medication](medication.html): Returns medications for a specific code 1513* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code 1514* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code 1515* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code 1516* [MedicationUsage](medicationusage.html): Return statements of this medication code 1517* [Observation](observation.html): The code of the observation type 1518* [Procedure](procedure.html): A code to identify a procedure 1519* [ServiceRequest](servicerequest.html): What is being requested/ordered 1520</b><br> 1521 * Type: <b>token</b><br> 1522 * Path: <b>AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationUsage.medication.concept | Observation.code | Procedure.code | ServiceRequest.code</b><br> 1523 * </p> 1524 */ 1525 @SearchParamDefinition(name="code", path="AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationUsage.medication.concept | Observation.code | Procedure.code | ServiceRequest.code", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance\r\n* [Condition](condition.html): Code for the condition\r\n* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered\r\n* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code\r\n* [List](list.html): What the purpose of this list is\r\n* [Medication](medication.html): Returns medications for a specific code\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code\r\n* [MedicationUsage](medicationusage.html): Return statements of this medication code\r\n* [Observation](observation.html): The code of the observation type\r\n* [Procedure](procedure.html): A code to identify a procedure\r\n* [ServiceRequest](servicerequest.html): What is being requested/ordered\r\n", type="token" ) 1526 public static final String SP_CODE = "code"; 1527 /** 1528 * <b>Fluent Client</b> search parameter constant for <b>code</b> 1529 * <p> 1530 * Description: <b>Multiple Resources: 1531 1532* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance 1533* [Condition](condition.html): Code for the condition 1534* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered 1535* [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 1536* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code 1537* [List](list.html): What the purpose of this list is 1538* [Medication](medication.html): Returns medications for a specific code 1539* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code 1540* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code 1541* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code 1542* [MedicationUsage](medicationusage.html): Return statements of this medication code 1543* [Observation](observation.html): The code of the observation type 1544* [Procedure](procedure.html): A code to identify a procedure 1545* [ServiceRequest](servicerequest.html): What is being requested/ordered 1546</b><br> 1547 * Type: <b>token</b><br> 1548 * Path: <b>AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationUsage.medication.concept | Observation.code | Procedure.code | ServiceRequest.code</b><br> 1549 * </p> 1550 */ 1551 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 1552 1553 1554} 1555