001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017package ca.uhn.fhir.model.dstu2.composite; 018 019import java.net.URI; 020import java.math.BigDecimal; 021import org.apache.commons.lang3.StringUtils; 022import java.util.*; 023import ca.uhn.fhir.model.api.*; 024import ca.uhn.fhir.model.primitive.*; 025import ca.uhn.fhir.model.api.annotation.*; 026import ca.uhn.fhir.model.base.composite.*; 027 028import ca.uhn.fhir.model.dstu2.valueset.AddressTypeEnum; 029import ca.uhn.fhir.model.dstu2.valueset.AddressUseEnum; 030import ca.uhn.fhir.model.dstu2.valueset.AggregationModeEnum; 031import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum; 032import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; 033import ca.uhn.fhir.model.dstu2.composite.CodingDt; 034import ca.uhn.fhir.model.dstu2.valueset.ConstraintSeverityEnum; 035import ca.uhn.fhir.model.dstu2.valueset.ContactPointSystemEnum; 036import ca.uhn.fhir.model.dstu2.valueset.ContactPointUseEnum; 037import ca.uhn.fhir.model.dstu2.resource.Device; 038import ca.uhn.fhir.model.dstu2.valueset.EventTimingEnum; 039import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum; 040import ca.uhn.fhir.model.dstu2.valueset.IdentifierUseEnum; 041import ca.uhn.fhir.model.dstu2.valueset.NameUseEnum; 042import ca.uhn.fhir.model.dstu2.resource.Organization; 043import ca.uhn.fhir.model.dstu2.resource.Patient; 044import ca.uhn.fhir.model.dstu2.composite.PeriodDt; 045import ca.uhn.fhir.model.dstu2.resource.Practitioner; 046import ca.uhn.fhir.model.dstu2.valueset.PropertyRepresentationEnum; 047import ca.uhn.fhir.model.dstu2.valueset.QuantityComparatorEnum; 048import ca.uhn.fhir.model.dstu2.composite.QuantityDt; 049import ca.uhn.fhir.model.dstu2.composite.RangeDt; 050import ca.uhn.fhir.model.dstu2.resource.RelatedPerson; 051import ca.uhn.fhir.model.dstu2.valueset.SignatureTypeCodesEnum; 052import ca.uhn.fhir.model.dstu2.valueset.SlicingRulesEnum; 053import ca.uhn.fhir.model.api.TemporalPrecisionEnum; 054import ca.uhn.fhir.model.dstu2.valueset.TimingAbbreviationEnum; 055import ca.uhn.fhir.model.dstu2.valueset.UnitsOfTimeEnum; 056import ca.uhn.fhir.model.dstu2.resource.ValueSet; 057import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt; 058import ca.uhn.fhir.model.dstu2.composite.DurationDt; 059import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt; 060import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt; 061import ca.uhn.fhir.model.primitive.Base64BinaryDt; 062import ca.uhn.fhir.model.primitive.BooleanDt; 063import ca.uhn.fhir.model.primitive.BoundCodeDt; 064import ca.uhn.fhir.model.primitive.CodeDt; 065import ca.uhn.fhir.model.primitive.DateTimeDt; 066import ca.uhn.fhir.model.primitive.DecimalDt; 067import ca.uhn.fhir.model.primitive.IdDt; 068import ca.uhn.fhir.model.primitive.InstantDt; 069import ca.uhn.fhir.model.primitive.IntegerDt; 070import ca.uhn.fhir.model.primitive.MarkdownDt; 071import ca.uhn.fhir.model.primitive.PositiveIntDt; 072import ca.uhn.fhir.model.primitive.StringDt; 073import ca.uhn.fhir.model.primitive.UnsignedIntDt; 074import ca.uhn.fhir.model.primitive.UriDt; 075 076/** 077 * HAPI/FHIR <b>TimingDt</b> Datatype 078 * () 079 * 080 * <p> 081 * <b>Definition:</b> 082 * Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds 083 * </p> 084 * 085 * <p> 086 * <b>Requirements:</b> 087 * Need to able to track proposed timing schedules. There are several different ways to do this: one or more specified times, a simple rules like three times a day, or before/after meals 088 * </p> 089 */ 090@DatatypeDef(name="Timing") 091public class TimingDt 092 extends BaseIdentifiableElement implements ICompositeDatatype{ 093 094 /** 095 * Constructor 096 */ 097 public TimingDt() { 098 // nothing 099 } 100 101 102 @Child(name="event", type=DateTimeDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false) 103 @Description( 104 shortDefinition="", 105 formalDefinition="Identifies specific times when the event occurs" 106 ) 107 private java.util.List<DateTimeDt> myEvent; 108 109 @Child(name="repeat", order=1, min=0, max=1, summary=true, modifier=false) 110 @Description( 111 shortDefinition="", 112 formalDefinition="A set of rules that describe when the event should occur" 113 ) 114 private Repeat myRepeat; 115 116 @Child(name="code", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=true, modifier=false) 117 @Description( 118 shortDefinition="", 119 formalDefinition="A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes" 120 ) 121 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/timing-abbreviation") 122 private BoundCodeableConceptDt<TimingAbbreviationEnum> myCode; 123 124 125 @Override 126 public boolean isEmpty() { 127 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myEvent, myRepeat, myCode); 128 } 129 130 @Override 131 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 132 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myEvent, myRepeat, myCode); 133 } 134 135 /** 136 * Gets the value(s) for <b>event</b> (). 137 * creating it if it does 138 * not exist. Will not return <code>null</code>. 139 * 140 * <p> 141 * <b>Definition:</b> 142 * Identifies specific times when the event occurs 143 * </p> 144 */ 145 public java.util.List<DateTimeDt> getEvent() { 146 if (myEvent == null) { 147 myEvent = new java.util.ArrayList<DateTimeDt>(); 148 } 149 return myEvent; 150 } 151 152 /** 153 * Sets the value(s) for <b>event</b> () 154 * 155 * <p> 156 * <b>Definition:</b> 157 * Identifies specific times when the event occurs 158 * </p> 159 */ 160 public TimingDt setEvent(java.util.List<DateTimeDt> theValue) { 161 myEvent = theValue; 162 return this; 163 } 164 165 166 167 /** 168 * Adds and returns a new value for <b>event</b> () 169 * 170 * <p> 171 * <b>Definition:</b> 172 * Identifies specific times when the event occurs 173 * </p> 174 */ 175 public DateTimeDt addEvent() { 176 DateTimeDt newType = new DateTimeDt(); 177 getEvent().add(newType); 178 return newType; 179 } 180 181 /** 182 * Adds a given new value for <b>event</b> () 183 * 184 * <p> 185 * <b>Definition:</b> 186 * Identifies specific times when the event occurs 187 * </p> 188 * @param theValue The event to add (must not be <code>null</code>) 189 */ 190 public TimingDt addEvent(DateTimeDt theValue) { 191 if (theValue == null) { 192 throw new NullPointerException("theValue must not be null"); 193 } 194 getEvent().add(theValue); 195 return this; 196 } 197 198 /** 199 * Gets the first repetition for <b>event</b> (), 200 * creating it if it does not already exist. 201 * 202 * <p> 203 * <b>Definition:</b> 204 * Identifies specific times when the event occurs 205 * </p> 206 */ 207 public DateTimeDt getEventFirstRep() { 208 if (getEvent().isEmpty()) { 209 return addEvent(); 210 } 211 return getEvent().get(0); 212 } 213 /** 214 * Adds a new value for <b>event</b> () 215 * 216 * <p> 217 * <b>Definition:</b> 218 * Identifies specific times when the event occurs 219 * </p> 220 * 221 * @return Returns a reference to this object, to allow for simple chaining. 222 */ 223 public TimingDt addEvent( Date theDate, TemporalPrecisionEnum thePrecision) { 224 if (myEvent == null) { 225 myEvent = new java.util.ArrayList<DateTimeDt>(); 226 } 227 myEvent.add(new DateTimeDt(theDate, thePrecision)); 228 return this; 229 } 230 231 /** 232 * Adds a new value for <b>event</b> () 233 * 234 * <p> 235 * <b>Definition:</b> 236 * Identifies specific times when the event occurs 237 * </p> 238 * 239 * @return Returns a reference to this object, to allow for simple chaining. 240 */ 241 public TimingDt addEvent( Date theDate) { 242 if (myEvent == null) { 243 myEvent = new java.util.ArrayList<DateTimeDt>(); 244 } 245 myEvent.add(new DateTimeDt(theDate)); 246 return this; 247 } 248 249 250 /** 251 * Gets the value(s) for <b>repeat</b> (). 252 * creating it if it does 253 * not exist. Will not return <code>null</code>. 254 * 255 * <p> 256 * <b>Definition:</b> 257 * A set of rules that describe when the event should occur 258 * </p> 259 */ 260 public Repeat getRepeat() { 261 if (myRepeat == null) { 262 myRepeat = new Repeat(); 263 } 264 return myRepeat; 265 } 266 267 /** 268 * Sets the value(s) for <b>repeat</b> () 269 * 270 * <p> 271 * <b>Definition:</b> 272 * A set of rules that describe when the event should occur 273 * </p> 274 */ 275 public TimingDt setRepeat(Repeat theValue) { 276 myRepeat = theValue; 277 return this; 278 } 279 280 281 282 283 /** 284 * Gets the value(s) for <b>code</b> (). 285 * creating it if it does 286 * not exist. Will not return <code>null</code>. 287 * 288 * <p> 289 * <b>Definition:</b> 290 * A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes 291 * </p> 292 */ 293 public BoundCodeableConceptDt<TimingAbbreviationEnum> getCode() { 294 if (myCode == null) { 295 myCode = new BoundCodeableConceptDt<TimingAbbreviationEnum>(TimingAbbreviationEnum.VALUESET_BINDER); 296 } 297 return myCode; 298 } 299 300 /** 301 * Sets the value(s) for <b>code</b> () 302 * 303 * <p> 304 * <b>Definition:</b> 305 * A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes 306 * </p> 307 */ 308 public TimingDt setCode(BoundCodeableConceptDt<TimingAbbreviationEnum> theValue) { 309 myCode = theValue; 310 return this; 311 } 312 313 314 315 /** 316 * Sets the value(s) for <b>code</b> () 317 * 318 * <p> 319 * <b>Definition:</b> 320 * A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes 321 * </p> 322 */ 323 public TimingDt setCode(TimingAbbreviationEnum theValue) { 324 setCode(new BoundCodeableConceptDt<TimingAbbreviationEnum>(TimingAbbreviationEnum.VALUESET_BINDER, theValue)); 325 326/* 327 getCode().setValueAsEnum(theValue); 328*/ 329 return this; 330 } 331 332 333 /** 334 * Block class for child element: <b>Timing.repeat</b> () 335 * 336 * <p> 337 * <b>Definition:</b> 338 * A set of rules that describe when the event should occur 339 * </p> 340 */ 341 @Block() 342 public static class Repeat 343 extends BaseIdentifiableElement implements IResourceBlock { 344 345 @Child(name="bounds", order=0, min=0, max=1, summary=true, modifier=false, type={ 346 DurationDt.class, RangeDt.class, PeriodDt.class }) 347 @Description( 348 shortDefinition="", 349 formalDefinition="Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule" 350 ) 351 private IDatatype myBounds; 352 353 @Child(name="count", type=IntegerDt.class, order=1, min=0, max=1, summary=true, modifier=false) 354 @Description( 355 shortDefinition="", 356 formalDefinition="A total count of the desired number of repetitions" 357 ) 358 private IntegerDt myCount; 359 360 @Child(name="duration", type=DecimalDt.class, order=2, min=0, max=1, summary=true, modifier=false) 361 @Description( 362 shortDefinition="", 363 formalDefinition="How long this thing happens for when it happens" 364 ) 365 private DecimalDt myDuration; 366 367 @Child(name="durationMax", type=DecimalDt.class, order=3, min=0, max=1, summary=true, modifier=false) 368 @Description( 369 shortDefinition="", 370 formalDefinition="The upper limit of how long this thing happens for when it happens" 371 ) 372 private DecimalDt myDurationMax; 373 374 @Child(name="durationUnits", type=CodeDt.class, order=4, min=0, max=1, summary=true, modifier=false) 375 @Description( 376 shortDefinition="", 377 formalDefinition="The units of time for the duration, in UCUM units" 378 ) 379 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/units-of-time") 380 private BoundCodeDt<UnitsOfTimeEnum> myDurationUnits; 381 382 @Child(name="frequency", type=IntegerDt.class, order=5, min=0, max=1, summary=true, modifier=false) 383 @Description( 384 shortDefinition="", 385 formalDefinition="The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided)" 386 ) 387 private IntegerDt myFrequency; 388 389 @Child(name="frequencyMax", type=IntegerDt.class, order=6, min=0, max=1, summary=true, modifier=false) 390 @Description( 391 shortDefinition="", 392 formalDefinition="" 393 ) 394 private IntegerDt myFrequencyMax; 395 396 @Child(name="period", type=DecimalDt.class, order=7, min=0, max=1, summary=true, modifier=false) 397 @Description( 398 shortDefinition="", 399 formalDefinition="Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period" 400 ) 401 private DecimalDt myPeriod; 402 403 @Child(name="periodMax", type=DecimalDt.class, order=8, min=0, max=1, summary=true, modifier=false) 404 @Description( 405 shortDefinition="", 406 formalDefinition="If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days" 407 ) 408 private DecimalDt myPeriodMax; 409 410 @Child(name="periodUnits", type=CodeDt.class, order=9, min=0, max=1, summary=true, modifier=false) 411 @Description( 412 shortDefinition="", 413 formalDefinition="The units of time for the period in UCUM units" 414 ) 415 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/units-of-time") 416 private BoundCodeDt<UnitsOfTimeEnum> myPeriodUnits; 417 418 @Child(name="when", type=CodeDt.class, order=10, min=0, max=1, summary=true, modifier=false) 419 @Description( 420 shortDefinition="", 421 formalDefinition="A real world event that the occurrence of the event should be tied to." 422 ) 423 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/event-timing") 424 private BoundCodeDt<EventTimingEnum> myWhen; 425 426 427 @Override 428 public boolean isEmpty() { 429 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myBounds, myCount, myDuration, myDurationMax, myDurationUnits, myFrequency, myFrequencyMax, myPeriod, myPeriodMax, myPeriodUnits, myWhen); 430 } 431 432 @Override 433 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 434 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myBounds, myCount, myDuration, myDurationMax, myDurationUnits, myFrequency, myFrequencyMax, myPeriod, myPeriodMax, myPeriodUnits, myWhen); 435 } 436 437 /** 438 * Gets the value(s) for <b>bounds[x]</b> (). 439 * creating it if it does 440 * not exist. Will not return <code>null</code>. 441 * 442 * <p> 443 * <b>Definition:</b> 444 * Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule 445 * </p> 446 */ 447 public IDatatype getBounds() { 448 return myBounds; 449 } 450 451 /** 452 * Sets the value(s) for <b>bounds[x]</b> () 453 * 454 * <p> 455 * <b>Definition:</b> 456 * Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule 457 * </p> 458 */ 459 public Repeat setBounds(IDatatype theValue) { 460 myBounds = theValue; 461 return this; 462 } 463 464 465 466 467 /** 468 * Gets the value(s) for <b>count</b> (). 469 * creating it if it does 470 * not exist. Will not return <code>null</code>. 471 * 472 * <p> 473 * <b>Definition:</b> 474 * A total count of the desired number of repetitions 475 * </p> 476 */ 477 public IntegerDt getCountElement() { 478 if (myCount == null) { 479 myCount = new IntegerDt(); 480 } 481 return myCount; 482 } 483 484 485 /** 486 * Gets the value(s) for <b>count</b> (). 487 * creating it if it does 488 * not exist. This method may return <code>null</code>. 489 * 490 * <p> 491 * <b>Definition:</b> 492 * A total count of the desired number of repetitions 493 * </p> 494 */ 495 public Integer getCount() { 496 return getCountElement().getValue(); 497 } 498 499 /** 500 * Sets the value(s) for <b>count</b> () 501 * 502 * <p> 503 * <b>Definition:</b> 504 * A total count of the desired number of repetitions 505 * </p> 506 */ 507 public Repeat setCount(IntegerDt theValue) { 508 myCount = theValue; 509 return this; 510 } 511 512 513 514 /** 515 * Sets the value for <b>count</b> () 516 * 517 * <p> 518 * <b>Definition:</b> 519 * A total count of the desired number of repetitions 520 * </p> 521 */ 522 public Repeat setCount( int theInteger) { 523 myCount = new IntegerDt(theInteger); 524 return this; 525 } 526 527 528 /** 529 * Gets the value(s) for <b>duration</b> (). 530 * creating it if it does 531 * not exist. Will not return <code>null</code>. 532 * 533 * <p> 534 * <b>Definition:</b> 535 * How long this thing happens for when it happens 536 * </p> 537 */ 538 public DecimalDt getDurationElement() { 539 if (myDuration == null) { 540 myDuration = new DecimalDt(); 541 } 542 return myDuration; 543 } 544 545 546 /** 547 * Gets the value(s) for <b>duration</b> (). 548 * creating it if it does 549 * not exist. This method may return <code>null</code>. 550 * 551 * <p> 552 * <b>Definition:</b> 553 * How long this thing happens for when it happens 554 * </p> 555 */ 556 public BigDecimal getDuration() { 557 return getDurationElement().getValue(); 558 } 559 560 /** 561 * Sets the value(s) for <b>duration</b> () 562 * 563 * <p> 564 * <b>Definition:</b> 565 * How long this thing happens for when it happens 566 * </p> 567 */ 568 public Repeat setDuration(DecimalDt theValue) { 569 myDuration = theValue; 570 return this; 571 } 572 573 574 575 /** 576 * Sets the value for <b>duration</b> () 577 * 578 * <p> 579 * <b>Definition:</b> 580 * How long this thing happens for when it happens 581 * </p> 582 */ 583 public Repeat setDuration( long theValue) { 584 myDuration = new DecimalDt(theValue); 585 return this; 586 } 587 588 /** 589 * Sets the value for <b>duration</b> () 590 * 591 * <p> 592 * <b>Definition:</b> 593 * How long this thing happens for when it happens 594 * </p> 595 */ 596 public Repeat setDuration( double theValue) { 597 myDuration = new DecimalDt(theValue); 598 return this; 599 } 600 601 /** 602 * Sets the value for <b>duration</b> () 603 * 604 * <p> 605 * <b>Definition:</b> 606 * How long this thing happens for when it happens 607 * </p> 608 */ 609 public Repeat setDuration( java.math.BigDecimal theValue) { 610 myDuration = new DecimalDt(theValue); 611 return this; 612 } 613 614 615 /** 616 * Gets the value(s) for <b>durationMax</b> (). 617 * creating it if it does 618 * not exist. Will not return <code>null</code>. 619 * 620 * <p> 621 * <b>Definition:</b> 622 * The upper limit of how long this thing happens for when it happens 623 * </p> 624 */ 625 public DecimalDt getDurationMaxElement() { 626 if (myDurationMax == null) { 627 myDurationMax = new DecimalDt(); 628 } 629 return myDurationMax; 630 } 631 632 633 /** 634 * Gets the value(s) for <b>durationMax</b> (). 635 * creating it if it does 636 * not exist. This method may return <code>null</code>. 637 * 638 * <p> 639 * <b>Definition:</b> 640 * The upper limit of how long this thing happens for when it happens 641 * </p> 642 */ 643 public BigDecimal getDurationMax() { 644 return getDurationMaxElement().getValue(); 645 } 646 647 /** 648 * Sets the value(s) for <b>durationMax</b> () 649 * 650 * <p> 651 * <b>Definition:</b> 652 * The upper limit of how long this thing happens for when it happens 653 * </p> 654 */ 655 public Repeat setDurationMax(DecimalDt theValue) { 656 myDurationMax = theValue; 657 return this; 658 } 659 660 661 662 /** 663 * Sets the value for <b>durationMax</b> () 664 * 665 * <p> 666 * <b>Definition:</b> 667 * The upper limit of how long this thing happens for when it happens 668 * </p> 669 */ 670 public Repeat setDurationMax( long theValue) { 671 myDurationMax = new DecimalDt(theValue); 672 return this; 673 } 674 675 /** 676 * Sets the value for <b>durationMax</b> () 677 * 678 * <p> 679 * <b>Definition:</b> 680 * The upper limit of how long this thing happens for when it happens 681 * </p> 682 */ 683 public Repeat setDurationMax( double theValue) { 684 myDurationMax = new DecimalDt(theValue); 685 return this; 686 } 687 688 /** 689 * Sets the value for <b>durationMax</b> () 690 * 691 * <p> 692 * <b>Definition:</b> 693 * The upper limit of how long this thing happens for when it happens 694 * </p> 695 */ 696 public Repeat setDurationMax( java.math.BigDecimal theValue) { 697 myDurationMax = new DecimalDt(theValue); 698 return this; 699 } 700 701 702 /** 703 * Gets the value(s) for <b>durationUnits</b> (). 704 * creating it if it does 705 * not exist. Will not return <code>null</code>. 706 * 707 * <p> 708 * <b>Definition:</b> 709 * The units of time for the duration, in UCUM units 710 * </p> 711 */ 712 public BoundCodeDt<UnitsOfTimeEnum> getDurationUnitsElement() { 713 if (myDurationUnits == null) { 714 myDurationUnits = new BoundCodeDt<UnitsOfTimeEnum>(UnitsOfTimeEnum.VALUESET_BINDER); 715 } 716 return myDurationUnits; 717 } 718 719 720 /** 721 * Gets the value(s) for <b>durationUnits</b> (). 722 * creating it if it does 723 * not exist. This method may return <code>null</code>. 724 * 725 * <p> 726 * <b>Definition:</b> 727 * The units of time for the duration, in UCUM units 728 * </p> 729 */ 730 public String getDurationUnits() { 731 return getDurationUnitsElement().getValue(); 732 } 733 734 /** 735 * Sets the value(s) for <b>durationUnits</b> () 736 * 737 * <p> 738 * <b>Definition:</b> 739 * The units of time for the duration, in UCUM units 740 * </p> 741 */ 742 public Repeat setDurationUnits(BoundCodeDt<UnitsOfTimeEnum> theValue) { 743 myDurationUnits = theValue; 744 return this; 745 } 746 747 748 749 /** 750 * Sets the value(s) for <b>durationUnits</b> () 751 * 752 * <p> 753 * <b>Definition:</b> 754 * The units of time for the duration, in UCUM units 755 * </p> 756 */ 757 public Repeat setDurationUnits(UnitsOfTimeEnum theValue) { 758 setDurationUnits(new BoundCodeDt<UnitsOfTimeEnum>(UnitsOfTimeEnum.VALUESET_BINDER, theValue)); 759 760/* 761 getDurationUnitsElement().setValueAsEnum(theValue); 762*/ 763 return this; 764 } 765 766 767 /** 768 * Gets the value(s) for <b>frequency</b> (). 769 * creating it if it does 770 * not exist. Will not return <code>null</code>. 771 * 772 * <p> 773 * <b>Definition:</b> 774 * The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided) 775 * </p> 776 */ 777 public IntegerDt getFrequencyElement() { 778 if (myFrequency == null) { 779 myFrequency = new IntegerDt(); 780 } 781 return myFrequency; 782 } 783 784 785 /** 786 * Gets the value(s) for <b>frequency</b> (). 787 * creating it if it does 788 * not exist. This method may return <code>null</code>. 789 * 790 * <p> 791 * <b>Definition:</b> 792 * The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided) 793 * </p> 794 */ 795 public Integer getFrequency() { 796 return getFrequencyElement().getValue(); 797 } 798 799 /** 800 * Sets the value(s) for <b>frequency</b> () 801 * 802 * <p> 803 * <b>Definition:</b> 804 * The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided) 805 * </p> 806 */ 807 public Repeat setFrequency(IntegerDt theValue) { 808 myFrequency = theValue; 809 return this; 810 } 811 812 813 814 /** 815 * Sets the value for <b>frequency</b> () 816 * 817 * <p> 818 * <b>Definition:</b> 819 * The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided) 820 * </p> 821 */ 822 public Repeat setFrequency( int theInteger) { 823 myFrequency = new IntegerDt(theInteger); 824 return this; 825 } 826 827 828 /** 829 * Gets the value(s) for <b>frequencyMax</b> (). 830 * creating it if it does 831 * not exist. Will not return <code>null</code>. 832 * 833 * <p> 834 * <b>Definition:</b> 835 * 836 * </p> 837 */ 838 public IntegerDt getFrequencyMaxElement() { 839 if (myFrequencyMax == null) { 840 myFrequencyMax = new IntegerDt(); 841 } 842 return myFrequencyMax; 843 } 844 845 846 /** 847 * Gets the value(s) for <b>frequencyMax</b> (). 848 * creating it if it does 849 * not exist. This method may return <code>null</code>. 850 * 851 * <p> 852 * <b>Definition:</b> 853 * 854 * </p> 855 */ 856 public Integer getFrequencyMax() { 857 return getFrequencyMaxElement().getValue(); 858 } 859 860 /** 861 * Sets the value(s) for <b>frequencyMax</b> () 862 * 863 * <p> 864 * <b>Definition:</b> 865 * 866 * </p> 867 */ 868 public Repeat setFrequencyMax(IntegerDt theValue) { 869 myFrequencyMax = theValue; 870 return this; 871 } 872 873 874 875 /** 876 * Sets the value for <b>frequencyMax</b> () 877 * 878 * <p> 879 * <b>Definition:</b> 880 * 881 * </p> 882 */ 883 public Repeat setFrequencyMax( int theInteger) { 884 myFrequencyMax = new IntegerDt(theInteger); 885 return this; 886 } 887 888 889 /** 890 * Gets the value(s) for <b>period</b> (). 891 * creating it if it does 892 * not exist. Will not return <code>null</code>. 893 * 894 * <p> 895 * <b>Definition:</b> 896 * Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period 897 * </p> 898 */ 899 public DecimalDt getPeriodElement() { 900 if (myPeriod == null) { 901 myPeriod = new DecimalDt(); 902 } 903 return myPeriod; 904 } 905 906 907 /** 908 * Gets the value(s) for <b>period</b> (). 909 * creating it if it does 910 * not exist. This method may return <code>null</code>. 911 * 912 * <p> 913 * <b>Definition:</b> 914 * Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period 915 * </p> 916 */ 917 public BigDecimal getPeriod() { 918 return getPeriodElement().getValue(); 919 } 920 921 /** 922 * Sets the value(s) for <b>period</b> () 923 * 924 * <p> 925 * <b>Definition:</b> 926 * Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period 927 * </p> 928 */ 929 public Repeat setPeriod(DecimalDt theValue) { 930 myPeriod = theValue; 931 return this; 932 } 933 934 935 936 /** 937 * Sets the value for <b>period</b> () 938 * 939 * <p> 940 * <b>Definition:</b> 941 * Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period 942 * </p> 943 */ 944 public Repeat setPeriod( long theValue) { 945 myPeriod = new DecimalDt(theValue); 946 return this; 947 } 948 949 /** 950 * Sets the value for <b>period</b> () 951 * 952 * <p> 953 * <b>Definition:</b> 954 * Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period 955 * </p> 956 */ 957 public Repeat setPeriod( double theValue) { 958 myPeriod = new DecimalDt(theValue); 959 return this; 960 } 961 962 /** 963 * Sets the value for <b>period</b> () 964 * 965 * <p> 966 * <b>Definition:</b> 967 * Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period 968 * </p> 969 */ 970 public Repeat setPeriod( java.math.BigDecimal theValue) { 971 myPeriod = new DecimalDt(theValue); 972 return this; 973 } 974 975 976 /** 977 * Gets the value(s) for <b>periodMax</b> (). 978 * creating it if it does 979 * not exist. Will not return <code>null</code>. 980 * 981 * <p> 982 * <b>Definition:</b> 983 * If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days 984 * </p> 985 */ 986 public DecimalDt getPeriodMaxElement() { 987 if (myPeriodMax == null) { 988 myPeriodMax = new DecimalDt(); 989 } 990 return myPeriodMax; 991 } 992 993 994 /** 995 * Gets the value(s) for <b>periodMax</b> (). 996 * creating it if it does 997 * not exist. This method may return <code>null</code>. 998 * 999 * <p> 1000 * <b>Definition:</b> 1001 * If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days 1002 * </p> 1003 */ 1004 public BigDecimal getPeriodMax() { 1005 return getPeriodMaxElement().getValue(); 1006 } 1007 1008 /** 1009 * Sets the value(s) for <b>periodMax</b> () 1010 * 1011 * <p> 1012 * <b>Definition:</b> 1013 * If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days 1014 * </p> 1015 */ 1016 public Repeat setPeriodMax(DecimalDt theValue) { 1017 myPeriodMax = theValue; 1018 return this; 1019 } 1020 1021 1022 1023 /** 1024 * Sets the value for <b>periodMax</b> () 1025 * 1026 * <p> 1027 * <b>Definition:</b> 1028 * If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days 1029 * </p> 1030 */ 1031 public Repeat setPeriodMax( long theValue) { 1032 myPeriodMax = new DecimalDt(theValue); 1033 return this; 1034 } 1035 1036 /** 1037 * Sets the value for <b>periodMax</b> () 1038 * 1039 * <p> 1040 * <b>Definition:</b> 1041 * If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days 1042 * </p> 1043 */ 1044 public Repeat setPeriodMax( double theValue) { 1045 myPeriodMax = new DecimalDt(theValue); 1046 return this; 1047 } 1048 1049 /** 1050 * Sets the value for <b>periodMax</b> () 1051 * 1052 * <p> 1053 * <b>Definition:</b> 1054 * If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days 1055 * </p> 1056 */ 1057 public Repeat setPeriodMax( java.math.BigDecimal theValue) { 1058 myPeriodMax = new DecimalDt(theValue); 1059 return this; 1060 } 1061 1062 1063 /** 1064 * Gets the value(s) for <b>periodUnits</b> (). 1065 * creating it if it does 1066 * not exist. Will not return <code>null</code>. 1067 * 1068 * <p> 1069 * <b>Definition:</b> 1070 * The units of time for the period in UCUM units 1071 * </p> 1072 */ 1073 public BoundCodeDt<UnitsOfTimeEnum> getPeriodUnitsElement() { 1074 if (myPeriodUnits == null) { 1075 myPeriodUnits = new BoundCodeDt<UnitsOfTimeEnum>(UnitsOfTimeEnum.VALUESET_BINDER); 1076 } 1077 return myPeriodUnits; 1078 } 1079 1080 1081 /** 1082 * Gets the value(s) for <b>periodUnits</b> (). 1083 * creating it if it does 1084 * not exist. This method may return <code>null</code>. 1085 * 1086 * <p> 1087 * <b>Definition:</b> 1088 * The units of time for the period in UCUM units 1089 * </p> 1090 */ 1091 public String getPeriodUnits() { 1092 return getPeriodUnitsElement().getValue(); 1093 } 1094 1095 /** 1096 * Sets the value(s) for <b>periodUnits</b> () 1097 * 1098 * <p> 1099 * <b>Definition:</b> 1100 * The units of time for the period in UCUM units 1101 * </p> 1102 */ 1103 public Repeat setPeriodUnits(BoundCodeDt<UnitsOfTimeEnum> theValue) { 1104 myPeriodUnits = theValue; 1105 return this; 1106 } 1107 1108 1109 1110 /** 1111 * Sets the value(s) for <b>periodUnits</b> () 1112 * 1113 * <p> 1114 * <b>Definition:</b> 1115 * The units of time for the period in UCUM units 1116 * </p> 1117 */ 1118 public Repeat setPeriodUnits(UnitsOfTimeEnum theValue) { 1119 setPeriodUnits(new BoundCodeDt<UnitsOfTimeEnum>(UnitsOfTimeEnum.VALUESET_BINDER, theValue)); 1120 1121/* 1122 getPeriodUnitsElement().setValueAsEnum(theValue); 1123*/ 1124 return this; 1125 } 1126 1127 1128 /** 1129 * Gets the value(s) for <b>when</b> (). 1130 * creating it if it does 1131 * not exist. Will not return <code>null</code>. 1132 * 1133 * <p> 1134 * <b>Definition:</b> 1135 * A real world event that the occurrence of the event should be tied to. 1136 * </p> 1137 */ 1138 public BoundCodeDt<EventTimingEnum> getWhenElement() { 1139 if (myWhen == null) { 1140 myWhen = new BoundCodeDt<EventTimingEnum>(EventTimingEnum.VALUESET_BINDER); 1141 } 1142 return myWhen; 1143 } 1144 1145 1146 /** 1147 * Gets the value(s) for <b>when</b> (). 1148 * creating it if it does 1149 * not exist. This method may return <code>null</code>. 1150 * 1151 * <p> 1152 * <b>Definition:</b> 1153 * A real world event that the occurrence of the event should be tied to. 1154 * </p> 1155 */ 1156 public String getWhen() { 1157 return getWhenElement().getValue(); 1158 } 1159 1160 /** 1161 * Sets the value(s) for <b>when</b> () 1162 * 1163 * <p> 1164 * <b>Definition:</b> 1165 * A real world event that the occurrence of the event should be tied to. 1166 * </p> 1167 */ 1168 public Repeat setWhen(BoundCodeDt<EventTimingEnum> theValue) { 1169 myWhen = theValue; 1170 return this; 1171 } 1172 1173 1174 1175 /** 1176 * Sets the value(s) for <b>when</b> () 1177 * 1178 * <p> 1179 * <b>Definition:</b> 1180 * A real world event that the occurrence of the event should be tied to. 1181 * </p> 1182 */ 1183 public Repeat setWhen(EventTimingEnum theValue) { 1184 setWhen(new BoundCodeDt<EventTimingEnum>(EventTimingEnum.VALUESET_BINDER, theValue)); 1185 1186/* 1187 getWhenElement().setValueAsEnum(theValue); 1188*/ 1189 return this; 1190 } 1191 1192 1193 1194 1195 } 1196 1197 1198 1199 1200}