001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * Record of transport.
052 */
053@ResourceDef(name="Transport", profile="http://hl7.org/fhir/StructureDefinition/Transport")
054public class Transport extends DomainResource {
055
056    public enum TransportIntent {
057        /**
058         * The intent is not known.  When dealing with Transport, it's not always known (or relevant) how the transport was initiated - i.e. whether it was proposed, planned, ordered or just done spontaneously.
059         */
060        UNKNOWN, 
061        /**
062         * The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act.
063         */
064        PROPOSAL, 
065        /**
066         * The request represents an intention to ensure something occurs without providing an authorization for others to act.
067         */
068        PLAN, 
069        /**
070         * The request represents a request/demand and authorization for action by the requestor.
071         */
072        ORDER, 
073        /**
074         * The request represents an original authorization for action.
075         */
076        ORIGINALORDER, 
077        /**
078         * The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization.
079         */
080        REFLEXORDER, 
081        /**
082         * The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order.
083         */
084        FILLERORDER, 
085        /**
086         * An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence.  E.g. The administration of a single dose of a drug.
087         */
088        INSTANCEORDER, 
089        /**
090         * The request represents a component or option for a RequestOrchestration that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestOrchestration]]] for additional information on how this status is used.
091         */
092        OPTION, 
093        /**
094         * added to help the parsers with the generic types
095         */
096        NULL;
097        public static TransportIntent fromCode(String codeString) throws FHIRException {
098            if (codeString == null || "".equals(codeString))
099                return null;
100        if ("unknown".equals(codeString))
101          return UNKNOWN;
102        if ("proposal".equals(codeString))
103          return PROPOSAL;
104        if ("plan".equals(codeString))
105          return PLAN;
106        if ("order".equals(codeString))
107          return ORDER;
108        if ("original-order".equals(codeString))
109          return ORIGINALORDER;
110        if ("reflex-order".equals(codeString))
111          return REFLEXORDER;
112        if ("filler-order".equals(codeString))
113          return FILLERORDER;
114        if ("instance-order".equals(codeString))
115          return INSTANCEORDER;
116        if ("option".equals(codeString))
117          return OPTION;
118        if (Configuration.isAcceptInvalidEnums())
119          return null;
120        else
121          throw new FHIRException("Unknown TransportIntent code '"+codeString+"'");
122        }
123        public String toCode() {
124          switch (this) {
125            case UNKNOWN: return "unknown";
126            case PROPOSAL: return "proposal";
127            case PLAN: return "plan";
128            case ORDER: return "order";
129            case ORIGINALORDER: return "original-order";
130            case REFLEXORDER: return "reflex-order";
131            case FILLERORDER: return "filler-order";
132            case INSTANCEORDER: return "instance-order";
133            case OPTION: return "option";
134            case NULL: return null;
135            default: return "?";
136          }
137        }
138        public String getSystem() {
139          switch (this) {
140            case UNKNOWN: return "http://hl7.org/fhir/transport-intent";
141            case PROPOSAL: return "http://hl7.org/fhir/request-intent";
142            case PLAN: return "http://hl7.org/fhir/request-intent";
143            case ORDER: return "http://hl7.org/fhir/request-intent";
144            case ORIGINALORDER: return "http://hl7.org/fhir/request-intent";
145            case REFLEXORDER: return "http://hl7.org/fhir/request-intent";
146            case FILLERORDER: return "http://hl7.org/fhir/request-intent";
147            case INSTANCEORDER: return "http://hl7.org/fhir/request-intent";
148            case OPTION: return "http://hl7.org/fhir/request-intent";
149            case NULL: return null;
150            default: return "?";
151          }
152        }
153        public String getDefinition() {
154          switch (this) {
155            case UNKNOWN: return "The intent is not known.  When dealing with Transport, it's not always known (or relevant) how the transport was initiated - i.e. whether it was proposed, planned, ordered or just done spontaneously.";
156            case PROPOSAL: return "The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act.";
157            case PLAN: return "The request represents an intention to ensure something occurs without providing an authorization for others to act.";
158            case ORDER: return "The request represents a request/demand and authorization for action by the requestor.";
159            case ORIGINALORDER: return "The request represents an original authorization for action.";
160            case REFLEXORDER: return "The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization.";
161            case FILLERORDER: return "The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order.";
162            case INSTANCEORDER: return "An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence.  E.g. The administration of a single dose of a drug.";
163            case OPTION: return "The request represents a component or option for a RequestOrchestration that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestOrchestration]]] for additional information on how this status is used.";
164            case NULL: return null;
165            default: return "?";
166          }
167        }
168        public String getDisplay() {
169          switch (this) {
170            case UNKNOWN: return "Unknown";
171            case PROPOSAL: return "Proposal";
172            case PLAN: return "Plan";
173            case ORDER: return "Order";
174            case ORIGINALORDER: return "Original Order";
175            case REFLEXORDER: return "Reflex Order";
176            case FILLERORDER: return "Filler Order";
177            case INSTANCEORDER: return "Instance Order";
178            case OPTION: return "Option";
179            case NULL: return null;
180            default: return "?";
181          }
182        }
183    }
184
185  public static class TransportIntentEnumFactory implements EnumFactory<TransportIntent> {
186    public TransportIntent fromCode(String codeString) throws IllegalArgumentException {
187      if (codeString == null || "".equals(codeString))
188            if (codeString == null || "".equals(codeString))
189                return null;
190        if ("unknown".equals(codeString))
191          return TransportIntent.UNKNOWN;
192        if ("proposal".equals(codeString))
193          return TransportIntent.PROPOSAL;
194        if ("plan".equals(codeString))
195          return TransportIntent.PLAN;
196        if ("order".equals(codeString))
197          return TransportIntent.ORDER;
198        if ("original-order".equals(codeString))
199          return TransportIntent.ORIGINALORDER;
200        if ("reflex-order".equals(codeString))
201          return TransportIntent.REFLEXORDER;
202        if ("filler-order".equals(codeString))
203          return TransportIntent.FILLERORDER;
204        if ("instance-order".equals(codeString))
205          return TransportIntent.INSTANCEORDER;
206        if ("option".equals(codeString))
207          return TransportIntent.OPTION;
208        throw new IllegalArgumentException("Unknown TransportIntent code '"+codeString+"'");
209        }
210        public Enumeration<TransportIntent> fromType(PrimitiveType<?> code) throws FHIRException {
211          if (code == null)
212            return null;
213          if (code.isEmpty())
214            return new Enumeration<TransportIntent>(this, TransportIntent.NULL, code);
215          String codeString = ((PrimitiveType) code).asStringValue();
216          if (codeString == null || "".equals(codeString))
217            return new Enumeration<TransportIntent>(this, TransportIntent.NULL, code);
218        if ("unknown".equals(codeString))
219          return new Enumeration<TransportIntent>(this, TransportIntent.UNKNOWN, code);
220        if ("proposal".equals(codeString))
221          return new Enumeration<TransportIntent>(this, TransportIntent.PROPOSAL, code);
222        if ("plan".equals(codeString))
223          return new Enumeration<TransportIntent>(this, TransportIntent.PLAN, code);
224        if ("order".equals(codeString))
225          return new Enumeration<TransportIntent>(this, TransportIntent.ORDER, code);
226        if ("original-order".equals(codeString))
227          return new Enumeration<TransportIntent>(this, TransportIntent.ORIGINALORDER, code);
228        if ("reflex-order".equals(codeString))
229          return new Enumeration<TransportIntent>(this, TransportIntent.REFLEXORDER, code);
230        if ("filler-order".equals(codeString))
231          return new Enumeration<TransportIntent>(this, TransportIntent.FILLERORDER, code);
232        if ("instance-order".equals(codeString))
233          return new Enumeration<TransportIntent>(this, TransportIntent.INSTANCEORDER, code);
234        if ("option".equals(codeString))
235          return new Enumeration<TransportIntent>(this, TransportIntent.OPTION, code);
236        throw new FHIRException("Unknown TransportIntent code '"+codeString+"'");
237        }
238    public String toCode(TransportIntent code) {
239      if (code == TransportIntent.UNKNOWN)
240        return "unknown";
241      if (code == TransportIntent.PROPOSAL)
242        return "proposal";
243      if (code == TransportIntent.PLAN)
244        return "plan";
245      if (code == TransportIntent.ORDER)
246        return "order";
247      if (code == TransportIntent.ORIGINALORDER)
248        return "original-order";
249      if (code == TransportIntent.REFLEXORDER)
250        return "reflex-order";
251      if (code == TransportIntent.FILLERORDER)
252        return "filler-order";
253      if (code == TransportIntent.INSTANCEORDER)
254        return "instance-order";
255      if (code == TransportIntent.OPTION)
256        return "option";
257      return "?";
258      }
259    public String toSystem(TransportIntent code) {
260      return code.getSystem();
261      }
262    }
263
264    public enum TransportStatus {
265        /**
266         * Transport has started but not completed.
267         */
268        INPROGRESS, 
269        /**
270         * Transport has been completed.
271         */
272        COMPLETED, 
273        /**
274         * Transport was started but not completed.
275         */
276        ABANDONED, 
277        /**
278         * Transport was cancelled before started.
279         */
280        CANCELLED, 
281        /**
282         * Planned transport that is not yet requested.
283         */
284        PLANNED, 
285        /**
286         * This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"abandoned\" rather than \"entered-in-error\".).
287         */
288        ENTEREDINERROR, 
289        /**
290         * added to help the parsers with the generic types
291         */
292        NULL;
293        public static TransportStatus fromCode(String codeString) throws FHIRException {
294            if (codeString == null || "".equals(codeString))
295                return null;
296        if ("in-progress".equals(codeString))
297          return INPROGRESS;
298        if ("completed".equals(codeString))
299          return COMPLETED;
300        if ("abandoned".equals(codeString))
301          return ABANDONED;
302        if ("cancelled".equals(codeString))
303          return CANCELLED;
304        if ("planned".equals(codeString))
305          return PLANNED;
306        if ("entered-in-error".equals(codeString))
307          return ENTEREDINERROR;
308        if (Configuration.isAcceptInvalidEnums())
309          return null;
310        else
311          throw new FHIRException("Unknown TransportStatus code '"+codeString+"'");
312        }
313        public String toCode() {
314          switch (this) {
315            case INPROGRESS: return "in-progress";
316            case COMPLETED: return "completed";
317            case ABANDONED: return "abandoned";
318            case CANCELLED: return "cancelled";
319            case PLANNED: return "planned";
320            case ENTEREDINERROR: return "entered-in-error";
321            case NULL: return null;
322            default: return "?";
323          }
324        }
325        public String getSystem() {
326          switch (this) {
327            case INPROGRESS: return "http://hl7.org/fhir/transport-status";
328            case COMPLETED: return "http://hl7.org/fhir/transport-status";
329            case ABANDONED: return "http://hl7.org/fhir/transport-status";
330            case CANCELLED: return "http://hl7.org/fhir/transport-status";
331            case PLANNED: return "http://hl7.org/fhir/transport-status";
332            case ENTEREDINERROR: return "http://hl7.org/fhir/transport-status";
333            case NULL: return null;
334            default: return "?";
335          }
336        }
337        public String getDefinition() {
338          switch (this) {
339            case INPROGRESS: return "Transport has started but not completed.";
340            case COMPLETED: return "Transport has been completed.";
341            case ABANDONED: return "Transport was started but not completed.";
342            case CANCELLED: return "Transport was cancelled before started.";
343            case PLANNED: return "Planned transport that is not yet requested.";
344            case ENTEREDINERROR: return "This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"abandoned\" rather than \"entered-in-error\".).";
345            case NULL: return null;
346            default: return "?";
347          }
348        }
349        public String getDisplay() {
350          switch (this) {
351            case INPROGRESS: return "In Progress";
352            case COMPLETED: return "Completed";
353            case ABANDONED: return "Abandoned";
354            case CANCELLED: return "Cancelled";
355            case PLANNED: return "Planned";
356            case ENTEREDINERROR: return "Entered In Error";
357            case NULL: return null;
358            default: return "?";
359          }
360        }
361    }
362
363  public static class TransportStatusEnumFactory implements EnumFactory<TransportStatus> {
364    public TransportStatus fromCode(String codeString) throws IllegalArgumentException {
365      if (codeString == null || "".equals(codeString))
366            if (codeString == null || "".equals(codeString))
367                return null;
368        if ("in-progress".equals(codeString))
369          return TransportStatus.INPROGRESS;
370        if ("completed".equals(codeString))
371          return TransportStatus.COMPLETED;
372        if ("abandoned".equals(codeString))
373          return TransportStatus.ABANDONED;
374        if ("cancelled".equals(codeString))
375          return TransportStatus.CANCELLED;
376        if ("planned".equals(codeString))
377          return TransportStatus.PLANNED;
378        if ("entered-in-error".equals(codeString))
379          return TransportStatus.ENTEREDINERROR;
380        throw new IllegalArgumentException("Unknown TransportStatus code '"+codeString+"'");
381        }
382        public Enumeration<TransportStatus> fromType(PrimitiveType<?> code) throws FHIRException {
383          if (code == null)
384            return null;
385          if (code.isEmpty())
386            return new Enumeration<TransportStatus>(this, TransportStatus.NULL, code);
387          String codeString = ((PrimitiveType) code).asStringValue();
388          if (codeString == null || "".equals(codeString))
389            return new Enumeration<TransportStatus>(this, TransportStatus.NULL, code);
390        if ("in-progress".equals(codeString))
391          return new Enumeration<TransportStatus>(this, TransportStatus.INPROGRESS, code);
392        if ("completed".equals(codeString))
393          return new Enumeration<TransportStatus>(this, TransportStatus.COMPLETED, code);
394        if ("abandoned".equals(codeString))
395          return new Enumeration<TransportStatus>(this, TransportStatus.ABANDONED, code);
396        if ("cancelled".equals(codeString))
397          return new Enumeration<TransportStatus>(this, TransportStatus.CANCELLED, code);
398        if ("planned".equals(codeString))
399          return new Enumeration<TransportStatus>(this, TransportStatus.PLANNED, code);
400        if ("entered-in-error".equals(codeString))
401          return new Enumeration<TransportStatus>(this, TransportStatus.ENTEREDINERROR, code);
402        throw new FHIRException("Unknown TransportStatus code '"+codeString+"'");
403        }
404    public String toCode(TransportStatus code) {
405      if (code == TransportStatus.INPROGRESS)
406        return "in-progress";
407      if (code == TransportStatus.COMPLETED)
408        return "completed";
409      if (code == TransportStatus.ABANDONED)
410        return "abandoned";
411      if (code == TransportStatus.CANCELLED)
412        return "cancelled";
413      if (code == TransportStatus.PLANNED)
414        return "planned";
415      if (code == TransportStatus.ENTEREDINERROR)
416        return "entered-in-error";
417      return "?";
418      }
419    public String toSystem(TransportStatus code) {
420      return code.getSystem();
421      }
422    }
423
424    @Block()
425    public static class TransportRestrictionComponent extends BackboneElement implements IBaseBackboneElement {
426        /**
427         * Indicates the number of times the requested action should occur.
428         */
429        @Child(name = "repetitions", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false)
430        @Description(shortDefinition="How many times to repeat", formalDefinition="Indicates the number of times the requested action should occur." )
431        protected PositiveIntType repetitions;
432
433        /**
434         * Over what time-period is fulfillment sought.
435         */
436        @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false)
437        @Description(shortDefinition="When fulfillment sought", formalDefinition="Over what time-period is fulfillment sought." )
438        protected Period period;
439
440        /**
441         * For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for.
442         */
443        @Child(name = "recipient", type = {Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Group.class, Organization.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
444        @Description(shortDefinition="For whom is fulfillment sought?", formalDefinition="For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for." )
445        protected List<Reference> recipient;
446
447        private static final long serialVersionUID = 1673996066L;
448
449    /**
450     * Constructor
451     */
452      public TransportRestrictionComponent() {
453        super();
454      }
455
456        /**
457         * @return {@link #repetitions} (Indicates the number of times the requested action should occur.). This is the underlying object with id, value and extensions. The accessor "getRepetitions" gives direct access to the value
458         */
459        public PositiveIntType getRepetitionsElement() { 
460          if (this.repetitions == null)
461            if (Configuration.errorOnAutoCreate())
462              throw new Error("Attempt to auto-create TransportRestrictionComponent.repetitions");
463            else if (Configuration.doAutoCreate())
464              this.repetitions = new PositiveIntType(); // bb
465          return this.repetitions;
466        }
467
468        public boolean hasRepetitionsElement() { 
469          return this.repetitions != null && !this.repetitions.isEmpty();
470        }
471
472        public boolean hasRepetitions() { 
473          return this.repetitions != null && !this.repetitions.isEmpty();
474        }
475
476        /**
477         * @param value {@link #repetitions} (Indicates the number of times the requested action should occur.). This is the underlying object with id, value and extensions. The accessor "getRepetitions" gives direct access to the value
478         */
479        public TransportRestrictionComponent setRepetitionsElement(PositiveIntType value) { 
480          this.repetitions = value;
481          return this;
482        }
483
484        /**
485         * @return Indicates the number of times the requested action should occur.
486         */
487        public int getRepetitions() { 
488          return this.repetitions == null || this.repetitions.isEmpty() ? 0 : this.repetitions.getValue();
489        }
490
491        /**
492         * @param value Indicates the number of times the requested action should occur.
493         */
494        public TransportRestrictionComponent setRepetitions(int value) { 
495            if (this.repetitions == null)
496              this.repetitions = new PositiveIntType();
497            this.repetitions.setValue(value);
498          return this;
499        }
500
501        /**
502         * @return {@link #period} (Over what time-period is fulfillment sought.)
503         */
504        public Period getPeriod() { 
505          if (this.period == null)
506            if (Configuration.errorOnAutoCreate())
507              throw new Error("Attempt to auto-create TransportRestrictionComponent.period");
508            else if (Configuration.doAutoCreate())
509              this.period = new Period(); // cc
510          return this.period;
511        }
512
513        public boolean hasPeriod() { 
514          return this.period != null && !this.period.isEmpty();
515        }
516
517        /**
518         * @param value {@link #period} (Over what time-period is fulfillment sought.)
519         */
520        public TransportRestrictionComponent setPeriod(Period value) { 
521          this.period = value;
522          return this;
523        }
524
525        /**
526         * @return {@link #recipient} (For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for.)
527         */
528        public List<Reference> getRecipient() { 
529          if (this.recipient == null)
530            this.recipient = new ArrayList<Reference>();
531          return this.recipient;
532        }
533
534        /**
535         * @return Returns a reference to <code>this</code> for easy method chaining
536         */
537        public TransportRestrictionComponent setRecipient(List<Reference> theRecipient) { 
538          this.recipient = theRecipient;
539          return this;
540        }
541
542        public boolean hasRecipient() { 
543          if (this.recipient == null)
544            return false;
545          for (Reference item : this.recipient)
546            if (!item.isEmpty())
547              return true;
548          return false;
549        }
550
551        public Reference addRecipient() { //3
552          Reference t = new Reference();
553          if (this.recipient == null)
554            this.recipient = new ArrayList<Reference>();
555          this.recipient.add(t);
556          return t;
557        }
558
559        public TransportRestrictionComponent addRecipient(Reference t) { //3
560          if (t == null)
561            return this;
562          if (this.recipient == null)
563            this.recipient = new ArrayList<Reference>();
564          this.recipient.add(t);
565          return this;
566        }
567
568        /**
569         * @return The first repetition of repeating field {@link #recipient}, creating it if it does not already exist {3}
570         */
571        public Reference getRecipientFirstRep() { 
572          if (getRecipient().isEmpty()) {
573            addRecipient();
574          }
575          return getRecipient().get(0);
576        }
577
578        protected void listChildren(List<Property> children) {
579          super.listChildren(children);
580          children.add(new Property("repetitions", "positiveInt", "Indicates the number of times the requested action should occur.", 0, 1, repetitions));
581          children.add(new Property("period", "Period", "Over what time-period is fulfillment sought.", 0, 1, period));
582          children.add(new Property("recipient", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Group|Organization)", "For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for.", 0, java.lang.Integer.MAX_VALUE, recipient));
583        }
584
585        @Override
586        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
587          switch (_hash) {
588          case 984367650: /*repetitions*/  return new Property("repetitions", "positiveInt", "Indicates the number of times the requested action should occur.", 0, 1, repetitions);
589          case -991726143: /*period*/  return new Property("period", "Period", "Over what time-period is fulfillment sought.", 0, 1, period);
590          case 820081177: /*recipient*/  return new Property("recipient", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Group|Organization)", "For requests that are targeted to more than one potential recipient/target, to identify who is fulfillment is sought for.", 0, java.lang.Integer.MAX_VALUE, recipient);
591          default: return super.getNamedProperty(_hash, _name, _checkValid);
592          }
593
594        }
595
596      @Override
597      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
598        switch (hash) {
599        case 984367650: /*repetitions*/ return this.repetitions == null ? new Base[0] : new Base[] {this.repetitions}; // PositiveIntType
600        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
601        case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : this.recipient.toArray(new Base[this.recipient.size()]); // Reference
602        default: return super.getProperty(hash, name, checkValid);
603        }
604
605      }
606
607      @Override
608      public Base setProperty(int hash, String name, Base value) throws FHIRException {
609        switch (hash) {
610        case 984367650: // repetitions
611          this.repetitions = TypeConvertor.castToPositiveInt(value); // PositiveIntType
612          return value;
613        case -991726143: // period
614          this.period = TypeConvertor.castToPeriod(value); // Period
615          return value;
616        case 820081177: // recipient
617          this.getRecipient().add(TypeConvertor.castToReference(value)); // Reference
618          return value;
619        default: return super.setProperty(hash, name, value);
620        }
621
622      }
623
624      @Override
625      public Base setProperty(String name, Base value) throws FHIRException {
626        if (name.equals("repetitions")) {
627          this.repetitions = TypeConvertor.castToPositiveInt(value); // PositiveIntType
628        } else if (name.equals("period")) {
629          this.period = TypeConvertor.castToPeriod(value); // Period
630        } else if (name.equals("recipient")) {
631          this.getRecipient().add(TypeConvertor.castToReference(value));
632        } else
633          return super.setProperty(name, value);
634        return value;
635      }
636
637  @Override
638  public void removeChild(String name, Base value) throws FHIRException {
639        if (name.equals("repetitions")) {
640          this.repetitions = null;
641        } else if (name.equals("period")) {
642          this.period = null;
643        } else if (name.equals("recipient")) {
644          this.getRecipient().remove(value);
645        } else
646          super.removeChild(name, value);
647        
648      }
649
650      @Override
651      public Base makeProperty(int hash, String name) throws FHIRException {
652        switch (hash) {
653        case 984367650:  return getRepetitionsElement();
654        case -991726143:  return getPeriod();
655        case 820081177:  return addRecipient(); 
656        default: return super.makeProperty(hash, name);
657        }
658
659      }
660
661      @Override
662      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
663        switch (hash) {
664        case 984367650: /*repetitions*/ return new String[] {"positiveInt"};
665        case -991726143: /*period*/ return new String[] {"Period"};
666        case 820081177: /*recipient*/ return new String[] {"Reference"};
667        default: return super.getTypesForProperty(hash, name);
668        }
669
670      }
671
672      @Override
673      public Base addChild(String name) throws FHIRException {
674        if (name.equals("repetitions")) {
675          throw new FHIRException("Cannot call addChild on a singleton property Transport.restriction.repetitions");
676        }
677        else if (name.equals("period")) {
678          this.period = new Period();
679          return this.period;
680        }
681        else if (name.equals("recipient")) {
682          return addRecipient();
683        }
684        else
685          return super.addChild(name);
686      }
687
688      public TransportRestrictionComponent copy() {
689        TransportRestrictionComponent dst = new TransportRestrictionComponent();
690        copyValues(dst);
691        return dst;
692      }
693
694      public void copyValues(TransportRestrictionComponent dst) {
695        super.copyValues(dst);
696        dst.repetitions = repetitions == null ? null : repetitions.copy();
697        dst.period = period == null ? null : period.copy();
698        if (recipient != null) {
699          dst.recipient = new ArrayList<Reference>();
700          for (Reference i : recipient)
701            dst.recipient.add(i.copy());
702        };
703      }
704
705      @Override
706      public boolean equalsDeep(Base other_) {
707        if (!super.equalsDeep(other_))
708          return false;
709        if (!(other_ instanceof TransportRestrictionComponent))
710          return false;
711        TransportRestrictionComponent o = (TransportRestrictionComponent) other_;
712        return compareDeep(repetitions, o.repetitions, true) && compareDeep(period, o.period, true) && compareDeep(recipient, o.recipient, true)
713          ;
714      }
715
716      @Override
717      public boolean equalsShallow(Base other_) {
718        if (!super.equalsShallow(other_))
719          return false;
720        if (!(other_ instanceof TransportRestrictionComponent))
721          return false;
722        TransportRestrictionComponent o = (TransportRestrictionComponent) other_;
723        return compareValues(repetitions, o.repetitions, true);
724      }
725
726      public boolean isEmpty() {
727        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(repetitions, period, recipient
728          );
729      }
730
731  public String fhirType() {
732    return "Transport.restriction";
733
734  }
735
736  }
737
738    @Block()
739    public static class ParameterComponent extends BackboneElement implements IBaseBackboneElement {
740        /**
741         * A code or description indicating how the input is intended to be used as part of the transport execution.
742         */
743        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
744        @Description(shortDefinition="Label for the input", formalDefinition="A code or description indicating how the input is intended to be used as part of the transport execution." )
745        protected CodeableConcept type;
746
747        /**
748         * The value of the input parameter as a basic type.
749         */
750        @Child(name = "value", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.class, Integer64Type.class, MarkdownType.class, OidType.class, PositiveIntType.class, StringType.class, TimeType.class, UnsignedIntType.class, UriType.class, UrlType.class, UuidType.class, Address.class, Age.class, Annotation.class, Attachment.class, CodeableConcept.class, CodeableReference.class, Coding.class, ContactPoint.class, Count.class, Distance.class, Duration.class, HumanName.class, Identifier.class, Money.class, Period.class, Quantity.class, Range.class, Ratio.class, RatioRange.class, Reference.class, SampledData.class, Signature.class, Timing.class, ContactDetail.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Availability.class, ExtendedContactDetail.class, Dosage.class, Meta.class}, order=2, min=1, max=1, modifier=false, summary=false)
751        @Description(shortDefinition="Content to use in performing the transport", formalDefinition="The value of the input parameter as a basic type." )
752        protected DataType value;
753
754        private static final long serialVersionUID = -1659186716L;
755
756    /**
757     * Constructor
758     */
759      public ParameterComponent() {
760        super();
761      }
762
763    /**
764     * Constructor
765     */
766      public ParameterComponent(CodeableConcept type, DataType value) {
767        super();
768        this.setType(type);
769        this.setValue(value);
770      }
771
772        /**
773         * @return {@link #type} (A code or description indicating how the input is intended to be used as part of the transport execution.)
774         */
775        public CodeableConcept getType() { 
776          if (this.type == null)
777            if (Configuration.errorOnAutoCreate())
778              throw new Error("Attempt to auto-create ParameterComponent.type");
779            else if (Configuration.doAutoCreate())
780              this.type = new CodeableConcept(); // cc
781          return this.type;
782        }
783
784        public boolean hasType() { 
785          return this.type != null && !this.type.isEmpty();
786        }
787
788        /**
789         * @param value {@link #type} (A code or description indicating how the input is intended to be used as part of the transport execution.)
790         */
791        public ParameterComponent setType(CodeableConcept value) { 
792          this.type = value;
793          return this;
794        }
795
796        /**
797         * @return {@link #value} (The value of the input parameter as a basic type.)
798         */
799        public DataType getValue() { 
800          return this.value;
801        }
802
803        /**
804         * @return {@link #value} (The value of the input parameter as a basic type.)
805         */
806        public Base64BinaryType getValueBase64BinaryType() throws FHIRException { 
807          if (this.value == null)
808            this.value = new Base64BinaryType();
809          if (!(this.value instanceof Base64BinaryType))
810            throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.value.getClass().getName()+" was encountered");
811          return (Base64BinaryType) this.value;
812        }
813
814        public boolean hasValueBase64BinaryType() { 
815          return this != null && this.value instanceof Base64BinaryType;
816        }
817
818        /**
819         * @return {@link #value} (The value of the input parameter as a basic type.)
820         */
821        public BooleanType getValueBooleanType() throws FHIRException { 
822          if (this.value == null)
823            this.value = new BooleanType();
824          if (!(this.value instanceof BooleanType))
825            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
826          return (BooleanType) this.value;
827        }
828
829        public boolean hasValueBooleanType() { 
830          return this != null && this.value instanceof BooleanType;
831        }
832
833        /**
834         * @return {@link #value} (The value of the input parameter as a basic type.)
835         */
836        public CanonicalType getValueCanonicalType() throws FHIRException { 
837          if (this.value == null)
838            this.value = new CanonicalType();
839          if (!(this.value instanceof CanonicalType))
840            throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.value.getClass().getName()+" was encountered");
841          return (CanonicalType) this.value;
842        }
843
844        public boolean hasValueCanonicalType() { 
845          return this != null && this.value instanceof CanonicalType;
846        }
847
848        /**
849         * @return {@link #value} (The value of the input parameter as a basic type.)
850         */
851        public CodeType getValueCodeType() throws FHIRException { 
852          if (this.value == null)
853            this.value = new CodeType();
854          if (!(this.value instanceof CodeType))
855            throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered");
856          return (CodeType) this.value;
857        }
858
859        public boolean hasValueCodeType() { 
860          return this != null && this.value instanceof CodeType;
861        }
862
863        /**
864         * @return {@link #value} (The value of the input parameter as a basic type.)
865         */
866        public DateType getValueDateType() throws FHIRException { 
867          if (this.value == null)
868            this.value = new DateType();
869          if (!(this.value instanceof DateType))
870            throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered");
871          return (DateType) this.value;
872        }
873
874        public boolean hasValueDateType() { 
875          return this != null && this.value instanceof DateType;
876        }
877
878        /**
879         * @return {@link #value} (The value of the input parameter as a basic type.)
880         */
881        public DateTimeType getValueDateTimeType() throws FHIRException { 
882          if (this.value == null)
883            this.value = new DateTimeType();
884          if (!(this.value instanceof DateTimeType))
885            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered");
886          return (DateTimeType) this.value;
887        }
888
889        public boolean hasValueDateTimeType() { 
890          return this != null && this.value instanceof DateTimeType;
891        }
892
893        /**
894         * @return {@link #value} (The value of the input parameter as a basic type.)
895         */
896        public DecimalType getValueDecimalType() throws FHIRException { 
897          if (this.value == null)
898            this.value = new DecimalType();
899          if (!(this.value instanceof DecimalType))
900            throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered");
901          return (DecimalType) this.value;
902        }
903
904        public boolean hasValueDecimalType() { 
905          return this != null && this.value instanceof DecimalType;
906        }
907
908        /**
909         * @return {@link #value} (The value of the input parameter as a basic type.)
910         */
911        public IdType getValueIdType() throws FHIRException { 
912          if (this.value == null)
913            this.value = new IdType();
914          if (!(this.value instanceof IdType))
915            throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.value.getClass().getName()+" was encountered");
916          return (IdType) this.value;
917        }
918
919        public boolean hasValueIdType() { 
920          return this != null && this.value instanceof IdType;
921        }
922
923        /**
924         * @return {@link #value} (The value of the input parameter as a basic type.)
925         */
926        public InstantType getValueInstantType() throws FHIRException { 
927          if (this.value == null)
928            this.value = new InstantType();
929          if (!(this.value instanceof InstantType))
930            throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.value.getClass().getName()+" was encountered");
931          return (InstantType) this.value;
932        }
933
934        public boolean hasValueInstantType() { 
935          return this != null && this.value instanceof InstantType;
936        }
937
938        /**
939         * @return {@link #value} (The value of the input parameter as a basic type.)
940         */
941        public IntegerType getValueIntegerType() throws FHIRException { 
942          if (this.value == null)
943            this.value = new IntegerType();
944          if (!(this.value instanceof IntegerType))
945            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
946          return (IntegerType) this.value;
947        }
948
949        public boolean hasValueIntegerType() { 
950          return this != null && this.value instanceof IntegerType;
951        }
952
953        /**
954         * @return {@link #value} (The value of the input parameter as a basic type.)
955         */
956        public Integer64Type getValueInteger64Type() throws FHIRException { 
957          if (this.value == null)
958            this.value = new Integer64Type();
959          if (!(this.value instanceof Integer64Type))
960            throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.value.getClass().getName()+" was encountered");
961          return (Integer64Type) this.value;
962        }
963
964        public boolean hasValueInteger64Type() { 
965          return this != null && this.value instanceof Integer64Type;
966        }
967
968        /**
969         * @return {@link #value} (The value of the input parameter as a basic type.)
970         */
971        public MarkdownType getValueMarkdownType() throws FHIRException { 
972          if (this.value == null)
973            this.value = new MarkdownType();
974          if (!(this.value instanceof MarkdownType))
975            throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.value.getClass().getName()+" was encountered");
976          return (MarkdownType) this.value;
977        }
978
979        public boolean hasValueMarkdownType() { 
980          return this != null && this.value instanceof MarkdownType;
981        }
982
983        /**
984         * @return {@link #value} (The value of the input parameter as a basic type.)
985         */
986        public OidType getValueOidType() throws FHIRException { 
987          if (this.value == null)
988            this.value = new OidType();
989          if (!(this.value instanceof OidType))
990            throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.value.getClass().getName()+" was encountered");
991          return (OidType) this.value;
992        }
993
994        public boolean hasValueOidType() { 
995          return this != null && this.value instanceof OidType;
996        }
997
998        /**
999         * @return {@link #value} (The value of the input parameter as a basic type.)
1000         */
1001        public PositiveIntType getValuePositiveIntType() throws FHIRException { 
1002          if (this.value == null)
1003            this.value = new PositiveIntType();
1004          if (!(this.value instanceof PositiveIntType))
1005            throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.value.getClass().getName()+" was encountered");
1006          return (PositiveIntType) this.value;
1007        }
1008
1009        public boolean hasValuePositiveIntType() { 
1010          return this != null && this.value instanceof PositiveIntType;
1011        }
1012
1013        /**
1014         * @return {@link #value} (The value of the input parameter as a basic type.)
1015         */
1016        public StringType getValueStringType() throws FHIRException { 
1017          if (this.value == null)
1018            this.value = new StringType();
1019          if (!(this.value instanceof StringType))
1020            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
1021          return (StringType) this.value;
1022        }
1023
1024        public boolean hasValueStringType() { 
1025          return this != null && this.value instanceof StringType;
1026        }
1027
1028        /**
1029         * @return {@link #value} (The value of the input parameter as a basic type.)
1030         */
1031        public TimeType getValueTimeType() throws FHIRException { 
1032          if (this.value == null)
1033            this.value = new TimeType();
1034          if (!(this.value instanceof TimeType))
1035            throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered");
1036          return (TimeType) this.value;
1037        }
1038
1039        public boolean hasValueTimeType() { 
1040          return this != null && this.value instanceof TimeType;
1041        }
1042
1043        /**
1044         * @return {@link #value} (The value of the input parameter as a basic type.)
1045         */
1046        public UnsignedIntType getValueUnsignedIntType() throws FHIRException { 
1047          if (this.value == null)
1048            this.value = new UnsignedIntType();
1049          if (!(this.value instanceof UnsignedIntType))
1050            throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.value.getClass().getName()+" was encountered");
1051          return (UnsignedIntType) this.value;
1052        }
1053
1054        public boolean hasValueUnsignedIntType() { 
1055          return this != null && this.value instanceof UnsignedIntType;
1056        }
1057
1058        /**
1059         * @return {@link #value} (The value of the input parameter as a basic type.)
1060         */
1061        public UriType getValueUriType() throws FHIRException { 
1062          if (this.value == null)
1063            this.value = new UriType();
1064          if (!(this.value instanceof UriType))
1065            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered");
1066          return (UriType) this.value;
1067        }
1068
1069        public boolean hasValueUriType() { 
1070          return this != null && this.value instanceof UriType;
1071        }
1072
1073        /**
1074         * @return {@link #value} (The value of the input parameter as a basic type.)
1075         */
1076        public UrlType getValueUrlType() throws FHIRException { 
1077          if (this.value == null)
1078            this.value = new UrlType();
1079          if (!(this.value instanceof UrlType))
1080            throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.value.getClass().getName()+" was encountered");
1081          return (UrlType) this.value;
1082        }
1083
1084        public boolean hasValueUrlType() { 
1085          return this != null && this.value instanceof UrlType;
1086        }
1087
1088        /**
1089         * @return {@link #value} (The value of the input parameter as a basic type.)
1090         */
1091        public UuidType getValueUuidType() throws FHIRException { 
1092          if (this.value == null)
1093            this.value = new UuidType();
1094          if (!(this.value instanceof UuidType))
1095            throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.value.getClass().getName()+" was encountered");
1096          return (UuidType) this.value;
1097        }
1098
1099        public boolean hasValueUuidType() { 
1100          return this != null && this.value instanceof UuidType;
1101        }
1102
1103        /**
1104         * @return {@link #value} (The value of the input parameter as a basic type.)
1105         */
1106        public Address getValueAddress() throws FHIRException { 
1107          if (this.value == null)
1108            this.value = new Address();
1109          if (!(this.value instanceof Address))
1110            throw new FHIRException("Type mismatch: the type Address was expected, but "+this.value.getClass().getName()+" was encountered");
1111          return (Address) this.value;
1112        }
1113
1114        public boolean hasValueAddress() { 
1115          return this != null && this.value instanceof Address;
1116        }
1117
1118        /**
1119         * @return {@link #value} (The value of the input parameter as a basic type.)
1120         */
1121        public Age getValueAge() throws FHIRException { 
1122          if (this.value == null)
1123            this.value = new Age();
1124          if (!(this.value instanceof Age))
1125            throw new FHIRException("Type mismatch: the type Age was expected, but "+this.value.getClass().getName()+" was encountered");
1126          return (Age) this.value;
1127        }
1128
1129        public boolean hasValueAge() { 
1130          return this != null && this.value instanceof Age;
1131        }
1132
1133        /**
1134         * @return {@link #value} (The value of the input parameter as a basic type.)
1135         */
1136        public Annotation getValueAnnotation() throws FHIRException { 
1137          if (this.value == null)
1138            this.value = new Annotation();
1139          if (!(this.value instanceof Annotation))
1140            throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.value.getClass().getName()+" was encountered");
1141          return (Annotation) this.value;
1142        }
1143
1144        public boolean hasValueAnnotation() { 
1145          return this != null && this.value instanceof Annotation;
1146        }
1147
1148        /**
1149         * @return {@link #value} (The value of the input parameter as a basic type.)
1150         */
1151        public Attachment getValueAttachment() throws FHIRException { 
1152          if (this.value == null)
1153            this.value = new Attachment();
1154          if (!(this.value instanceof Attachment))
1155            throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered");
1156          return (Attachment) this.value;
1157        }
1158
1159        public boolean hasValueAttachment() { 
1160          return this != null && this.value instanceof Attachment;
1161        }
1162
1163        /**
1164         * @return {@link #value} (The value of the input parameter as a basic type.)
1165         */
1166        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
1167          if (this.value == null)
1168            this.value = new CodeableConcept();
1169          if (!(this.value instanceof CodeableConcept))
1170            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
1171          return (CodeableConcept) this.value;
1172        }
1173
1174        public boolean hasValueCodeableConcept() { 
1175          return this != null && this.value instanceof CodeableConcept;
1176        }
1177
1178        /**
1179         * @return {@link #value} (The value of the input parameter as a basic type.)
1180         */
1181        public CodeableReference getValueCodeableReference() throws FHIRException { 
1182          if (this.value == null)
1183            this.value = new CodeableReference();
1184          if (!(this.value instanceof CodeableReference))
1185            throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.value.getClass().getName()+" was encountered");
1186          return (CodeableReference) this.value;
1187        }
1188
1189        public boolean hasValueCodeableReference() { 
1190          return this != null && this.value instanceof CodeableReference;
1191        }
1192
1193        /**
1194         * @return {@link #value} (The value of the input parameter as a basic type.)
1195         */
1196        public Coding getValueCoding() throws FHIRException { 
1197          if (this.value == null)
1198            this.value = new Coding();
1199          if (!(this.value instanceof Coding))
1200            throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered");
1201          return (Coding) this.value;
1202        }
1203
1204        public boolean hasValueCoding() { 
1205          return this != null && this.value instanceof Coding;
1206        }
1207
1208        /**
1209         * @return {@link #value} (The value of the input parameter as a basic type.)
1210         */
1211        public ContactPoint getValueContactPoint() throws FHIRException { 
1212          if (this.value == null)
1213            this.value = new ContactPoint();
1214          if (!(this.value instanceof ContactPoint))
1215            throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.value.getClass().getName()+" was encountered");
1216          return (ContactPoint) this.value;
1217        }
1218
1219        public boolean hasValueContactPoint() { 
1220          return this != null && this.value instanceof ContactPoint;
1221        }
1222
1223        /**
1224         * @return {@link #value} (The value of the input parameter as a basic type.)
1225         */
1226        public Count getValueCount() throws FHIRException { 
1227          if (this.value == null)
1228            this.value = new Count();
1229          if (!(this.value instanceof Count))
1230            throw new FHIRException("Type mismatch: the type Count was expected, but "+this.value.getClass().getName()+" was encountered");
1231          return (Count) this.value;
1232        }
1233
1234        public boolean hasValueCount() { 
1235          return this != null && this.value instanceof Count;
1236        }
1237
1238        /**
1239         * @return {@link #value} (The value of the input parameter as a basic type.)
1240         */
1241        public Distance getValueDistance() throws FHIRException { 
1242          if (this.value == null)
1243            this.value = new Distance();
1244          if (!(this.value instanceof Distance))
1245            throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.value.getClass().getName()+" was encountered");
1246          return (Distance) this.value;
1247        }
1248
1249        public boolean hasValueDistance() { 
1250          return this != null && this.value instanceof Distance;
1251        }
1252
1253        /**
1254         * @return {@link #value} (The value of the input parameter as a basic type.)
1255         */
1256        public Duration getValueDuration() throws FHIRException { 
1257          if (this.value == null)
1258            this.value = new Duration();
1259          if (!(this.value instanceof Duration))
1260            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.value.getClass().getName()+" was encountered");
1261          return (Duration) this.value;
1262        }
1263
1264        public boolean hasValueDuration() { 
1265          return this != null && this.value instanceof Duration;
1266        }
1267
1268        /**
1269         * @return {@link #value} (The value of the input parameter as a basic type.)
1270         */
1271        public HumanName getValueHumanName() throws FHIRException { 
1272          if (this.value == null)
1273            this.value = new HumanName();
1274          if (!(this.value instanceof HumanName))
1275            throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.value.getClass().getName()+" was encountered");
1276          return (HumanName) this.value;
1277        }
1278
1279        public boolean hasValueHumanName() { 
1280          return this != null && this.value instanceof HumanName;
1281        }
1282
1283        /**
1284         * @return {@link #value} (The value of the input parameter as a basic type.)
1285         */
1286        public Identifier getValueIdentifier() throws FHIRException { 
1287          if (this.value == null)
1288            this.value = new Identifier();
1289          if (!(this.value instanceof Identifier))
1290            throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.value.getClass().getName()+" was encountered");
1291          return (Identifier) this.value;
1292        }
1293
1294        public boolean hasValueIdentifier() { 
1295          return this != null && this.value instanceof Identifier;
1296        }
1297
1298        /**
1299         * @return {@link #value} (The value of the input parameter as a basic type.)
1300         */
1301        public Money getValueMoney() throws FHIRException { 
1302          if (this.value == null)
1303            this.value = new Money();
1304          if (!(this.value instanceof Money))
1305            throw new FHIRException("Type mismatch: the type Money was expected, but "+this.value.getClass().getName()+" was encountered");
1306          return (Money) this.value;
1307        }
1308
1309        public boolean hasValueMoney() { 
1310          return this != null && this.value instanceof Money;
1311        }
1312
1313        /**
1314         * @return {@link #value} (The value of the input parameter as a basic type.)
1315         */
1316        public Period getValuePeriod() throws FHIRException { 
1317          if (this.value == null)
1318            this.value = new Period();
1319          if (!(this.value instanceof Period))
1320            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered");
1321          return (Period) this.value;
1322        }
1323
1324        public boolean hasValuePeriod() { 
1325          return this != null && this.value instanceof Period;
1326        }
1327
1328        /**
1329         * @return {@link #value} (The value of the input parameter as a basic type.)
1330         */
1331        public Quantity getValueQuantity() throws FHIRException { 
1332          if (this.value == null)
1333            this.value = new Quantity();
1334          if (!(this.value instanceof Quantity))
1335            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
1336          return (Quantity) this.value;
1337        }
1338
1339        public boolean hasValueQuantity() { 
1340          return this != null && this.value instanceof Quantity;
1341        }
1342
1343        /**
1344         * @return {@link #value} (The value of the input parameter as a basic type.)
1345         */
1346        public Range getValueRange() throws FHIRException { 
1347          if (this.value == null)
1348            this.value = new Range();
1349          if (!(this.value instanceof Range))
1350            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
1351          return (Range) this.value;
1352        }
1353
1354        public boolean hasValueRange() { 
1355          return this != null && this.value instanceof Range;
1356        }
1357
1358        /**
1359         * @return {@link #value} (The value of the input parameter as a basic type.)
1360         */
1361        public Ratio getValueRatio() throws FHIRException { 
1362          if (this.value == null)
1363            this.value = new Ratio();
1364          if (!(this.value instanceof Ratio))
1365            throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered");
1366          return (Ratio) this.value;
1367        }
1368
1369        public boolean hasValueRatio() { 
1370          return this != null && this.value instanceof Ratio;
1371        }
1372
1373        /**
1374         * @return {@link #value} (The value of the input parameter as a basic type.)
1375         */
1376        public RatioRange getValueRatioRange() throws FHIRException { 
1377          if (this.value == null)
1378            this.value = new RatioRange();
1379          if (!(this.value instanceof RatioRange))
1380            throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.value.getClass().getName()+" was encountered");
1381          return (RatioRange) this.value;
1382        }
1383
1384        public boolean hasValueRatioRange() { 
1385          return this != null && this.value instanceof RatioRange;
1386        }
1387
1388        /**
1389         * @return {@link #value} (The value of the input parameter as a basic type.)
1390         */
1391        public Reference getValueReference() throws FHIRException { 
1392          if (this.value == null)
1393            this.value = new Reference();
1394          if (!(this.value instanceof Reference))
1395            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered");
1396          return (Reference) this.value;
1397        }
1398
1399        public boolean hasValueReference() { 
1400          return this != null && this.value instanceof Reference;
1401        }
1402
1403        /**
1404         * @return {@link #value} (The value of the input parameter as a basic type.)
1405         */
1406        public SampledData getValueSampledData() throws FHIRException { 
1407          if (this.value == null)
1408            this.value = new SampledData();
1409          if (!(this.value instanceof SampledData))
1410            throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered");
1411          return (SampledData) this.value;
1412        }
1413
1414        public boolean hasValueSampledData() { 
1415          return this != null && this.value instanceof SampledData;
1416        }
1417
1418        /**
1419         * @return {@link #value} (The value of the input parameter as a basic type.)
1420         */
1421        public Signature getValueSignature() throws FHIRException { 
1422          if (this.value == null)
1423            this.value = new Signature();
1424          if (!(this.value instanceof Signature))
1425            throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.value.getClass().getName()+" was encountered");
1426          return (Signature) this.value;
1427        }
1428
1429        public boolean hasValueSignature() { 
1430          return this != null && this.value instanceof Signature;
1431        }
1432
1433        /**
1434         * @return {@link #value} (The value of the input parameter as a basic type.)
1435         */
1436        public Timing getValueTiming() throws FHIRException { 
1437          if (this.value == null)
1438            this.value = new Timing();
1439          if (!(this.value instanceof Timing))
1440            throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.value.getClass().getName()+" was encountered");
1441          return (Timing) this.value;
1442        }
1443
1444        public boolean hasValueTiming() { 
1445          return this != null && this.value instanceof Timing;
1446        }
1447
1448        /**
1449         * @return {@link #value} (The value of the input parameter as a basic type.)
1450         */
1451        public ContactDetail getValueContactDetail() throws FHIRException { 
1452          if (this.value == null)
1453            this.value = new ContactDetail();
1454          if (!(this.value instanceof ContactDetail))
1455            throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.value.getClass().getName()+" was encountered");
1456          return (ContactDetail) this.value;
1457        }
1458
1459        public boolean hasValueContactDetail() { 
1460          return this != null && this.value instanceof ContactDetail;
1461        }
1462
1463        /**
1464         * @return {@link #value} (The value of the input parameter as a basic type.)
1465         */
1466        public DataRequirement getValueDataRequirement() throws FHIRException { 
1467          if (this.value == null)
1468            this.value = new DataRequirement();
1469          if (!(this.value instanceof DataRequirement))
1470            throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.value.getClass().getName()+" was encountered");
1471          return (DataRequirement) this.value;
1472        }
1473
1474        public boolean hasValueDataRequirement() { 
1475          return this != null && this.value instanceof DataRequirement;
1476        }
1477
1478        /**
1479         * @return {@link #value} (The value of the input parameter as a basic type.)
1480         */
1481        public Expression getValueExpression() throws FHIRException { 
1482          if (this.value == null)
1483            this.value = new Expression();
1484          if (!(this.value instanceof Expression))
1485            throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.value.getClass().getName()+" was encountered");
1486          return (Expression) this.value;
1487        }
1488
1489        public boolean hasValueExpression() { 
1490          return this != null && this.value instanceof Expression;
1491        }
1492
1493        /**
1494         * @return {@link #value} (The value of the input parameter as a basic type.)
1495         */
1496        public ParameterDefinition getValueParameterDefinition() throws FHIRException { 
1497          if (this.value == null)
1498            this.value = new ParameterDefinition();
1499          if (!(this.value instanceof ParameterDefinition))
1500            throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
1501          return (ParameterDefinition) this.value;
1502        }
1503
1504        public boolean hasValueParameterDefinition() { 
1505          return this != null && this.value instanceof ParameterDefinition;
1506        }
1507
1508        /**
1509         * @return {@link #value} (The value of the input parameter as a basic type.)
1510         */
1511        public RelatedArtifact getValueRelatedArtifact() throws FHIRException { 
1512          if (this.value == null)
1513            this.value = new RelatedArtifact();
1514          if (!(this.value instanceof RelatedArtifact))
1515            throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.value.getClass().getName()+" was encountered");
1516          return (RelatedArtifact) this.value;
1517        }
1518
1519        public boolean hasValueRelatedArtifact() { 
1520          return this != null && this.value instanceof RelatedArtifact;
1521        }
1522
1523        /**
1524         * @return {@link #value} (The value of the input parameter as a basic type.)
1525         */
1526        public TriggerDefinition getValueTriggerDefinition() throws FHIRException { 
1527          if (this.value == null)
1528            this.value = new TriggerDefinition();
1529          if (!(this.value instanceof TriggerDefinition))
1530            throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
1531          return (TriggerDefinition) this.value;
1532        }
1533
1534        public boolean hasValueTriggerDefinition() { 
1535          return this != null && this.value instanceof TriggerDefinition;
1536        }
1537
1538        /**
1539         * @return {@link #value} (The value of the input parameter as a basic type.)
1540         */
1541        public UsageContext getValueUsageContext() throws FHIRException { 
1542          if (this.value == null)
1543            this.value = new UsageContext();
1544          if (!(this.value instanceof UsageContext))
1545            throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.value.getClass().getName()+" was encountered");
1546          return (UsageContext) this.value;
1547        }
1548
1549        public boolean hasValueUsageContext() { 
1550          return this != null && this.value instanceof UsageContext;
1551        }
1552
1553        /**
1554         * @return {@link #value} (The value of the input parameter as a basic type.)
1555         */
1556        public Availability getValueAvailability() throws FHIRException { 
1557          if (this.value == null)
1558            this.value = new Availability();
1559          if (!(this.value instanceof Availability))
1560            throw new FHIRException("Type mismatch: the type Availability was expected, but "+this.value.getClass().getName()+" was encountered");
1561          return (Availability) this.value;
1562        }
1563
1564        public boolean hasValueAvailability() { 
1565          return this != null && this.value instanceof Availability;
1566        }
1567
1568        /**
1569         * @return {@link #value} (The value of the input parameter as a basic type.)
1570         */
1571        public ExtendedContactDetail getValueExtendedContactDetail() throws FHIRException { 
1572          if (this.value == null)
1573            this.value = new ExtendedContactDetail();
1574          if (!(this.value instanceof ExtendedContactDetail))
1575            throw new FHIRException("Type mismatch: the type ExtendedContactDetail was expected, but "+this.value.getClass().getName()+" was encountered");
1576          return (ExtendedContactDetail) this.value;
1577        }
1578
1579        public boolean hasValueExtendedContactDetail() { 
1580          return this != null && this.value instanceof ExtendedContactDetail;
1581        }
1582
1583        /**
1584         * @return {@link #value} (The value of the input parameter as a basic type.)
1585         */
1586        public Dosage getValueDosage() throws FHIRException { 
1587          if (this.value == null)
1588            this.value = new Dosage();
1589          if (!(this.value instanceof Dosage))
1590            throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.value.getClass().getName()+" was encountered");
1591          return (Dosage) this.value;
1592        }
1593
1594        public boolean hasValueDosage() { 
1595          return this != null && this.value instanceof Dosage;
1596        }
1597
1598        /**
1599         * @return {@link #value} (The value of the input parameter as a basic type.)
1600         */
1601        public Meta getValueMeta() throws FHIRException { 
1602          if (this.value == null)
1603            this.value = new Meta();
1604          if (!(this.value instanceof Meta))
1605            throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.value.getClass().getName()+" was encountered");
1606          return (Meta) this.value;
1607        }
1608
1609        public boolean hasValueMeta() { 
1610          return this != null && this.value instanceof Meta;
1611        }
1612
1613        public boolean hasValue() { 
1614          return this.value != null && !this.value.isEmpty();
1615        }
1616
1617        /**
1618         * @param value {@link #value} (The value of the input parameter as a basic type.)
1619         */
1620        public ParameterComponent setValue(DataType value) { 
1621          if (value != null && !(value instanceof Base64BinaryType || value instanceof BooleanType || value instanceof CanonicalType || value instanceof CodeType || value instanceof DateType || value instanceof DateTimeType || value instanceof DecimalType || value instanceof IdType || value instanceof InstantType || value instanceof IntegerType || value instanceof Integer64Type || value instanceof MarkdownType || value instanceof OidType || value instanceof PositiveIntType || value instanceof StringType || value instanceof TimeType || value instanceof UnsignedIntType || value instanceof UriType || value instanceof UrlType || value instanceof UuidType || value instanceof Address || value instanceof Age || value instanceof Annotation || value instanceof Attachment || value instanceof CodeableConcept || value instanceof CodeableReference || value instanceof Coding || value instanceof ContactPoint || value instanceof Count || value instanceof Distance || value instanceof Duration || value instanceof HumanName || value instanceof Identifier || value instanceof Money || value instanceof Period || value instanceof Quantity || value instanceof Range || value instanceof Ratio || value instanceof RatioRange || value instanceof Reference || value instanceof SampledData || value instanceof Signature || value instanceof Timing || value instanceof ContactDetail || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Availability || value instanceof ExtendedContactDetail || value instanceof Dosage || value instanceof Meta))
1622            throw new FHIRException("Not the right type for Transport.input.value[x]: "+value.fhirType());
1623          this.value = value;
1624          return this;
1625        }
1626
1627        protected void listChildren(List<Property> children) {
1628          super.listChildren(children);
1629          children.add(new Property("type", "CodeableConcept", "A code or description indicating how the input is intended to be used as part of the transport execution.", 0, 1, type));
1630          children.add(new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value of the input parameter as a basic type.", 0, 1, value));
1631        }
1632
1633        @Override
1634        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1635          switch (_hash) {
1636          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "A code or description indicating how the input is intended to be used as part of the transport execution.", 0, 1, type);
1637          case -1410166417: /*value[x]*/  return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value of the input parameter as a basic type.", 0, 1, value);
1638          case 111972721: /*value*/  return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value of the input parameter as a basic type.", 0, 1, value);
1639          case -1535024575: /*valueBase64Binary*/  return new Property("value[x]", "base64Binary", "The value of the input parameter as a basic type.", 0, 1, value);
1640          case 733421943: /*valueBoolean*/  return new Property("value[x]", "boolean", "The value of the input parameter as a basic type.", 0, 1, value);
1641          case -786218365: /*valueCanonical*/  return new Property("value[x]", "canonical", "The value of the input parameter as a basic type.", 0, 1, value);
1642          case -766209282: /*valueCode*/  return new Property("value[x]", "code", "The value of the input parameter as a basic type.", 0, 1, value);
1643          case -766192449: /*valueDate*/  return new Property("value[x]", "date", "The value of the input parameter as a basic type.", 0, 1, value);
1644          case 1047929900: /*valueDateTime*/  return new Property("value[x]", "dateTime", "The value of the input parameter as a basic type.", 0, 1, value);
1645          case -2083993440: /*valueDecimal*/  return new Property("value[x]", "decimal", "The value of the input parameter as a basic type.", 0, 1, value);
1646          case 231604844: /*valueId*/  return new Property("value[x]", "id", "The value of the input parameter as a basic type.", 0, 1, value);
1647          case -1668687056: /*valueInstant*/  return new Property("value[x]", "instant", "The value of the input parameter as a basic type.", 0, 1, value);
1648          case -1668204915: /*valueInteger*/  return new Property("value[x]", "integer", "The value of the input parameter as a basic type.", 0, 1, value);
1649          case -1122120181: /*valueInteger64*/  return new Property("value[x]", "integer64", "The value of the input parameter as a basic type.", 0, 1, value);
1650          case -497880704: /*valueMarkdown*/  return new Property("value[x]", "markdown", "The value of the input parameter as a basic type.", 0, 1, value);
1651          case -1410178407: /*valueOid*/  return new Property("value[x]", "oid", "The value of the input parameter as a basic type.", 0, 1, value);
1652          case -1249932027: /*valuePositiveInt*/  return new Property("value[x]", "positiveInt", "The value of the input parameter as a basic type.", 0, 1, value);
1653          case -1424603934: /*valueString*/  return new Property("value[x]", "string", "The value of the input parameter as a basic type.", 0, 1, value);
1654          case -765708322: /*valueTime*/  return new Property("value[x]", "time", "The value of the input parameter as a basic type.", 0, 1, value);
1655          case 26529417: /*valueUnsignedInt*/  return new Property("value[x]", "unsignedInt", "The value of the input parameter as a basic type.", 0, 1, value);
1656          case -1410172357: /*valueUri*/  return new Property("value[x]", "uri", "The value of the input parameter as a basic type.", 0, 1, value);
1657          case -1410172354: /*valueUrl*/  return new Property("value[x]", "url", "The value of the input parameter as a basic type.", 0, 1, value);
1658          case -765667124: /*valueUuid*/  return new Property("value[x]", "uuid", "The value of the input parameter as a basic type.", 0, 1, value);
1659          case -478981821: /*valueAddress*/  return new Property("value[x]", "Address", "The value of the input parameter as a basic type.", 0, 1, value);
1660          case -1410191922: /*valueAge*/  return new Property("value[x]", "Age", "The value of the input parameter as a basic type.", 0, 1, value);
1661          case -67108992: /*valueAnnotation*/  return new Property("value[x]", "Annotation", "The value of the input parameter as a basic type.", 0, 1, value);
1662          case -475566732: /*valueAttachment*/  return new Property("value[x]", "Attachment", "The value of the input parameter as a basic type.", 0, 1, value);
1663          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "The value of the input parameter as a basic type.", 0, 1, value);
1664          case -257955629: /*valueCodeableReference*/  return new Property("value[x]", "CodeableReference", "The value of the input parameter as a basic type.", 0, 1, value);
1665          case -1887705029: /*valueCoding*/  return new Property("value[x]", "Coding", "The value of the input parameter as a basic type.", 0, 1, value);
1666          case 944904545: /*valueContactPoint*/  return new Property("value[x]", "ContactPoint", "The value of the input parameter as a basic type.", 0, 1, value);
1667          case 2017332766: /*valueCount*/  return new Property("value[x]", "Count", "The value of the input parameter as a basic type.", 0, 1, value);
1668          case -456359802: /*valueDistance*/  return new Property("value[x]", "Distance", "The value of the input parameter as a basic type.", 0, 1, value);
1669          case 1558135333: /*valueDuration*/  return new Property("value[x]", "Duration", "The value of the input parameter as a basic type.", 0, 1, value);
1670          case -2026205465: /*valueHumanName*/  return new Property("value[x]", "HumanName", "The value of the input parameter as a basic type.", 0, 1, value);
1671          case -130498310: /*valueIdentifier*/  return new Property("value[x]", "Identifier", "The value of the input parameter as a basic type.", 0, 1, value);
1672          case 2026560975: /*valueMoney*/  return new Property("value[x]", "Money", "The value of the input parameter as a basic type.", 0, 1, value);
1673          case -1524344174: /*valuePeriod*/  return new Property("value[x]", "Period", "The value of the input parameter as a basic type.", 0, 1, value);
1674          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "The value of the input parameter as a basic type.", 0, 1, value);
1675          case 2030761548: /*valueRange*/  return new Property("value[x]", "Range", "The value of the input parameter as a basic type.", 0, 1, value);
1676          case 2030767386: /*valueRatio*/  return new Property("value[x]", "Ratio", "The value of the input parameter as a basic type.", 0, 1, value);
1677          case -706454461: /*valueRatioRange*/  return new Property("value[x]", "RatioRange", "The value of the input parameter as a basic type.", 0, 1, value);
1678          case 1755241690: /*valueReference*/  return new Property("value[x]", "Reference", "The value of the input parameter as a basic type.", 0, 1, value);
1679          case -962229101: /*valueSampledData*/  return new Property("value[x]", "SampledData", "The value of the input parameter as a basic type.", 0, 1, value);
1680          case -540985785: /*valueSignature*/  return new Property("value[x]", "Signature", "The value of the input parameter as a basic type.", 0, 1, value);
1681          case -1406282469: /*valueTiming*/  return new Property("value[x]", "Timing", "The value of the input parameter as a basic type.", 0, 1, value);
1682          case -1125200224: /*valueContactDetail*/  return new Property("value[x]", "ContactDetail", "The value of the input parameter as a basic type.", 0, 1, value);
1683          case 1710554248: /*valueDataRequirement*/  return new Property("value[x]", "DataRequirement", "The value of the input parameter as a basic type.", 0, 1, value);
1684          case -307517719: /*valueExpression*/  return new Property("value[x]", "Expression", "The value of the input parameter as a basic type.", 0, 1, value);
1685          case 1387478187: /*valueParameterDefinition*/  return new Property("value[x]", "ParameterDefinition", "The value of the input parameter as a basic type.", 0, 1, value);
1686          case 1748214124: /*valueRelatedArtifact*/  return new Property("value[x]", "RelatedArtifact", "The value of the input parameter as a basic type.", 0, 1, value);
1687          case 976830394: /*valueTriggerDefinition*/  return new Property("value[x]", "TriggerDefinition", "The value of the input parameter as a basic type.", 0, 1, value);
1688          case 588000479: /*valueUsageContext*/  return new Property("value[x]", "UsageContext", "The value of the input parameter as a basic type.", 0, 1, value);
1689          case 1678530924: /*valueAvailability*/  return new Property("value[x]", "Availability", "The value of the input parameter as a basic type.", 0, 1, value);
1690          case -1567222041: /*valueExtendedContactDetail*/  return new Property("value[x]", "ExtendedContactDetail", "The value of the input parameter as a basic type.", 0, 1, value);
1691          case -1858636920: /*valueDosage*/  return new Property("value[x]", "Dosage", "The value of the input parameter as a basic type.", 0, 1, value);
1692          case -765920490: /*valueMeta*/  return new Property("value[x]", "Meta", "The value of the input parameter as a basic type.", 0, 1, value);
1693          default: return super.getNamedProperty(_hash, _name, _checkValid);
1694          }
1695
1696        }
1697
1698      @Override
1699      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1700        switch (hash) {
1701        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1702        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
1703        default: return super.getProperty(hash, name, checkValid);
1704        }
1705
1706      }
1707
1708      @Override
1709      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1710        switch (hash) {
1711        case 3575610: // type
1712          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1713          return value;
1714        case 111972721: // value
1715          this.value = TypeConvertor.castToType(value); // DataType
1716          return value;
1717        default: return super.setProperty(hash, name, value);
1718        }
1719
1720      }
1721
1722      @Override
1723      public Base setProperty(String name, Base value) throws FHIRException {
1724        if (name.equals("type")) {
1725          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1726        } else if (name.equals("value[x]")) {
1727          this.value = TypeConvertor.castToType(value); // DataType
1728        } else
1729          return super.setProperty(name, value);
1730        return value;
1731      }
1732
1733  @Override
1734  public void removeChild(String name, Base value) throws FHIRException {
1735        if (name.equals("type")) {
1736          this.type = null;
1737        } else if (name.equals("value[x]")) {
1738          this.value = null;
1739        } else
1740          super.removeChild(name, value);
1741        
1742      }
1743
1744      @Override
1745      public Base makeProperty(int hash, String name) throws FHIRException {
1746        switch (hash) {
1747        case 3575610:  return getType();
1748        case -1410166417:  return getValue();
1749        case 111972721:  return getValue();
1750        default: return super.makeProperty(hash, name);
1751        }
1752
1753      }
1754
1755      @Override
1756      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1757        switch (hash) {
1758        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1759        case 111972721: /*value*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "integer64", "markdown", "oid", "positiveInt", "string", "time", "unsignedInt", "uri", "url", "uuid", "Address", "Age", "Annotation", "Attachment", "CodeableConcept", "CodeableReference", "Coding", "ContactPoint", "Count", "Distance", "Duration", "HumanName", "Identifier", "Money", "Period", "Quantity", "Range", "Ratio", "RatioRange", "Reference", "SampledData", "Signature", "Timing", "ContactDetail", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Availability", "ExtendedContactDetail", "Dosage", "Meta"};
1760        default: return super.getTypesForProperty(hash, name);
1761        }
1762
1763      }
1764
1765      @Override
1766      public Base addChild(String name) throws FHIRException {
1767        if (name.equals("type")) {
1768          this.type = new CodeableConcept();
1769          return this.type;
1770        }
1771        else if (name.equals("valueBase64Binary")) {
1772          this.value = new Base64BinaryType();
1773          return this.value;
1774        }
1775        else if (name.equals("valueBoolean")) {
1776          this.value = new BooleanType();
1777          return this.value;
1778        }
1779        else if (name.equals("valueCanonical")) {
1780          this.value = new CanonicalType();
1781          return this.value;
1782        }
1783        else if (name.equals("valueCode")) {
1784          this.value = new CodeType();
1785          return this.value;
1786        }
1787        else if (name.equals("valueDate")) {
1788          this.value = new DateType();
1789          return this.value;
1790        }
1791        else if (name.equals("valueDateTime")) {
1792          this.value = new DateTimeType();
1793          return this.value;
1794        }
1795        else if (name.equals("valueDecimal")) {
1796          this.value = new DecimalType();
1797          return this.value;
1798        }
1799        else if (name.equals("valueId")) {
1800          this.value = new IdType();
1801          return this.value;
1802        }
1803        else if (name.equals("valueInstant")) {
1804          this.value = new InstantType();
1805          return this.value;
1806        }
1807        else if (name.equals("valueInteger")) {
1808          this.value = new IntegerType();
1809          return this.value;
1810        }
1811        else if (name.equals("valueInteger64")) {
1812          this.value = new Integer64Type();
1813          return this.value;
1814        }
1815        else if (name.equals("valueMarkdown")) {
1816          this.value = new MarkdownType();
1817          return this.value;
1818        }
1819        else if (name.equals("valueOid")) {
1820          this.value = new OidType();
1821          return this.value;
1822        }
1823        else if (name.equals("valuePositiveInt")) {
1824          this.value = new PositiveIntType();
1825          return this.value;
1826        }
1827        else if (name.equals("valueString")) {
1828          this.value = new StringType();
1829          return this.value;
1830        }
1831        else if (name.equals("valueTime")) {
1832          this.value = new TimeType();
1833          return this.value;
1834        }
1835        else if (name.equals("valueUnsignedInt")) {
1836          this.value = new UnsignedIntType();
1837          return this.value;
1838        }
1839        else if (name.equals("valueUri")) {
1840          this.value = new UriType();
1841          return this.value;
1842        }
1843        else if (name.equals("valueUrl")) {
1844          this.value = new UrlType();
1845          return this.value;
1846        }
1847        else if (name.equals("valueUuid")) {
1848          this.value = new UuidType();
1849          return this.value;
1850        }
1851        else if (name.equals("valueAddress")) {
1852          this.value = new Address();
1853          return this.value;
1854        }
1855        else if (name.equals("valueAge")) {
1856          this.value = new Age();
1857          return this.value;
1858        }
1859        else if (name.equals("valueAnnotation")) {
1860          this.value = new Annotation();
1861          return this.value;
1862        }
1863        else if (name.equals("valueAttachment")) {
1864          this.value = new Attachment();
1865          return this.value;
1866        }
1867        else if (name.equals("valueCodeableConcept")) {
1868          this.value = new CodeableConcept();
1869          return this.value;
1870        }
1871        else if (name.equals("valueCodeableReference")) {
1872          this.value = new CodeableReference();
1873          return this.value;
1874        }
1875        else if (name.equals("valueCoding")) {
1876          this.value = new Coding();
1877          return this.value;
1878        }
1879        else if (name.equals("valueContactPoint")) {
1880          this.value = new ContactPoint();
1881          return this.value;
1882        }
1883        else if (name.equals("valueCount")) {
1884          this.value = new Count();
1885          return this.value;
1886        }
1887        else if (name.equals("valueDistance")) {
1888          this.value = new Distance();
1889          return this.value;
1890        }
1891        else if (name.equals("valueDuration")) {
1892          this.value = new Duration();
1893          return this.value;
1894        }
1895        else if (name.equals("valueHumanName")) {
1896          this.value = new HumanName();
1897          return this.value;
1898        }
1899        else if (name.equals("valueIdentifier")) {
1900          this.value = new Identifier();
1901          return this.value;
1902        }
1903        else if (name.equals("valueMoney")) {
1904          this.value = new Money();
1905          return this.value;
1906        }
1907        else if (name.equals("valuePeriod")) {
1908          this.value = new Period();
1909          return this.value;
1910        }
1911        else if (name.equals("valueQuantity")) {
1912          this.value = new Quantity();
1913          return this.value;
1914        }
1915        else if (name.equals("valueRange")) {
1916          this.value = new Range();
1917          return this.value;
1918        }
1919        else if (name.equals("valueRatio")) {
1920          this.value = new Ratio();
1921          return this.value;
1922        }
1923        else if (name.equals("valueRatioRange")) {
1924          this.value = new RatioRange();
1925          return this.value;
1926        }
1927        else if (name.equals("valueReference")) {
1928          this.value = new Reference();
1929          return this.value;
1930        }
1931        else if (name.equals("valueSampledData")) {
1932          this.value = new SampledData();
1933          return this.value;
1934        }
1935        else if (name.equals("valueSignature")) {
1936          this.value = new Signature();
1937          return this.value;
1938        }
1939        else if (name.equals("valueTiming")) {
1940          this.value = new Timing();
1941          return this.value;
1942        }
1943        else if (name.equals("valueContactDetail")) {
1944          this.value = new ContactDetail();
1945          return this.value;
1946        }
1947        else if (name.equals("valueDataRequirement")) {
1948          this.value = new DataRequirement();
1949          return this.value;
1950        }
1951        else if (name.equals("valueExpression")) {
1952          this.value = new Expression();
1953          return this.value;
1954        }
1955        else if (name.equals("valueParameterDefinition")) {
1956          this.value = new ParameterDefinition();
1957          return this.value;
1958        }
1959        else if (name.equals("valueRelatedArtifact")) {
1960          this.value = new RelatedArtifact();
1961          return this.value;
1962        }
1963        else if (name.equals("valueTriggerDefinition")) {
1964          this.value = new TriggerDefinition();
1965          return this.value;
1966        }
1967        else if (name.equals("valueUsageContext")) {
1968          this.value = new UsageContext();
1969          return this.value;
1970        }
1971        else if (name.equals("valueAvailability")) {
1972          this.value = new Availability();
1973          return this.value;
1974        }
1975        else if (name.equals("valueExtendedContactDetail")) {
1976          this.value = new ExtendedContactDetail();
1977          return this.value;
1978        }
1979        else if (name.equals("valueDosage")) {
1980          this.value = new Dosage();
1981          return this.value;
1982        }
1983        else if (name.equals("valueMeta")) {
1984          this.value = new Meta();
1985          return this.value;
1986        }
1987        else
1988          return super.addChild(name);
1989      }
1990
1991      public ParameterComponent copy() {
1992        ParameterComponent dst = new ParameterComponent();
1993        copyValues(dst);
1994        return dst;
1995      }
1996
1997      public void copyValues(ParameterComponent dst) {
1998        super.copyValues(dst);
1999        dst.type = type == null ? null : type.copy();
2000        dst.value = value == null ? null : value.copy();
2001      }
2002
2003      @Override
2004      public boolean equalsDeep(Base other_) {
2005        if (!super.equalsDeep(other_))
2006          return false;
2007        if (!(other_ instanceof ParameterComponent))
2008          return false;
2009        ParameterComponent o = (ParameterComponent) other_;
2010        return compareDeep(type, o.type, true) && compareDeep(value, o.value, true);
2011      }
2012
2013      @Override
2014      public boolean equalsShallow(Base other_) {
2015        if (!super.equalsShallow(other_))
2016          return false;
2017        if (!(other_ instanceof ParameterComponent))
2018          return false;
2019        ParameterComponent o = (ParameterComponent) other_;
2020        return true;
2021      }
2022
2023      public boolean isEmpty() {
2024        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
2025      }
2026
2027  public String fhirType() {
2028    return "Transport.input";
2029
2030  }
2031
2032  }
2033
2034    @Block()
2035    public static class TransportOutputComponent extends BackboneElement implements IBaseBackboneElement {
2036        /**
2037         * The name of the Output parameter.
2038         */
2039        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
2040        @Description(shortDefinition="Label for output", formalDefinition="The name of the Output parameter." )
2041        protected CodeableConcept type;
2042
2043        /**
2044         * The value of the Output parameter as a basic type.
2045         */
2046        @Child(name = "value", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.class, Integer64Type.class, MarkdownType.class, OidType.class, PositiveIntType.class, StringType.class, TimeType.class, UnsignedIntType.class, UriType.class, UrlType.class, UuidType.class, Address.class, Age.class, Annotation.class, Attachment.class, CodeableConcept.class, CodeableReference.class, Coding.class, ContactPoint.class, Count.class, Distance.class, Duration.class, HumanName.class, Identifier.class, Money.class, Period.class, Quantity.class, Range.class, Ratio.class, RatioRange.class, Reference.class, SampledData.class, Signature.class, Timing.class, ContactDetail.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Availability.class, ExtendedContactDetail.class, Dosage.class, Meta.class}, order=2, min=1, max=1, modifier=false, summary=false)
2047        @Description(shortDefinition="Result of output", formalDefinition="The value of the Output parameter as a basic type." )
2048        protected DataType value;
2049
2050        private static final long serialVersionUID = -1659186716L;
2051
2052    /**
2053     * Constructor
2054     */
2055      public TransportOutputComponent() {
2056        super();
2057      }
2058
2059    /**
2060     * Constructor
2061     */
2062      public TransportOutputComponent(CodeableConcept type, DataType value) {
2063        super();
2064        this.setType(type);
2065        this.setValue(value);
2066      }
2067
2068        /**
2069         * @return {@link #type} (The name of the Output parameter.)
2070         */
2071        public CodeableConcept getType() { 
2072          if (this.type == null)
2073            if (Configuration.errorOnAutoCreate())
2074              throw new Error("Attempt to auto-create TransportOutputComponent.type");
2075            else if (Configuration.doAutoCreate())
2076              this.type = new CodeableConcept(); // cc
2077          return this.type;
2078        }
2079
2080        public boolean hasType() { 
2081          return this.type != null && !this.type.isEmpty();
2082        }
2083
2084        /**
2085         * @param value {@link #type} (The name of the Output parameter.)
2086         */
2087        public TransportOutputComponent setType(CodeableConcept value) { 
2088          this.type = value;
2089          return this;
2090        }
2091
2092        /**
2093         * @return {@link #value} (The value of the Output parameter as a basic type.)
2094         */
2095        public DataType getValue() { 
2096          return this.value;
2097        }
2098
2099        /**
2100         * @return {@link #value} (The value of the Output parameter as a basic type.)
2101         */
2102        public Base64BinaryType getValueBase64BinaryType() throws FHIRException { 
2103          if (this.value == null)
2104            this.value = new Base64BinaryType();
2105          if (!(this.value instanceof Base64BinaryType))
2106            throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.value.getClass().getName()+" was encountered");
2107          return (Base64BinaryType) this.value;
2108        }
2109
2110        public boolean hasValueBase64BinaryType() { 
2111          return this != null && this.value instanceof Base64BinaryType;
2112        }
2113
2114        /**
2115         * @return {@link #value} (The value of the Output parameter as a basic type.)
2116         */
2117        public BooleanType getValueBooleanType() throws FHIRException { 
2118          if (this.value == null)
2119            this.value = new BooleanType();
2120          if (!(this.value instanceof BooleanType))
2121            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
2122          return (BooleanType) this.value;
2123        }
2124
2125        public boolean hasValueBooleanType() { 
2126          return this != null && this.value instanceof BooleanType;
2127        }
2128
2129        /**
2130         * @return {@link #value} (The value of the Output parameter as a basic type.)
2131         */
2132        public CanonicalType getValueCanonicalType() throws FHIRException { 
2133          if (this.value == null)
2134            this.value = new CanonicalType();
2135          if (!(this.value instanceof CanonicalType))
2136            throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.value.getClass().getName()+" was encountered");
2137          return (CanonicalType) this.value;
2138        }
2139
2140        public boolean hasValueCanonicalType() { 
2141          return this != null && this.value instanceof CanonicalType;
2142        }
2143
2144        /**
2145         * @return {@link #value} (The value of the Output parameter as a basic type.)
2146         */
2147        public CodeType getValueCodeType() throws FHIRException { 
2148          if (this.value == null)
2149            this.value = new CodeType();
2150          if (!(this.value instanceof CodeType))
2151            throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered");
2152          return (CodeType) this.value;
2153        }
2154
2155        public boolean hasValueCodeType() { 
2156          return this != null && this.value instanceof CodeType;
2157        }
2158
2159        /**
2160         * @return {@link #value} (The value of the Output parameter as a basic type.)
2161         */
2162        public DateType getValueDateType() throws FHIRException { 
2163          if (this.value == null)
2164            this.value = new DateType();
2165          if (!(this.value instanceof DateType))
2166            throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered");
2167          return (DateType) this.value;
2168        }
2169
2170        public boolean hasValueDateType() { 
2171          return this != null && this.value instanceof DateType;
2172        }
2173
2174        /**
2175         * @return {@link #value} (The value of the Output parameter as a basic type.)
2176         */
2177        public DateTimeType getValueDateTimeType() throws FHIRException { 
2178          if (this.value == null)
2179            this.value = new DateTimeType();
2180          if (!(this.value instanceof DateTimeType))
2181            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered");
2182          return (DateTimeType) this.value;
2183        }
2184
2185        public boolean hasValueDateTimeType() { 
2186          return this != null && this.value instanceof DateTimeType;
2187        }
2188
2189        /**
2190         * @return {@link #value} (The value of the Output parameter as a basic type.)
2191         */
2192        public DecimalType getValueDecimalType() throws FHIRException { 
2193          if (this.value == null)
2194            this.value = new DecimalType();
2195          if (!(this.value instanceof DecimalType))
2196            throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered");
2197          return (DecimalType) this.value;
2198        }
2199
2200        public boolean hasValueDecimalType() { 
2201          return this != null && this.value instanceof DecimalType;
2202        }
2203
2204        /**
2205         * @return {@link #value} (The value of the Output parameter as a basic type.)
2206         */
2207        public IdType getValueIdType() throws FHIRException { 
2208          if (this.value == null)
2209            this.value = new IdType();
2210          if (!(this.value instanceof IdType))
2211            throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.value.getClass().getName()+" was encountered");
2212          return (IdType) this.value;
2213        }
2214
2215        public boolean hasValueIdType() { 
2216          return this != null && this.value instanceof IdType;
2217        }
2218
2219        /**
2220         * @return {@link #value} (The value of the Output parameter as a basic type.)
2221         */
2222        public InstantType getValueInstantType() throws FHIRException { 
2223          if (this.value == null)
2224            this.value = new InstantType();
2225          if (!(this.value instanceof InstantType))
2226            throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.value.getClass().getName()+" was encountered");
2227          return (InstantType) this.value;
2228        }
2229
2230        public boolean hasValueInstantType() { 
2231          return this != null && this.value instanceof InstantType;
2232        }
2233
2234        /**
2235         * @return {@link #value} (The value of the Output parameter as a basic type.)
2236         */
2237        public IntegerType getValueIntegerType() throws FHIRException { 
2238          if (this.value == null)
2239            this.value = new IntegerType();
2240          if (!(this.value instanceof IntegerType))
2241            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
2242          return (IntegerType) this.value;
2243        }
2244
2245        public boolean hasValueIntegerType() { 
2246          return this != null && this.value instanceof IntegerType;
2247        }
2248
2249        /**
2250         * @return {@link #value} (The value of the Output parameter as a basic type.)
2251         */
2252        public Integer64Type getValueInteger64Type() throws FHIRException { 
2253          if (this.value == null)
2254            this.value = new Integer64Type();
2255          if (!(this.value instanceof Integer64Type))
2256            throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.value.getClass().getName()+" was encountered");
2257          return (Integer64Type) this.value;
2258        }
2259
2260        public boolean hasValueInteger64Type() { 
2261          return this != null && this.value instanceof Integer64Type;
2262        }
2263
2264        /**
2265         * @return {@link #value} (The value of the Output parameter as a basic type.)
2266         */
2267        public MarkdownType getValueMarkdownType() throws FHIRException { 
2268          if (this.value == null)
2269            this.value = new MarkdownType();
2270          if (!(this.value instanceof MarkdownType))
2271            throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.value.getClass().getName()+" was encountered");
2272          return (MarkdownType) this.value;
2273        }
2274
2275        public boolean hasValueMarkdownType() { 
2276          return this != null && this.value instanceof MarkdownType;
2277        }
2278
2279        /**
2280         * @return {@link #value} (The value of the Output parameter as a basic type.)
2281         */
2282        public OidType getValueOidType() throws FHIRException { 
2283          if (this.value == null)
2284            this.value = new OidType();
2285          if (!(this.value instanceof OidType))
2286            throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.value.getClass().getName()+" was encountered");
2287          return (OidType) this.value;
2288        }
2289
2290        public boolean hasValueOidType() { 
2291          return this != null && this.value instanceof OidType;
2292        }
2293
2294        /**
2295         * @return {@link #value} (The value of the Output parameter as a basic type.)
2296         */
2297        public PositiveIntType getValuePositiveIntType() throws FHIRException { 
2298          if (this.value == null)
2299            this.value = new PositiveIntType();
2300          if (!(this.value instanceof PositiveIntType))
2301            throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.value.getClass().getName()+" was encountered");
2302          return (PositiveIntType) this.value;
2303        }
2304
2305        public boolean hasValuePositiveIntType() { 
2306          return this != null && this.value instanceof PositiveIntType;
2307        }
2308
2309        /**
2310         * @return {@link #value} (The value of the Output parameter as a basic type.)
2311         */
2312        public StringType getValueStringType() throws FHIRException { 
2313          if (this.value == null)
2314            this.value = new StringType();
2315          if (!(this.value instanceof StringType))
2316            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
2317          return (StringType) this.value;
2318        }
2319
2320        public boolean hasValueStringType() { 
2321          return this != null && this.value instanceof StringType;
2322        }
2323
2324        /**
2325         * @return {@link #value} (The value of the Output parameter as a basic type.)
2326         */
2327        public TimeType getValueTimeType() throws FHIRException { 
2328          if (this.value == null)
2329            this.value = new TimeType();
2330          if (!(this.value instanceof TimeType))
2331            throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered");
2332          return (TimeType) this.value;
2333        }
2334
2335        public boolean hasValueTimeType() { 
2336          return this != null && this.value instanceof TimeType;
2337        }
2338
2339        /**
2340         * @return {@link #value} (The value of the Output parameter as a basic type.)
2341         */
2342        public UnsignedIntType getValueUnsignedIntType() throws FHIRException { 
2343          if (this.value == null)
2344            this.value = new UnsignedIntType();
2345          if (!(this.value instanceof UnsignedIntType))
2346            throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.value.getClass().getName()+" was encountered");
2347          return (UnsignedIntType) this.value;
2348        }
2349
2350        public boolean hasValueUnsignedIntType() { 
2351          return this != null && this.value instanceof UnsignedIntType;
2352        }
2353
2354        /**
2355         * @return {@link #value} (The value of the Output parameter as a basic type.)
2356         */
2357        public UriType getValueUriType() throws FHIRException { 
2358          if (this.value == null)
2359            this.value = new UriType();
2360          if (!(this.value instanceof UriType))
2361            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered");
2362          return (UriType) this.value;
2363        }
2364
2365        public boolean hasValueUriType() { 
2366          return this != null && this.value instanceof UriType;
2367        }
2368
2369        /**
2370         * @return {@link #value} (The value of the Output parameter as a basic type.)
2371         */
2372        public UrlType getValueUrlType() throws FHIRException { 
2373          if (this.value == null)
2374            this.value = new UrlType();
2375          if (!(this.value instanceof UrlType))
2376            throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.value.getClass().getName()+" was encountered");
2377          return (UrlType) this.value;
2378        }
2379
2380        public boolean hasValueUrlType() { 
2381          return this != null && this.value instanceof UrlType;
2382        }
2383
2384        /**
2385         * @return {@link #value} (The value of the Output parameter as a basic type.)
2386         */
2387        public UuidType getValueUuidType() throws FHIRException { 
2388          if (this.value == null)
2389            this.value = new UuidType();
2390          if (!(this.value instanceof UuidType))
2391            throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.value.getClass().getName()+" was encountered");
2392          return (UuidType) this.value;
2393        }
2394
2395        public boolean hasValueUuidType() { 
2396          return this != null && this.value instanceof UuidType;
2397        }
2398
2399        /**
2400         * @return {@link #value} (The value of the Output parameter as a basic type.)
2401         */
2402        public Address getValueAddress() throws FHIRException { 
2403          if (this.value == null)
2404            this.value = new Address();
2405          if (!(this.value instanceof Address))
2406            throw new FHIRException("Type mismatch: the type Address was expected, but "+this.value.getClass().getName()+" was encountered");
2407          return (Address) this.value;
2408        }
2409
2410        public boolean hasValueAddress() { 
2411          return this != null && this.value instanceof Address;
2412        }
2413
2414        /**
2415         * @return {@link #value} (The value of the Output parameter as a basic type.)
2416         */
2417        public Age getValueAge() throws FHIRException { 
2418          if (this.value == null)
2419            this.value = new Age();
2420          if (!(this.value instanceof Age))
2421            throw new FHIRException("Type mismatch: the type Age was expected, but "+this.value.getClass().getName()+" was encountered");
2422          return (Age) this.value;
2423        }
2424
2425        public boolean hasValueAge() { 
2426          return this != null && this.value instanceof Age;
2427        }
2428
2429        /**
2430         * @return {@link #value} (The value of the Output parameter as a basic type.)
2431         */
2432        public Annotation getValueAnnotation() throws FHIRException { 
2433          if (this.value == null)
2434            this.value = new Annotation();
2435          if (!(this.value instanceof Annotation))
2436            throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.value.getClass().getName()+" was encountered");
2437          return (Annotation) this.value;
2438        }
2439
2440        public boolean hasValueAnnotation() { 
2441          return this != null && this.value instanceof Annotation;
2442        }
2443
2444        /**
2445         * @return {@link #value} (The value of the Output parameter as a basic type.)
2446         */
2447        public Attachment getValueAttachment() throws FHIRException { 
2448          if (this.value == null)
2449            this.value = new Attachment();
2450          if (!(this.value instanceof Attachment))
2451            throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered");
2452          return (Attachment) this.value;
2453        }
2454
2455        public boolean hasValueAttachment() { 
2456          return this != null && this.value instanceof Attachment;
2457        }
2458
2459        /**
2460         * @return {@link #value} (The value of the Output parameter as a basic type.)
2461         */
2462        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
2463          if (this.value == null)
2464            this.value = new CodeableConcept();
2465          if (!(this.value instanceof CodeableConcept))
2466            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
2467          return (CodeableConcept) this.value;
2468        }
2469
2470        public boolean hasValueCodeableConcept() { 
2471          return this != null && this.value instanceof CodeableConcept;
2472        }
2473
2474        /**
2475         * @return {@link #value} (The value of the Output parameter as a basic type.)
2476         */
2477        public CodeableReference getValueCodeableReference() throws FHIRException { 
2478          if (this.value == null)
2479            this.value = new CodeableReference();
2480          if (!(this.value instanceof CodeableReference))
2481            throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.value.getClass().getName()+" was encountered");
2482          return (CodeableReference) this.value;
2483        }
2484
2485        public boolean hasValueCodeableReference() { 
2486          return this != null && this.value instanceof CodeableReference;
2487        }
2488
2489        /**
2490         * @return {@link #value} (The value of the Output parameter as a basic type.)
2491         */
2492        public Coding getValueCoding() throws FHIRException { 
2493          if (this.value == null)
2494            this.value = new Coding();
2495          if (!(this.value instanceof Coding))
2496            throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered");
2497          return (Coding) this.value;
2498        }
2499
2500        public boolean hasValueCoding() { 
2501          return this != null && this.value instanceof Coding;
2502        }
2503
2504        /**
2505         * @return {@link #value} (The value of the Output parameter as a basic type.)
2506         */
2507        public ContactPoint getValueContactPoint() throws FHIRException { 
2508          if (this.value == null)
2509            this.value = new ContactPoint();
2510          if (!(this.value instanceof ContactPoint))
2511            throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.value.getClass().getName()+" was encountered");
2512          return (ContactPoint) this.value;
2513        }
2514
2515        public boolean hasValueContactPoint() { 
2516          return this != null && this.value instanceof ContactPoint;
2517        }
2518
2519        /**
2520         * @return {@link #value} (The value of the Output parameter as a basic type.)
2521         */
2522        public Count getValueCount() throws FHIRException { 
2523          if (this.value == null)
2524            this.value = new Count();
2525          if (!(this.value instanceof Count))
2526            throw new FHIRException("Type mismatch: the type Count was expected, but "+this.value.getClass().getName()+" was encountered");
2527          return (Count) this.value;
2528        }
2529
2530        public boolean hasValueCount() { 
2531          return this != null && this.value instanceof Count;
2532        }
2533
2534        /**
2535         * @return {@link #value} (The value of the Output parameter as a basic type.)
2536         */
2537        public Distance getValueDistance() throws FHIRException { 
2538          if (this.value == null)
2539            this.value = new Distance();
2540          if (!(this.value instanceof Distance))
2541            throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.value.getClass().getName()+" was encountered");
2542          return (Distance) this.value;
2543        }
2544
2545        public boolean hasValueDistance() { 
2546          return this != null && this.value instanceof Distance;
2547        }
2548
2549        /**
2550         * @return {@link #value} (The value of the Output parameter as a basic type.)
2551         */
2552        public Duration getValueDuration() throws FHIRException { 
2553          if (this.value == null)
2554            this.value = new Duration();
2555          if (!(this.value instanceof Duration))
2556            throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.value.getClass().getName()+" was encountered");
2557          return (Duration) this.value;
2558        }
2559
2560        public boolean hasValueDuration() { 
2561          return this != null && this.value instanceof Duration;
2562        }
2563
2564        /**
2565         * @return {@link #value} (The value of the Output parameter as a basic type.)
2566         */
2567        public HumanName getValueHumanName() throws FHIRException { 
2568          if (this.value == null)
2569            this.value = new HumanName();
2570          if (!(this.value instanceof HumanName))
2571            throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.value.getClass().getName()+" was encountered");
2572          return (HumanName) this.value;
2573        }
2574
2575        public boolean hasValueHumanName() { 
2576          return this != null && this.value instanceof HumanName;
2577        }
2578
2579        /**
2580         * @return {@link #value} (The value of the Output parameter as a basic type.)
2581         */
2582        public Identifier getValueIdentifier() throws FHIRException { 
2583          if (this.value == null)
2584            this.value = new Identifier();
2585          if (!(this.value instanceof Identifier))
2586            throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.value.getClass().getName()+" was encountered");
2587          return (Identifier) this.value;
2588        }
2589
2590        public boolean hasValueIdentifier() { 
2591          return this != null && this.value instanceof Identifier;
2592        }
2593
2594        /**
2595         * @return {@link #value} (The value of the Output parameter as a basic type.)
2596         */
2597        public Money getValueMoney() throws FHIRException { 
2598          if (this.value == null)
2599            this.value = new Money();
2600          if (!(this.value instanceof Money))
2601            throw new FHIRException("Type mismatch: the type Money was expected, but "+this.value.getClass().getName()+" was encountered");
2602          return (Money) this.value;
2603        }
2604
2605        public boolean hasValueMoney() { 
2606          return this != null && this.value instanceof Money;
2607        }
2608
2609        /**
2610         * @return {@link #value} (The value of the Output parameter as a basic type.)
2611         */
2612        public Period getValuePeriod() throws FHIRException { 
2613          if (this.value == null)
2614            this.value = new Period();
2615          if (!(this.value instanceof Period))
2616            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered");
2617          return (Period) this.value;
2618        }
2619
2620        public boolean hasValuePeriod() { 
2621          return this != null && this.value instanceof Period;
2622        }
2623
2624        /**
2625         * @return {@link #value} (The value of the Output parameter as a basic type.)
2626         */
2627        public Quantity getValueQuantity() throws FHIRException { 
2628          if (this.value == null)
2629            this.value = new Quantity();
2630          if (!(this.value instanceof Quantity))
2631            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
2632          return (Quantity) this.value;
2633        }
2634
2635        public boolean hasValueQuantity() { 
2636          return this != null && this.value instanceof Quantity;
2637        }
2638
2639        /**
2640         * @return {@link #value} (The value of the Output parameter as a basic type.)
2641         */
2642        public Range getValueRange() throws FHIRException { 
2643          if (this.value == null)
2644            this.value = new Range();
2645          if (!(this.value instanceof Range))
2646            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
2647          return (Range) this.value;
2648        }
2649
2650        public boolean hasValueRange() { 
2651          return this != null && this.value instanceof Range;
2652        }
2653
2654        /**
2655         * @return {@link #value} (The value of the Output parameter as a basic type.)
2656         */
2657        public Ratio getValueRatio() throws FHIRException { 
2658          if (this.value == null)
2659            this.value = new Ratio();
2660          if (!(this.value instanceof Ratio))
2661            throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered");
2662          return (Ratio) this.value;
2663        }
2664
2665        public boolean hasValueRatio() { 
2666          return this != null && this.value instanceof Ratio;
2667        }
2668
2669        /**
2670         * @return {@link #value} (The value of the Output parameter as a basic type.)
2671         */
2672        public RatioRange getValueRatioRange() throws FHIRException { 
2673          if (this.value == null)
2674            this.value = new RatioRange();
2675          if (!(this.value instanceof RatioRange))
2676            throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.value.getClass().getName()+" was encountered");
2677          return (RatioRange) this.value;
2678        }
2679
2680        public boolean hasValueRatioRange() { 
2681          return this != null && this.value instanceof RatioRange;
2682        }
2683
2684        /**
2685         * @return {@link #value} (The value of the Output parameter as a basic type.)
2686         */
2687        public Reference getValueReference() throws FHIRException { 
2688          if (this.value == null)
2689            this.value = new Reference();
2690          if (!(this.value instanceof Reference))
2691            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered");
2692          return (Reference) this.value;
2693        }
2694
2695        public boolean hasValueReference() { 
2696          return this != null && this.value instanceof Reference;
2697        }
2698
2699        /**
2700         * @return {@link #value} (The value of the Output parameter as a basic type.)
2701         */
2702        public SampledData getValueSampledData() throws FHIRException { 
2703          if (this.value == null)
2704            this.value = new SampledData();
2705          if (!(this.value instanceof SampledData))
2706            throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered");
2707          return (SampledData) this.value;
2708        }
2709
2710        public boolean hasValueSampledData() { 
2711          return this != null && this.value instanceof SampledData;
2712        }
2713
2714        /**
2715         * @return {@link #value} (The value of the Output parameter as a basic type.)
2716         */
2717        public Signature getValueSignature() throws FHIRException { 
2718          if (this.value == null)
2719            this.value = new Signature();
2720          if (!(this.value instanceof Signature))
2721            throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.value.getClass().getName()+" was encountered");
2722          return (Signature) this.value;
2723        }
2724
2725        public boolean hasValueSignature() { 
2726          return this != null && this.value instanceof Signature;
2727        }
2728
2729        /**
2730         * @return {@link #value} (The value of the Output parameter as a basic type.)
2731         */
2732        public Timing getValueTiming() throws FHIRException { 
2733          if (this.value == null)
2734            this.value = new Timing();
2735          if (!(this.value instanceof Timing))
2736            throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.value.getClass().getName()+" was encountered");
2737          return (Timing) this.value;
2738        }
2739
2740        public boolean hasValueTiming() { 
2741          return this != null && this.value instanceof Timing;
2742        }
2743
2744        /**
2745         * @return {@link #value} (The value of the Output parameter as a basic type.)
2746         */
2747        public ContactDetail getValueContactDetail() throws FHIRException { 
2748          if (this.value == null)
2749            this.value = new ContactDetail();
2750          if (!(this.value instanceof ContactDetail))
2751            throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.value.getClass().getName()+" was encountered");
2752          return (ContactDetail) this.value;
2753        }
2754
2755        public boolean hasValueContactDetail() { 
2756          return this != null && this.value instanceof ContactDetail;
2757        }
2758
2759        /**
2760         * @return {@link #value} (The value of the Output parameter as a basic type.)
2761         */
2762        public DataRequirement getValueDataRequirement() throws FHIRException { 
2763          if (this.value == null)
2764            this.value = new DataRequirement();
2765          if (!(this.value instanceof DataRequirement))
2766            throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.value.getClass().getName()+" was encountered");
2767          return (DataRequirement) this.value;
2768        }
2769
2770        public boolean hasValueDataRequirement() { 
2771          return this != null && this.value instanceof DataRequirement;
2772        }
2773
2774        /**
2775         * @return {@link #value} (The value of the Output parameter as a basic type.)
2776         */
2777        public Expression getValueExpression() throws FHIRException { 
2778          if (this.value == null)
2779            this.value = new Expression();
2780          if (!(this.value instanceof Expression))
2781            throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.value.getClass().getName()+" was encountered");
2782          return (Expression) this.value;
2783        }
2784
2785        public boolean hasValueExpression() { 
2786          return this != null && this.value instanceof Expression;
2787        }
2788
2789        /**
2790         * @return {@link #value} (The value of the Output parameter as a basic type.)
2791         */
2792        public ParameterDefinition getValueParameterDefinition() throws FHIRException { 
2793          if (this.value == null)
2794            this.value = new ParameterDefinition();
2795          if (!(this.value instanceof ParameterDefinition))
2796            throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
2797          return (ParameterDefinition) this.value;
2798        }
2799
2800        public boolean hasValueParameterDefinition() { 
2801          return this != null && this.value instanceof ParameterDefinition;
2802        }
2803
2804        /**
2805         * @return {@link #value} (The value of the Output parameter as a basic type.)
2806         */
2807        public RelatedArtifact getValueRelatedArtifact() throws FHIRException { 
2808          if (this.value == null)
2809            this.value = new RelatedArtifact();
2810          if (!(this.value instanceof RelatedArtifact))
2811            throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.value.getClass().getName()+" was encountered");
2812          return (RelatedArtifact) this.value;
2813        }
2814
2815        public boolean hasValueRelatedArtifact() { 
2816          return this != null && this.value instanceof RelatedArtifact;
2817        }
2818
2819        /**
2820         * @return {@link #value} (The value of the Output parameter as a basic type.)
2821         */
2822        public TriggerDefinition getValueTriggerDefinition() throws FHIRException { 
2823          if (this.value == null)
2824            this.value = new TriggerDefinition();
2825          if (!(this.value instanceof TriggerDefinition))
2826            throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.value.getClass().getName()+" was encountered");
2827          return (TriggerDefinition) this.value;
2828        }
2829
2830        public boolean hasValueTriggerDefinition() { 
2831          return this != null && this.value instanceof TriggerDefinition;
2832        }
2833
2834        /**
2835         * @return {@link #value} (The value of the Output parameter as a basic type.)
2836         */
2837        public UsageContext getValueUsageContext() throws FHIRException { 
2838          if (this.value == null)
2839            this.value = new UsageContext();
2840          if (!(this.value instanceof UsageContext))
2841            throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.value.getClass().getName()+" was encountered");
2842          return (UsageContext) this.value;
2843        }
2844
2845        public boolean hasValueUsageContext() { 
2846          return this != null && this.value instanceof UsageContext;
2847        }
2848
2849        /**
2850         * @return {@link #value} (The value of the Output parameter as a basic type.)
2851         */
2852        public Availability getValueAvailability() throws FHIRException { 
2853          if (this.value == null)
2854            this.value = new Availability();
2855          if (!(this.value instanceof Availability))
2856            throw new FHIRException("Type mismatch: the type Availability was expected, but "+this.value.getClass().getName()+" was encountered");
2857          return (Availability) this.value;
2858        }
2859
2860        public boolean hasValueAvailability() { 
2861          return this != null && this.value instanceof Availability;
2862        }
2863
2864        /**
2865         * @return {@link #value} (The value of the Output parameter as a basic type.)
2866         */
2867        public ExtendedContactDetail getValueExtendedContactDetail() throws FHIRException { 
2868          if (this.value == null)
2869            this.value = new ExtendedContactDetail();
2870          if (!(this.value instanceof ExtendedContactDetail))
2871            throw new FHIRException("Type mismatch: the type ExtendedContactDetail was expected, but "+this.value.getClass().getName()+" was encountered");
2872          return (ExtendedContactDetail) this.value;
2873        }
2874
2875        public boolean hasValueExtendedContactDetail() { 
2876          return this != null && this.value instanceof ExtendedContactDetail;
2877        }
2878
2879        /**
2880         * @return {@link #value} (The value of the Output parameter as a basic type.)
2881         */
2882        public Dosage getValueDosage() throws FHIRException { 
2883          if (this.value == null)
2884            this.value = new Dosage();
2885          if (!(this.value instanceof Dosage))
2886            throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.value.getClass().getName()+" was encountered");
2887          return (Dosage) this.value;
2888        }
2889
2890        public boolean hasValueDosage() { 
2891          return this != null && this.value instanceof Dosage;
2892        }
2893
2894        /**
2895         * @return {@link #value} (The value of the Output parameter as a basic type.)
2896         */
2897        public Meta getValueMeta() throws FHIRException { 
2898          if (this.value == null)
2899            this.value = new Meta();
2900          if (!(this.value instanceof Meta))
2901            throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.value.getClass().getName()+" was encountered");
2902          return (Meta) this.value;
2903        }
2904
2905        public boolean hasValueMeta() { 
2906          return this != null && this.value instanceof Meta;
2907        }
2908
2909        public boolean hasValue() { 
2910          return this.value != null && !this.value.isEmpty();
2911        }
2912
2913        /**
2914         * @param value {@link #value} (The value of the Output parameter as a basic type.)
2915         */
2916        public TransportOutputComponent setValue(DataType value) { 
2917          if (value != null && !(value instanceof Base64BinaryType || value instanceof BooleanType || value instanceof CanonicalType || value instanceof CodeType || value instanceof DateType || value instanceof DateTimeType || value instanceof DecimalType || value instanceof IdType || value instanceof InstantType || value instanceof IntegerType || value instanceof Integer64Type || value instanceof MarkdownType || value instanceof OidType || value instanceof PositiveIntType || value instanceof StringType || value instanceof TimeType || value instanceof UnsignedIntType || value instanceof UriType || value instanceof UrlType || value instanceof UuidType || value instanceof Address || value instanceof Age || value instanceof Annotation || value instanceof Attachment || value instanceof CodeableConcept || value instanceof CodeableReference || value instanceof Coding || value instanceof ContactPoint || value instanceof Count || value instanceof Distance || value instanceof Duration || value instanceof HumanName || value instanceof Identifier || value instanceof Money || value instanceof Period || value instanceof Quantity || value instanceof Range || value instanceof Ratio || value instanceof RatioRange || value instanceof Reference || value instanceof SampledData || value instanceof Signature || value instanceof Timing || value instanceof ContactDetail || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Availability || value instanceof ExtendedContactDetail || value instanceof Dosage || value instanceof Meta))
2918            throw new FHIRException("Not the right type for Transport.output.value[x]: "+value.fhirType());
2919          this.value = value;
2920          return this;
2921        }
2922
2923        protected void listChildren(List<Property> children) {
2924          super.listChildren(children);
2925          children.add(new Property("type", "CodeableConcept", "The name of the Output parameter.", 0, 1, type));
2926          children.add(new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value of the Output parameter as a basic type.", 0, 1, value));
2927        }
2928
2929        @Override
2930        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2931          switch (_hash) {
2932          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "The name of the Output parameter.", 0, 1, type);
2933          case -1410166417: /*value[x]*/  return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value of the Output parameter as a basic type.", 0, 1, value);
2934          case 111972721: /*value*/  return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "The value of the Output parameter as a basic type.", 0, 1, value);
2935          case -1535024575: /*valueBase64Binary*/  return new Property("value[x]", "base64Binary", "The value of the Output parameter as a basic type.", 0, 1, value);
2936          case 733421943: /*valueBoolean*/  return new Property("value[x]", "boolean", "The value of the Output parameter as a basic type.", 0, 1, value);
2937          case -786218365: /*valueCanonical*/  return new Property("value[x]", "canonical", "The value of the Output parameter as a basic type.", 0, 1, value);
2938          case -766209282: /*valueCode*/  return new Property("value[x]", "code", "The value of the Output parameter as a basic type.", 0, 1, value);
2939          case -766192449: /*valueDate*/  return new Property("value[x]", "date", "The value of the Output parameter as a basic type.", 0, 1, value);
2940          case 1047929900: /*valueDateTime*/  return new Property("value[x]", "dateTime", "The value of the Output parameter as a basic type.", 0, 1, value);
2941          case -2083993440: /*valueDecimal*/  return new Property("value[x]", "decimal", "The value of the Output parameter as a basic type.", 0, 1, value);
2942          case 231604844: /*valueId*/  return new Property("value[x]", "id", "The value of the Output parameter as a basic type.", 0, 1, value);
2943          case -1668687056: /*valueInstant*/  return new Property("value[x]", "instant", "The value of the Output parameter as a basic type.", 0, 1, value);
2944          case -1668204915: /*valueInteger*/  return new Property("value[x]", "integer", "The value of the Output parameter as a basic type.", 0, 1, value);
2945          case -1122120181: /*valueInteger64*/  return new Property("value[x]", "integer64", "The value of the Output parameter as a basic type.", 0, 1, value);
2946          case -497880704: /*valueMarkdown*/  return new Property("value[x]", "markdown", "The value of the Output parameter as a basic type.", 0, 1, value);
2947          case -1410178407: /*valueOid*/  return new Property("value[x]", "oid", "The value of the Output parameter as a basic type.", 0, 1, value);
2948          case -1249932027: /*valuePositiveInt*/  return new Property("value[x]", "positiveInt", "The value of the Output parameter as a basic type.", 0, 1, value);
2949          case -1424603934: /*valueString*/  return new Property("value[x]", "string", "The value of the Output parameter as a basic type.", 0, 1, value);
2950          case -765708322: /*valueTime*/  return new Property("value[x]", "time", "The value of the Output parameter as a basic type.", 0, 1, value);
2951          case 26529417: /*valueUnsignedInt*/  return new Property("value[x]", "unsignedInt", "The value of the Output parameter as a basic type.", 0, 1, value);
2952          case -1410172357: /*valueUri*/  return new Property("value[x]", "uri", "The value of the Output parameter as a basic type.", 0, 1, value);
2953          case -1410172354: /*valueUrl*/  return new Property("value[x]", "url", "The value of the Output parameter as a basic type.", 0, 1, value);
2954          case -765667124: /*valueUuid*/  return new Property("value[x]", "uuid", "The value of the Output parameter as a basic type.", 0, 1, value);
2955          case -478981821: /*valueAddress*/  return new Property("value[x]", "Address", "The value of the Output parameter as a basic type.", 0, 1, value);
2956          case -1410191922: /*valueAge*/  return new Property("value[x]", "Age", "The value of the Output parameter as a basic type.", 0, 1, value);
2957          case -67108992: /*valueAnnotation*/  return new Property("value[x]", "Annotation", "The value of the Output parameter as a basic type.", 0, 1, value);
2958          case -475566732: /*valueAttachment*/  return new Property("value[x]", "Attachment", "The value of the Output parameter as a basic type.", 0, 1, value);
2959          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "The value of the Output parameter as a basic type.", 0, 1, value);
2960          case -257955629: /*valueCodeableReference*/  return new Property("value[x]", "CodeableReference", "The value of the Output parameter as a basic type.", 0, 1, value);
2961          case -1887705029: /*valueCoding*/  return new Property("value[x]", "Coding", "The value of the Output parameter as a basic type.", 0, 1, value);
2962          case 944904545: /*valueContactPoint*/  return new Property("value[x]", "ContactPoint", "The value of the Output parameter as a basic type.", 0, 1, value);
2963          case 2017332766: /*valueCount*/  return new Property("value[x]", "Count", "The value of the Output parameter as a basic type.", 0, 1, value);
2964          case -456359802: /*valueDistance*/  return new Property("value[x]", "Distance", "The value of the Output parameter as a basic type.", 0, 1, value);
2965          case 1558135333: /*valueDuration*/  return new Property("value[x]", "Duration", "The value of the Output parameter as a basic type.", 0, 1, value);
2966          case -2026205465: /*valueHumanName*/  return new Property("value[x]", "HumanName", "The value of the Output parameter as a basic type.", 0, 1, value);
2967          case -130498310: /*valueIdentifier*/  return new Property("value[x]", "Identifier", "The value of the Output parameter as a basic type.", 0, 1, value);
2968          case 2026560975: /*valueMoney*/  return new Property("value[x]", "Money", "The value of the Output parameter as a basic type.", 0, 1, value);
2969          case -1524344174: /*valuePeriod*/  return new Property("value[x]", "Period", "The value of the Output parameter as a basic type.", 0, 1, value);
2970          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "The value of the Output parameter as a basic type.", 0, 1, value);
2971          case 2030761548: /*valueRange*/  return new Property("value[x]", "Range", "The value of the Output parameter as a basic type.", 0, 1, value);
2972          case 2030767386: /*valueRatio*/  return new Property("value[x]", "Ratio", "The value of the Output parameter as a basic type.", 0, 1, value);
2973          case -706454461: /*valueRatioRange*/  return new Property("value[x]", "RatioRange", "The value of the Output parameter as a basic type.", 0, 1, value);
2974          case 1755241690: /*valueReference*/  return new Property("value[x]", "Reference", "The value of the Output parameter as a basic type.", 0, 1, value);
2975          case -962229101: /*valueSampledData*/  return new Property("value[x]", "SampledData", "The value of the Output parameter as a basic type.", 0, 1, value);
2976          case -540985785: /*valueSignature*/  return new Property("value[x]", "Signature", "The value of the Output parameter as a basic type.", 0, 1, value);
2977          case -1406282469: /*valueTiming*/  return new Property("value[x]", "Timing", "The value of the Output parameter as a basic type.", 0, 1, value);
2978          case -1125200224: /*valueContactDetail*/  return new Property("value[x]", "ContactDetail", "The value of the Output parameter as a basic type.", 0, 1, value);
2979          case 1710554248: /*valueDataRequirement*/  return new Property("value[x]", "DataRequirement", "The value of the Output parameter as a basic type.", 0, 1, value);
2980          case -307517719: /*valueExpression*/  return new Property("value[x]", "Expression", "The value of the Output parameter as a basic type.", 0, 1, value);
2981          case 1387478187: /*valueParameterDefinition*/  return new Property("value[x]", "ParameterDefinition", "The value of the Output parameter as a basic type.", 0, 1, value);
2982          case 1748214124: /*valueRelatedArtifact*/  return new Property("value[x]", "RelatedArtifact", "The value of the Output parameter as a basic type.", 0, 1, value);
2983          case 976830394: /*valueTriggerDefinition*/  return new Property("value[x]", "TriggerDefinition", "The value of the Output parameter as a basic type.", 0, 1, value);
2984          case 588000479: /*valueUsageContext*/  return new Property("value[x]", "UsageContext", "The value of the Output parameter as a basic type.", 0, 1, value);
2985          case 1678530924: /*valueAvailability*/  return new Property("value[x]", "Availability", "The value of the Output parameter as a basic type.", 0, 1, value);
2986          case -1567222041: /*valueExtendedContactDetail*/  return new Property("value[x]", "ExtendedContactDetail", "The value of the Output parameter as a basic type.", 0, 1, value);
2987          case -1858636920: /*valueDosage*/  return new Property("value[x]", "Dosage", "The value of the Output parameter as a basic type.", 0, 1, value);
2988          case -765920490: /*valueMeta*/  return new Property("value[x]", "Meta", "The value of the Output parameter as a basic type.", 0, 1, value);
2989          default: return super.getNamedProperty(_hash, _name, _checkValid);
2990          }
2991
2992        }
2993
2994      @Override
2995      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2996        switch (hash) {
2997        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
2998        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
2999        default: return super.getProperty(hash, name, checkValid);
3000        }
3001
3002      }
3003
3004      @Override
3005      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3006        switch (hash) {
3007        case 3575610: // type
3008          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3009          return value;
3010        case 111972721: // value
3011          this.value = TypeConvertor.castToType(value); // DataType
3012          return value;
3013        default: return super.setProperty(hash, name, value);
3014        }
3015
3016      }
3017
3018      @Override
3019      public Base setProperty(String name, Base value) throws FHIRException {
3020        if (name.equals("type")) {
3021          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3022        } else if (name.equals("value[x]")) {
3023          this.value = TypeConvertor.castToType(value); // DataType
3024        } else
3025          return super.setProperty(name, value);
3026        return value;
3027      }
3028
3029  @Override
3030  public void removeChild(String name, Base value) throws FHIRException {
3031        if (name.equals("type")) {
3032          this.type = null;
3033        } else if (name.equals("value[x]")) {
3034          this.value = null;
3035        } else
3036          super.removeChild(name, value);
3037        
3038      }
3039
3040      @Override
3041      public Base makeProperty(int hash, String name) throws FHIRException {
3042        switch (hash) {
3043        case 3575610:  return getType();
3044        case -1410166417:  return getValue();
3045        case 111972721:  return getValue();
3046        default: return super.makeProperty(hash, name);
3047        }
3048
3049      }
3050
3051      @Override
3052      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3053        switch (hash) {
3054        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
3055        case 111972721: /*value*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "integer64", "markdown", "oid", "positiveInt", "string", "time", "unsignedInt", "uri", "url", "uuid", "Address", "Age", "Annotation", "Attachment", "CodeableConcept", "CodeableReference", "Coding", "ContactPoint", "Count", "Distance", "Duration", "HumanName", "Identifier", "Money", "Period", "Quantity", "Range", "Ratio", "RatioRange", "Reference", "SampledData", "Signature", "Timing", "ContactDetail", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Availability", "ExtendedContactDetail", "Dosage", "Meta"};
3056        default: return super.getTypesForProperty(hash, name);
3057        }
3058
3059      }
3060
3061      @Override
3062      public Base addChild(String name) throws FHIRException {
3063        if (name.equals("type")) {
3064          this.type = new CodeableConcept();
3065          return this.type;
3066        }
3067        else if (name.equals("valueBase64Binary")) {
3068          this.value = new Base64BinaryType();
3069          return this.value;
3070        }
3071        else if (name.equals("valueBoolean")) {
3072          this.value = new BooleanType();
3073          return this.value;
3074        }
3075        else if (name.equals("valueCanonical")) {
3076          this.value = new CanonicalType();
3077          return this.value;
3078        }
3079        else if (name.equals("valueCode")) {
3080          this.value = new CodeType();
3081          return this.value;
3082        }
3083        else if (name.equals("valueDate")) {
3084          this.value = new DateType();
3085          return this.value;
3086        }
3087        else if (name.equals("valueDateTime")) {
3088          this.value = new DateTimeType();
3089          return this.value;
3090        }
3091        else if (name.equals("valueDecimal")) {
3092          this.value = new DecimalType();
3093          return this.value;
3094        }
3095        else if (name.equals("valueId")) {
3096          this.value = new IdType();
3097          return this.value;
3098        }
3099        else if (name.equals("valueInstant")) {
3100          this.value = new InstantType();
3101          return this.value;
3102        }
3103        else if (name.equals("valueInteger")) {
3104          this.value = new IntegerType();
3105          return this.value;
3106        }
3107        else if (name.equals("valueInteger64")) {
3108          this.value = new Integer64Type();
3109          return this.value;
3110        }
3111        else if (name.equals("valueMarkdown")) {
3112          this.value = new MarkdownType();
3113          return this.value;
3114        }
3115        else if (name.equals("valueOid")) {
3116          this.value = new OidType();
3117          return this.value;
3118        }
3119        else if (name.equals("valuePositiveInt")) {
3120          this.value = new PositiveIntType();
3121          return this.value;
3122        }
3123        else if (name.equals("valueString")) {
3124          this.value = new StringType();
3125          return this.value;
3126        }
3127        else if (name.equals("valueTime")) {
3128          this.value = new TimeType();
3129          return this.value;
3130        }
3131        else if (name.equals("valueUnsignedInt")) {
3132          this.value = new UnsignedIntType();
3133          return this.value;
3134        }
3135        else if (name.equals("valueUri")) {
3136          this.value = new UriType();
3137          return this.value;
3138        }
3139        else if (name.equals("valueUrl")) {
3140          this.value = new UrlType();
3141          return this.value;
3142        }
3143        else if (name.equals("valueUuid")) {
3144          this.value = new UuidType();
3145          return this.value;
3146        }
3147        else if (name.equals("valueAddress")) {
3148          this.value = new Address();
3149          return this.value;
3150        }
3151        else if (name.equals("valueAge")) {
3152          this.value = new Age();
3153          return this.value;
3154        }
3155        else if (name.equals("valueAnnotation")) {
3156          this.value = new Annotation();
3157          return this.value;
3158        }
3159        else if (name.equals("valueAttachment")) {
3160          this.value = new Attachment();
3161          return this.value;
3162        }
3163        else if (name.equals("valueCodeableConcept")) {
3164          this.value = new CodeableConcept();
3165          return this.value;
3166        }
3167        else if (name.equals("valueCodeableReference")) {
3168          this.value = new CodeableReference();
3169          return this.value;
3170        }
3171        else if (name.equals("valueCoding")) {
3172          this.value = new Coding();
3173          return this.value;
3174        }
3175        else if (name.equals("valueContactPoint")) {
3176          this.value = new ContactPoint();
3177          return this.value;
3178        }
3179        else if (name.equals("valueCount")) {
3180          this.value = new Count();
3181          return this.value;
3182        }
3183        else if (name.equals("valueDistance")) {
3184          this.value = new Distance();
3185          return this.value;
3186        }
3187        else if (name.equals("valueDuration")) {
3188          this.value = new Duration();
3189          return this.value;
3190        }
3191        else if (name.equals("valueHumanName")) {
3192          this.value = new HumanName();
3193          return this.value;
3194        }
3195        else if (name.equals("valueIdentifier")) {
3196          this.value = new Identifier();
3197          return this.value;
3198        }
3199        else if (name.equals("valueMoney")) {
3200          this.value = new Money();
3201          return this.value;
3202        }
3203        else if (name.equals("valuePeriod")) {
3204          this.value = new Period();
3205          return this.value;
3206        }
3207        else if (name.equals("valueQuantity")) {
3208          this.value = new Quantity();
3209          return this.value;
3210        }
3211        else if (name.equals("valueRange")) {
3212          this.value = new Range();
3213          return this.value;
3214        }
3215        else if (name.equals("valueRatio")) {
3216          this.value = new Ratio();
3217          return this.value;
3218        }
3219        else if (name.equals("valueRatioRange")) {
3220          this.value = new RatioRange();
3221          return this.value;
3222        }
3223        else if (name.equals("valueReference")) {
3224          this.value = new Reference();
3225          return this.value;
3226        }
3227        else if (name.equals("valueSampledData")) {
3228          this.value = new SampledData();
3229          return this.value;
3230        }
3231        else if (name.equals("valueSignature")) {
3232          this.value = new Signature();
3233          return this.value;
3234        }
3235        else if (name.equals("valueTiming")) {
3236          this.value = new Timing();
3237          return this.value;
3238        }
3239        else if (name.equals("valueContactDetail")) {
3240          this.value = new ContactDetail();
3241          return this.value;
3242        }
3243        else if (name.equals("valueDataRequirement")) {
3244          this.value = new DataRequirement();
3245          return this.value;
3246        }
3247        else if (name.equals("valueExpression")) {
3248          this.value = new Expression();
3249          return this.value;
3250        }
3251        else if (name.equals("valueParameterDefinition")) {
3252          this.value = new ParameterDefinition();
3253          return this.value;
3254        }
3255        else if (name.equals("valueRelatedArtifact")) {
3256          this.value = new RelatedArtifact();
3257          return this.value;
3258        }
3259        else if (name.equals("valueTriggerDefinition")) {
3260          this.value = new TriggerDefinition();
3261          return this.value;
3262        }
3263        else if (name.equals("valueUsageContext")) {
3264          this.value = new UsageContext();
3265          return this.value;
3266        }
3267        else if (name.equals("valueAvailability")) {
3268          this.value = new Availability();
3269          return this.value;
3270        }
3271        else if (name.equals("valueExtendedContactDetail")) {
3272          this.value = new ExtendedContactDetail();
3273          return this.value;
3274        }
3275        else if (name.equals("valueDosage")) {
3276          this.value = new Dosage();
3277          return this.value;
3278        }
3279        else if (name.equals("valueMeta")) {
3280          this.value = new Meta();
3281          return this.value;
3282        }
3283        else
3284          return super.addChild(name);
3285      }
3286
3287      public TransportOutputComponent copy() {
3288        TransportOutputComponent dst = new TransportOutputComponent();
3289        copyValues(dst);
3290        return dst;
3291      }
3292
3293      public void copyValues(TransportOutputComponent dst) {
3294        super.copyValues(dst);
3295        dst.type = type == null ? null : type.copy();
3296        dst.value = value == null ? null : value.copy();
3297      }
3298
3299      @Override
3300      public boolean equalsDeep(Base other_) {
3301        if (!super.equalsDeep(other_))
3302          return false;
3303        if (!(other_ instanceof TransportOutputComponent))
3304          return false;
3305        TransportOutputComponent o = (TransportOutputComponent) other_;
3306        return compareDeep(type, o.type, true) && compareDeep(value, o.value, true);
3307      }
3308
3309      @Override
3310      public boolean equalsShallow(Base other_) {
3311        if (!super.equalsShallow(other_))
3312          return false;
3313        if (!(other_ instanceof TransportOutputComponent))
3314          return false;
3315        TransportOutputComponent o = (TransportOutputComponent) other_;
3316        return true;
3317      }
3318
3319      public boolean isEmpty() {
3320        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
3321      }
3322
3323  public String fhirType() {
3324    return "Transport.output";
3325
3326  }
3327
3328  }
3329
3330    /**
3331     * Identifier for the transport event that is used to identify it across multiple disparate systems.
3332     */
3333    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3334    @Description(shortDefinition="External identifier", formalDefinition="Identifier for the transport event that is used to identify it across multiple disparate systems." )
3335    protected List<Identifier> identifier;
3336
3337    /**
3338     * The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.
3339     */
3340    @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=1, min=0, max=1, modifier=false, summary=true)
3341    @Description(shortDefinition="Formal definition of transport", formalDefinition="The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport." )
3342    protected CanonicalType instantiatesCanonical;
3343
3344    /**
3345     * The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.
3346     */
3347    @Child(name = "instantiatesUri", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true)
3348    @Description(shortDefinition="Formal definition of transport", formalDefinition="The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport." )
3349    protected UriType instantiatesUri;
3350
3351    /**
3352     * BasedOn refers to a higher-level authorization that triggered the creation of the transport.  It references a "request" resource such as a ServiceRequest or Transport, which is distinct from the "request" resource the Transport is seeking to fulfill.  This latter resource is referenced by FocusOn.  For example, based on a ServiceRequest (= BasedOn), a transport is created to fulfill a procedureRequest ( = FocusOn ) to transport a specimen to the lab.
3353     */
3354    @Child(name = "basedOn", type = {Reference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3355    @Description(shortDefinition="Request fulfilled by this transport", formalDefinition="BasedOn refers to a higher-level authorization that triggered the creation of the transport.  It references a \"request\" resource such as a ServiceRequest or Transport, which is distinct from the \"request\" resource the Transport is seeking to fulfill.  This latter resource is referenced by FocusOn.  For example, based on a ServiceRequest (= BasedOn), a transport is created to fulfill a procedureRequest ( = FocusOn ) to transport a specimen to the lab." )
3356    protected List<Reference> basedOn;
3357
3358    /**
3359     * A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.
3360     */
3361    @Child(name = "groupIdentifier", type = {Identifier.class}, order=4, min=0, max=1, modifier=false, summary=true)
3362    @Description(shortDefinition="Requisition or grouper id", formalDefinition="A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time." )
3363    protected Identifier groupIdentifier;
3364
3365    /**
3366     * A larger event of which this particular event is a component or step.
3367     */
3368    @Child(name = "partOf", type = {Transport.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3369    @Description(shortDefinition="Part of referenced event", formalDefinition="A larger event of which this particular event is a component or step." )
3370    protected List<Reference> partOf;
3371
3372    /**
3373     * A code specifying the state of the transport event.
3374     */
3375    @Child(name = "status", type = {CodeType.class}, order=6, min=0, max=1, modifier=true, summary=true)
3376    @Description(shortDefinition="in-progress | completed | abandoned | cancelled | planned | entered-in-error", formalDefinition="A code specifying the state of the transport event." )
3377    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/transport-status")
3378    protected Enumeration<TransportStatus> status;
3379
3380    /**
3381     * An explanation as to why this transport is held, failed, was refused, etc.
3382     */
3383    @Child(name = "statusReason", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true)
3384    @Description(shortDefinition="Reason for current status", formalDefinition="An explanation as to why this transport is held, failed, was refused, etc." )
3385    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/transport-status-reason")
3386    protected CodeableConcept statusReason;
3387
3388    /**
3389     * Indicates the "level" of actionability associated with the Transport, i.e. i+R[9]Cs this a proposed transport, a planned transport, an actionable transport, etc.
3390     */
3391    @Child(name = "intent", type = {CodeType.class}, order=8, min=1, max=1, modifier=false, summary=true)
3392    @Description(shortDefinition="unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option", formalDefinition="Indicates the \"level\" of actionability associated with the Transport, i.e. i+R[9]Cs this a proposed transport, a planned transport, an actionable transport, etc." )
3393    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/transport-intent")
3394    protected Enumeration<TransportIntent> intent;
3395
3396    /**
3397     * Indicates how quickly the Transport should be addressed with respect to other requests.
3398     */
3399    @Child(name = "priority", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=false)
3400    @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly the Transport should be addressed with respect to other requests." )
3401    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority")
3402    protected Enumeration<RequestPriority> priority;
3403
3404    /**
3405     * A name or code (or both) briefly describing what the transport involves.
3406     */
3407    @Child(name = "code", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true)
3408    @Description(shortDefinition="Transport Type", formalDefinition="A name or code (or both) briefly describing what the transport involves." )
3409    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/transport-code")
3410    protected CodeableConcept code;
3411
3412    /**
3413     * A free-text description of what is to be performed.
3414     */
3415    @Child(name = "description", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=true)
3416    @Description(shortDefinition="Human-readable explanation of transport", formalDefinition="A free-text description of what is to be performed." )
3417    protected StringType description;
3418
3419    /**
3420     * The request being actioned or the resource being manipulated by this transport.
3421     */
3422    @Child(name = "focus", type = {Reference.class}, order=12, min=0, max=1, modifier=false, summary=true)
3423    @Description(shortDefinition="What transport is acting on", formalDefinition="The request being actioned or the resource being manipulated by this transport." )
3424    protected Reference focus;
3425
3426    /**
3427     * The entity who benefits from the performance of the service specified in the transport (e.g., the patient).
3428     */
3429    @Child(name = "for", type = {Reference.class}, order=13, min=0, max=1, modifier=false, summary=true)
3430    @Description(shortDefinition="Beneficiary of the Transport", formalDefinition="The entity who benefits from the performance of the service specified in the transport (e.g., the patient)." )
3431    protected Reference for_;
3432
3433    /**
3434     * The healthcare event  (e.g. a patient and healthcare provider interaction) during which this transport was created.
3435     */
3436    @Child(name = "encounter", type = {Encounter.class}, order=14, min=0, max=1, modifier=false, summary=true)
3437    @Description(shortDefinition="Healthcare event during which this transport originated", formalDefinition="The healthcare event  (e.g. a patient and healthcare provider interaction) during which this transport was created." )
3438    protected Reference encounter;
3439
3440    /**
3441     * Identifies the completion time of the event (the occurrence).
3442     */
3443    @Child(name = "completionTime", type = {DateTimeType.class}, order=15, min=0, max=1, modifier=false, summary=true)
3444    @Description(shortDefinition="Completion time of the event (the occurrence)", formalDefinition="Identifies the completion time of the event (the occurrence)." )
3445    protected DateTimeType completionTime;
3446
3447    /**
3448     * The date and time this transport was created.
3449     */
3450    @Child(name = "authoredOn", type = {DateTimeType.class}, order=16, min=0, max=1, modifier=false, summary=false)
3451    @Description(shortDefinition="Transport Creation Date", formalDefinition="The date and time this transport was created." )
3452    protected DateTimeType authoredOn;
3453
3454    /**
3455     * The date and time of last modification to this transport.
3456     */
3457    @Child(name = "lastModified", type = {DateTimeType.class}, order=17, min=0, max=1, modifier=false, summary=true)
3458    @Description(shortDefinition="Transport Last Modified Date", formalDefinition="The date and time of last modification to this transport." )
3459    protected DateTimeType lastModified;
3460
3461    /**
3462     * The creator of the transport.
3463     */
3464    @Child(name = "requester", type = {Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class}, order=18, min=0, max=1, modifier=false, summary=true)
3465    @Description(shortDefinition="Who is asking for transport to be done", formalDefinition="The creator of the transport." )
3466    protected Reference requester;
3467
3468    /**
3469     * The kind of participant that should perform the transport.
3470     */
3471    @Child(name = "performerType", type = {CodeableConcept.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3472    @Description(shortDefinition="Requested performer", formalDefinition="The kind of participant that should perform the transport." )
3473    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/performer-role")
3474    protected List<CodeableConcept> performerType;
3475
3476    /**
3477     * Individual organization or Device currently responsible for transport execution.
3478     */
3479    @Child(name = "owner", type = {Practitioner.class, PractitionerRole.class, Organization.class, CareTeam.class, HealthcareService.class, Patient.class, Device.class, RelatedPerson.class}, order=20, min=0, max=1, modifier=false, summary=true)
3480    @Description(shortDefinition="Responsible individual", formalDefinition="Individual organization or Device currently responsible for transport execution." )
3481    protected Reference owner;
3482
3483    /**
3484     * Principal physical location where this transport is performed.
3485     */
3486    @Child(name = "location", type = {Location.class}, order=21, min=0, max=1, modifier=false, summary=true)
3487    @Description(shortDefinition="Where transport occurs", formalDefinition="Principal physical location where this transport is performed." )
3488    protected Reference location;
3489
3490    /**
3491     * Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Transport.
3492     */
3493    @Child(name = "insurance", type = {Coverage.class, ClaimResponse.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3494    @Description(shortDefinition="Associated insurance coverage", formalDefinition="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Transport." )
3495    protected List<Reference> insurance;
3496
3497    /**
3498     * Free-text information captured about the transport as it progresses.
3499     */
3500    @Child(name = "note", type = {Annotation.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3501    @Description(shortDefinition="Comments made about the transport", formalDefinition="Free-text information captured about the transport as it progresses." )
3502    protected List<Annotation> note;
3503
3504    /**
3505     * Links to Provenance records for past versions of this Transport that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the transport.
3506     */
3507    @Child(name = "relevantHistory", type = {Provenance.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3508    @Description(shortDefinition="Key events in history of the Transport", formalDefinition="Links to Provenance records for past versions of this Transport that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the transport." )
3509    protected List<Reference> relevantHistory;
3510
3511    /**
3512     * If the Transport.focus is a request resource and the transport is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.
3513     */
3514    @Child(name = "restriction", type = {}, order=25, min=0, max=1, modifier=false, summary=false)
3515    @Description(shortDefinition="Constraints on fulfillment transports", formalDefinition="If the Transport.focus is a request resource and the transport is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned." )
3516    protected TransportRestrictionComponent restriction;
3517
3518    /**
3519     * Additional information that may be needed in the execution of the transport.
3520     */
3521    @Child(name = "input", type = {}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3522    @Description(shortDefinition="Information used to perform transport", formalDefinition="Additional information that may be needed in the execution of the transport." )
3523    protected List<ParameterComponent> input;
3524
3525    /**
3526     * Outputs produced by the Transport.
3527     */
3528    @Child(name = "output", type = {}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3529    @Description(shortDefinition="Information produced as part of transport", formalDefinition="Outputs produced by the Transport." )
3530    protected List<TransportOutputComponent> output;
3531
3532    /**
3533     * The desired or final location for the transport.
3534     */
3535    @Child(name = "requestedLocation", type = {Location.class}, order=28, min=1, max=1, modifier=false, summary=true)
3536    @Description(shortDefinition="The desired location", formalDefinition="The desired or final location for the transport." )
3537    protected Reference requestedLocation;
3538
3539    /**
3540     * The current location for the entity to be transported.
3541     */
3542    @Child(name = "currentLocation", type = {Location.class}, order=29, min=1, max=1, modifier=false, summary=true)
3543    @Description(shortDefinition="The entity current location", formalDefinition="The current location for the entity to be transported." )
3544    protected Reference currentLocation;
3545
3546    /**
3547     * A resource reference indicating why this transport needs to be performed.
3548     */
3549    @Child(name = "reason", type = {CodeableReference.class}, order=30, min=0, max=1, modifier=false, summary=false)
3550    @Description(shortDefinition="Why transport is needed", formalDefinition="A resource reference indicating why this transport needs to be performed." )
3551    protected CodeableReference reason;
3552
3553    /**
3554     * The transport event prior to this one.
3555     */
3556    @Child(name = "history", type = {Transport.class}, order=31, min=0, max=1, modifier=false, summary=false)
3557    @Description(shortDefinition="Parent (or preceding) transport", formalDefinition="The transport event prior to this one." )
3558    protected Reference history;
3559
3560    private static final long serialVersionUID = -2095581755L;
3561
3562  /**
3563   * Constructor
3564   */
3565    public Transport() {
3566      super();
3567    }
3568
3569  /**
3570   * Constructor
3571   */
3572    public Transport(TransportIntent intent, Reference requestedLocation, Reference currentLocation) {
3573      super();
3574      this.setIntent(intent);
3575      this.setRequestedLocation(requestedLocation);
3576      this.setCurrentLocation(currentLocation);
3577    }
3578
3579    /**
3580     * @return {@link #identifier} (Identifier for the transport event that is used to identify it across multiple disparate systems.)
3581     */
3582    public List<Identifier> getIdentifier() { 
3583      if (this.identifier == null)
3584        this.identifier = new ArrayList<Identifier>();
3585      return this.identifier;
3586    }
3587
3588    /**
3589     * @return Returns a reference to <code>this</code> for easy method chaining
3590     */
3591    public Transport setIdentifier(List<Identifier> theIdentifier) { 
3592      this.identifier = theIdentifier;
3593      return this;
3594    }
3595
3596    public boolean hasIdentifier() { 
3597      if (this.identifier == null)
3598        return false;
3599      for (Identifier item : this.identifier)
3600        if (!item.isEmpty())
3601          return true;
3602      return false;
3603    }
3604
3605    public Identifier addIdentifier() { //3
3606      Identifier t = new Identifier();
3607      if (this.identifier == null)
3608        this.identifier = new ArrayList<Identifier>();
3609      this.identifier.add(t);
3610      return t;
3611    }
3612
3613    public Transport addIdentifier(Identifier t) { //3
3614      if (t == null)
3615        return this;
3616      if (this.identifier == null)
3617        this.identifier = new ArrayList<Identifier>();
3618      this.identifier.add(t);
3619      return this;
3620    }
3621
3622    /**
3623     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
3624     */
3625    public Identifier getIdentifierFirstRep() { 
3626      if (getIdentifier().isEmpty()) {
3627        addIdentifier();
3628      }
3629      return getIdentifier().get(0);
3630    }
3631
3632    /**
3633     * @return {@link #instantiatesCanonical} (The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.). This is the underlying object with id, value and extensions. The accessor "getInstantiatesCanonical" gives direct access to the value
3634     */
3635    public CanonicalType getInstantiatesCanonicalElement() { 
3636      if (this.instantiatesCanonical == null)
3637        if (Configuration.errorOnAutoCreate())
3638          throw new Error("Attempt to auto-create Transport.instantiatesCanonical");
3639        else if (Configuration.doAutoCreate())
3640          this.instantiatesCanonical = new CanonicalType(); // bb
3641      return this.instantiatesCanonical;
3642    }
3643
3644    public boolean hasInstantiatesCanonicalElement() { 
3645      return this.instantiatesCanonical != null && !this.instantiatesCanonical.isEmpty();
3646    }
3647
3648    public boolean hasInstantiatesCanonical() { 
3649      return this.instantiatesCanonical != null && !this.instantiatesCanonical.isEmpty();
3650    }
3651
3652    /**
3653     * @param value {@link #instantiatesCanonical} (The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.). This is the underlying object with id, value and extensions. The accessor "getInstantiatesCanonical" gives direct access to the value
3654     */
3655    public Transport setInstantiatesCanonicalElement(CanonicalType value) { 
3656      this.instantiatesCanonical = value;
3657      return this;
3658    }
3659
3660    /**
3661     * @return The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.
3662     */
3663    public String getInstantiatesCanonical() { 
3664      return this.instantiatesCanonical == null ? null : this.instantiatesCanonical.getValue();
3665    }
3666
3667    /**
3668     * @param value The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.
3669     */
3670    public Transport setInstantiatesCanonical(String value) { 
3671      if (Utilities.noString(value))
3672        this.instantiatesCanonical = null;
3673      else {
3674        if (this.instantiatesCanonical == null)
3675          this.instantiatesCanonical = new CanonicalType();
3676        this.instantiatesCanonical.setValue(value);
3677      }
3678      return this;
3679    }
3680
3681    /**
3682     * @return {@link #instantiatesUri} (The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.). This is the underlying object with id, value and extensions. The accessor "getInstantiatesUri" gives direct access to the value
3683     */
3684    public UriType getInstantiatesUriElement() { 
3685      if (this.instantiatesUri == null)
3686        if (Configuration.errorOnAutoCreate())
3687          throw new Error("Attempt to auto-create Transport.instantiatesUri");
3688        else if (Configuration.doAutoCreate())
3689          this.instantiatesUri = new UriType(); // bb
3690      return this.instantiatesUri;
3691    }
3692
3693    public boolean hasInstantiatesUriElement() { 
3694      return this.instantiatesUri != null && !this.instantiatesUri.isEmpty();
3695    }
3696
3697    public boolean hasInstantiatesUri() { 
3698      return this.instantiatesUri != null && !this.instantiatesUri.isEmpty();
3699    }
3700
3701    /**
3702     * @param value {@link #instantiatesUri} (The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.). This is the underlying object with id, value and extensions. The accessor "getInstantiatesUri" gives direct access to the value
3703     */
3704    public Transport setInstantiatesUriElement(UriType value) { 
3705      this.instantiatesUri = value;
3706      return this;
3707    }
3708
3709    /**
3710     * @return The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.
3711     */
3712    public String getInstantiatesUri() { 
3713      return this.instantiatesUri == null ? null : this.instantiatesUri.getValue();
3714    }
3715
3716    /**
3717     * @param value The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.
3718     */
3719    public Transport setInstantiatesUri(String value) { 
3720      if (Utilities.noString(value))
3721        this.instantiatesUri = null;
3722      else {
3723        if (this.instantiatesUri == null)
3724          this.instantiatesUri = new UriType();
3725        this.instantiatesUri.setValue(value);
3726      }
3727      return this;
3728    }
3729
3730    /**
3731     * @return {@link #basedOn} (BasedOn refers to a higher-level authorization that triggered the creation of the transport.  It references a "request" resource such as a ServiceRequest or Transport, which is distinct from the "request" resource the Transport is seeking to fulfill.  This latter resource is referenced by FocusOn.  For example, based on a ServiceRequest (= BasedOn), a transport is created to fulfill a procedureRequest ( = FocusOn ) to transport a specimen to the lab.)
3732     */
3733    public List<Reference> getBasedOn() { 
3734      if (this.basedOn == null)
3735        this.basedOn = new ArrayList<Reference>();
3736      return this.basedOn;
3737    }
3738
3739    /**
3740     * @return Returns a reference to <code>this</code> for easy method chaining
3741     */
3742    public Transport setBasedOn(List<Reference> theBasedOn) { 
3743      this.basedOn = theBasedOn;
3744      return this;
3745    }
3746
3747    public boolean hasBasedOn() { 
3748      if (this.basedOn == null)
3749        return false;
3750      for (Reference item : this.basedOn)
3751        if (!item.isEmpty())
3752          return true;
3753      return false;
3754    }
3755
3756    public Reference addBasedOn() { //3
3757      Reference t = new Reference();
3758      if (this.basedOn == null)
3759        this.basedOn = new ArrayList<Reference>();
3760      this.basedOn.add(t);
3761      return t;
3762    }
3763
3764    public Transport addBasedOn(Reference t) { //3
3765      if (t == null)
3766        return this;
3767      if (this.basedOn == null)
3768        this.basedOn = new ArrayList<Reference>();
3769      this.basedOn.add(t);
3770      return this;
3771    }
3772
3773    /**
3774     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
3775     */
3776    public Reference getBasedOnFirstRep() { 
3777      if (getBasedOn().isEmpty()) {
3778        addBasedOn();
3779      }
3780      return getBasedOn().get(0);
3781    }
3782
3783    /**
3784     * @return {@link #groupIdentifier} (A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.)
3785     */
3786    public Identifier getGroupIdentifier() { 
3787      if (this.groupIdentifier == null)
3788        if (Configuration.errorOnAutoCreate())
3789          throw new Error("Attempt to auto-create Transport.groupIdentifier");
3790        else if (Configuration.doAutoCreate())
3791          this.groupIdentifier = new Identifier(); // cc
3792      return this.groupIdentifier;
3793    }
3794
3795    public boolean hasGroupIdentifier() { 
3796      return this.groupIdentifier != null && !this.groupIdentifier.isEmpty();
3797    }
3798
3799    /**
3800     * @param value {@link #groupIdentifier} (A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.)
3801     */
3802    public Transport setGroupIdentifier(Identifier value) { 
3803      this.groupIdentifier = value;
3804      return this;
3805    }
3806
3807    /**
3808     * @return {@link #partOf} (A larger event of which this particular event is a component or step.)
3809     */
3810    public List<Reference> getPartOf() { 
3811      if (this.partOf == null)
3812        this.partOf = new ArrayList<Reference>();
3813      return this.partOf;
3814    }
3815
3816    /**
3817     * @return Returns a reference to <code>this</code> for easy method chaining
3818     */
3819    public Transport setPartOf(List<Reference> thePartOf) { 
3820      this.partOf = thePartOf;
3821      return this;
3822    }
3823
3824    public boolean hasPartOf() { 
3825      if (this.partOf == null)
3826        return false;
3827      for (Reference item : this.partOf)
3828        if (!item.isEmpty())
3829          return true;
3830      return false;
3831    }
3832
3833    public Reference addPartOf() { //3
3834      Reference t = new Reference();
3835      if (this.partOf == null)
3836        this.partOf = new ArrayList<Reference>();
3837      this.partOf.add(t);
3838      return t;
3839    }
3840
3841    public Transport addPartOf(Reference t) { //3
3842      if (t == null)
3843        return this;
3844      if (this.partOf == null)
3845        this.partOf = new ArrayList<Reference>();
3846      this.partOf.add(t);
3847      return this;
3848    }
3849
3850    /**
3851     * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3}
3852     */
3853    public Reference getPartOfFirstRep() { 
3854      if (getPartOf().isEmpty()) {
3855        addPartOf();
3856      }
3857      return getPartOf().get(0);
3858    }
3859
3860    /**
3861     * @return {@link #status} (A code specifying the state of the transport event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
3862     */
3863    public Enumeration<TransportStatus> getStatusElement() { 
3864      if (this.status == null)
3865        if (Configuration.errorOnAutoCreate())
3866          throw new Error("Attempt to auto-create Transport.status");
3867        else if (Configuration.doAutoCreate())
3868          this.status = new Enumeration<TransportStatus>(new TransportStatusEnumFactory()); // bb
3869      return this.status;
3870    }
3871
3872    public boolean hasStatusElement() { 
3873      return this.status != null && !this.status.isEmpty();
3874    }
3875
3876    public boolean hasStatus() { 
3877      return this.status != null && !this.status.isEmpty();
3878    }
3879
3880    /**
3881     * @param value {@link #status} (A code specifying the state of the transport event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
3882     */
3883    public Transport setStatusElement(Enumeration<TransportStatus> value) { 
3884      this.status = value;
3885      return this;
3886    }
3887
3888    /**
3889     * @return A code specifying the state of the transport event.
3890     */
3891    public TransportStatus getStatus() { 
3892      return this.status == null ? null : this.status.getValue();
3893    }
3894
3895    /**
3896     * @param value A code specifying the state of the transport event.
3897     */
3898    public Transport setStatus(TransportStatus value) { 
3899      if (value == null)
3900        this.status = null;
3901      else {
3902        if (this.status == null)
3903          this.status = new Enumeration<TransportStatus>(new TransportStatusEnumFactory());
3904        this.status.setValue(value);
3905      }
3906      return this;
3907    }
3908
3909    /**
3910     * @return {@link #statusReason} (An explanation as to why this transport is held, failed, was refused, etc.)
3911     */
3912    public CodeableConcept getStatusReason() { 
3913      if (this.statusReason == null)
3914        if (Configuration.errorOnAutoCreate())
3915          throw new Error("Attempt to auto-create Transport.statusReason");
3916        else if (Configuration.doAutoCreate())
3917          this.statusReason = new CodeableConcept(); // cc
3918      return this.statusReason;
3919    }
3920
3921    public boolean hasStatusReason() { 
3922      return this.statusReason != null && !this.statusReason.isEmpty();
3923    }
3924
3925    /**
3926     * @param value {@link #statusReason} (An explanation as to why this transport is held, failed, was refused, etc.)
3927     */
3928    public Transport setStatusReason(CodeableConcept value) { 
3929      this.statusReason = value;
3930      return this;
3931    }
3932
3933    /**
3934     * @return {@link #intent} (Indicates the "level" of actionability associated with the Transport, i.e. i+R[9]Cs this a proposed transport, a planned transport, an actionable transport, etc.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
3935     */
3936    public Enumeration<TransportIntent> getIntentElement() { 
3937      if (this.intent == null)
3938        if (Configuration.errorOnAutoCreate())
3939          throw new Error("Attempt to auto-create Transport.intent");
3940        else if (Configuration.doAutoCreate())
3941          this.intent = new Enumeration<TransportIntent>(new TransportIntentEnumFactory()); // bb
3942      return this.intent;
3943    }
3944
3945    public boolean hasIntentElement() { 
3946      return this.intent != null && !this.intent.isEmpty();
3947    }
3948
3949    public boolean hasIntent() { 
3950      return this.intent != null && !this.intent.isEmpty();
3951    }
3952
3953    /**
3954     * @param value {@link #intent} (Indicates the "level" of actionability associated with the Transport, i.e. i+R[9]Cs this a proposed transport, a planned transport, an actionable transport, etc.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
3955     */
3956    public Transport setIntentElement(Enumeration<TransportIntent> value) { 
3957      this.intent = value;
3958      return this;
3959    }
3960
3961    /**
3962     * @return Indicates the "level" of actionability associated with the Transport, i.e. i+R[9]Cs this a proposed transport, a planned transport, an actionable transport, etc.
3963     */
3964    public TransportIntent getIntent() { 
3965      return this.intent == null ? null : this.intent.getValue();
3966    }
3967
3968    /**
3969     * @param value Indicates the "level" of actionability associated with the Transport, i.e. i+R[9]Cs this a proposed transport, a planned transport, an actionable transport, etc.
3970     */
3971    public Transport setIntent(TransportIntent value) { 
3972        if (this.intent == null)
3973          this.intent = new Enumeration<TransportIntent>(new TransportIntentEnumFactory());
3974        this.intent.setValue(value);
3975      return this;
3976    }
3977
3978    /**
3979     * @return {@link #priority} (Indicates how quickly the Transport should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
3980     */
3981    public Enumeration<RequestPriority> getPriorityElement() { 
3982      if (this.priority == null)
3983        if (Configuration.errorOnAutoCreate())
3984          throw new Error("Attempt to auto-create Transport.priority");
3985        else if (Configuration.doAutoCreate())
3986          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb
3987      return this.priority;
3988    }
3989
3990    public boolean hasPriorityElement() { 
3991      return this.priority != null && !this.priority.isEmpty();
3992    }
3993
3994    public boolean hasPriority() { 
3995      return this.priority != null && !this.priority.isEmpty();
3996    }
3997
3998    /**
3999     * @param value {@link #priority} (Indicates how quickly the Transport should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
4000     */
4001    public Transport setPriorityElement(Enumeration<RequestPriority> value) { 
4002      this.priority = value;
4003      return this;
4004    }
4005
4006    /**
4007     * @return Indicates how quickly the Transport should be addressed with respect to other requests.
4008     */
4009    public RequestPriority getPriority() { 
4010      return this.priority == null ? null : this.priority.getValue();
4011    }
4012
4013    /**
4014     * @param value Indicates how quickly the Transport should be addressed with respect to other requests.
4015     */
4016    public Transport setPriority(RequestPriority value) { 
4017      if (value == null)
4018        this.priority = null;
4019      else {
4020        if (this.priority == null)
4021          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory());
4022        this.priority.setValue(value);
4023      }
4024      return this;
4025    }
4026
4027    /**
4028     * @return {@link #code} (A name or code (or both) briefly describing what the transport involves.)
4029     */
4030    public CodeableConcept getCode() { 
4031      if (this.code == null)
4032        if (Configuration.errorOnAutoCreate())
4033          throw new Error("Attempt to auto-create Transport.code");
4034        else if (Configuration.doAutoCreate())
4035          this.code = new CodeableConcept(); // cc
4036      return this.code;
4037    }
4038
4039    public boolean hasCode() { 
4040      return this.code != null && !this.code.isEmpty();
4041    }
4042
4043    /**
4044     * @param value {@link #code} (A name or code (or both) briefly describing what the transport involves.)
4045     */
4046    public Transport setCode(CodeableConcept value) { 
4047      this.code = value;
4048      return this;
4049    }
4050
4051    /**
4052     * @return {@link #description} (A free-text description of what is to be performed.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4053     */
4054    public StringType getDescriptionElement() { 
4055      if (this.description == null)
4056        if (Configuration.errorOnAutoCreate())
4057          throw new Error("Attempt to auto-create Transport.description");
4058        else if (Configuration.doAutoCreate())
4059          this.description = new StringType(); // bb
4060      return this.description;
4061    }
4062
4063    public boolean hasDescriptionElement() { 
4064      return this.description != null && !this.description.isEmpty();
4065    }
4066
4067    public boolean hasDescription() { 
4068      return this.description != null && !this.description.isEmpty();
4069    }
4070
4071    /**
4072     * @param value {@link #description} (A free-text description of what is to be performed.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4073     */
4074    public Transport setDescriptionElement(StringType value) { 
4075      this.description = value;
4076      return this;
4077    }
4078
4079    /**
4080     * @return A free-text description of what is to be performed.
4081     */
4082    public String getDescription() { 
4083      return this.description == null ? null : this.description.getValue();
4084    }
4085
4086    /**
4087     * @param value A free-text description of what is to be performed.
4088     */
4089    public Transport setDescription(String value) { 
4090      if (Utilities.noString(value))
4091        this.description = null;
4092      else {
4093        if (this.description == null)
4094          this.description = new StringType();
4095        this.description.setValue(value);
4096      }
4097      return this;
4098    }
4099
4100    /**
4101     * @return {@link #focus} (The request being actioned or the resource being manipulated by this transport.)
4102     */
4103    public Reference getFocus() { 
4104      if (this.focus == null)
4105        if (Configuration.errorOnAutoCreate())
4106          throw new Error("Attempt to auto-create Transport.focus");
4107        else if (Configuration.doAutoCreate())
4108          this.focus = new Reference(); // cc
4109      return this.focus;
4110    }
4111
4112    public boolean hasFocus() { 
4113      return this.focus != null && !this.focus.isEmpty();
4114    }
4115
4116    /**
4117     * @param value {@link #focus} (The request being actioned or the resource being manipulated by this transport.)
4118     */
4119    public Transport setFocus(Reference value) { 
4120      this.focus = value;
4121      return this;
4122    }
4123
4124    /**
4125     * @return {@link #for_} (The entity who benefits from the performance of the service specified in the transport (e.g., the patient).)
4126     */
4127    public Reference getFor() { 
4128      if (this.for_ == null)
4129        if (Configuration.errorOnAutoCreate())
4130          throw new Error("Attempt to auto-create Transport.for_");
4131        else if (Configuration.doAutoCreate())
4132          this.for_ = new Reference(); // cc
4133      return this.for_;
4134    }
4135
4136    public boolean hasFor() { 
4137      return this.for_ != null && !this.for_.isEmpty();
4138    }
4139
4140    /**
4141     * @param value {@link #for_} (The entity who benefits from the performance of the service specified in the transport (e.g., the patient).)
4142     */
4143    public Transport setFor(Reference value) { 
4144      this.for_ = value;
4145      return this;
4146    }
4147
4148    /**
4149     * @return {@link #encounter} (The healthcare event  (e.g. a patient and healthcare provider interaction) during which this transport was created.)
4150     */
4151    public Reference getEncounter() { 
4152      if (this.encounter == null)
4153        if (Configuration.errorOnAutoCreate())
4154          throw new Error("Attempt to auto-create Transport.encounter");
4155        else if (Configuration.doAutoCreate())
4156          this.encounter = new Reference(); // cc
4157      return this.encounter;
4158    }
4159
4160    public boolean hasEncounter() { 
4161      return this.encounter != null && !this.encounter.isEmpty();
4162    }
4163
4164    /**
4165     * @param value {@link #encounter} (The healthcare event  (e.g. a patient and healthcare provider interaction) during which this transport was created.)
4166     */
4167    public Transport setEncounter(Reference value) { 
4168      this.encounter = value;
4169      return this;
4170    }
4171
4172    /**
4173     * @return {@link #completionTime} (Identifies the completion time of the event (the occurrence).). This is the underlying object with id, value and extensions. The accessor "getCompletionTime" gives direct access to the value
4174     */
4175    public DateTimeType getCompletionTimeElement() { 
4176      if (this.completionTime == null)
4177        if (Configuration.errorOnAutoCreate())
4178          throw new Error("Attempt to auto-create Transport.completionTime");
4179        else if (Configuration.doAutoCreate())
4180          this.completionTime = new DateTimeType(); // bb
4181      return this.completionTime;
4182    }
4183
4184    public boolean hasCompletionTimeElement() { 
4185      return this.completionTime != null && !this.completionTime.isEmpty();
4186    }
4187
4188    public boolean hasCompletionTime() { 
4189      return this.completionTime != null && !this.completionTime.isEmpty();
4190    }
4191
4192    /**
4193     * @param value {@link #completionTime} (Identifies the completion time of the event (the occurrence).). This is the underlying object with id, value and extensions. The accessor "getCompletionTime" gives direct access to the value
4194     */
4195    public Transport setCompletionTimeElement(DateTimeType value) { 
4196      this.completionTime = value;
4197      return this;
4198    }
4199
4200    /**
4201     * @return Identifies the completion time of the event (the occurrence).
4202     */
4203    public Date getCompletionTime() { 
4204      return this.completionTime == null ? null : this.completionTime.getValue();
4205    }
4206
4207    /**
4208     * @param value Identifies the completion time of the event (the occurrence).
4209     */
4210    public Transport setCompletionTime(Date value) { 
4211      if (value == null)
4212        this.completionTime = null;
4213      else {
4214        if (this.completionTime == null)
4215          this.completionTime = new DateTimeType();
4216        this.completionTime.setValue(value);
4217      }
4218      return this;
4219    }
4220
4221    /**
4222     * @return {@link #authoredOn} (The date and time this transport was created.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
4223     */
4224    public DateTimeType getAuthoredOnElement() { 
4225      if (this.authoredOn == null)
4226        if (Configuration.errorOnAutoCreate())
4227          throw new Error("Attempt to auto-create Transport.authoredOn");
4228        else if (Configuration.doAutoCreate())
4229          this.authoredOn = new DateTimeType(); // bb
4230      return this.authoredOn;
4231    }
4232
4233    public boolean hasAuthoredOnElement() { 
4234      return this.authoredOn != null && !this.authoredOn.isEmpty();
4235    }
4236
4237    public boolean hasAuthoredOn() { 
4238      return this.authoredOn != null && !this.authoredOn.isEmpty();
4239    }
4240
4241    /**
4242     * @param value {@link #authoredOn} (The date and time this transport was created.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
4243     */
4244    public Transport setAuthoredOnElement(DateTimeType value) { 
4245      this.authoredOn = value;
4246      return this;
4247    }
4248
4249    /**
4250     * @return The date and time this transport was created.
4251     */
4252    public Date getAuthoredOn() { 
4253      return this.authoredOn == null ? null : this.authoredOn.getValue();
4254    }
4255
4256    /**
4257     * @param value The date and time this transport was created.
4258     */
4259    public Transport setAuthoredOn(Date value) { 
4260      if (value == null)
4261        this.authoredOn = null;
4262      else {
4263        if (this.authoredOn == null)
4264          this.authoredOn = new DateTimeType();
4265        this.authoredOn.setValue(value);
4266      }
4267      return this;
4268    }
4269
4270    /**
4271     * @return {@link #lastModified} (The date and time of last modification to this transport.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value
4272     */
4273    public DateTimeType getLastModifiedElement() { 
4274      if (this.lastModified == null)
4275        if (Configuration.errorOnAutoCreate())
4276          throw new Error("Attempt to auto-create Transport.lastModified");
4277        else if (Configuration.doAutoCreate())
4278          this.lastModified = new DateTimeType(); // bb
4279      return this.lastModified;
4280    }
4281
4282    public boolean hasLastModifiedElement() { 
4283      return this.lastModified != null && !this.lastModified.isEmpty();
4284    }
4285
4286    public boolean hasLastModified() { 
4287      return this.lastModified != null && !this.lastModified.isEmpty();
4288    }
4289
4290    /**
4291     * @param value {@link #lastModified} (The date and time of last modification to this transport.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value
4292     */
4293    public Transport setLastModifiedElement(DateTimeType value) { 
4294      this.lastModified = value;
4295      return this;
4296    }
4297
4298    /**
4299     * @return The date and time of last modification to this transport.
4300     */
4301    public Date getLastModified() { 
4302      return this.lastModified == null ? null : this.lastModified.getValue();
4303    }
4304
4305    /**
4306     * @param value The date and time of last modification to this transport.
4307     */
4308    public Transport setLastModified(Date value) { 
4309      if (value == null)
4310        this.lastModified = null;
4311      else {
4312        if (this.lastModified == null)
4313          this.lastModified = new DateTimeType();
4314        this.lastModified.setValue(value);
4315      }
4316      return this;
4317    }
4318
4319    /**
4320     * @return {@link #requester} (The creator of the transport.)
4321     */
4322    public Reference getRequester() { 
4323      if (this.requester == null)
4324        if (Configuration.errorOnAutoCreate())
4325          throw new Error("Attempt to auto-create Transport.requester");
4326        else if (Configuration.doAutoCreate())
4327          this.requester = new Reference(); // cc
4328      return this.requester;
4329    }
4330
4331    public boolean hasRequester() { 
4332      return this.requester != null && !this.requester.isEmpty();
4333    }
4334
4335    /**
4336     * @param value {@link #requester} (The creator of the transport.)
4337     */
4338    public Transport setRequester(Reference value) { 
4339      this.requester = value;
4340      return this;
4341    }
4342
4343    /**
4344     * @return {@link #performerType} (The kind of participant that should perform the transport.)
4345     */
4346    public List<CodeableConcept> getPerformerType() { 
4347      if (this.performerType == null)
4348        this.performerType = new ArrayList<CodeableConcept>();
4349      return this.performerType;
4350    }
4351
4352    /**
4353     * @return Returns a reference to <code>this</code> for easy method chaining
4354     */
4355    public Transport setPerformerType(List<CodeableConcept> thePerformerType) { 
4356      this.performerType = thePerformerType;
4357      return this;
4358    }
4359
4360    public boolean hasPerformerType() { 
4361      if (this.performerType == null)
4362        return false;
4363      for (CodeableConcept item : this.performerType)
4364        if (!item.isEmpty())
4365          return true;
4366      return false;
4367    }
4368
4369    public CodeableConcept addPerformerType() { //3
4370      CodeableConcept t = new CodeableConcept();
4371      if (this.performerType == null)
4372        this.performerType = new ArrayList<CodeableConcept>();
4373      this.performerType.add(t);
4374      return t;
4375    }
4376
4377    public Transport addPerformerType(CodeableConcept t) { //3
4378      if (t == null)
4379        return this;
4380      if (this.performerType == null)
4381        this.performerType = new ArrayList<CodeableConcept>();
4382      this.performerType.add(t);
4383      return this;
4384    }
4385
4386    /**
4387     * @return The first repetition of repeating field {@link #performerType}, creating it if it does not already exist {3}
4388     */
4389    public CodeableConcept getPerformerTypeFirstRep() { 
4390      if (getPerformerType().isEmpty()) {
4391        addPerformerType();
4392      }
4393      return getPerformerType().get(0);
4394    }
4395
4396    /**
4397     * @return {@link #owner} (Individual organization or Device currently responsible for transport execution.)
4398     */
4399    public Reference getOwner() { 
4400      if (this.owner == null)
4401        if (Configuration.errorOnAutoCreate())
4402          throw new Error("Attempt to auto-create Transport.owner");
4403        else if (Configuration.doAutoCreate())
4404          this.owner = new Reference(); // cc
4405      return this.owner;
4406    }
4407
4408    public boolean hasOwner() { 
4409      return this.owner != null && !this.owner.isEmpty();
4410    }
4411
4412    /**
4413     * @param value {@link #owner} (Individual organization or Device currently responsible for transport execution.)
4414     */
4415    public Transport setOwner(Reference value) { 
4416      this.owner = value;
4417      return this;
4418    }
4419
4420    /**
4421     * @return {@link #location} (Principal physical location where this transport is performed.)
4422     */
4423    public Reference getLocation() { 
4424      if (this.location == null)
4425        if (Configuration.errorOnAutoCreate())
4426          throw new Error("Attempt to auto-create Transport.location");
4427        else if (Configuration.doAutoCreate())
4428          this.location = new Reference(); // cc
4429      return this.location;
4430    }
4431
4432    public boolean hasLocation() { 
4433      return this.location != null && !this.location.isEmpty();
4434    }
4435
4436    /**
4437     * @param value {@link #location} (Principal physical location where this transport is performed.)
4438     */
4439    public Transport setLocation(Reference value) { 
4440      this.location = value;
4441      return this;
4442    }
4443
4444    /**
4445     * @return {@link #insurance} (Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Transport.)
4446     */
4447    public List<Reference> getInsurance() { 
4448      if (this.insurance == null)
4449        this.insurance = new ArrayList<Reference>();
4450      return this.insurance;
4451    }
4452
4453    /**
4454     * @return Returns a reference to <code>this</code> for easy method chaining
4455     */
4456    public Transport setInsurance(List<Reference> theInsurance) { 
4457      this.insurance = theInsurance;
4458      return this;
4459    }
4460
4461    public boolean hasInsurance() { 
4462      if (this.insurance == null)
4463        return false;
4464      for (Reference item : this.insurance)
4465        if (!item.isEmpty())
4466          return true;
4467      return false;
4468    }
4469
4470    public Reference addInsurance() { //3
4471      Reference t = new Reference();
4472      if (this.insurance == null)
4473        this.insurance = new ArrayList<Reference>();
4474      this.insurance.add(t);
4475      return t;
4476    }
4477
4478    public Transport addInsurance(Reference t) { //3
4479      if (t == null)
4480        return this;
4481      if (this.insurance == null)
4482        this.insurance = new ArrayList<Reference>();
4483      this.insurance.add(t);
4484      return this;
4485    }
4486
4487    /**
4488     * @return The first repetition of repeating field {@link #insurance}, creating it if it does not already exist {3}
4489     */
4490    public Reference getInsuranceFirstRep() { 
4491      if (getInsurance().isEmpty()) {
4492        addInsurance();
4493      }
4494      return getInsurance().get(0);
4495    }
4496
4497    /**
4498     * @return {@link #note} (Free-text information captured about the transport as it progresses.)
4499     */
4500    public List<Annotation> getNote() { 
4501      if (this.note == null)
4502        this.note = new ArrayList<Annotation>();
4503      return this.note;
4504    }
4505
4506    /**
4507     * @return Returns a reference to <code>this</code> for easy method chaining
4508     */
4509    public Transport setNote(List<Annotation> theNote) { 
4510      this.note = theNote;
4511      return this;
4512    }
4513
4514    public boolean hasNote() { 
4515      if (this.note == null)
4516        return false;
4517      for (Annotation item : this.note)
4518        if (!item.isEmpty())
4519          return true;
4520      return false;
4521    }
4522
4523    public Annotation addNote() { //3
4524      Annotation t = new Annotation();
4525      if (this.note == null)
4526        this.note = new ArrayList<Annotation>();
4527      this.note.add(t);
4528      return t;
4529    }
4530
4531    public Transport addNote(Annotation t) { //3
4532      if (t == null)
4533        return this;
4534      if (this.note == null)
4535        this.note = new ArrayList<Annotation>();
4536      this.note.add(t);
4537      return this;
4538    }
4539
4540    /**
4541     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
4542     */
4543    public Annotation getNoteFirstRep() { 
4544      if (getNote().isEmpty()) {
4545        addNote();
4546      }
4547      return getNote().get(0);
4548    }
4549
4550    /**
4551     * @return {@link #relevantHistory} (Links to Provenance records for past versions of this Transport that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the transport.)
4552     */
4553    public List<Reference> getRelevantHistory() { 
4554      if (this.relevantHistory == null)
4555        this.relevantHistory = new ArrayList<Reference>();
4556      return this.relevantHistory;
4557    }
4558
4559    /**
4560     * @return Returns a reference to <code>this</code> for easy method chaining
4561     */
4562    public Transport setRelevantHistory(List<Reference> theRelevantHistory) { 
4563      this.relevantHistory = theRelevantHistory;
4564      return this;
4565    }
4566
4567    public boolean hasRelevantHistory() { 
4568      if (this.relevantHistory == null)
4569        return false;
4570      for (Reference item : this.relevantHistory)
4571        if (!item.isEmpty())
4572          return true;
4573      return false;
4574    }
4575
4576    public Reference addRelevantHistory() { //3
4577      Reference t = new Reference();
4578      if (this.relevantHistory == null)
4579        this.relevantHistory = new ArrayList<Reference>();
4580      this.relevantHistory.add(t);
4581      return t;
4582    }
4583
4584    public Transport addRelevantHistory(Reference t) { //3
4585      if (t == null)
4586        return this;
4587      if (this.relevantHistory == null)
4588        this.relevantHistory = new ArrayList<Reference>();
4589      this.relevantHistory.add(t);
4590      return this;
4591    }
4592
4593    /**
4594     * @return The first repetition of repeating field {@link #relevantHistory}, creating it if it does not already exist {3}
4595     */
4596    public Reference getRelevantHistoryFirstRep() { 
4597      if (getRelevantHistory().isEmpty()) {
4598        addRelevantHistory();
4599      }
4600      return getRelevantHistory().get(0);
4601    }
4602
4603    /**
4604     * @return {@link #restriction} (If the Transport.focus is a request resource and the transport is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.)
4605     */
4606    public TransportRestrictionComponent getRestriction() { 
4607      if (this.restriction == null)
4608        if (Configuration.errorOnAutoCreate())
4609          throw new Error("Attempt to auto-create Transport.restriction");
4610        else if (Configuration.doAutoCreate())
4611          this.restriction = new TransportRestrictionComponent(); // cc
4612      return this.restriction;
4613    }
4614
4615    public boolean hasRestriction() { 
4616      return this.restriction != null && !this.restriction.isEmpty();
4617    }
4618
4619    /**
4620     * @param value {@link #restriction} (If the Transport.focus is a request resource and the transport is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.)
4621     */
4622    public Transport setRestriction(TransportRestrictionComponent value) { 
4623      this.restriction = value;
4624      return this;
4625    }
4626
4627    /**
4628     * @return {@link #input} (Additional information that may be needed in the execution of the transport.)
4629     */
4630    public List<ParameterComponent> getInput() { 
4631      if (this.input == null)
4632        this.input = new ArrayList<ParameterComponent>();
4633      return this.input;
4634    }
4635
4636    /**
4637     * @return Returns a reference to <code>this</code> for easy method chaining
4638     */
4639    public Transport setInput(List<ParameterComponent> theInput) { 
4640      this.input = theInput;
4641      return this;
4642    }
4643
4644    public boolean hasInput() { 
4645      if (this.input == null)
4646        return false;
4647      for (ParameterComponent item : this.input)
4648        if (!item.isEmpty())
4649          return true;
4650      return false;
4651    }
4652
4653    public ParameterComponent addInput() { //3
4654      ParameterComponent t = new ParameterComponent();
4655      if (this.input == null)
4656        this.input = new ArrayList<ParameterComponent>();
4657      this.input.add(t);
4658      return t;
4659    }
4660
4661    public Transport addInput(ParameterComponent t) { //3
4662      if (t == null)
4663        return this;
4664      if (this.input == null)
4665        this.input = new ArrayList<ParameterComponent>();
4666      this.input.add(t);
4667      return this;
4668    }
4669
4670    /**
4671     * @return The first repetition of repeating field {@link #input}, creating it if it does not already exist {3}
4672     */
4673    public ParameterComponent getInputFirstRep() { 
4674      if (getInput().isEmpty()) {
4675        addInput();
4676      }
4677      return getInput().get(0);
4678    }
4679
4680    /**
4681     * @return {@link #output} (Outputs produced by the Transport.)
4682     */
4683    public List<TransportOutputComponent> getOutput() { 
4684      if (this.output == null)
4685        this.output = new ArrayList<TransportOutputComponent>();
4686      return this.output;
4687    }
4688
4689    /**
4690     * @return Returns a reference to <code>this</code> for easy method chaining
4691     */
4692    public Transport setOutput(List<TransportOutputComponent> theOutput) { 
4693      this.output = theOutput;
4694      return this;
4695    }
4696
4697    public boolean hasOutput() { 
4698      if (this.output == null)
4699        return false;
4700      for (TransportOutputComponent item : this.output)
4701        if (!item.isEmpty())
4702          return true;
4703      return false;
4704    }
4705
4706    public TransportOutputComponent addOutput() { //3
4707      TransportOutputComponent t = new TransportOutputComponent();
4708      if (this.output == null)
4709        this.output = new ArrayList<TransportOutputComponent>();
4710      this.output.add(t);
4711      return t;
4712    }
4713
4714    public Transport addOutput(TransportOutputComponent t) { //3
4715      if (t == null)
4716        return this;
4717      if (this.output == null)
4718        this.output = new ArrayList<TransportOutputComponent>();
4719      this.output.add(t);
4720      return this;
4721    }
4722
4723    /**
4724     * @return The first repetition of repeating field {@link #output}, creating it if it does not already exist {3}
4725     */
4726    public TransportOutputComponent getOutputFirstRep() { 
4727      if (getOutput().isEmpty()) {
4728        addOutput();
4729      }
4730      return getOutput().get(0);
4731    }
4732
4733    /**
4734     * @return {@link #requestedLocation} (The desired or final location for the transport.)
4735     */
4736    public Reference getRequestedLocation() { 
4737      if (this.requestedLocation == null)
4738        if (Configuration.errorOnAutoCreate())
4739          throw new Error("Attempt to auto-create Transport.requestedLocation");
4740        else if (Configuration.doAutoCreate())
4741          this.requestedLocation = new Reference(); // cc
4742      return this.requestedLocation;
4743    }
4744
4745    public boolean hasRequestedLocation() { 
4746      return this.requestedLocation != null && !this.requestedLocation.isEmpty();
4747    }
4748
4749    /**
4750     * @param value {@link #requestedLocation} (The desired or final location for the transport.)
4751     */
4752    public Transport setRequestedLocation(Reference value) { 
4753      this.requestedLocation = value;
4754      return this;
4755    }
4756
4757    /**
4758     * @return {@link #currentLocation} (The current location for the entity to be transported.)
4759     */
4760    public Reference getCurrentLocation() { 
4761      if (this.currentLocation == null)
4762        if (Configuration.errorOnAutoCreate())
4763          throw new Error("Attempt to auto-create Transport.currentLocation");
4764        else if (Configuration.doAutoCreate())
4765          this.currentLocation = new Reference(); // cc
4766      return this.currentLocation;
4767    }
4768
4769    public boolean hasCurrentLocation() { 
4770      return this.currentLocation != null && !this.currentLocation.isEmpty();
4771    }
4772
4773    /**
4774     * @param value {@link #currentLocation} (The current location for the entity to be transported.)
4775     */
4776    public Transport setCurrentLocation(Reference value) { 
4777      this.currentLocation = value;
4778      return this;
4779    }
4780
4781    /**
4782     * @return {@link #reason} (A resource reference indicating why this transport needs to be performed.)
4783     */
4784    public CodeableReference getReason() { 
4785      if (this.reason == null)
4786        if (Configuration.errorOnAutoCreate())
4787          throw new Error("Attempt to auto-create Transport.reason");
4788        else if (Configuration.doAutoCreate())
4789          this.reason = new CodeableReference(); // cc
4790      return this.reason;
4791    }
4792
4793    public boolean hasReason() { 
4794      return this.reason != null && !this.reason.isEmpty();
4795    }
4796
4797    /**
4798     * @param value {@link #reason} (A resource reference indicating why this transport needs to be performed.)
4799     */
4800    public Transport setReason(CodeableReference value) { 
4801      this.reason = value;
4802      return this;
4803    }
4804
4805    /**
4806     * @return {@link #history} (The transport event prior to this one.)
4807     */
4808    public Reference getHistory() { 
4809      if (this.history == null)
4810        if (Configuration.errorOnAutoCreate())
4811          throw new Error("Attempt to auto-create Transport.history");
4812        else if (Configuration.doAutoCreate())
4813          this.history = new Reference(); // cc
4814      return this.history;
4815    }
4816
4817    public boolean hasHistory() { 
4818      return this.history != null && !this.history.isEmpty();
4819    }
4820
4821    /**
4822     * @param value {@link #history} (The transport event prior to this one.)
4823     */
4824    public Transport setHistory(Reference value) { 
4825      this.history = value;
4826      return this;
4827    }
4828
4829      protected void listChildren(List<Property> children) {
4830        super.listChildren(children);
4831        children.add(new Property("identifier", "Identifier", "Identifier for the transport event that is used to identify it across multiple disparate systems.", 0, java.lang.Integer.MAX_VALUE, identifier));
4832        children.add(new Property("instantiatesCanonical", "canonical(ActivityDefinition)", "The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.", 0, 1, instantiatesCanonical));
4833        children.add(new Property("instantiatesUri", "uri", "The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.", 0, 1, instantiatesUri));
4834        children.add(new Property("basedOn", "Reference(Any)", "BasedOn refers to a higher-level authorization that triggered the creation of the transport.  It references a \"request\" resource such as a ServiceRequest or Transport, which is distinct from the \"request\" resource the Transport is seeking to fulfill.  This latter resource is referenced by FocusOn.  For example, based on a ServiceRequest (= BasedOn), a transport is created to fulfill a procedureRequest ( = FocusOn ) to transport a specimen to the lab.", 0, java.lang.Integer.MAX_VALUE, basedOn));
4835        children.add(new Property("groupIdentifier", "Identifier", "A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.", 0, 1, groupIdentifier));
4836        children.add(new Property("partOf", "Reference(Transport)", "A larger event of which this particular event is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf));
4837        children.add(new Property("status", "code", "A code specifying the state of the transport event.", 0, 1, status));
4838        children.add(new Property("statusReason", "CodeableConcept", "An explanation as to why this transport is held, failed, was refused, etc.", 0, 1, statusReason));
4839        children.add(new Property("intent", "code", "Indicates the \"level\" of actionability associated with the Transport, i.e. i+R[9]Cs this a proposed transport, a planned transport, an actionable transport, etc.", 0, 1, intent));
4840        children.add(new Property("priority", "code", "Indicates how quickly the Transport should be addressed with respect to other requests.", 0, 1, priority));
4841        children.add(new Property("code", "CodeableConcept", "A name or code (or both) briefly describing what the transport involves.", 0, 1, code));
4842        children.add(new Property("description", "string", "A free-text description of what is to be performed.", 0, 1, description));
4843        children.add(new Property("focus", "Reference(Any)", "The request being actioned or the resource being manipulated by this transport.", 0, 1, focus));
4844        children.add(new Property("for", "Reference(Any)", "The entity who benefits from the performance of the service specified in the transport (e.g., the patient).", 0, 1, for_));
4845        children.add(new Property("encounter", "Reference(Encounter)", "The healthcare event  (e.g. a patient and healthcare provider interaction) during which this transport was created.", 0, 1, encounter));
4846        children.add(new Property("completionTime", "dateTime", "Identifies the completion time of the event (the occurrence).", 0, 1, completionTime));
4847        children.add(new Property("authoredOn", "dateTime", "The date and time this transport was created.", 0, 1, authoredOn));
4848        children.add(new Property("lastModified", "dateTime", "The date and time of last modification to this transport.", 0, 1, lastModified));
4849        children.add(new Property("requester", "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "The creator of the transport.", 0, 1, requester));
4850        children.add(new Property("performerType", "CodeableConcept", "The kind of participant that should perform the transport.", 0, java.lang.Integer.MAX_VALUE, performerType));
4851        children.add(new Property("owner", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|HealthcareService|Patient|Device|RelatedPerson)", "Individual organization or Device currently responsible for transport execution.", 0, 1, owner));
4852        children.add(new Property("location", "Reference(Location)", "Principal physical location where this transport is performed.", 0, 1, location));
4853        children.add(new Property("insurance", "Reference(Coverage|ClaimResponse)", "Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Transport.", 0, java.lang.Integer.MAX_VALUE, insurance));
4854        children.add(new Property("note", "Annotation", "Free-text information captured about the transport as it progresses.", 0, java.lang.Integer.MAX_VALUE, note));
4855        children.add(new Property("relevantHistory", "Reference(Provenance)", "Links to Provenance records for past versions of this Transport that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the transport.", 0, java.lang.Integer.MAX_VALUE, relevantHistory));
4856        children.add(new Property("restriction", "", "If the Transport.focus is a request resource and the transport is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.", 0, 1, restriction));
4857        children.add(new Property("input", "", "Additional information that may be needed in the execution of the transport.", 0, java.lang.Integer.MAX_VALUE, input));
4858        children.add(new Property("output", "", "Outputs produced by the Transport.", 0, java.lang.Integer.MAX_VALUE, output));
4859        children.add(new Property("requestedLocation", "Reference(Location)", "The desired or final location for the transport.", 0, 1, requestedLocation));
4860        children.add(new Property("currentLocation", "Reference(Location)", "The current location for the entity to be transported.", 0, 1, currentLocation));
4861        children.add(new Property("reason", "CodeableReference(Any)", "A resource reference indicating why this transport needs to be performed.", 0, 1, reason));
4862        children.add(new Property("history", "Reference(Transport)", "The transport event prior to this one.", 0, 1, history));
4863      }
4864
4865      @Override
4866      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4867        switch (_hash) {
4868        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Identifier for the transport event that is used to identify it across multiple disparate systems.", 0, java.lang.Integer.MAX_VALUE, identifier);
4869        case 8911915: /*instantiatesCanonical*/  return new Property("instantiatesCanonical", "canonical(ActivityDefinition)", "The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.", 0, 1, instantiatesCanonical);
4870        case -1926393373: /*instantiatesUri*/  return new Property("instantiatesUri", "uri", "The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Transport.", 0, 1, instantiatesUri);
4871        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(Any)", "BasedOn refers to a higher-level authorization that triggered the creation of the transport.  It references a \"request\" resource such as a ServiceRequest or Transport, which is distinct from the \"request\" resource the Transport is seeking to fulfill.  This latter resource is referenced by FocusOn.  For example, based on a ServiceRequest (= BasedOn), a transport is created to fulfill a procedureRequest ( = FocusOn ) to transport a specimen to the lab.", 0, java.lang.Integer.MAX_VALUE, basedOn);
4872        case -445338488: /*groupIdentifier*/  return new Property("groupIdentifier", "Identifier", "A shared identifier common to multiple independent Request instances that were activated/authorized more or less simultaneously by a single author.  The presence of the same identifier on each request ties those requests together and may have business ramifications in terms of reporting of results, billing, etc.  E.g. a requisition number shared by a set of lab tests ordered together, or a prescription number shared by all meds ordered at one time.", 0, 1, groupIdentifier);
4873        case -995410646: /*partOf*/  return new Property("partOf", "Reference(Transport)", "A larger event of which this particular event is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf);
4874        case -892481550: /*status*/  return new Property("status", "code", "A code specifying the state of the transport event.", 0, 1, status);
4875        case 2051346646: /*statusReason*/  return new Property("statusReason", "CodeableConcept", "An explanation as to why this transport is held, failed, was refused, etc.", 0, 1, statusReason);
4876        case -1183762788: /*intent*/  return new Property("intent", "code", "Indicates the \"level\" of actionability associated with the Transport, i.e. i+R[9]Cs this a proposed transport, a planned transport, an actionable transport, etc.", 0, 1, intent);
4877        case -1165461084: /*priority*/  return new Property("priority", "code", "Indicates how quickly the Transport should be addressed with respect to other requests.", 0, 1, priority);
4878        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A name or code (or both) briefly describing what the transport involves.", 0, 1, code);
4879        case -1724546052: /*description*/  return new Property("description", "string", "A free-text description of what is to be performed.", 0, 1, description);
4880        case 97604824: /*focus*/  return new Property("focus", "Reference(Any)", "The request being actioned or the resource being manipulated by this transport.", 0, 1, focus);
4881        case 101577: /*for*/  return new Property("for", "Reference(Any)", "The entity who benefits from the performance of the service specified in the transport (e.g., the patient).", 0, 1, for_);
4882        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The healthcare event  (e.g. a patient and healthcare provider interaction) during which this transport was created.", 0, 1, encounter);
4883        case 1146641609: /*completionTime*/  return new Property("completionTime", "dateTime", "Identifies the completion time of the event (the occurrence).", 0, 1, completionTime);
4884        case -1500852503: /*authoredOn*/  return new Property("authoredOn", "dateTime", "The date and time this transport was created.", 0, 1, authoredOn);
4885        case 1959003007: /*lastModified*/  return new Property("lastModified", "dateTime", "The date and time of last modification to this transport.", 0, 1, lastModified);
4886        case 693933948: /*requester*/  return new Property("requester", "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "The creator of the transport.", 0, 1, requester);
4887        case -901444568: /*performerType*/  return new Property("performerType", "CodeableConcept", "The kind of participant that should perform the transport.", 0, java.lang.Integer.MAX_VALUE, performerType);
4888        case 106164915: /*owner*/  return new Property("owner", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|HealthcareService|Patient|Device|RelatedPerson)", "Individual organization or Device currently responsible for transport execution.", 0, 1, owner);
4889        case 1901043637: /*location*/  return new Property("location", "Reference(Location)", "Principal physical location where this transport is performed.", 0, 1, location);
4890        case 73049818: /*insurance*/  return new Property("insurance", "Reference(Coverage|ClaimResponse)", "Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Transport.", 0, java.lang.Integer.MAX_VALUE, insurance);
4891        case 3387378: /*note*/  return new Property("note", "Annotation", "Free-text information captured about the transport as it progresses.", 0, java.lang.Integer.MAX_VALUE, note);
4892        case 1538891575: /*relevantHistory*/  return new Property("relevantHistory", "Reference(Provenance)", "Links to Provenance records for past versions of this Transport that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the transport.", 0, java.lang.Integer.MAX_VALUE, relevantHistory);
4893        case -1561062452: /*restriction*/  return new Property("restriction", "", "If the Transport.focus is a request resource and the transport is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.", 0, 1, restriction);
4894        case 100358090: /*input*/  return new Property("input", "", "Additional information that may be needed in the execution of the transport.", 0, java.lang.Integer.MAX_VALUE, input);
4895        case -1005512447: /*output*/  return new Property("output", "", "Outputs produced by the Transport.", 0, java.lang.Integer.MAX_VALUE, output);
4896        case -1788392125: /*requestedLocation*/  return new Property("requestedLocation", "Reference(Location)", "The desired or final location for the transport.", 0, 1, requestedLocation);
4897        case -140429234: /*currentLocation*/  return new Property("currentLocation", "Reference(Location)", "The current location for the entity to be transported.", 0, 1, currentLocation);
4898        case -934964668: /*reason*/  return new Property("reason", "CodeableReference(Any)", "A resource reference indicating why this transport needs to be performed.", 0, 1, reason);
4899        case 926934164: /*history*/  return new Property("history", "Reference(Transport)", "The transport event prior to this one.", 0, 1, history);
4900        default: return super.getNamedProperty(_hash, _name, _checkValid);
4901        }
4902
4903      }
4904
4905      @Override
4906      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4907        switch (hash) {
4908        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
4909        case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : new Base[] {this.instantiatesCanonical}; // CanonicalType
4910        case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : new Base[] {this.instantiatesUri}; // UriType
4911        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
4912        case -445338488: /*groupIdentifier*/ return this.groupIdentifier == null ? new Base[0] : new Base[] {this.groupIdentifier}; // Identifier
4913        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference
4914        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<TransportStatus>
4915        case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : new Base[] {this.statusReason}; // CodeableConcept
4916        case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration<TransportIntent>
4917        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<RequestPriority>
4918        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
4919        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
4920        case 97604824: /*focus*/ return this.focus == null ? new Base[0] : new Base[] {this.focus}; // Reference
4921        case 101577: /*for*/ return this.for_ == null ? new Base[0] : new Base[] {this.for_}; // Reference
4922        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
4923        case 1146641609: /*completionTime*/ return this.completionTime == null ? new Base[0] : new Base[] {this.completionTime}; // DateTimeType
4924        case -1500852503: /*authoredOn*/ return this.authoredOn == null ? new Base[0] : new Base[] {this.authoredOn}; // DateTimeType
4925        case 1959003007: /*lastModified*/ return this.lastModified == null ? new Base[0] : new Base[] {this.lastModified}; // DateTimeType
4926        case 693933948: /*requester*/ return this.requester == null ? new Base[0] : new Base[] {this.requester}; // Reference
4927        case -901444568: /*performerType*/ return this.performerType == null ? new Base[0] : this.performerType.toArray(new Base[this.performerType.size()]); // CodeableConcept
4928        case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference
4929        case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
4930        case 73049818: /*insurance*/ return this.insurance == null ? new Base[0] : this.insurance.toArray(new Base[this.insurance.size()]); // Reference
4931        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
4932        case 1538891575: /*relevantHistory*/ return this.relevantHistory == null ? new Base[0] : this.relevantHistory.toArray(new Base[this.relevantHistory.size()]); // Reference
4933        case -1561062452: /*restriction*/ return this.restriction == null ? new Base[0] : new Base[] {this.restriction}; // TransportRestrictionComponent
4934        case 100358090: /*input*/ return this.input == null ? new Base[0] : this.input.toArray(new Base[this.input.size()]); // ParameterComponent
4935        case -1005512447: /*output*/ return this.output == null ? new Base[0] : this.output.toArray(new Base[this.output.size()]); // TransportOutputComponent
4936        case -1788392125: /*requestedLocation*/ return this.requestedLocation == null ? new Base[0] : new Base[] {this.requestedLocation}; // Reference
4937        case -140429234: /*currentLocation*/ return this.currentLocation == null ? new Base[0] : new Base[] {this.currentLocation}; // Reference
4938        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // CodeableReference
4939        case 926934164: /*history*/ return this.history == null ? new Base[0] : new Base[] {this.history}; // Reference
4940        default: return super.getProperty(hash, name, checkValid);
4941        }
4942
4943      }
4944
4945      @Override
4946      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4947        switch (hash) {
4948        case -1618432855: // identifier
4949          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
4950          return value;
4951        case 8911915: // instantiatesCanonical
4952          this.instantiatesCanonical = TypeConvertor.castToCanonical(value); // CanonicalType
4953          return value;
4954        case -1926393373: // instantiatesUri
4955          this.instantiatesUri = TypeConvertor.castToUri(value); // UriType
4956          return value;
4957        case -332612366: // basedOn
4958          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
4959          return value;
4960        case -445338488: // groupIdentifier
4961          this.groupIdentifier = TypeConvertor.castToIdentifier(value); // Identifier
4962          return value;
4963        case -995410646: // partOf
4964          this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference
4965          return value;
4966        case -892481550: // status
4967          value = new TransportStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
4968          this.status = (Enumeration) value; // Enumeration<TransportStatus>
4969          return value;
4970        case 2051346646: // statusReason
4971          this.statusReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
4972          return value;
4973        case -1183762788: // intent
4974          value = new TransportIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
4975          this.intent = (Enumeration) value; // Enumeration<TransportIntent>
4976          return value;
4977        case -1165461084: // priority
4978          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
4979          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
4980          return value;
4981        case 3059181: // code
4982          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
4983          return value;
4984        case -1724546052: // description
4985          this.description = TypeConvertor.castToString(value); // StringType
4986          return value;
4987        case 97604824: // focus
4988          this.focus = TypeConvertor.castToReference(value); // Reference
4989          return value;
4990        case 101577: // for
4991          this.for_ = TypeConvertor.castToReference(value); // Reference
4992          return value;
4993        case 1524132147: // encounter
4994          this.encounter = TypeConvertor.castToReference(value); // Reference
4995          return value;
4996        case 1146641609: // completionTime
4997          this.completionTime = TypeConvertor.castToDateTime(value); // DateTimeType
4998          return value;
4999        case -1500852503: // authoredOn
5000          this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType
5001          return value;
5002        case 1959003007: // lastModified
5003          this.lastModified = TypeConvertor.castToDateTime(value); // DateTimeType
5004          return value;
5005        case 693933948: // requester
5006          this.requester = TypeConvertor.castToReference(value); // Reference
5007          return value;
5008        case -901444568: // performerType
5009          this.getPerformerType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
5010          return value;
5011        case 106164915: // owner
5012          this.owner = TypeConvertor.castToReference(value); // Reference
5013          return value;
5014        case 1901043637: // location
5015          this.location = TypeConvertor.castToReference(value); // Reference
5016          return value;
5017        case 73049818: // insurance
5018          this.getInsurance().add(TypeConvertor.castToReference(value)); // Reference
5019          return value;
5020        case 3387378: // note
5021          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
5022          return value;
5023        case 1538891575: // relevantHistory
5024          this.getRelevantHistory().add(TypeConvertor.castToReference(value)); // Reference
5025          return value;
5026        case -1561062452: // restriction
5027          this.restriction = (TransportRestrictionComponent) value; // TransportRestrictionComponent
5028          return value;
5029        case 100358090: // input
5030          this.getInput().add((ParameterComponent) value); // ParameterComponent
5031          return value;
5032        case -1005512447: // output
5033          this.getOutput().add((TransportOutputComponent) value); // TransportOutputComponent
5034          return value;
5035        case -1788392125: // requestedLocation
5036          this.requestedLocation = TypeConvertor.castToReference(value); // Reference
5037          return value;
5038        case -140429234: // currentLocation
5039          this.currentLocation = TypeConvertor.castToReference(value); // Reference
5040          return value;
5041        case -934964668: // reason
5042          this.reason = TypeConvertor.castToCodeableReference(value); // CodeableReference
5043          return value;
5044        case 926934164: // history
5045          this.history = TypeConvertor.castToReference(value); // Reference
5046          return value;
5047        default: return super.setProperty(hash, name, value);
5048        }
5049
5050      }
5051
5052      @Override
5053      public Base setProperty(String name, Base value) throws FHIRException {
5054        if (name.equals("identifier")) {
5055          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
5056        } else if (name.equals("instantiatesCanonical")) {
5057          this.instantiatesCanonical = TypeConvertor.castToCanonical(value); // CanonicalType
5058        } else if (name.equals("instantiatesUri")) {
5059          this.instantiatesUri = TypeConvertor.castToUri(value); // UriType
5060        } else if (name.equals("basedOn")) {
5061          this.getBasedOn().add(TypeConvertor.castToReference(value));
5062        } else if (name.equals("groupIdentifier")) {
5063          this.groupIdentifier = TypeConvertor.castToIdentifier(value); // Identifier
5064        } else if (name.equals("partOf")) {
5065          this.getPartOf().add(TypeConvertor.castToReference(value));
5066        } else if (name.equals("status")) {
5067          value = new TransportStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
5068          this.status = (Enumeration) value; // Enumeration<TransportStatus>
5069        } else if (name.equals("statusReason")) {
5070          this.statusReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5071        } else if (name.equals("intent")) {
5072          value = new TransportIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
5073          this.intent = (Enumeration) value; // Enumeration<TransportIntent>
5074        } else if (name.equals("priority")) {
5075          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
5076          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
5077        } else if (name.equals("code")) {
5078          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
5079        } else if (name.equals("description")) {
5080          this.description = TypeConvertor.castToString(value); // StringType
5081        } else if (name.equals("focus")) {
5082          this.focus = TypeConvertor.castToReference(value); // Reference
5083        } else if (name.equals("for")) {
5084          this.for_ = TypeConvertor.castToReference(value); // Reference
5085        } else if (name.equals("encounter")) {
5086          this.encounter = TypeConvertor.castToReference(value); // Reference
5087        } else if (name.equals("completionTime")) {
5088          this.completionTime = TypeConvertor.castToDateTime(value); // DateTimeType
5089        } else if (name.equals("authoredOn")) {
5090          this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType
5091        } else if (name.equals("lastModified")) {
5092          this.lastModified = TypeConvertor.castToDateTime(value); // DateTimeType
5093        } else if (name.equals("requester")) {
5094          this.requester = TypeConvertor.castToReference(value); // Reference
5095        } else if (name.equals("performerType")) {
5096          this.getPerformerType().add(TypeConvertor.castToCodeableConcept(value));
5097        } else if (name.equals("owner")) {
5098          this.owner = TypeConvertor.castToReference(value); // Reference
5099        } else if (name.equals("location")) {
5100          this.location = TypeConvertor.castToReference(value); // Reference
5101        } else if (name.equals("insurance")) {
5102          this.getInsurance().add(TypeConvertor.castToReference(value));
5103        } else if (name.equals("note")) {
5104          this.getNote().add(TypeConvertor.castToAnnotation(value));
5105        } else if (name.equals("relevantHistory")) {
5106          this.getRelevantHistory().add(TypeConvertor.castToReference(value));
5107        } else if (name.equals("restriction")) {
5108          this.restriction = (TransportRestrictionComponent) value; // TransportRestrictionComponent
5109        } else if (name.equals("input")) {
5110          this.getInput().add((ParameterComponent) value);
5111        } else if (name.equals("output")) {
5112          this.getOutput().add((TransportOutputComponent) value);
5113        } else if (name.equals("requestedLocation")) {
5114          this.requestedLocation = TypeConvertor.castToReference(value); // Reference
5115        } else if (name.equals("currentLocation")) {
5116          this.currentLocation = TypeConvertor.castToReference(value); // Reference
5117        } else if (name.equals("reason")) {
5118          this.reason = TypeConvertor.castToCodeableReference(value); // CodeableReference
5119        } else if (name.equals("history")) {
5120          this.history = TypeConvertor.castToReference(value); // Reference
5121        } else
5122          return super.setProperty(name, value);
5123        return value;
5124      }
5125
5126  @Override
5127  public void removeChild(String name, Base value) throws FHIRException {
5128        if (name.equals("identifier")) {
5129          this.getIdentifier().remove(value);
5130        } else if (name.equals("instantiatesCanonical")) {
5131          this.instantiatesCanonical = null;
5132        } else if (name.equals("instantiatesUri")) {
5133          this.instantiatesUri = null;
5134        } else if (name.equals("basedOn")) {
5135          this.getBasedOn().remove(value);
5136        } else if (name.equals("groupIdentifier")) {
5137          this.groupIdentifier = null;
5138        } else if (name.equals("partOf")) {
5139          this.getPartOf().remove(value);
5140        } else if (name.equals("status")) {
5141          value = new TransportStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
5142          this.status = (Enumeration) value; // Enumeration<TransportStatus>
5143        } else if (name.equals("statusReason")) {
5144          this.statusReason = null;
5145        } else if (name.equals("intent")) {
5146          value = new TransportIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
5147          this.intent = (Enumeration) value; // Enumeration<TransportIntent>
5148        } else if (name.equals("priority")) {
5149          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
5150          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
5151        } else if (name.equals("code")) {
5152          this.code = null;
5153        } else if (name.equals("description")) {
5154          this.description = null;
5155        } else if (name.equals("focus")) {
5156          this.focus = null;
5157        } else if (name.equals("for")) {
5158          this.for_ = null;
5159        } else if (name.equals("encounter")) {
5160          this.encounter = null;
5161        } else if (name.equals("completionTime")) {
5162          this.completionTime = null;
5163        } else if (name.equals("authoredOn")) {
5164          this.authoredOn = null;
5165        } else if (name.equals("lastModified")) {
5166          this.lastModified = null;
5167        } else if (name.equals("requester")) {
5168          this.requester = null;
5169        } else if (name.equals("performerType")) {
5170          this.getPerformerType().remove(value);
5171        } else if (name.equals("owner")) {
5172          this.owner = null;
5173        } else if (name.equals("location")) {
5174          this.location = null;
5175        } else if (name.equals("insurance")) {
5176          this.getInsurance().remove(value);
5177        } else if (name.equals("note")) {
5178          this.getNote().remove(value);
5179        } else if (name.equals("relevantHistory")) {
5180          this.getRelevantHistory().remove(value);
5181        } else if (name.equals("restriction")) {
5182          this.restriction = (TransportRestrictionComponent) value; // TransportRestrictionComponent
5183        } else if (name.equals("input")) {
5184          this.getInput().remove((ParameterComponent) value);
5185        } else if (name.equals("output")) {
5186          this.getOutput().remove((TransportOutputComponent) value);
5187        } else if (name.equals("requestedLocation")) {
5188          this.requestedLocation = null;
5189        } else if (name.equals("currentLocation")) {
5190          this.currentLocation = null;
5191        } else if (name.equals("reason")) {
5192          this.reason = null;
5193        } else if (name.equals("history")) {
5194          this.history = null;
5195        } else
5196          super.removeChild(name, value);
5197        
5198      }
5199
5200      @Override
5201      public Base makeProperty(int hash, String name) throws FHIRException {
5202        switch (hash) {
5203        case -1618432855:  return addIdentifier(); 
5204        case 8911915:  return getInstantiatesCanonicalElement();
5205        case -1926393373:  return getInstantiatesUriElement();
5206        case -332612366:  return addBasedOn(); 
5207        case -445338488:  return getGroupIdentifier();
5208        case -995410646:  return addPartOf(); 
5209        case -892481550:  return getStatusElement();
5210        case 2051346646:  return getStatusReason();
5211        case -1183762788:  return getIntentElement();
5212        case -1165461084:  return getPriorityElement();
5213        case 3059181:  return getCode();
5214        case -1724546052:  return getDescriptionElement();
5215        case 97604824:  return getFocus();
5216        case 101577:  return getFor();
5217        case 1524132147:  return getEncounter();
5218        case 1146641609:  return getCompletionTimeElement();
5219        case -1500852503:  return getAuthoredOnElement();
5220        case 1959003007:  return getLastModifiedElement();
5221        case 693933948:  return getRequester();
5222        case -901444568:  return addPerformerType(); 
5223        case 106164915:  return getOwner();
5224        case 1901043637:  return getLocation();
5225        case 73049818:  return addInsurance(); 
5226        case 3387378:  return addNote(); 
5227        case 1538891575:  return addRelevantHistory(); 
5228        case -1561062452:  return getRestriction();
5229        case 100358090:  return addInput(); 
5230        case -1005512447:  return addOutput(); 
5231        case -1788392125:  return getRequestedLocation();
5232        case -140429234:  return getCurrentLocation();
5233        case -934964668:  return getReason();
5234        case 926934164:  return getHistory();
5235        default: return super.makeProperty(hash, name);
5236        }
5237
5238      }
5239
5240      @Override
5241      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5242        switch (hash) {
5243        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
5244        case 8911915: /*instantiatesCanonical*/ return new String[] {"canonical"};
5245        case -1926393373: /*instantiatesUri*/ return new String[] {"uri"};
5246        case -332612366: /*basedOn*/ return new String[] {"Reference"};
5247        case -445338488: /*groupIdentifier*/ return new String[] {"Identifier"};
5248        case -995410646: /*partOf*/ return new String[] {"Reference"};
5249        case -892481550: /*status*/ return new String[] {"code"};
5250        case 2051346646: /*statusReason*/ return new String[] {"CodeableConcept"};
5251        case -1183762788: /*intent*/ return new String[] {"code"};
5252        case -1165461084: /*priority*/ return new String[] {"code"};
5253        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
5254        case -1724546052: /*description*/ return new String[] {"string"};
5255        case 97604824: /*focus*/ return new String[] {"Reference"};
5256        case 101577: /*for*/ return new String[] {"Reference"};
5257        case 1524132147: /*encounter*/ return new String[] {"Reference"};
5258        case 1146641609: /*completionTime*/ return new String[] {"dateTime"};
5259        case -1500852503: /*authoredOn*/ return new String[] {"dateTime"};
5260        case 1959003007: /*lastModified*/ return new String[] {"dateTime"};
5261        case 693933948: /*requester*/ return new String[] {"Reference"};
5262        case -901444568: /*performerType*/ return new String[] {"CodeableConcept"};
5263        case 106164915: /*owner*/ return new String[] {"Reference"};
5264        case 1901043637: /*location*/ return new String[] {"Reference"};
5265        case 73049818: /*insurance*/ return new String[] {"Reference"};
5266        case 3387378: /*note*/ return new String[] {"Annotation"};
5267        case 1538891575: /*relevantHistory*/ return new String[] {"Reference"};
5268        case -1561062452: /*restriction*/ return new String[] {};
5269        case 100358090: /*input*/ return new String[] {};
5270        case -1005512447: /*output*/ return new String[] {};
5271        case -1788392125: /*requestedLocation*/ return new String[] {"Reference"};
5272        case -140429234: /*currentLocation*/ return new String[] {"Reference"};
5273        case -934964668: /*reason*/ return new String[] {"CodeableReference"};
5274        case 926934164: /*history*/ return new String[] {"Reference"};
5275        default: return super.getTypesForProperty(hash, name);
5276        }
5277
5278      }
5279
5280      @Override
5281      public Base addChild(String name) throws FHIRException {
5282        if (name.equals("identifier")) {
5283          return addIdentifier();
5284        }
5285        else if (name.equals("instantiatesCanonical")) {
5286          throw new FHIRException("Cannot call addChild on a singleton property Transport.instantiatesCanonical");
5287        }
5288        else if (name.equals("instantiatesUri")) {
5289          throw new FHIRException("Cannot call addChild on a singleton property Transport.instantiatesUri");
5290        }
5291        else if (name.equals("basedOn")) {
5292          return addBasedOn();
5293        }
5294        else if (name.equals("groupIdentifier")) {
5295          this.groupIdentifier = new Identifier();
5296          return this.groupIdentifier;
5297        }
5298        else if (name.equals("partOf")) {
5299          return addPartOf();
5300        }
5301        else if (name.equals("status")) {
5302          throw new FHIRException("Cannot call addChild on a singleton property Transport.status");
5303        }
5304        else if (name.equals("statusReason")) {
5305          this.statusReason = new CodeableConcept();
5306          return this.statusReason;
5307        }
5308        else if (name.equals("intent")) {
5309          throw new FHIRException("Cannot call addChild on a singleton property Transport.intent");
5310        }
5311        else if (name.equals("priority")) {
5312          throw new FHIRException("Cannot call addChild on a singleton property Transport.priority");
5313        }
5314        else if (name.equals("code")) {
5315          this.code = new CodeableConcept();
5316          return this.code;
5317        }
5318        else if (name.equals("description")) {
5319          throw new FHIRException("Cannot call addChild on a singleton property Transport.description");
5320        }
5321        else if (name.equals("focus")) {
5322          this.focus = new Reference();
5323          return this.focus;
5324        }
5325        else if (name.equals("for")) {
5326          this.for_ = new Reference();
5327          return this.for_;
5328        }
5329        else if (name.equals("encounter")) {
5330          this.encounter = new Reference();
5331          return this.encounter;
5332        }
5333        else if (name.equals("completionTime")) {
5334          throw new FHIRException("Cannot call addChild on a singleton property Transport.completionTime");
5335        }
5336        else if (name.equals("authoredOn")) {
5337          throw new FHIRException("Cannot call addChild on a singleton property Transport.authoredOn");
5338        }
5339        else if (name.equals("lastModified")) {
5340          throw new FHIRException("Cannot call addChild on a singleton property Transport.lastModified");
5341        }
5342        else if (name.equals("requester")) {
5343          this.requester = new Reference();
5344          return this.requester;
5345        }
5346        else if (name.equals("performerType")) {
5347          return addPerformerType();
5348        }
5349        else if (name.equals("owner")) {
5350          this.owner = new Reference();
5351          return this.owner;
5352        }
5353        else if (name.equals("location")) {
5354          this.location = new Reference();
5355          return this.location;
5356        }
5357        else if (name.equals("insurance")) {
5358          return addInsurance();
5359        }
5360        else if (name.equals("note")) {
5361          return addNote();
5362        }
5363        else if (name.equals("relevantHistory")) {
5364          return addRelevantHistory();
5365        }
5366        else if (name.equals("restriction")) {
5367          this.restriction = new TransportRestrictionComponent();
5368          return this.restriction;
5369        }
5370        else if (name.equals("input")) {
5371          return addInput();
5372        }
5373        else if (name.equals("output")) {
5374          return addOutput();
5375        }
5376        else if (name.equals("requestedLocation")) {
5377          this.requestedLocation = new Reference();
5378          return this.requestedLocation;
5379        }
5380        else if (name.equals("currentLocation")) {
5381          this.currentLocation = new Reference();
5382          return this.currentLocation;
5383        }
5384        else if (name.equals("reason")) {
5385          this.reason = new CodeableReference();
5386          return this.reason;
5387        }
5388        else if (name.equals("history")) {
5389          this.history = new Reference();
5390          return this.history;
5391        }
5392        else
5393          return super.addChild(name);
5394      }
5395
5396  public String fhirType() {
5397    return "Transport";
5398
5399  }
5400
5401      public Transport copy() {
5402        Transport dst = new Transport();
5403        copyValues(dst);
5404        return dst;
5405      }
5406
5407      public void copyValues(Transport dst) {
5408        super.copyValues(dst);
5409        if (identifier != null) {
5410          dst.identifier = new ArrayList<Identifier>();
5411          for (Identifier i : identifier)
5412            dst.identifier.add(i.copy());
5413        };
5414        dst.instantiatesCanonical = instantiatesCanonical == null ? null : instantiatesCanonical.copy();
5415        dst.instantiatesUri = instantiatesUri == null ? null : instantiatesUri.copy();
5416        if (basedOn != null) {
5417          dst.basedOn = new ArrayList<Reference>();
5418          for (Reference i : basedOn)
5419            dst.basedOn.add(i.copy());
5420        };
5421        dst.groupIdentifier = groupIdentifier == null ? null : groupIdentifier.copy();
5422        if (partOf != null) {
5423          dst.partOf = new ArrayList<Reference>();
5424          for (Reference i : partOf)
5425            dst.partOf.add(i.copy());
5426        };
5427        dst.status = status == null ? null : status.copy();
5428        dst.statusReason = statusReason == null ? null : statusReason.copy();
5429        dst.intent = intent == null ? null : intent.copy();
5430        dst.priority = priority == null ? null : priority.copy();
5431        dst.code = code == null ? null : code.copy();
5432        dst.description = description == null ? null : description.copy();
5433        dst.focus = focus == null ? null : focus.copy();
5434        dst.for_ = for_ == null ? null : for_.copy();
5435        dst.encounter = encounter == null ? null : encounter.copy();
5436        dst.completionTime = completionTime == null ? null : completionTime.copy();
5437        dst.authoredOn = authoredOn == null ? null : authoredOn.copy();
5438        dst.lastModified = lastModified == null ? null : lastModified.copy();
5439        dst.requester = requester == null ? null : requester.copy();
5440        if (performerType != null) {
5441          dst.performerType = new ArrayList<CodeableConcept>();
5442          for (CodeableConcept i : performerType)
5443            dst.performerType.add(i.copy());
5444        };
5445        dst.owner = owner == null ? null : owner.copy();
5446        dst.location = location == null ? null : location.copy();
5447        if (insurance != null) {
5448          dst.insurance = new ArrayList<Reference>();
5449          for (Reference i : insurance)
5450            dst.insurance.add(i.copy());
5451        };
5452        if (note != null) {
5453          dst.note = new ArrayList<Annotation>();
5454          for (Annotation i : note)
5455            dst.note.add(i.copy());
5456        };
5457        if (relevantHistory != null) {
5458          dst.relevantHistory = new ArrayList<Reference>();
5459          for (Reference i : relevantHistory)
5460            dst.relevantHistory.add(i.copy());
5461        };
5462        dst.restriction = restriction == null ? null : restriction.copy();
5463        if (input != null) {
5464          dst.input = new ArrayList<ParameterComponent>();
5465          for (ParameterComponent i : input)
5466            dst.input.add(i.copy());
5467        };
5468        if (output != null) {
5469          dst.output = new ArrayList<TransportOutputComponent>();
5470          for (TransportOutputComponent i : output)
5471            dst.output.add(i.copy());
5472        };
5473        dst.requestedLocation = requestedLocation == null ? null : requestedLocation.copy();
5474        dst.currentLocation = currentLocation == null ? null : currentLocation.copy();
5475        dst.reason = reason == null ? null : reason.copy();
5476        dst.history = history == null ? null : history.copy();
5477      }
5478
5479      protected Transport typedCopy() {
5480        return copy();
5481      }
5482
5483      @Override
5484      public boolean equalsDeep(Base other_) {
5485        if (!super.equalsDeep(other_))
5486          return false;
5487        if (!(other_ instanceof Transport))
5488          return false;
5489        Transport o = (Transport) other_;
5490        return compareDeep(identifier, o.identifier, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true)
5491           && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(basedOn, o.basedOn, true)
5492           && compareDeep(groupIdentifier, o.groupIdentifier, true) && compareDeep(partOf, o.partOf, true)
5493           && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true) && compareDeep(intent, o.intent, true)
5494           && compareDeep(priority, o.priority, true) && compareDeep(code, o.code, true) && compareDeep(description, o.description, true)
5495           && compareDeep(focus, o.focus, true) && compareDeep(for_, o.for_, true) && compareDeep(encounter, o.encounter, true)
5496           && compareDeep(completionTime, o.completionTime, true) && compareDeep(authoredOn, o.authoredOn, true)
5497           && compareDeep(lastModified, o.lastModified, true) && compareDeep(requester, o.requester, true)
5498           && compareDeep(performerType, o.performerType, true) && compareDeep(owner, o.owner, true) && compareDeep(location, o.location, true)
5499           && compareDeep(insurance, o.insurance, true) && compareDeep(note, o.note, true) && compareDeep(relevantHistory, o.relevantHistory, true)
5500           && compareDeep(restriction, o.restriction, true) && compareDeep(input, o.input, true) && compareDeep(output, o.output, true)
5501           && compareDeep(requestedLocation, o.requestedLocation, true) && compareDeep(currentLocation, o.currentLocation, true)
5502           && compareDeep(reason, o.reason, true) && compareDeep(history, o.history, true);
5503      }
5504
5505      @Override
5506      public boolean equalsShallow(Base other_) {
5507        if (!super.equalsShallow(other_))
5508          return false;
5509        if (!(other_ instanceof Transport))
5510          return false;
5511        Transport o = (Transport) other_;
5512        return compareValues(instantiatesCanonical, o.instantiatesCanonical, true) && compareValues(instantiatesUri, o.instantiatesUri, true)
5513           && compareValues(status, o.status, true) && compareValues(intent, o.intent, true) && compareValues(priority, o.priority, true)
5514           && compareValues(description, o.description, true) && compareValues(completionTime, o.completionTime, true)
5515           && compareValues(authoredOn, o.authoredOn, true) && compareValues(lastModified, o.lastModified, true)
5516          ;
5517      }
5518
5519      public boolean isEmpty() {
5520        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical
5521          , instantiatesUri, basedOn, groupIdentifier, partOf, status, statusReason, intent
5522          , priority, code, description, focus, for_, encounter, completionTime, authoredOn
5523          , lastModified, requester, performerType, owner, location, insurance, note, relevantHistory
5524          , restriction, input, output, requestedLocation, currentLocation, reason, history
5525          );
5526      }
5527
5528  @Override
5529  public ResourceType getResourceType() {
5530    return ResourceType.Transport;
5531   }
5532
5533 /**
5534   * Search parameter: <b>identifier</b>
5535   * <p>
5536   * Description: <b>External identifier</b><br>
5537   * Type: <b>token</b><br>
5538   * Path: <b>Transport.identifier</b><br>
5539   * </p>
5540   */
5541  @SearchParamDefinition(name="identifier", path="Transport.identifier", description="External identifier", type="token" )
5542  public static final String SP_IDENTIFIER = "identifier";
5543 /**
5544   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
5545   * <p>
5546   * Description: <b>External identifier</b><br>
5547   * Type: <b>token</b><br>
5548   * Path: <b>Transport.identifier</b><br>
5549   * </p>
5550   */
5551  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
5552
5553 /**
5554   * Search parameter: <b>status</b>
5555   * <p>
5556   * Description: <b>in-progress | completed | entered-in-error</b><br>
5557   * Type: <b>token</b><br>
5558   * Path: <b>Transport.status</b><br>
5559   * </p>
5560   */
5561  @SearchParamDefinition(name="status", path="Transport.status", description="in-progress | completed | entered-in-error", type="token" )
5562  public static final String SP_STATUS = "status";
5563 /**
5564   * <b>Fluent Client</b> search parameter constant for <b>status</b>
5565   * <p>
5566   * Description: <b>in-progress | completed | entered-in-error</b><br>
5567   * Type: <b>token</b><br>
5568   * Path: <b>Transport.status</b><br>
5569   * </p>
5570   */
5571  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
5572
5573
5574}
5575