001package org.hl7.fhir.dstu3.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.1 033 034import java.util.*; 035 036import java.math.*; 037import org.hl7.fhir.utilities.Utilities; 038import ca.uhn.fhir.model.api.annotation.ResourceDef; 039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 040import ca.uhn.fhir.model.api.annotation.Child; 041import ca.uhn.fhir.model.api.annotation.ChildOrder; 042import ca.uhn.fhir.model.api.annotation.Description; 043import ca.uhn.fhir.model.api.annotation.Block; 044import org.hl7.fhir.instance.model.api.*; 045import org.hl7.fhir.exceptions.FHIRException; 046import org.hl7.fhir.exceptions.FHIRFormatError; 047/** 048 * An authorization for the supply of glasses and/or contact lenses to a patient. 049 */ 050@ResourceDef(name="VisionPrescription", profile="http://hl7.org/fhir/StructureDefinition/VisionPrescription") 051public class VisionPrescription extends DomainResource { 052 053 public enum VisionStatus { 054 /** 055 * The instance is currently in-force. 056 */ 057 ACTIVE, 058 /** 059 * The instance is withdrawn, rescinded or reversed. 060 */ 061 CANCELLED, 062 /** 063 * A new instance the contents of which is not complete. 064 */ 065 DRAFT, 066 /** 067 * The instance was entered in error. 068 */ 069 ENTEREDINERROR, 070 /** 071 * added to help the parsers with the generic types 072 */ 073 NULL; 074 public static VisionStatus fromCode(String codeString) throws FHIRException { 075 if (codeString == null || "".equals(codeString)) 076 return null; 077 if ("active".equals(codeString)) 078 return ACTIVE; 079 if ("cancelled".equals(codeString)) 080 return CANCELLED; 081 if ("draft".equals(codeString)) 082 return DRAFT; 083 if ("entered-in-error".equals(codeString)) 084 return ENTEREDINERROR; 085 if (Configuration.isAcceptInvalidEnums()) 086 return null; 087 else 088 throw new FHIRException("Unknown VisionStatus code '"+codeString+"'"); 089 } 090 public String toCode() { 091 switch (this) { 092 case ACTIVE: return "active"; 093 case CANCELLED: return "cancelled"; 094 case DRAFT: return "draft"; 095 case ENTEREDINERROR: return "entered-in-error"; 096 default: return "?"; 097 } 098 } 099 public String getSystem() { 100 switch (this) { 101 case ACTIVE: return "http://hl7.org/fhir/fm-status"; 102 case CANCELLED: return "http://hl7.org/fhir/fm-status"; 103 case DRAFT: return "http://hl7.org/fhir/fm-status"; 104 case ENTEREDINERROR: return "http://hl7.org/fhir/fm-status"; 105 default: return "?"; 106 } 107 } 108 public String getDefinition() { 109 switch (this) { 110 case ACTIVE: return "The instance is currently in-force."; 111 case CANCELLED: return "The instance is withdrawn, rescinded or reversed."; 112 case DRAFT: return "A new instance the contents of which is not complete."; 113 case ENTEREDINERROR: return "The instance was entered in error."; 114 default: return "?"; 115 } 116 } 117 public String getDisplay() { 118 switch (this) { 119 case ACTIVE: return "Active"; 120 case CANCELLED: return "Cancelled"; 121 case DRAFT: return "Draft"; 122 case ENTEREDINERROR: return "Entered in Error"; 123 default: return "?"; 124 } 125 } 126 } 127 128 public static class VisionStatusEnumFactory implements EnumFactory<VisionStatus> { 129 public VisionStatus fromCode(String codeString) throws IllegalArgumentException { 130 if (codeString == null || "".equals(codeString)) 131 if (codeString == null || "".equals(codeString)) 132 return null; 133 if ("active".equals(codeString)) 134 return VisionStatus.ACTIVE; 135 if ("cancelled".equals(codeString)) 136 return VisionStatus.CANCELLED; 137 if ("draft".equals(codeString)) 138 return VisionStatus.DRAFT; 139 if ("entered-in-error".equals(codeString)) 140 return VisionStatus.ENTEREDINERROR; 141 throw new IllegalArgumentException("Unknown VisionStatus code '"+codeString+"'"); 142 } 143 public Enumeration<VisionStatus> fromType(Base code) throws FHIRException { 144 if (code == null) 145 return null; 146 if (code.isEmpty()) 147 return new Enumeration<VisionStatus>(this); 148 String codeString = ((PrimitiveType) code).asStringValue(); 149 if (codeString == null || "".equals(codeString)) 150 return null; 151 if ("active".equals(codeString)) 152 return new Enumeration<VisionStatus>(this, VisionStatus.ACTIVE); 153 if ("cancelled".equals(codeString)) 154 return new Enumeration<VisionStatus>(this, VisionStatus.CANCELLED); 155 if ("draft".equals(codeString)) 156 return new Enumeration<VisionStatus>(this, VisionStatus.DRAFT); 157 if ("entered-in-error".equals(codeString)) 158 return new Enumeration<VisionStatus>(this, VisionStatus.ENTEREDINERROR); 159 throw new FHIRException("Unknown VisionStatus code '"+codeString+"'"); 160 } 161 public String toCode(VisionStatus code) { 162 if (code == VisionStatus.ACTIVE) 163 return "active"; 164 if (code == VisionStatus.CANCELLED) 165 return "cancelled"; 166 if (code == VisionStatus.DRAFT) 167 return "draft"; 168 if (code == VisionStatus.ENTEREDINERROR) 169 return "entered-in-error"; 170 return "?"; 171 } 172 public String toSystem(VisionStatus code) { 173 return code.getSystem(); 174 } 175 } 176 177 public enum VisionEyes { 178 /** 179 * Right Eye 180 */ 181 RIGHT, 182 /** 183 * Left Eye 184 */ 185 LEFT, 186 /** 187 * added to help the parsers with the generic types 188 */ 189 NULL; 190 public static VisionEyes fromCode(String codeString) throws FHIRException { 191 if (codeString == null || "".equals(codeString)) 192 return null; 193 if ("right".equals(codeString)) 194 return RIGHT; 195 if ("left".equals(codeString)) 196 return LEFT; 197 if (Configuration.isAcceptInvalidEnums()) 198 return null; 199 else 200 throw new FHIRException("Unknown VisionEyes code '"+codeString+"'"); 201 } 202 public String toCode() { 203 switch (this) { 204 case RIGHT: return "right"; 205 case LEFT: return "left"; 206 default: return "?"; 207 } 208 } 209 public String getSystem() { 210 switch (this) { 211 case RIGHT: return "http://hl7.org/fhir/vision-eye-codes"; 212 case LEFT: return "http://hl7.org/fhir/vision-eye-codes"; 213 default: return "?"; 214 } 215 } 216 public String getDefinition() { 217 switch (this) { 218 case RIGHT: return "Right Eye"; 219 case LEFT: return "Left Eye"; 220 default: return "?"; 221 } 222 } 223 public String getDisplay() { 224 switch (this) { 225 case RIGHT: return "Right Eye"; 226 case LEFT: return "Left Eye"; 227 default: return "?"; 228 } 229 } 230 } 231 232 public static class VisionEyesEnumFactory implements EnumFactory<VisionEyes> { 233 public VisionEyes fromCode(String codeString) throws IllegalArgumentException { 234 if (codeString == null || "".equals(codeString)) 235 if (codeString == null || "".equals(codeString)) 236 return null; 237 if ("right".equals(codeString)) 238 return VisionEyes.RIGHT; 239 if ("left".equals(codeString)) 240 return VisionEyes.LEFT; 241 throw new IllegalArgumentException("Unknown VisionEyes code '"+codeString+"'"); 242 } 243 public Enumeration<VisionEyes> fromType(Base code) throws FHIRException { 244 if (code == null) 245 return null; 246 if (code.isEmpty()) 247 return new Enumeration<VisionEyes>(this); 248 String codeString = ((PrimitiveType) code).asStringValue(); 249 if (codeString == null || "".equals(codeString)) 250 return null; 251 if ("right".equals(codeString)) 252 return new Enumeration<VisionEyes>(this, VisionEyes.RIGHT); 253 if ("left".equals(codeString)) 254 return new Enumeration<VisionEyes>(this, VisionEyes.LEFT); 255 throw new FHIRException("Unknown VisionEyes code '"+codeString+"'"); 256 } 257 public String toCode(VisionEyes code) { 258 if (code == VisionEyes.RIGHT) 259 return "right"; 260 if (code == VisionEyes.LEFT) 261 return "left"; 262 return "?"; 263 } 264 public String toSystem(VisionEyes code) { 265 return code.getSystem(); 266 } 267 } 268 269 public enum VisionBase { 270 /** 271 * top 272 */ 273 UP, 274 /** 275 * bottom 276 */ 277 DOWN, 278 /** 279 * inner edge 280 */ 281 IN, 282 /** 283 * outer edge 284 */ 285 OUT, 286 /** 287 * added to help the parsers with the generic types 288 */ 289 NULL; 290 public static VisionBase fromCode(String codeString) throws FHIRException { 291 if (codeString == null || "".equals(codeString)) 292 return null; 293 if ("up".equals(codeString)) 294 return UP; 295 if ("down".equals(codeString)) 296 return DOWN; 297 if ("in".equals(codeString)) 298 return IN; 299 if ("out".equals(codeString)) 300 return OUT; 301 if (Configuration.isAcceptInvalidEnums()) 302 return null; 303 else 304 throw new FHIRException("Unknown VisionBase code '"+codeString+"'"); 305 } 306 public String toCode() { 307 switch (this) { 308 case UP: return "up"; 309 case DOWN: return "down"; 310 case IN: return "in"; 311 case OUT: return "out"; 312 default: return "?"; 313 } 314 } 315 public String getSystem() { 316 switch (this) { 317 case UP: return "http://hl7.org/fhir/vision-base-codes"; 318 case DOWN: return "http://hl7.org/fhir/vision-base-codes"; 319 case IN: return "http://hl7.org/fhir/vision-base-codes"; 320 case OUT: return "http://hl7.org/fhir/vision-base-codes"; 321 default: return "?"; 322 } 323 } 324 public String getDefinition() { 325 switch (this) { 326 case UP: return "top"; 327 case DOWN: return "bottom"; 328 case IN: return "inner edge"; 329 case OUT: return "outer edge"; 330 default: return "?"; 331 } 332 } 333 public String getDisplay() { 334 switch (this) { 335 case UP: return "Up"; 336 case DOWN: return "Down"; 337 case IN: return "In"; 338 case OUT: return "Out"; 339 default: return "?"; 340 } 341 } 342 } 343 344 public static class VisionBaseEnumFactory implements EnumFactory<VisionBase> { 345 public VisionBase fromCode(String codeString) throws IllegalArgumentException { 346 if (codeString == null || "".equals(codeString)) 347 if (codeString == null || "".equals(codeString)) 348 return null; 349 if ("up".equals(codeString)) 350 return VisionBase.UP; 351 if ("down".equals(codeString)) 352 return VisionBase.DOWN; 353 if ("in".equals(codeString)) 354 return VisionBase.IN; 355 if ("out".equals(codeString)) 356 return VisionBase.OUT; 357 throw new IllegalArgumentException("Unknown VisionBase code '"+codeString+"'"); 358 } 359 public Enumeration<VisionBase> fromType(Base code) throws FHIRException { 360 if (code == null) 361 return null; 362 if (code.isEmpty()) 363 return new Enumeration<VisionBase>(this); 364 String codeString = ((PrimitiveType) code).asStringValue(); 365 if (codeString == null || "".equals(codeString)) 366 return null; 367 if ("up".equals(codeString)) 368 return new Enumeration<VisionBase>(this, VisionBase.UP); 369 if ("down".equals(codeString)) 370 return new Enumeration<VisionBase>(this, VisionBase.DOWN); 371 if ("in".equals(codeString)) 372 return new Enumeration<VisionBase>(this, VisionBase.IN); 373 if ("out".equals(codeString)) 374 return new Enumeration<VisionBase>(this, VisionBase.OUT); 375 throw new FHIRException("Unknown VisionBase code '"+codeString+"'"); 376 } 377 public String toCode(VisionBase code) { 378 if (code == VisionBase.UP) 379 return "up"; 380 if (code == VisionBase.DOWN) 381 return "down"; 382 if (code == VisionBase.IN) 383 return "in"; 384 if (code == VisionBase.OUT) 385 return "out"; 386 return "?"; 387 } 388 public String toSystem(VisionBase code) { 389 return code.getSystem(); 390 } 391 } 392 393 @Block() 394 public static class VisionPrescriptionDispenseComponent extends BackboneElement implements IBaseBackboneElement { 395 /** 396 * Identifies the type of vision correction product which is required for the patient. 397 */ 398 @Child(name = "product", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 399 @Description(shortDefinition="Product to be supplied", formalDefinition="Identifies the type of vision correction product which is required for the patient." ) 400 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/vision-product") 401 protected CodeableConcept product; 402 403 /** 404 * The eye for which the lens applies. 405 */ 406 @Child(name = "eye", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 407 @Description(shortDefinition="right | left", formalDefinition="The eye for which the lens applies." ) 408 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/vision-eye-codes") 409 protected Enumeration<VisionEyes> eye; 410 411 /** 412 * Lens power measured in diopters (0.25 units). 413 */ 414 @Child(name = "sphere", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=false) 415 @Description(shortDefinition="Lens sphere", formalDefinition="Lens power measured in diopters (0.25 units)." ) 416 protected DecimalType sphere; 417 418 /** 419 * Power adjustment for astigmatism measured in diopters (0.25 units). 420 */ 421 @Child(name = "cylinder", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=false) 422 @Description(shortDefinition="Lens cylinder", formalDefinition="Power adjustment for astigmatism measured in diopters (0.25 units)." ) 423 protected DecimalType cylinder; 424 425 /** 426 * Adjustment for astigmatism measured in integer degrees. 427 */ 428 @Child(name = "axis", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=false) 429 @Description(shortDefinition="Lens axis", formalDefinition="Adjustment for astigmatism measured in integer degrees." ) 430 protected IntegerType axis; 431 432 /** 433 * Amount of prism to compensate for eye alignment in fractional units. 434 */ 435 @Child(name = "prism", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=false) 436 @Description(shortDefinition="Lens prism", formalDefinition="Amount of prism to compensate for eye alignment in fractional units." ) 437 protected DecimalType prism; 438 439 /** 440 * The relative base, or reference lens edge, for the prism. 441 */ 442 @Child(name = "base", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false) 443 @Description(shortDefinition="up | down | in | out", formalDefinition="The relative base, or reference lens edge, for the prism." ) 444 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/vision-base-codes") 445 protected Enumeration<VisionBase> base; 446 447 /** 448 * Power adjustment for multifocal lenses measured in diopters (0.25 units). 449 */ 450 @Child(name = "add", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=false) 451 @Description(shortDefinition="Lens add", formalDefinition="Power adjustment for multifocal lenses measured in diopters (0.25 units)." ) 452 protected DecimalType add; 453 454 /** 455 * Contact lens power measured in diopters (0.25 units). 456 */ 457 @Child(name = "power", type = {DecimalType.class}, order=9, min=0, max=1, modifier=false, summary=false) 458 @Description(shortDefinition="Contact lens power", formalDefinition="Contact lens power measured in diopters (0.25 units)." ) 459 protected DecimalType power; 460 461 /** 462 * Back curvature measured in millimeters. 463 */ 464 @Child(name = "backCurve", type = {DecimalType.class}, order=10, min=0, max=1, modifier=false, summary=false) 465 @Description(shortDefinition="Contact lens back curvature", formalDefinition="Back curvature measured in millimeters." ) 466 protected DecimalType backCurve; 467 468 /** 469 * Contact lens diameter measured in millimeters. 470 */ 471 @Child(name = "diameter", type = {DecimalType.class}, order=11, min=0, max=1, modifier=false, summary=false) 472 @Description(shortDefinition="Contact lens diameter", formalDefinition="Contact lens diameter measured in millimeters." ) 473 protected DecimalType diameter; 474 475 /** 476 * The recommended maximum wear period for the lens. 477 */ 478 @Child(name = "duration", type = {SimpleQuantity.class}, order=12, min=0, max=1, modifier=false, summary=false) 479 @Description(shortDefinition="Lens wear duration", formalDefinition="The recommended maximum wear period for the lens." ) 480 protected SimpleQuantity duration; 481 482 /** 483 * Special color or pattern. 484 */ 485 @Child(name = "color", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) 486 @Description(shortDefinition="Color required", formalDefinition="Special color or pattern." ) 487 protected StringType color; 488 489 /** 490 * Brand recommendations or restrictions. 491 */ 492 @Child(name = "brand", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) 493 @Description(shortDefinition="Brand required", formalDefinition="Brand recommendations or restrictions." ) 494 protected StringType brand; 495 496 /** 497 * Notes for special requirements such as coatings and lens materials. 498 */ 499 @Child(name = "note", type = {Annotation.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 500 @Description(shortDefinition="Notes for coatings", formalDefinition="Notes for special requirements such as coatings and lens materials." ) 501 protected List<Annotation> note; 502 503 private static final long serialVersionUID = 400998008L; 504 505 /** 506 * Constructor 507 */ 508 public VisionPrescriptionDispenseComponent() { 509 super(); 510 } 511 512 /** 513 * @return {@link #product} (Identifies the type of vision correction product which is required for the patient.) 514 */ 515 public CodeableConcept getProduct() { 516 if (this.product == null) 517 if (Configuration.errorOnAutoCreate()) 518 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.product"); 519 else if (Configuration.doAutoCreate()) 520 this.product = new CodeableConcept(); // cc 521 return this.product; 522 } 523 524 public boolean hasProduct() { 525 return this.product != null && !this.product.isEmpty(); 526 } 527 528 /** 529 * @param value {@link #product} (Identifies the type of vision correction product which is required for the patient.) 530 */ 531 public VisionPrescriptionDispenseComponent setProduct(CodeableConcept value) { 532 this.product = value; 533 return this; 534 } 535 536 /** 537 * @return {@link #eye} (The eye for which the lens applies.). This is the underlying object with id, value and extensions. The accessor "getEye" gives direct access to the value 538 */ 539 public Enumeration<VisionEyes> getEyeElement() { 540 if (this.eye == null) 541 if (Configuration.errorOnAutoCreate()) 542 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.eye"); 543 else if (Configuration.doAutoCreate()) 544 this.eye = new Enumeration<VisionEyes>(new VisionEyesEnumFactory()); // bb 545 return this.eye; 546 } 547 548 public boolean hasEyeElement() { 549 return this.eye != null && !this.eye.isEmpty(); 550 } 551 552 public boolean hasEye() { 553 return this.eye != null && !this.eye.isEmpty(); 554 } 555 556 /** 557 * @param value {@link #eye} (The eye for which the lens applies.). This is the underlying object with id, value and extensions. The accessor "getEye" gives direct access to the value 558 */ 559 public VisionPrescriptionDispenseComponent setEyeElement(Enumeration<VisionEyes> value) { 560 this.eye = value; 561 return this; 562 } 563 564 /** 565 * @return The eye for which the lens applies. 566 */ 567 public VisionEyes getEye() { 568 return this.eye == null ? null : this.eye.getValue(); 569 } 570 571 /** 572 * @param value The eye for which the lens applies. 573 */ 574 public VisionPrescriptionDispenseComponent setEye(VisionEyes value) { 575 if (value == null) 576 this.eye = null; 577 else { 578 if (this.eye == null) 579 this.eye = new Enumeration<VisionEyes>(new VisionEyesEnumFactory()); 580 this.eye.setValue(value); 581 } 582 return this; 583 } 584 585 /** 586 * @return {@link #sphere} (Lens power measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getSphere" gives direct access to the value 587 */ 588 public DecimalType getSphereElement() { 589 if (this.sphere == null) 590 if (Configuration.errorOnAutoCreate()) 591 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.sphere"); 592 else if (Configuration.doAutoCreate()) 593 this.sphere = new DecimalType(); // bb 594 return this.sphere; 595 } 596 597 public boolean hasSphereElement() { 598 return this.sphere != null && !this.sphere.isEmpty(); 599 } 600 601 public boolean hasSphere() { 602 return this.sphere != null && !this.sphere.isEmpty(); 603 } 604 605 /** 606 * @param value {@link #sphere} (Lens power measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getSphere" gives direct access to the value 607 */ 608 public VisionPrescriptionDispenseComponent setSphereElement(DecimalType value) { 609 this.sphere = value; 610 return this; 611 } 612 613 /** 614 * @return Lens power measured in diopters (0.25 units). 615 */ 616 public BigDecimal getSphere() { 617 return this.sphere == null ? null : this.sphere.getValue(); 618 } 619 620 /** 621 * @param value Lens power measured in diopters (0.25 units). 622 */ 623 public VisionPrescriptionDispenseComponent setSphere(BigDecimal value) { 624 if (value == null) 625 this.sphere = null; 626 else { 627 if (this.sphere == null) 628 this.sphere = new DecimalType(); 629 this.sphere.setValue(value); 630 } 631 return this; 632 } 633 634 /** 635 * @param value Lens power measured in diopters (0.25 units). 636 */ 637 public VisionPrescriptionDispenseComponent setSphere(long value) { 638 this.sphere = new DecimalType(); 639 this.sphere.setValue(value); 640 return this; 641 } 642 643 /** 644 * @param value Lens power measured in diopters (0.25 units). 645 */ 646 public VisionPrescriptionDispenseComponent setSphere(double value) { 647 this.sphere = new DecimalType(); 648 this.sphere.setValue(value); 649 return this; 650 } 651 652 /** 653 * @return {@link #cylinder} (Power adjustment for astigmatism measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getCylinder" gives direct access to the value 654 */ 655 public DecimalType getCylinderElement() { 656 if (this.cylinder == null) 657 if (Configuration.errorOnAutoCreate()) 658 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.cylinder"); 659 else if (Configuration.doAutoCreate()) 660 this.cylinder = new DecimalType(); // bb 661 return this.cylinder; 662 } 663 664 public boolean hasCylinderElement() { 665 return this.cylinder != null && !this.cylinder.isEmpty(); 666 } 667 668 public boolean hasCylinder() { 669 return this.cylinder != null && !this.cylinder.isEmpty(); 670 } 671 672 /** 673 * @param value {@link #cylinder} (Power adjustment for astigmatism measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getCylinder" gives direct access to the value 674 */ 675 public VisionPrescriptionDispenseComponent setCylinderElement(DecimalType value) { 676 this.cylinder = value; 677 return this; 678 } 679 680 /** 681 * @return Power adjustment for astigmatism measured in diopters (0.25 units). 682 */ 683 public BigDecimal getCylinder() { 684 return this.cylinder == null ? null : this.cylinder.getValue(); 685 } 686 687 /** 688 * @param value Power adjustment for astigmatism measured in diopters (0.25 units). 689 */ 690 public VisionPrescriptionDispenseComponent setCylinder(BigDecimal value) { 691 if (value == null) 692 this.cylinder = null; 693 else { 694 if (this.cylinder == null) 695 this.cylinder = new DecimalType(); 696 this.cylinder.setValue(value); 697 } 698 return this; 699 } 700 701 /** 702 * @param value Power adjustment for astigmatism measured in diopters (0.25 units). 703 */ 704 public VisionPrescriptionDispenseComponent setCylinder(long value) { 705 this.cylinder = new DecimalType(); 706 this.cylinder.setValue(value); 707 return this; 708 } 709 710 /** 711 * @param value Power adjustment for astigmatism measured in diopters (0.25 units). 712 */ 713 public VisionPrescriptionDispenseComponent setCylinder(double value) { 714 this.cylinder = new DecimalType(); 715 this.cylinder.setValue(value); 716 return this; 717 } 718 719 /** 720 * @return {@link #axis} (Adjustment for astigmatism measured in integer degrees.). This is the underlying object with id, value and extensions. The accessor "getAxis" gives direct access to the value 721 */ 722 public IntegerType getAxisElement() { 723 if (this.axis == null) 724 if (Configuration.errorOnAutoCreate()) 725 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.axis"); 726 else if (Configuration.doAutoCreate()) 727 this.axis = new IntegerType(); // bb 728 return this.axis; 729 } 730 731 public boolean hasAxisElement() { 732 return this.axis != null && !this.axis.isEmpty(); 733 } 734 735 public boolean hasAxis() { 736 return this.axis != null && !this.axis.isEmpty(); 737 } 738 739 /** 740 * @param value {@link #axis} (Adjustment for astigmatism measured in integer degrees.). This is the underlying object with id, value and extensions. The accessor "getAxis" gives direct access to the value 741 */ 742 public VisionPrescriptionDispenseComponent setAxisElement(IntegerType value) { 743 this.axis = value; 744 return this; 745 } 746 747 /** 748 * @return Adjustment for astigmatism measured in integer degrees. 749 */ 750 public int getAxis() { 751 return this.axis == null || this.axis.isEmpty() ? 0 : this.axis.getValue(); 752 } 753 754 /** 755 * @param value Adjustment for astigmatism measured in integer degrees. 756 */ 757 public VisionPrescriptionDispenseComponent setAxis(int value) { 758 if (this.axis == null) 759 this.axis = new IntegerType(); 760 this.axis.setValue(value); 761 return this; 762 } 763 764 /** 765 * @return {@link #prism} (Amount of prism to compensate for eye alignment in fractional units.). This is the underlying object with id, value and extensions. The accessor "getPrism" gives direct access to the value 766 */ 767 public DecimalType getPrismElement() { 768 if (this.prism == null) 769 if (Configuration.errorOnAutoCreate()) 770 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.prism"); 771 else if (Configuration.doAutoCreate()) 772 this.prism = new DecimalType(); // bb 773 return this.prism; 774 } 775 776 public boolean hasPrismElement() { 777 return this.prism != null && !this.prism.isEmpty(); 778 } 779 780 public boolean hasPrism() { 781 return this.prism != null && !this.prism.isEmpty(); 782 } 783 784 /** 785 * @param value {@link #prism} (Amount of prism to compensate for eye alignment in fractional units.). This is the underlying object with id, value and extensions. The accessor "getPrism" gives direct access to the value 786 */ 787 public VisionPrescriptionDispenseComponent setPrismElement(DecimalType value) { 788 this.prism = value; 789 return this; 790 } 791 792 /** 793 * @return Amount of prism to compensate for eye alignment in fractional units. 794 */ 795 public BigDecimal getPrism() { 796 return this.prism == null ? null : this.prism.getValue(); 797 } 798 799 /** 800 * @param value Amount of prism to compensate for eye alignment in fractional units. 801 */ 802 public VisionPrescriptionDispenseComponent setPrism(BigDecimal value) { 803 if (value == null) 804 this.prism = null; 805 else { 806 if (this.prism == null) 807 this.prism = new DecimalType(); 808 this.prism.setValue(value); 809 } 810 return this; 811 } 812 813 /** 814 * @param value Amount of prism to compensate for eye alignment in fractional units. 815 */ 816 public VisionPrescriptionDispenseComponent setPrism(long value) { 817 this.prism = new DecimalType(); 818 this.prism.setValue(value); 819 return this; 820 } 821 822 /** 823 * @param value Amount of prism to compensate for eye alignment in fractional units. 824 */ 825 public VisionPrescriptionDispenseComponent setPrism(double value) { 826 this.prism = new DecimalType(); 827 this.prism.setValue(value); 828 return this; 829 } 830 831 /** 832 * @return {@link #base} (The relative base, or reference lens edge, for the prism.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value 833 */ 834 public Enumeration<VisionBase> getBaseElement() { 835 if (this.base == null) 836 if (Configuration.errorOnAutoCreate()) 837 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.base"); 838 else if (Configuration.doAutoCreate()) 839 this.base = new Enumeration<VisionBase>(new VisionBaseEnumFactory()); // bb 840 return this.base; 841 } 842 843 public boolean hasBaseElement() { 844 return this.base != null && !this.base.isEmpty(); 845 } 846 847 public boolean hasBase() { 848 return this.base != null && !this.base.isEmpty(); 849 } 850 851 /** 852 * @param value {@link #base} (The relative base, or reference lens edge, for the prism.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value 853 */ 854 public VisionPrescriptionDispenseComponent setBaseElement(Enumeration<VisionBase> value) { 855 this.base = value; 856 return this; 857 } 858 859 /** 860 * @return The relative base, or reference lens edge, for the prism. 861 */ 862 public VisionBase getBase() { 863 return this.base == null ? null : this.base.getValue(); 864 } 865 866 /** 867 * @param value The relative base, or reference lens edge, for the prism. 868 */ 869 public VisionPrescriptionDispenseComponent setBase(VisionBase value) { 870 if (value == null) 871 this.base = null; 872 else { 873 if (this.base == null) 874 this.base = new Enumeration<VisionBase>(new VisionBaseEnumFactory()); 875 this.base.setValue(value); 876 } 877 return this; 878 } 879 880 /** 881 * @return {@link #add} (Power adjustment for multifocal lenses measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getAdd" gives direct access to the value 882 */ 883 public DecimalType getAddElement() { 884 if (this.add == null) 885 if (Configuration.errorOnAutoCreate()) 886 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.add"); 887 else if (Configuration.doAutoCreate()) 888 this.add = new DecimalType(); // bb 889 return this.add; 890 } 891 892 public boolean hasAddElement() { 893 return this.add != null && !this.add.isEmpty(); 894 } 895 896 public boolean hasAdd() { 897 return this.add != null && !this.add.isEmpty(); 898 } 899 900 /** 901 * @param value {@link #add} (Power adjustment for multifocal lenses measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getAdd" gives direct access to the value 902 */ 903 public VisionPrescriptionDispenseComponent setAddElement(DecimalType value) { 904 this.add = value; 905 return this; 906 } 907 908 /** 909 * @return Power adjustment for multifocal lenses measured in diopters (0.25 units). 910 */ 911 public BigDecimal getAdd() { 912 return this.add == null ? null : this.add.getValue(); 913 } 914 915 /** 916 * @param value Power adjustment for multifocal lenses measured in diopters (0.25 units). 917 */ 918 public VisionPrescriptionDispenseComponent setAdd(BigDecimal value) { 919 if (value == null) 920 this.add = null; 921 else { 922 if (this.add == null) 923 this.add = new DecimalType(); 924 this.add.setValue(value); 925 } 926 return this; 927 } 928 929 /** 930 * @param value Power adjustment for multifocal lenses measured in diopters (0.25 units). 931 */ 932 public VisionPrescriptionDispenseComponent setAdd(long value) { 933 this.add = new DecimalType(); 934 this.add.setValue(value); 935 return this; 936 } 937 938 /** 939 * @param value Power adjustment for multifocal lenses measured in diopters (0.25 units). 940 */ 941 public VisionPrescriptionDispenseComponent setAdd(double value) { 942 this.add = new DecimalType(); 943 this.add.setValue(value); 944 return this; 945 } 946 947 /** 948 * @return {@link #power} (Contact lens power measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getPower" gives direct access to the value 949 */ 950 public DecimalType getPowerElement() { 951 if (this.power == null) 952 if (Configuration.errorOnAutoCreate()) 953 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.power"); 954 else if (Configuration.doAutoCreate()) 955 this.power = new DecimalType(); // bb 956 return this.power; 957 } 958 959 public boolean hasPowerElement() { 960 return this.power != null && !this.power.isEmpty(); 961 } 962 963 public boolean hasPower() { 964 return this.power != null && !this.power.isEmpty(); 965 } 966 967 /** 968 * @param value {@link #power} (Contact lens power measured in diopters (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getPower" gives direct access to the value 969 */ 970 public VisionPrescriptionDispenseComponent setPowerElement(DecimalType value) { 971 this.power = value; 972 return this; 973 } 974 975 /** 976 * @return Contact lens power measured in diopters (0.25 units). 977 */ 978 public BigDecimal getPower() { 979 return this.power == null ? null : this.power.getValue(); 980 } 981 982 /** 983 * @param value Contact lens power measured in diopters (0.25 units). 984 */ 985 public VisionPrescriptionDispenseComponent setPower(BigDecimal value) { 986 if (value == null) 987 this.power = null; 988 else { 989 if (this.power == null) 990 this.power = new DecimalType(); 991 this.power.setValue(value); 992 } 993 return this; 994 } 995 996 /** 997 * @param value Contact lens power measured in diopters (0.25 units). 998 */ 999 public VisionPrescriptionDispenseComponent setPower(long value) { 1000 this.power = new DecimalType(); 1001 this.power.setValue(value); 1002 return this; 1003 } 1004 1005 /** 1006 * @param value Contact lens power measured in diopters (0.25 units). 1007 */ 1008 public VisionPrescriptionDispenseComponent setPower(double value) { 1009 this.power = new DecimalType(); 1010 this.power.setValue(value); 1011 return this; 1012 } 1013 1014 /** 1015 * @return {@link #backCurve} (Back curvature measured in millimeters.). This is the underlying object with id, value and extensions. The accessor "getBackCurve" gives direct access to the value 1016 */ 1017 public DecimalType getBackCurveElement() { 1018 if (this.backCurve == null) 1019 if (Configuration.errorOnAutoCreate()) 1020 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.backCurve"); 1021 else if (Configuration.doAutoCreate()) 1022 this.backCurve = new DecimalType(); // bb 1023 return this.backCurve; 1024 } 1025 1026 public boolean hasBackCurveElement() { 1027 return this.backCurve != null && !this.backCurve.isEmpty(); 1028 } 1029 1030 public boolean hasBackCurve() { 1031 return this.backCurve != null && !this.backCurve.isEmpty(); 1032 } 1033 1034 /** 1035 * @param value {@link #backCurve} (Back curvature measured in millimeters.). This is the underlying object with id, value and extensions. The accessor "getBackCurve" gives direct access to the value 1036 */ 1037 public VisionPrescriptionDispenseComponent setBackCurveElement(DecimalType value) { 1038 this.backCurve = value; 1039 return this; 1040 } 1041 1042 /** 1043 * @return Back curvature measured in millimeters. 1044 */ 1045 public BigDecimal getBackCurve() { 1046 return this.backCurve == null ? null : this.backCurve.getValue(); 1047 } 1048 1049 /** 1050 * @param value Back curvature measured in millimeters. 1051 */ 1052 public VisionPrescriptionDispenseComponent setBackCurve(BigDecimal value) { 1053 if (value == null) 1054 this.backCurve = null; 1055 else { 1056 if (this.backCurve == null) 1057 this.backCurve = new DecimalType(); 1058 this.backCurve.setValue(value); 1059 } 1060 return this; 1061 } 1062 1063 /** 1064 * @param value Back curvature measured in millimeters. 1065 */ 1066 public VisionPrescriptionDispenseComponent setBackCurve(long value) { 1067 this.backCurve = new DecimalType(); 1068 this.backCurve.setValue(value); 1069 return this; 1070 } 1071 1072 /** 1073 * @param value Back curvature measured in millimeters. 1074 */ 1075 public VisionPrescriptionDispenseComponent setBackCurve(double value) { 1076 this.backCurve = new DecimalType(); 1077 this.backCurve.setValue(value); 1078 return this; 1079 } 1080 1081 /** 1082 * @return {@link #diameter} (Contact lens diameter measured in millimeters.). This is the underlying object with id, value and extensions. The accessor "getDiameter" gives direct access to the value 1083 */ 1084 public DecimalType getDiameterElement() { 1085 if (this.diameter == null) 1086 if (Configuration.errorOnAutoCreate()) 1087 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.diameter"); 1088 else if (Configuration.doAutoCreate()) 1089 this.diameter = new DecimalType(); // bb 1090 return this.diameter; 1091 } 1092 1093 public boolean hasDiameterElement() { 1094 return this.diameter != null && !this.diameter.isEmpty(); 1095 } 1096 1097 public boolean hasDiameter() { 1098 return this.diameter != null && !this.diameter.isEmpty(); 1099 } 1100 1101 /** 1102 * @param value {@link #diameter} (Contact lens diameter measured in millimeters.). This is the underlying object with id, value and extensions. The accessor "getDiameter" gives direct access to the value 1103 */ 1104 public VisionPrescriptionDispenseComponent setDiameterElement(DecimalType value) { 1105 this.diameter = value; 1106 return this; 1107 } 1108 1109 /** 1110 * @return Contact lens diameter measured in millimeters. 1111 */ 1112 public BigDecimal getDiameter() { 1113 return this.diameter == null ? null : this.diameter.getValue(); 1114 } 1115 1116 /** 1117 * @param value Contact lens diameter measured in millimeters. 1118 */ 1119 public VisionPrescriptionDispenseComponent setDiameter(BigDecimal value) { 1120 if (value == null) 1121 this.diameter = null; 1122 else { 1123 if (this.diameter == null) 1124 this.diameter = new DecimalType(); 1125 this.diameter.setValue(value); 1126 } 1127 return this; 1128 } 1129 1130 /** 1131 * @param value Contact lens diameter measured in millimeters. 1132 */ 1133 public VisionPrescriptionDispenseComponent setDiameter(long value) { 1134 this.diameter = new DecimalType(); 1135 this.diameter.setValue(value); 1136 return this; 1137 } 1138 1139 /** 1140 * @param value Contact lens diameter measured in millimeters. 1141 */ 1142 public VisionPrescriptionDispenseComponent setDiameter(double value) { 1143 this.diameter = new DecimalType(); 1144 this.diameter.setValue(value); 1145 return this; 1146 } 1147 1148 /** 1149 * @return {@link #duration} (The recommended maximum wear period for the lens.) 1150 */ 1151 public SimpleQuantity getDuration() { 1152 if (this.duration == null) 1153 if (Configuration.errorOnAutoCreate()) 1154 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.duration"); 1155 else if (Configuration.doAutoCreate()) 1156 this.duration = new SimpleQuantity(); // cc 1157 return this.duration; 1158 } 1159 1160 public boolean hasDuration() { 1161 return this.duration != null && !this.duration.isEmpty(); 1162 } 1163 1164 /** 1165 * @param value {@link #duration} (The recommended maximum wear period for the lens.) 1166 */ 1167 public VisionPrescriptionDispenseComponent setDuration(SimpleQuantity value) { 1168 this.duration = value; 1169 return this; 1170 } 1171 1172 /** 1173 * @return {@link #color} (Special color or pattern.). This is the underlying object with id, value and extensions. The accessor "getColor" gives direct access to the value 1174 */ 1175 public StringType getColorElement() { 1176 if (this.color == null) 1177 if (Configuration.errorOnAutoCreate()) 1178 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.color"); 1179 else if (Configuration.doAutoCreate()) 1180 this.color = new StringType(); // bb 1181 return this.color; 1182 } 1183 1184 public boolean hasColorElement() { 1185 return this.color != null && !this.color.isEmpty(); 1186 } 1187 1188 public boolean hasColor() { 1189 return this.color != null && !this.color.isEmpty(); 1190 } 1191 1192 /** 1193 * @param value {@link #color} (Special color or pattern.). This is the underlying object with id, value and extensions. The accessor "getColor" gives direct access to the value 1194 */ 1195 public VisionPrescriptionDispenseComponent setColorElement(StringType value) { 1196 this.color = value; 1197 return this; 1198 } 1199 1200 /** 1201 * @return Special color or pattern. 1202 */ 1203 public String getColor() { 1204 return this.color == null ? null : this.color.getValue(); 1205 } 1206 1207 /** 1208 * @param value Special color or pattern. 1209 */ 1210 public VisionPrescriptionDispenseComponent setColor(String value) { 1211 if (Utilities.noString(value)) 1212 this.color = null; 1213 else { 1214 if (this.color == null) 1215 this.color = new StringType(); 1216 this.color.setValue(value); 1217 } 1218 return this; 1219 } 1220 1221 /** 1222 * @return {@link #brand} (Brand recommendations or restrictions.). This is the underlying object with id, value and extensions. The accessor "getBrand" gives direct access to the value 1223 */ 1224 public StringType getBrandElement() { 1225 if (this.brand == null) 1226 if (Configuration.errorOnAutoCreate()) 1227 throw new Error("Attempt to auto-create VisionPrescriptionDispenseComponent.brand"); 1228 else if (Configuration.doAutoCreate()) 1229 this.brand = new StringType(); // bb 1230 return this.brand; 1231 } 1232 1233 public boolean hasBrandElement() { 1234 return this.brand != null && !this.brand.isEmpty(); 1235 } 1236 1237 public boolean hasBrand() { 1238 return this.brand != null && !this.brand.isEmpty(); 1239 } 1240 1241 /** 1242 * @param value {@link #brand} (Brand recommendations or restrictions.). This is the underlying object with id, value and extensions. The accessor "getBrand" gives direct access to the value 1243 */ 1244 public VisionPrescriptionDispenseComponent setBrandElement(StringType value) { 1245 this.brand = value; 1246 return this; 1247 } 1248 1249 /** 1250 * @return Brand recommendations or restrictions. 1251 */ 1252 public String getBrand() { 1253 return this.brand == null ? null : this.brand.getValue(); 1254 } 1255 1256 /** 1257 * @param value Brand recommendations or restrictions. 1258 */ 1259 public VisionPrescriptionDispenseComponent setBrand(String value) { 1260 if (Utilities.noString(value)) 1261 this.brand = null; 1262 else { 1263 if (this.brand == null) 1264 this.brand = new StringType(); 1265 this.brand.setValue(value); 1266 } 1267 return this; 1268 } 1269 1270 /** 1271 * @return {@link #note} (Notes for special requirements such as coatings and lens materials.) 1272 */ 1273 public List<Annotation> getNote() { 1274 if (this.note == null) 1275 this.note = new ArrayList<Annotation>(); 1276 return this.note; 1277 } 1278 1279 /** 1280 * @return Returns a reference to <code>this</code> for easy method chaining 1281 */ 1282 public VisionPrescriptionDispenseComponent setNote(List<Annotation> theNote) { 1283 this.note = theNote; 1284 return this; 1285 } 1286 1287 public boolean hasNote() { 1288 if (this.note == null) 1289 return false; 1290 for (Annotation item : this.note) 1291 if (!item.isEmpty()) 1292 return true; 1293 return false; 1294 } 1295 1296 public Annotation addNote() { //3 1297 Annotation t = new Annotation(); 1298 if (this.note == null) 1299 this.note = new ArrayList<Annotation>(); 1300 this.note.add(t); 1301 return t; 1302 } 1303 1304 public VisionPrescriptionDispenseComponent addNote(Annotation t) { //3 1305 if (t == null) 1306 return this; 1307 if (this.note == null) 1308 this.note = new ArrayList<Annotation>(); 1309 this.note.add(t); 1310 return this; 1311 } 1312 1313 /** 1314 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 1315 */ 1316 public Annotation getNoteFirstRep() { 1317 if (getNote().isEmpty()) { 1318 addNote(); 1319 } 1320 return getNote().get(0); 1321 } 1322 1323 protected void listChildren(List<Property> children) { 1324 super.listChildren(children); 1325 children.add(new Property("product", "CodeableConcept", "Identifies the type of vision correction product which is required for the patient.", 0, 1, product)); 1326 children.add(new Property("eye", "code", "The eye for which the lens applies.", 0, 1, eye)); 1327 children.add(new Property("sphere", "decimal", "Lens power measured in diopters (0.25 units).", 0, 1, sphere)); 1328 children.add(new Property("cylinder", "decimal", "Power adjustment for astigmatism measured in diopters (0.25 units).", 0, 1, cylinder)); 1329 children.add(new Property("axis", "integer", "Adjustment for astigmatism measured in integer degrees.", 0, 1, axis)); 1330 children.add(new Property("prism", "decimal", "Amount of prism to compensate for eye alignment in fractional units.", 0, 1, prism)); 1331 children.add(new Property("base", "code", "The relative base, or reference lens edge, for the prism.", 0, 1, base)); 1332 children.add(new Property("add", "decimal", "Power adjustment for multifocal lenses measured in diopters (0.25 units).", 0, 1, add)); 1333 children.add(new Property("power", "decimal", "Contact lens power measured in diopters (0.25 units).", 0, 1, power)); 1334 children.add(new Property("backCurve", "decimal", "Back curvature measured in millimeters.", 0, 1, backCurve)); 1335 children.add(new Property("diameter", "decimal", "Contact lens diameter measured in millimeters.", 0, 1, diameter)); 1336 children.add(new Property("duration", "SimpleQuantity", "The recommended maximum wear period for the lens.", 0, 1, duration)); 1337 children.add(new Property("color", "string", "Special color or pattern.", 0, 1, color)); 1338 children.add(new Property("brand", "string", "Brand recommendations or restrictions.", 0, 1, brand)); 1339 children.add(new Property("note", "Annotation", "Notes for special requirements such as coatings and lens materials.", 0, java.lang.Integer.MAX_VALUE, note)); 1340 } 1341 1342 @Override 1343 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1344 switch (_hash) { 1345 case -309474065: /*product*/ return new Property("product", "CodeableConcept", "Identifies the type of vision correction product which is required for the patient.", 0, 1, product); 1346 case 100913: /*eye*/ return new Property("eye", "code", "The eye for which the lens applies.", 0, 1, eye); 1347 case -895981619: /*sphere*/ return new Property("sphere", "decimal", "Lens power measured in diopters (0.25 units).", 0, 1, sphere); 1348 case -349378602: /*cylinder*/ return new Property("cylinder", "decimal", "Power adjustment for astigmatism measured in diopters (0.25 units).", 0, 1, cylinder); 1349 case 3008417: /*axis*/ return new Property("axis", "integer", "Adjustment for astigmatism measured in integer degrees.", 0, 1, axis); 1350 case 106935105: /*prism*/ return new Property("prism", "decimal", "Amount of prism to compensate for eye alignment in fractional units.", 0, 1, prism); 1351 case 3016401: /*base*/ return new Property("base", "code", "The relative base, or reference lens edge, for the prism.", 0, 1, base); 1352 case 96417: /*add*/ return new Property("add", "decimal", "Power adjustment for multifocal lenses measured in diopters (0.25 units).", 0, 1, add); 1353 case 106858757: /*power*/ return new Property("power", "decimal", "Contact lens power measured in diopters (0.25 units).", 0, 1, power); 1354 case 1309344840: /*backCurve*/ return new Property("backCurve", "decimal", "Back curvature measured in millimeters.", 0, 1, backCurve); 1355 case -233204595: /*diameter*/ return new Property("diameter", "decimal", "Contact lens diameter measured in millimeters.", 0, 1, diameter); 1356 case -1992012396: /*duration*/ return new Property("duration", "SimpleQuantity", "The recommended maximum wear period for the lens.", 0, 1, duration); 1357 case 94842723: /*color*/ return new Property("color", "string", "Special color or pattern.", 0, 1, color); 1358 case 93997959: /*brand*/ return new Property("brand", "string", "Brand recommendations or restrictions.", 0, 1, brand); 1359 case 3387378: /*note*/ return new Property("note", "Annotation", "Notes for special requirements such as coatings and lens materials.", 0, java.lang.Integer.MAX_VALUE, note); 1360 default: return super.getNamedProperty(_hash, _name, _checkValid); 1361 } 1362 1363 } 1364 1365 @Override 1366 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1367 switch (hash) { 1368 case -309474065: /*product*/ return this.product == null ? new Base[0] : new Base[] {this.product}; // CodeableConcept 1369 case 100913: /*eye*/ return this.eye == null ? new Base[0] : new Base[] {this.eye}; // Enumeration<VisionEyes> 1370 case -895981619: /*sphere*/ return this.sphere == null ? new Base[0] : new Base[] {this.sphere}; // DecimalType 1371 case -349378602: /*cylinder*/ return this.cylinder == null ? new Base[0] : new Base[] {this.cylinder}; // DecimalType 1372 case 3008417: /*axis*/ return this.axis == null ? new Base[0] : new Base[] {this.axis}; // IntegerType 1373 case 106935105: /*prism*/ return this.prism == null ? new Base[0] : new Base[] {this.prism}; // DecimalType 1374 case 3016401: /*base*/ return this.base == null ? new Base[0] : new Base[] {this.base}; // Enumeration<VisionBase> 1375 case 96417: /*add*/ return this.add == null ? new Base[0] : new Base[] {this.add}; // DecimalType 1376 case 106858757: /*power*/ return this.power == null ? new Base[0] : new Base[] {this.power}; // DecimalType 1377 case 1309344840: /*backCurve*/ return this.backCurve == null ? new Base[0] : new Base[] {this.backCurve}; // DecimalType 1378 case -233204595: /*diameter*/ return this.diameter == null ? new Base[0] : new Base[] {this.diameter}; // DecimalType 1379 case -1992012396: /*duration*/ return this.duration == null ? new Base[0] : new Base[] {this.duration}; // SimpleQuantity 1380 case 94842723: /*color*/ return this.color == null ? new Base[0] : new Base[] {this.color}; // StringType 1381 case 93997959: /*brand*/ return this.brand == null ? new Base[0] : new Base[] {this.brand}; // StringType 1382 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 1383 default: return super.getProperty(hash, name, checkValid); 1384 } 1385 1386 } 1387 1388 @Override 1389 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1390 switch (hash) { 1391 case -309474065: // product 1392 this.product = castToCodeableConcept(value); // CodeableConcept 1393 return value; 1394 case 100913: // eye 1395 value = new VisionEyesEnumFactory().fromType(castToCode(value)); 1396 this.eye = (Enumeration) value; // Enumeration<VisionEyes> 1397 return value; 1398 case -895981619: // sphere 1399 this.sphere = castToDecimal(value); // DecimalType 1400 return value; 1401 case -349378602: // cylinder 1402 this.cylinder = castToDecimal(value); // DecimalType 1403 return value; 1404 case 3008417: // axis 1405 this.axis = castToInteger(value); // IntegerType 1406 return value; 1407 case 106935105: // prism 1408 this.prism = castToDecimal(value); // DecimalType 1409 return value; 1410 case 3016401: // base 1411 value = new VisionBaseEnumFactory().fromType(castToCode(value)); 1412 this.base = (Enumeration) value; // Enumeration<VisionBase> 1413 return value; 1414 case 96417: // add 1415 this.add = castToDecimal(value); // DecimalType 1416 return value; 1417 case 106858757: // power 1418 this.power = castToDecimal(value); // DecimalType 1419 return value; 1420 case 1309344840: // backCurve 1421 this.backCurve = castToDecimal(value); // DecimalType 1422 return value; 1423 case -233204595: // diameter 1424 this.diameter = castToDecimal(value); // DecimalType 1425 return value; 1426 case -1992012396: // duration 1427 this.duration = castToSimpleQuantity(value); // SimpleQuantity 1428 return value; 1429 case 94842723: // color 1430 this.color = castToString(value); // StringType 1431 return value; 1432 case 93997959: // brand 1433 this.brand = castToString(value); // StringType 1434 return value; 1435 case 3387378: // note 1436 this.getNote().add(castToAnnotation(value)); // Annotation 1437 return value; 1438 default: return super.setProperty(hash, name, value); 1439 } 1440 1441 } 1442 1443 @Override 1444 public Base setProperty(String name, Base value) throws FHIRException { 1445 if (name.equals("product")) { 1446 this.product = castToCodeableConcept(value); // CodeableConcept 1447 } else if (name.equals("eye")) { 1448 value = new VisionEyesEnumFactory().fromType(castToCode(value)); 1449 this.eye = (Enumeration) value; // Enumeration<VisionEyes> 1450 } else if (name.equals("sphere")) { 1451 this.sphere = castToDecimal(value); // DecimalType 1452 } else if (name.equals("cylinder")) { 1453 this.cylinder = castToDecimal(value); // DecimalType 1454 } else if (name.equals("axis")) { 1455 this.axis = castToInteger(value); // IntegerType 1456 } else if (name.equals("prism")) { 1457 this.prism = castToDecimal(value); // DecimalType 1458 } else if (name.equals("base")) { 1459 value = new VisionBaseEnumFactory().fromType(castToCode(value)); 1460 this.base = (Enumeration) value; // Enumeration<VisionBase> 1461 } else if (name.equals("add")) { 1462 this.add = castToDecimal(value); // DecimalType 1463 } else if (name.equals("power")) { 1464 this.power = castToDecimal(value); // DecimalType 1465 } else if (name.equals("backCurve")) { 1466 this.backCurve = castToDecimal(value); // DecimalType 1467 } else if (name.equals("diameter")) { 1468 this.diameter = castToDecimal(value); // DecimalType 1469 } else if (name.equals("duration")) { 1470 this.duration = castToSimpleQuantity(value); // SimpleQuantity 1471 } else if (name.equals("color")) { 1472 this.color = castToString(value); // StringType 1473 } else if (name.equals("brand")) { 1474 this.brand = castToString(value); // StringType 1475 } else if (name.equals("note")) { 1476 this.getNote().add(castToAnnotation(value)); 1477 } else 1478 return super.setProperty(name, value); 1479 return value; 1480 } 1481 1482 @Override 1483 public Base makeProperty(int hash, String name) throws FHIRException { 1484 switch (hash) { 1485 case -309474065: return getProduct(); 1486 case 100913: return getEyeElement(); 1487 case -895981619: return getSphereElement(); 1488 case -349378602: return getCylinderElement(); 1489 case 3008417: return getAxisElement(); 1490 case 106935105: return getPrismElement(); 1491 case 3016401: return getBaseElement(); 1492 case 96417: return getAddElement(); 1493 case 106858757: return getPowerElement(); 1494 case 1309344840: return getBackCurveElement(); 1495 case -233204595: return getDiameterElement(); 1496 case -1992012396: return getDuration(); 1497 case 94842723: return getColorElement(); 1498 case 93997959: return getBrandElement(); 1499 case 3387378: return addNote(); 1500 default: return super.makeProperty(hash, name); 1501 } 1502 1503 } 1504 1505 @Override 1506 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1507 switch (hash) { 1508 case -309474065: /*product*/ return new String[] {"CodeableConcept"}; 1509 case 100913: /*eye*/ return new String[] {"code"}; 1510 case -895981619: /*sphere*/ return new String[] {"decimal"}; 1511 case -349378602: /*cylinder*/ return new String[] {"decimal"}; 1512 case 3008417: /*axis*/ return new String[] {"integer"}; 1513 case 106935105: /*prism*/ return new String[] {"decimal"}; 1514 case 3016401: /*base*/ return new String[] {"code"}; 1515 case 96417: /*add*/ return new String[] {"decimal"}; 1516 case 106858757: /*power*/ return new String[] {"decimal"}; 1517 case 1309344840: /*backCurve*/ return new String[] {"decimal"}; 1518 case -233204595: /*diameter*/ return new String[] {"decimal"}; 1519 case -1992012396: /*duration*/ return new String[] {"SimpleQuantity"}; 1520 case 94842723: /*color*/ return new String[] {"string"}; 1521 case 93997959: /*brand*/ return new String[] {"string"}; 1522 case 3387378: /*note*/ return new String[] {"Annotation"}; 1523 default: return super.getTypesForProperty(hash, name); 1524 } 1525 1526 } 1527 1528 @Override 1529 public Base addChild(String name) throws FHIRException { 1530 if (name.equals("product")) { 1531 this.product = new CodeableConcept(); 1532 return this.product; 1533 } 1534 else if (name.equals("eye")) { 1535 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.eye"); 1536 } 1537 else if (name.equals("sphere")) { 1538 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.sphere"); 1539 } 1540 else if (name.equals("cylinder")) { 1541 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.cylinder"); 1542 } 1543 else if (name.equals("axis")) { 1544 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.axis"); 1545 } 1546 else if (name.equals("prism")) { 1547 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.prism"); 1548 } 1549 else if (name.equals("base")) { 1550 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.base"); 1551 } 1552 else if (name.equals("add")) { 1553 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.add"); 1554 } 1555 else if (name.equals("power")) { 1556 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.power"); 1557 } 1558 else if (name.equals("backCurve")) { 1559 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.backCurve"); 1560 } 1561 else if (name.equals("diameter")) { 1562 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.diameter"); 1563 } 1564 else if (name.equals("duration")) { 1565 this.duration = new SimpleQuantity(); 1566 return this.duration; 1567 } 1568 else if (name.equals("color")) { 1569 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.color"); 1570 } 1571 else if (name.equals("brand")) { 1572 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.brand"); 1573 } 1574 else if (name.equals("note")) { 1575 return addNote(); 1576 } 1577 else 1578 return super.addChild(name); 1579 } 1580 1581 public VisionPrescriptionDispenseComponent copy() { 1582 VisionPrescriptionDispenseComponent dst = new VisionPrescriptionDispenseComponent(); 1583 copyValues(dst); 1584 dst.product = product == null ? null : product.copy(); 1585 dst.eye = eye == null ? null : eye.copy(); 1586 dst.sphere = sphere == null ? null : sphere.copy(); 1587 dst.cylinder = cylinder == null ? null : cylinder.copy(); 1588 dst.axis = axis == null ? null : axis.copy(); 1589 dst.prism = prism == null ? null : prism.copy(); 1590 dst.base = base == null ? null : base.copy(); 1591 dst.add = add == null ? null : add.copy(); 1592 dst.power = power == null ? null : power.copy(); 1593 dst.backCurve = backCurve == null ? null : backCurve.copy(); 1594 dst.diameter = diameter == null ? null : diameter.copy(); 1595 dst.duration = duration == null ? null : duration.copy(); 1596 dst.color = color == null ? null : color.copy(); 1597 dst.brand = brand == null ? null : brand.copy(); 1598 if (note != null) { 1599 dst.note = new ArrayList<Annotation>(); 1600 for (Annotation i : note) 1601 dst.note.add(i.copy()); 1602 }; 1603 return dst; 1604 } 1605 1606 @Override 1607 public boolean equalsDeep(Base other_) { 1608 if (!super.equalsDeep(other_)) 1609 return false; 1610 if (!(other_ instanceof VisionPrescriptionDispenseComponent)) 1611 return false; 1612 VisionPrescriptionDispenseComponent o = (VisionPrescriptionDispenseComponent) other_; 1613 return compareDeep(product, o.product, true) && compareDeep(eye, o.eye, true) && compareDeep(sphere, o.sphere, true) 1614 && compareDeep(cylinder, o.cylinder, true) && compareDeep(axis, o.axis, true) && compareDeep(prism, o.prism, true) 1615 && compareDeep(base, o.base, true) && compareDeep(add, o.add, true) && compareDeep(power, o.power, true) 1616 && compareDeep(backCurve, o.backCurve, true) && compareDeep(diameter, o.diameter, true) && compareDeep(duration, o.duration, true) 1617 && compareDeep(color, o.color, true) && compareDeep(brand, o.brand, true) && compareDeep(note, o.note, true) 1618 ; 1619 } 1620 1621 @Override 1622 public boolean equalsShallow(Base other_) { 1623 if (!super.equalsShallow(other_)) 1624 return false; 1625 if (!(other_ instanceof VisionPrescriptionDispenseComponent)) 1626 return false; 1627 VisionPrescriptionDispenseComponent o = (VisionPrescriptionDispenseComponent) other_; 1628 return compareValues(eye, o.eye, true) && compareValues(sphere, o.sphere, true) && compareValues(cylinder, o.cylinder, true) 1629 && compareValues(axis, o.axis, true) && compareValues(prism, o.prism, true) && compareValues(base, o.base, true) 1630 && compareValues(add, o.add, true) && compareValues(power, o.power, true) && compareValues(backCurve, o.backCurve, true) 1631 && compareValues(diameter, o.diameter, true) && compareValues(color, o.color, true) && compareValues(brand, o.brand, true) 1632 ; 1633 } 1634 1635 public boolean isEmpty() { 1636 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(product, eye, sphere, cylinder 1637 , axis, prism, base, add, power, backCurve, diameter, duration, color, brand 1638 , note); 1639 } 1640 1641 public String fhirType() { 1642 return "VisionPrescription.dispense"; 1643 1644 } 1645 1646 } 1647 1648 /** 1649 * Business identifier which may be used by other parties to reference or identify the prescription. 1650 */ 1651 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1652 @Description(shortDefinition="Business identifier", formalDefinition="Business identifier which may be used by other parties to reference or identify the prescription." ) 1653 protected List<Identifier> identifier; 1654 1655 /** 1656 * The status of the resource instance. 1657 */ 1658 @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) 1659 @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." ) 1660 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status") 1661 protected Enumeration<VisionStatus> status; 1662 1663 /** 1664 * A link to a resource representing the person to whom the vision products will be supplied. 1665 */ 1666 @Child(name = "patient", type = {Patient.class}, order=2, min=0, max=1, modifier=false, summary=false) 1667 @Description(shortDefinition="Who prescription is for", formalDefinition="A link to a resource representing the person to whom the vision products will be supplied." ) 1668 protected Reference patient; 1669 1670 /** 1671 * The actual object that is the target of the reference (A link to a resource representing the person to whom the vision products will be supplied.) 1672 */ 1673 protected Patient patientTarget; 1674 1675 /** 1676 * A link to a resource that identifies the particular occurrence of contact between patient and health care provider. 1677 */ 1678 @Child(name = "encounter", type = {Encounter.class}, order=3, min=0, max=1, modifier=false, summary=false) 1679 @Description(shortDefinition="Created during encounter / admission / stay", formalDefinition="A link to a resource that identifies the particular occurrence of contact between patient and health care provider." ) 1680 protected Reference encounter; 1681 1682 /** 1683 * The actual object that is the target of the reference (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) 1684 */ 1685 protected Encounter encounterTarget; 1686 1687 /** 1688 * The date (and perhaps time) when the prescription was written. 1689 */ 1690 @Child(name = "dateWritten", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=false) 1691 @Description(shortDefinition="When prescription was authorized", formalDefinition="The date (and perhaps time) when the prescription was written." ) 1692 protected DateTimeType dateWritten; 1693 1694 /** 1695 * The healthcare professional responsible for authorizing the prescription. 1696 */ 1697 @Child(name = "prescriber", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=false) 1698 @Description(shortDefinition="Who authorizes the vision product", formalDefinition="The healthcare professional responsible for authorizing the prescription." ) 1699 protected Reference prescriber; 1700 1701 /** 1702 * The actual object that is the target of the reference (The healthcare professional responsible for authorizing the prescription.) 1703 */ 1704 protected Practitioner prescriberTarget; 1705 1706 /** 1707 * Can be the reason or the indication for writing the prescription. 1708 */ 1709 @Child(name = "reason", type = {CodeableConcept.class, Condition.class}, order=6, min=0, max=1, modifier=false, summary=false) 1710 @Description(shortDefinition="Reason or indication for writing the prescription", formalDefinition="Can be the reason or the indication for writing the prescription." ) 1711 protected Type reason; 1712 1713 /** 1714 * Deals with details of the dispense part of the supply specification. 1715 */ 1716 @Child(name = "dispense", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1717 @Description(shortDefinition="Vision supply authorization", formalDefinition="Deals with details of the dispense part of the supply specification." ) 1718 protected List<VisionPrescriptionDispenseComponent> dispense; 1719 1720 private static final long serialVersionUID = 603347490L; 1721 1722 /** 1723 * Constructor 1724 */ 1725 public VisionPrescription() { 1726 super(); 1727 } 1728 1729 /** 1730 * @return {@link #identifier} (Business identifier which may be used by other parties to reference or identify the prescription.) 1731 */ 1732 public List<Identifier> getIdentifier() { 1733 if (this.identifier == null) 1734 this.identifier = new ArrayList<Identifier>(); 1735 return this.identifier; 1736 } 1737 1738 /** 1739 * @return Returns a reference to <code>this</code> for easy method chaining 1740 */ 1741 public VisionPrescription setIdentifier(List<Identifier> theIdentifier) { 1742 this.identifier = theIdentifier; 1743 return this; 1744 } 1745 1746 public boolean hasIdentifier() { 1747 if (this.identifier == null) 1748 return false; 1749 for (Identifier item : this.identifier) 1750 if (!item.isEmpty()) 1751 return true; 1752 return false; 1753 } 1754 1755 public Identifier addIdentifier() { //3 1756 Identifier t = new Identifier(); 1757 if (this.identifier == null) 1758 this.identifier = new ArrayList<Identifier>(); 1759 this.identifier.add(t); 1760 return t; 1761 } 1762 1763 public VisionPrescription addIdentifier(Identifier t) { //3 1764 if (t == null) 1765 return this; 1766 if (this.identifier == null) 1767 this.identifier = new ArrayList<Identifier>(); 1768 this.identifier.add(t); 1769 return this; 1770 } 1771 1772 /** 1773 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 1774 */ 1775 public Identifier getIdentifierFirstRep() { 1776 if (getIdentifier().isEmpty()) { 1777 addIdentifier(); 1778 } 1779 return getIdentifier().get(0); 1780 } 1781 1782 /** 1783 * @return {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1784 */ 1785 public Enumeration<VisionStatus> getStatusElement() { 1786 if (this.status == null) 1787 if (Configuration.errorOnAutoCreate()) 1788 throw new Error("Attempt to auto-create VisionPrescription.status"); 1789 else if (Configuration.doAutoCreate()) 1790 this.status = new Enumeration<VisionStatus>(new VisionStatusEnumFactory()); // bb 1791 return this.status; 1792 } 1793 1794 public boolean hasStatusElement() { 1795 return this.status != null && !this.status.isEmpty(); 1796 } 1797 1798 public boolean hasStatus() { 1799 return this.status != null && !this.status.isEmpty(); 1800 } 1801 1802 /** 1803 * @param value {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1804 */ 1805 public VisionPrescription setStatusElement(Enumeration<VisionStatus> value) { 1806 this.status = value; 1807 return this; 1808 } 1809 1810 /** 1811 * @return The status of the resource instance. 1812 */ 1813 public VisionStatus getStatus() { 1814 return this.status == null ? null : this.status.getValue(); 1815 } 1816 1817 /** 1818 * @param value The status of the resource instance. 1819 */ 1820 public VisionPrescription setStatus(VisionStatus value) { 1821 if (value == null) 1822 this.status = null; 1823 else { 1824 if (this.status == null) 1825 this.status = new Enumeration<VisionStatus>(new VisionStatusEnumFactory()); 1826 this.status.setValue(value); 1827 } 1828 return this; 1829 } 1830 1831 /** 1832 * @return {@link #patient} (A link to a resource representing the person to whom the vision products will be supplied.) 1833 */ 1834 public Reference getPatient() { 1835 if (this.patient == null) 1836 if (Configuration.errorOnAutoCreate()) 1837 throw new Error("Attempt to auto-create VisionPrescription.patient"); 1838 else if (Configuration.doAutoCreate()) 1839 this.patient = new Reference(); // cc 1840 return this.patient; 1841 } 1842 1843 public boolean hasPatient() { 1844 return this.patient != null && !this.patient.isEmpty(); 1845 } 1846 1847 /** 1848 * @param value {@link #patient} (A link to a resource representing the person to whom the vision products will be supplied.) 1849 */ 1850 public VisionPrescription setPatient(Reference value) { 1851 this.patient = value; 1852 return this; 1853 } 1854 1855 /** 1856 * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A link to a resource representing the person to whom the vision products will be supplied.) 1857 */ 1858 public Patient getPatientTarget() { 1859 if (this.patientTarget == null) 1860 if (Configuration.errorOnAutoCreate()) 1861 throw new Error("Attempt to auto-create VisionPrescription.patient"); 1862 else if (Configuration.doAutoCreate()) 1863 this.patientTarget = new Patient(); // aa 1864 return this.patientTarget; 1865 } 1866 1867 /** 1868 * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A link to a resource representing the person to whom the vision products will be supplied.) 1869 */ 1870 public VisionPrescription setPatientTarget(Patient value) { 1871 this.patientTarget = value; 1872 return this; 1873 } 1874 1875 /** 1876 * @return {@link #encounter} (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) 1877 */ 1878 public Reference getEncounter() { 1879 if (this.encounter == null) 1880 if (Configuration.errorOnAutoCreate()) 1881 throw new Error("Attempt to auto-create VisionPrescription.encounter"); 1882 else if (Configuration.doAutoCreate()) 1883 this.encounter = new Reference(); // cc 1884 return this.encounter; 1885 } 1886 1887 public boolean hasEncounter() { 1888 return this.encounter != null && !this.encounter.isEmpty(); 1889 } 1890 1891 /** 1892 * @param value {@link #encounter} (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) 1893 */ 1894 public VisionPrescription setEncounter(Reference value) { 1895 this.encounter = value; 1896 return this; 1897 } 1898 1899 /** 1900 * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) 1901 */ 1902 public Encounter getEncounterTarget() { 1903 if (this.encounterTarget == null) 1904 if (Configuration.errorOnAutoCreate()) 1905 throw new Error("Attempt to auto-create VisionPrescription.encounter"); 1906 else if (Configuration.doAutoCreate()) 1907 this.encounterTarget = new Encounter(); // aa 1908 return this.encounterTarget; 1909 } 1910 1911 /** 1912 * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.) 1913 */ 1914 public VisionPrescription setEncounterTarget(Encounter value) { 1915 this.encounterTarget = value; 1916 return this; 1917 } 1918 1919 /** 1920 * @return {@link #dateWritten} (The date (and perhaps time) when the prescription was written.). This is the underlying object with id, value and extensions. The accessor "getDateWritten" gives direct access to the value 1921 */ 1922 public DateTimeType getDateWrittenElement() { 1923 if (this.dateWritten == null) 1924 if (Configuration.errorOnAutoCreate()) 1925 throw new Error("Attempt to auto-create VisionPrescription.dateWritten"); 1926 else if (Configuration.doAutoCreate()) 1927 this.dateWritten = new DateTimeType(); // bb 1928 return this.dateWritten; 1929 } 1930 1931 public boolean hasDateWrittenElement() { 1932 return this.dateWritten != null && !this.dateWritten.isEmpty(); 1933 } 1934 1935 public boolean hasDateWritten() { 1936 return this.dateWritten != null && !this.dateWritten.isEmpty(); 1937 } 1938 1939 /** 1940 * @param value {@link #dateWritten} (The date (and perhaps time) when the prescription was written.). This is the underlying object with id, value and extensions. The accessor "getDateWritten" gives direct access to the value 1941 */ 1942 public VisionPrescription setDateWrittenElement(DateTimeType value) { 1943 this.dateWritten = value; 1944 return this; 1945 } 1946 1947 /** 1948 * @return The date (and perhaps time) when the prescription was written. 1949 */ 1950 public Date getDateWritten() { 1951 return this.dateWritten == null ? null : this.dateWritten.getValue(); 1952 } 1953 1954 /** 1955 * @param value The date (and perhaps time) when the prescription was written. 1956 */ 1957 public VisionPrescription setDateWritten(Date value) { 1958 if (value == null) 1959 this.dateWritten = null; 1960 else { 1961 if (this.dateWritten == null) 1962 this.dateWritten = new DateTimeType(); 1963 this.dateWritten.setValue(value); 1964 } 1965 return this; 1966 } 1967 1968 /** 1969 * @return {@link #prescriber} (The healthcare professional responsible for authorizing the prescription.) 1970 */ 1971 public Reference getPrescriber() { 1972 if (this.prescriber == null) 1973 if (Configuration.errorOnAutoCreate()) 1974 throw new Error("Attempt to auto-create VisionPrescription.prescriber"); 1975 else if (Configuration.doAutoCreate()) 1976 this.prescriber = new Reference(); // cc 1977 return this.prescriber; 1978 } 1979 1980 public boolean hasPrescriber() { 1981 return this.prescriber != null && !this.prescriber.isEmpty(); 1982 } 1983 1984 /** 1985 * @param value {@link #prescriber} (The healthcare professional responsible for authorizing the prescription.) 1986 */ 1987 public VisionPrescription setPrescriber(Reference value) { 1988 this.prescriber = value; 1989 return this; 1990 } 1991 1992 /** 1993 * @return {@link #prescriber} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The healthcare professional responsible for authorizing the prescription.) 1994 */ 1995 public Practitioner getPrescriberTarget() { 1996 if (this.prescriberTarget == null) 1997 if (Configuration.errorOnAutoCreate()) 1998 throw new Error("Attempt to auto-create VisionPrescription.prescriber"); 1999 else if (Configuration.doAutoCreate()) 2000 this.prescriberTarget = new Practitioner(); // aa 2001 return this.prescriberTarget; 2002 } 2003 2004 /** 2005 * @param value {@link #prescriber} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The healthcare professional responsible for authorizing the prescription.) 2006 */ 2007 public VisionPrescription setPrescriberTarget(Practitioner value) { 2008 this.prescriberTarget = value; 2009 return this; 2010 } 2011 2012 /** 2013 * @return {@link #reason} (Can be the reason or the indication for writing the prescription.) 2014 */ 2015 public Type getReason() { 2016 return this.reason; 2017 } 2018 2019 /** 2020 * @return {@link #reason} (Can be the reason or the indication for writing the prescription.) 2021 */ 2022 public CodeableConcept getReasonCodeableConcept() throws FHIRException { 2023 if (this.reason == null) 2024 return null; 2025 if (!(this.reason instanceof CodeableConcept)) 2026 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.reason.getClass().getName()+" was encountered"); 2027 return (CodeableConcept) this.reason; 2028 } 2029 2030 public boolean hasReasonCodeableConcept() { 2031 return this != null && this.reason instanceof CodeableConcept; 2032 } 2033 2034 /** 2035 * @return {@link #reason} (Can be the reason or the indication for writing the prescription.) 2036 */ 2037 public Reference getReasonReference() throws FHIRException { 2038 if (this.reason == null) 2039 return null; 2040 if (!(this.reason instanceof Reference)) 2041 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.reason.getClass().getName()+" was encountered"); 2042 return (Reference) this.reason; 2043 } 2044 2045 public boolean hasReasonReference() { 2046 return this != null && this.reason instanceof Reference; 2047 } 2048 2049 public boolean hasReason() { 2050 return this.reason != null && !this.reason.isEmpty(); 2051 } 2052 2053 /** 2054 * @param value {@link #reason} (Can be the reason or the indication for writing the prescription.) 2055 */ 2056 public VisionPrescription setReason(Type value) throws FHIRFormatError { 2057 if (value != null && !(value instanceof CodeableConcept || value instanceof Reference)) 2058 throw new FHIRFormatError("Not the right type for VisionPrescription.reason[x]: "+value.fhirType()); 2059 this.reason = value; 2060 return this; 2061 } 2062 2063 /** 2064 * @return {@link #dispense} (Deals with details of the dispense part of the supply specification.) 2065 */ 2066 public List<VisionPrescriptionDispenseComponent> getDispense() { 2067 if (this.dispense == null) 2068 this.dispense = new ArrayList<VisionPrescriptionDispenseComponent>(); 2069 return this.dispense; 2070 } 2071 2072 /** 2073 * @return Returns a reference to <code>this</code> for easy method chaining 2074 */ 2075 public VisionPrescription setDispense(List<VisionPrescriptionDispenseComponent> theDispense) { 2076 this.dispense = theDispense; 2077 return this; 2078 } 2079 2080 public boolean hasDispense() { 2081 if (this.dispense == null) 2082 return false; 2083 for (VisionPrescriptionDispenseComponent item : this.dispense) 2084 if (!item.isEmpty()) 2085 return true; 2086 return false; 2087 } 2088 2089 public VisionPrescriptionDispenseComponent addDispense() { //3 2090 VisionPrescriptionDispenseComponent t = new VisionPrescriptionDispenseComponent(); 2091 if (this.dispense == null) 2092 this.dispense = new ArrayList<VisionPrescriptionDispenseComponent>(); 2093 this.dispense.add(t); 2094 return t; 2095 } 2096 2097 public VisionPrescription addDispense(VisionPrescriptionDispenseComponent t) { //3 2098 if (t == null) 2099 return this; 2100 if (this.dispense == null) 2101 this.dispense = new ArrayList<VisionPrescriptionDispenseComponent>(); 2102 this.dispense.add(t); 2103 return this; 2104 } 2105 2106 /** 2107 * @return The first repetition of repeating field {@link #dispense}, creating it if it does not already exist 2108 */ 2109 public VisionPrescriptionDispenseComponent getDispenseFirstRep() { 2110 if (getDispense().isEmpty()) { 2111 addDispense(); 2112 } 2113 return getDispense().get(0); 2114 } 2115 2116 protected void listChildren(List<Property> children) { 2117 super.listChildren(children); 2118 children.add(new Property("identifier", "Identifier", "Business identifier which may be used by other parties to reference or identify the prescription.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2119 children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status)); 2120 children.add(new Property("patient", "Reference(Patient)", "A link to a resource representing the person to whom the vision products will be supplied.", 0, 1, patient)); 2121 children.add(new Property("encounter", "Reference(Encounter)", "A link to a resource that identifies the particular occurrence of contact between patient and health care provider.", 0, 1, encounter)); 2122 children.add(new Property("dateWritten", "dateTime", "The date (and perhaps time) when the prescription was written.", 0, 1, dateWritten)); 2123 children.add(new Property("prescriber", "Reference(Practitioner)", "The healthcare professional responsible for authorizing the prescription.", 0, 1, prescriber)); 2124 children.add(new Property("reason[x]", "CodeableConcept|Reference(Condition)", "Can be the reason or the indication for writing the prescription.", 0, 1, reason)); 2125 children.add(new Property("dispense", "", "Deals with details of the dispense part of the supply specification.", 0, java.lang.Integer.MAX_VALUE, dispense)); 2126 } 2127 2128 @Override 2129 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2130 switch (_hash) { 2131 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Business identifier which may be used by other parties to reference or identify the prescription.", 0, java.lang.Integer.MAX_VALUE, identifier); 2132 case -892481550: /*status*/ return new Property("status", "code", "The status of the resource instance.", 0, 1, status); 2133 case -791418107: /*patient*/ return new Property("patient", "Reference(Patient)", "A link to a resource representing the person to whom the vision products will be supplied.", 0, 1, patient); 2134 case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "A link to a resource that identifies the particular occurrence of contact between patient and health care provider.", 0, 1, encounter); 2135 case -1496880759: /*dateWritten*/ return new Property("dateWritten", "dateTime", "The date (and perhaps time) when the prescription was written.", 0, 1, dateWritten); 2136 case 1430631077: /*prescriber*/ return new Property("prescriber", "Reference(Practitioner)", "The healthcare professional responsible for authorizing the prescription.", 0, 1, prescriber); 2137 case -669418564: /*reason[x]*/ return new Property("reason[x]", "CodeableConcept|Reference(Condition)", "Can be the reason or the indication for writing the prescription.", 0, 1, reason); 2138 case -934964668: /*reason*/ return new Property("reason[x]", "CodeableConcept|Reference(Condition)", "Can be the reason or the indication for writing the prescription.", 0, 1, reason); 2139 case -610155331: /*reasonCodeableConcept*/ return new Property("reason[x]", "CodeableConcept|Reference(Condition)", "Can be the reason or the indication for writing the prescription.", 0, 1, reason); 2140 case -1146218137: /*reasonReference*/ return new Property("reason[x]", "CodeableConcept|Reference(Condition)", "Can be the reason or the indication for writing the prescription.", 0, 1, reason); 2141 case 284885341: /*dispense*/ return new Property("dispense", "", "Deals with details of the dispense part of the supply specification.", 0, java.lang.Integer.MAX_VALUE, dispense); 2142 default: return super.getNamedProperty(_hash, _name, _checkValid); 2143 } 2144 2145 } 2146 2147 @Override 2148 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2149 switch (hash) { 2150 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 2151 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<VisionStatus> 2152 case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference 2153 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference 2154 case -1496880759: /*dateWritten*/ return this.dateWritten == null ? new Base[0] : new Base[] {this.dateWritten}; // DateTimeType 2155 case 1430631077: /*prescriber*/ return this.prescriber == null ? new Base[0] : new Base[] {this.prescriber}; // Reference 2156 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // Type 2157 case 284885341: /*dispense*/ return this.dispense == null ? new Base[0] : this.dispense.toArray(new Base[this.dispense.size()]); // VisionPrescriptionDispenseComponent 2158 default: return super.getProperty(hash, name, checkValid); 2159 } 2160 2161 } 2162 2163 @Override 2164 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2165 switch (hash) { 2166 case -1618432855: // identifier 2167 this.getIdentifier().add(castToIdentifier(value)); // Identifier 2168 return value; 2169 case -892481550: // status 2170 value = new VisionStatusEnumFactory().fromType(castToCode(value)); 2171 this.status = (Enumeration) value; // Enumeration<VisionStatus> 2172 return value; 2173 case -791418107: // patient 2174 this.patient = castToReference(value); // Reference 2175 return value; 2176 case 1524132147: // encounter 2177 this.encounter = castToReference(value); // Reference 2178 return value; 2179 case -1496880759: // dateWritten 2180 this.dateWritten = castToDateTime(value); // DateTimeType 2181 return value; 2182 case 1430631077: // prescriber 2183 this.prescriber = castToReference(value); // Reference 2184 return value; 2185 case -934964668: // reason 2186 this.reason = castToType(value); // Type 2187 return value; 2188 case 284885341: // dispense 2189 this.getDispense().add((VisionPrescriptionDispenseComponent) value); // VisionPrescriptionDispenseComponent 2190 return value; 2191 default: return super.setProperty(hash, name, value); 2192 } 2193 2194 } 2195 2196 @Override 2197 public Base setProperty(String name, Base value) throws FHIRException { 2198 if (name.equals("identifier")) { 2199 this.getIdentifier().add(castToIdentifier(value)); 2200 } else if (name.equals("status")) { 2201 value = new VisionStatusEnumFactory().fromType(castToCode(value)); 2202 this.status = (Enumeration) value; // Enumeration<VisionStatus> 2203 } else if (name.equals("patient")) { 2204 this.patient = castToReference(value); // Reference 2205 } else if (name.equals("encounter")) { 2206 this.encounter = castToReference(value); // Reference 2207 } else if (name.equals("dateWritten")) { 2208 this.dateWritten = castToDateTime(value); // DateTimeType 2209 } else if (name.equals("prescriber")) { 2210 this.prescriber = castToReference(value); // Reference 2211 } else if (name.equals("reason[x]")) { 2212 this.reason = castToType(value); // Type 2213 } else if (name.equals("dispense")) { 2214 this.getDispense().add((VisionPrescriptionDispenseComponent) value); 2215 } else 2216 return super.setProperty(name, value); 2217 return value; 2218 } 2219 2220 @Override 2221 public Base makeProperty(int hash, String name) throws FHIRException { 2222 switch (hash) { 2223 case -1618432855: return addIdentifier(); 2224 case -892481550: return getStatusElement(); 2225 case -791418107: return getPatient(); 2226 case 1524132147: return getEncounter(); 2227 case -1496880759: return getDateWrittenElement(); 2228 case 1430631077: return getPrescriber(); 2229 case -669418564: return getReason(); 2230 case -934964668: return getReason(); 2231 case 284885341: return addDispense(); 2232 default: return super.makeProperty(hash, name); 2233 } 2234 2235 } 2236 2237 @Override 2238 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2239 switch (hash) { 2240 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2241 case -892481550: /*status*/ return new String[] {"code"}; 2242 case -791418107: /*patient*/ return new String[] {"Reference"}; 2243 case 1524132147: /*encounter*/ return new String[] {"Reference"}; 2244 case -1496880759: /*dateWritten*/ return new String[] {"dateTime"}; 2245 case 1430631077: /*prescriber*/ return new String[] {"Reference"}; 2246 case -934964668: /*reason*/ return new String[] {"CodeableConcept", "Reference"}; 2247 case 284885341: /*dispense*/ return new String[] {}; 2248 default: return super.getTypesForProperty(hash, name); 2249 } 2250 2251 } 2252 2253 @Override 2254 public Base addChild(String name) throws FHIRException { 2255 if (name.equals("identifier")) { 2256 return addIdentifier(); 2257 } 2258 else if (name.equals("status")) { 2259 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.status"); 2260 } 2261 else if (name.equals("patient")) { 2262 this.patient = new Reference(); 2263 return this.patient; 2264 } 2265 else if (name.equals("encounter")) { 2266 this.encounter = new Reference(); 2267 return this.encounter; 2268 } 2269 else if (name.equals("dateWritten")) { 2270 throw new FHIRException("Cannot call addChild on a primitive type VisionPrescription.dateWritten"); 2271 } 2272 else if (name.equals("prescriber")) { 2273 this.prescriber = new Reference(); 2274 return this.prescriber; 2275 } 2276 else if (name.equals("reasonCodeableConcept")) { 2277 this.reason = new CodeableConcept(); 2278 return this.reason; 2279 } 2280 else if (name.equals("reasonReference")) { 2281 this.reason = new Reference(); 2282 return this.reason; 2283 } 2284 else if (name.equals("dispense")) { 2285 return addDispense(); 2286 } 2287 else 2288 return super.addChild(name); 2289 } 2290 2291 public String fhirType() { 2292 return "VisionPrescription"; 2293 2294 } 2295 2296 public VisionPrescription copy() { 2297 VisionPrescription dst = new VisionPrescription(); 2298 copyValues(dst); 2299 if (identifier != null) { 2300 dst.identifier = new ArrayList<Identifier>(); 2301 for (Identifier i : identifier) 2302 dst.identifier.add(i.copy()); 2303 }; 2304 dst.status = status == null ? null : status.copy(); 2305 dst.patient = patient == null ? null : patient.copy(); 2306 dst.encounter = encounter == null ? null : encounter.copy(); 2307 dst.dateWritten = dateWritten == null ? null : dateWritten.copy(); 2308 dst.prescriber = prescriber == null ? null : prescriber.copy(); 2309 dst.reason = reason == null ? null : reason.copy(); 2310 if (dispense != null) { 2311 dst.dispense = new ArrayList<VisionPrescriptionDispenseComponent>(); 2312 for (VisionPrescriptionDispenseComponent i : dispense) 2313 dst.dispense.add(i.copy()); 2314 }; 2315 return dst; 2316 } 2317 2318 protected VisionPrescription typedCopy() { 2319 return copy(); 2320 } 2321 2322 @Override 2323 public boolean equalsDeep(Base other_) { 2324 if (!super.equalsDeep(other_)) 2325 return false; 2326 if (!(other_ instanceof VisionPrescription)) 2327 return false; 2328 VisionPrescription o = (VisionPrescription) other_; 2329 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(patient, o.patient, true) 2330 && compareDeep(encounter, o.encounter, true) && compareDeep(dateWritten, o.dateWritten, true) && compareDeep(prescriber, o.prescriber, true) 2331 && compareDeep(reason, o.reason, true) && compareDeep(dispense, o.dispense, true); 2332 } 2333 2334 @Override 2335 public boolean equalsShallow(Base other_) { 2336 if (!super.equalsShallow(other_)) 2337 return false; 2338 if (!(other_ instanceof VisionPrescription)) 2339 return false; 2340 VisionPrescription o = (VisionPrescription) other_; 2341 return compareValues(status, o.status, true) && compareValues(dateWritten, o.dateWritten, true); 2342 } 2343 2344 public boolean isEmpty() { 2345 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, patient 2346 , encounter, dateWritten, prescriber, reason, dispense); 2347 } 2348 2349 @Override 2350 public ResourceType getResourceType() { 2351 return ResourceType.VisionPrescription; 2352 } 2353 2354 /** 2355 * Search parameter: <b>prescriber</b> 2356 * <p> 2357 * Description: <b>Who authorizes the vision product</b><br> 2358 * Type: <b>reference</b><br> 2359 * Path: <b>VisionPrescription.prescriber</b><br> 2360 * </p> 2361 */ 2362 @SearchParamDefinition(name="prescriber", path="VisionPrescription.prescriber", description="Who authorizes the vision product", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Practitioner.class } ) 2363 public static final String SP_PRESCRIBER = "prescriber"; 2364 /** 2365 * <b>Fluent Client</b> search parameter constant for <b>prescriber</b> 2366 * <p> 2367 * Description: <b>Who authorizes the vision product</b><br> 2368 * Type: <b>reference</b><br> 2369 * Path: <b>VisionPrescription.prescriber</b><br> 2370 * </p> 2371 */ 2372 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PRESCRIBER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PRESCRIBER); 2373 2374/** 2375 * Constant for fluent queries to be used to add include statements. Specifies 2376 * the path value of "<b>VisionPrescription:prescriber</b>". 2377 */ 2378 public static final ca.uhn.fhir.model.api.Include INCLUDE_PRESCRIBER = new ca.uhn.fhir.model.api.Include("VisionPrescription:prescriber").toLocked(); 2379 2380 /** 2381 * Search parameter: <b>identifier</b> 2382 * <p> 2383 * Description: <b>Return prescriptions with this external identifier</b><br> 2384 * Type: <b>token</b><br> 2385 * Path: <b>VisionPrescription.identifier</b><br> 2386 * </p> 2387 */ 2388 @SearchParamDefinition(name="identifier", path="VisionPrescription.identifier", description="Return prescriptions with this external identifier", type="token" ) 2389 public static final String SP_IDENTIFIER = "identifier"; 2390 /** 2391 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2392 * <p> 2393 * Description: <b>Return prescriptions with this external identifier</b><br> 2394 * Type: <b>token</b><br> 2395 * Path: <b>VisionPrescription.identifier</b><br> 2396 * </p> 2397 */ 2398 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2399 2400 /** 2401 * Search parameter: <b>patient</b> 2402 * <p> 2403 * Description: <b>The identity of a patient to list dispenses for</b><br> 2404 * Type: <b>reference</b><br> 2405 * Path: <b>VisionPrescription.patient</b><br> 2406 * </p> 2407 */ 2408 @SearchParamDefinition(name="patient", path="VisionPrescription.patient", description="The identity of a patient to list dispenses for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } ) 2409 public static final String SP_PATIENT = "patient"; 2410 /** 2411 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 2412 * <p> 2413 * Description: <b>The identity of a patient to list dispenses for</b><br> 2414 * Type: <b>reference</b><br> 2415 * Path: <b>VisionPrescription.patient</b><br> 2416 * </p> 2417 */ 2418 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 2419 2420/** 2421 * Constant for fluent queries to be used to add include statements. Specifies 2422 * the path value of "<b>VisionPrescription:patient</b>". 2423 */ 2424 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("VisionPrescription:patient").toLocked(); 2425 2426 /** 2427 * Search parameter: <b>datewritten</b> 2428 * <p> 2429 * Description: <b>Return prescriptions written on this date</b><br> 2430 * Type: <b>date</b><br> 2431 * Path: <b>VisionPrescription.dateWritten</b><br> 2432 * </p> 2433 */ 2434 @SearchParamDefinition(name="datewritten", path="VisionPrescription.dateWritten", description="Return prescriptions written on this date", type="date" ) 2435 public static final String SP_DATEWRITTEN = "datewritten"; 2436 /** 2437 * <b>Fluent Client</b> search parameter constant for <b>datewritten</b> 2438 * <p> 2439 * Description: <b>Return prescriptions written on this date</b><br> 2440 * Type: <b>date</b><br> 2441 * Path: <b>VisionPrescription.dateWritten</b><br> 2442 * </p> 2443 */ 2444 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATEWRITTEN = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATEWRITTEN); 2445 2446 /** 2447 * Search parameter: <b>encounter</b> 2448 * <p> 2449 * Description: <b>Return prescriptions with this encounter identifier</b><br> 2450 * Type: <b>reference</b><br> 2451 * Path: <b>VisionPrescription.encounter</b><br> 2452 * </p> 2453 */ 2454 @SearchParamDefinition(name="encounter", path="VisionPrescription.encounter", description="Return prescriptions with this encounter identifier", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") }, target={Encounter.class } ) 2455 public static final String SP_ENCOUNTER = "encounter"; 2456 /** 2457 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 2458 * <p> 2459 * Description: <b>Return prescriptions with this encounter identifier</b><br> 2460 * Type: <b>reference</b><br> 2461 * Path: <b>VisionPrescription.encounter</b><br> 2462 * </p> 2463 */ 2464 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 2465 2466/** 2467 * Constant for fluent queries to be used to add include statements. Specifies 2468 * the path value of "<b>VisionPrescription:encounter</b>". 2469 */ 2470 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("VisionPrescription:encounter").toLocked(); 2471 2472 2473} 2474