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 Fri, Jul 15, 2022 11:20+1000 for FHIR v5.0.0-snapshot2
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 * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
052 */
053@ResourceDef(name="TestScript", profile="http://hl7.org/fhir/StructureDefinition/TestScript")
054public class TestScript extends CanonicalResource {
055
056    public enum AssertionDirectionType {
057        /**
058         * The assertion is evaluated on the response. This is the default value.
059         */
060        RESPONSE, 
061        /**
062         * The assertion is evaluated on the request.
063         */
064        REQUEST, 
065        /**
066         * added to help the parsers with the generic types
067         */
068        NULL;
069        public static AssertionDirectionType fromCode(String codeString) throws FHIRException {
070            if (codeString == null || "".equals(codeString))
071                return null;
072        if ("response".equals(codeString))
073          return RESPONSE;
074        if ("request".equals(codeString))
075          return REQUEST;
076        if (Configuration.isAcceptInvalidEnums())
077          return null;
078        else
079          throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'");
080        }
081        public String toCode() {
082          switch (this) {
083            case RESPONSE: return "response";
084            case REQUEST: return "request";
085            case NULL: return null;
086            default: return "?";
087          }
088        }
089        public String getSystem() {
090          switch (this) {
091            case RESPONSE: return "http://hl7.org/fhir/assert-direction-codes";
092            case REQUEST: return "http://hl7.org/fhir/assert-direction-codes";
093            case NULL: return null;
094            default: return "?";
095          }
096        }
097        public String getDefinition() {
098          switch (this) {
099            case RESPONSE: return "The assertion is evaluated on the response. This is the default value.";
100            case REQUEST: return "The assertion is evaluated on the request.";
101            case NULL: return null;
102            default: return "?";
103          }
104        }
105        public String getDisplay() {
106          switch (this) {
107            case RESPONSE: return "response";
108            case REQUEST: return "request";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113    }
114
115  public static class AssertionDirectionTypeEnumFactory implements EnumFactory<AssertionDirectionType> {
116    public AssertionDirectionType fromCode(String codeString) throws IllegalArgumentException {
117      if (codeString == null || "".equals(codeString))
118            if (codeString == null || "".equals(codeString))
119                return null;
120        if ("response".equals(codeString))
121          return AssertionDirectionType.RESPONSE;
122        if ("request".equals(codeString))
123          return AssertionDirectionType.REQUEST;
124        throw new IllegalArgumentException("Unknown AssertionDirectionType code '"+codeString+"'");
125        }
126        public Enumeration<AssertionDirectionType> fromType(Base code) throws FHIRException {
127          if (code == null)
128            return null;
129          if (code.isEmpty())
130            return new Enumeration<AssertionDirectionType>(this);
131          String codeString = ((PrimitiveType) code).asStringValue();
132          if (codeString == null || "".equals(codeString))
133            return null;
134        if ("response".equals(codeString))
135          return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.RESPONSE);
136        if ("request".equals(codeString))
137          return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.REQUEST);
138        throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'");
139        }
140    public String toCode(AssertionDirectionType code) {
141      if (code == AssertionDirectionType.RESPONSE)
142        return "response";
143      if (code == AssertionDirectionType.REQUEST)
144        return "request";
145      return "?";
146      }
147    public String toSystem(AssertionDirectionType code) {
148      return code.getSystem();
149      }
150    }
151
152    public enum AssertionOperatorType {
153        /**
154         * Default value. Equals comparison.
155         */
156        EQUALS, 
157        /**
158         * Not equals comparison.
159         */
160        NOTEQUALS, 
161        /**
162         * Compare value within a known set of values.
163         */
164        IN, 
165        /**
166         * Compare value not within a known set of values.
167         */
168        NOTIN, 
169        /**
170         * Compare value to be greater than a known value.
171         */
172        GREATERTHAN, 
173        /**
174         * Compare value to be less than a known value.
175         */
176        LESSTHAN, 
177        /**
178         * Compare value is empty.
179         */
180        EMPTY, 
181        /**
182         * Compare value is not empty.
183         */
184        NOTEMPTY, 
185        /**
186         * Compare value string contains a known value.
187         */
188        CONTAINS, 
189        /**
190         * Compare value string does not contain a known value.
191         */
192        NOTCONTAINS, 
193        /**
194         * Evaluate the FHIRPath expression as a boolean condition.
195         */
196        EVAL, 
197        /**
198         * added to help the parsers with the generic types
199         */
200        NULL;
201        public static AssertionOperatorType fromCode(String codeString) throws FHIRException {
202            if (codeString == null || "".equals(codeString))
203                return null;
204        if ("equals".equals(codeString))
205          return EQUALS;
206        if ("notEquals".equals(codeString))
207          return NOTEQUALS;
208        if ("in".equals(codeString))
209          return IN;
210        if ("notIn".equals(codeString))
211          return NOTIN;
212        if ("greaterThan".equals(codeString))
213          return GREATERTHAN;
214        if ("lessThan".equals(codeString))
215          return LESSTHAN;
216        if ("empty".equals(codeString))
217          return EMPTY;
218        if ("notEmpty".equals(codeString))
219          return NOTEMPTY;
220        if ("contains".equals(codeString))
221          return CONTAINS;
222        if ("notContains".equals(codeString))
223          return NOTCONTAINS;
224        if ("eval".equals(codeString))
225          return EVAL;
226        if (Configuration.isAcceptInvalidEnums())
227          return null;
228        else
229          throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'");
230        }
231        public String toCode() {
232          switch (this) {
233            case EQUALS: return "equals";
234            case NOTEQUALS: return "notEquals";
235            case IN: return "in";
236            case NOTIN: return "notIn";
237            case GREATERTHAN: return "greaterThan";
238            case LESSTHAN: return "lessThan";
239            case EMPTY: return "empty";
240            case NOTEMPTY: return "notEmpty";
241            case CONTAINS: return "contains";
242            case NOTCONTAINS: return "notContains";
243            case EVAL: return "eval";
244            case NULL: return null;
245            default: return "?";
246          }
247        }
248        public String getSystem() {
249          switch (this) {
250            case EQUALS: return "http://hl7.org/fhir/assert-operator-codes";
251            case NOTEQUALS: return "http://hl7.org/fhir/assert-operator-codes";
252            case IN: return "http://hl7.org/fhir/assert-operator-codes";
253            case NOTIN: return "http://hl7.org/fhir/assert-operator-codes";
254            case GREATERTHAN: return "http://hl7.org/fhir/assert-operator-codes";
255            case LESSTHAN: return "http://hl7.org/fhir/assert-operator-codes";
256            case EMPTY: return "http://hl7.org/fhir/assert-operator-codes";
257            case NOTEMPTY: return "http://hl7.org/fhir/assert-operator-codes";
258            case CONTAINS: return "http://hl7.org/fhir/assert-operator-codes";
259            case NOTCONTAINS: return "http://hl7.org/fhir/assert-operator-codes";
260            case EVAL: return "http://hl7.org/fhir/assert-operator-codes";
261            case NULL: return null;
262            default: return "?";
263          }
264        }
265        public String getDefinition() {
266          switch (this) {
267            case EQUALS: return "Default value. Equals comparison.";
268            case NOTEQUALS: return "Not equals comparison.";
269            case IN: return "Compare value within a known set of values.";
270            case NOTIN: return "Compare value not within a known set of values.";
271            case GREATERTHAN: return "Compare value to be greater than a known value.";
272            case LESSTHAN: return "Compare value to be less than a known value.";
273            case EMPTY: return "Compare value is empty.";
274            case NOTEMPTY: return "Compare value is not empty.";
275            case CONTAINS: return "Compare value string contains a known value.";
276            case NOTCONTAINS: return "Compare value string does not contain a known value.";
277            case EVAL: return "Evaluate the FHIRPath expression as a boolean condition.";
278            case NULL: return null;
279            default: return "?";
280          }
281        }
282        public String getDisplay() {
283          switch (this) {
284            case EQUALS: return "equals";
285            case NOTEQUALS: return "notEquals";
286            case IN: return "in";
287            case NOTIN: return "notIn";
288            case GREATERTHAN: return "greaterThan";
289            case LESSTHAN: return "lessThan";
290            case EMPTY: return "empty";
291            case NOTEMPTY: return "notEmpty";
292            case CONTAINS: return "contains";
293            case NOTCONTAINS: return "notContains";
294            case EVAL: return "evaluate";
295            case NULL: return null;
296            default: return "?";
297          }
298        }
299    }
300
301  public static class AssertionOperatorTypeEnumFactory implements EnumFactory<AssertionOperatorType> {
302    public AssertionOperatorType fromCode(String codeString) throws IllegalArgumentException {
303      if (codeString == null || "".equals(codeString))
304            if (codeString == null || "".equals(codeString))
305                return null;
306        if ("equals".equals(codeString))
307          return AssertionOperatorType.EQUALS;
308        if ("notEquals".equals(codeString))
309          return AssertionOperatorType.NOTEQUALS;
310        if ("in".equals(codeString))
311          return AssertionOperatorType.IN;
312        if ("notIn".equals(codeString))
313          return AssertionOperatorType.NOTIN;
314        if ("greaterThan".equals(codeString))
315          return AssertionOperatorType.GREATERTHAN;
316        if ("lessThan".equals(codeString))
317          return AssertionOperatorType.LESSTHAN;
318        if ("empty".equals(codeString))
319          return AssertionOperatorType.EMPTY;
320        if ("notEmpty".equals(codeString))
321          return AssertionOperatorType.NOTEMPTY;
322        if ("contains".equals(codeString))
323          return AssertionOperatorType.CONTAINS;
324        if ("notContains".equals(codeString))
325          return AssertionOperatorType.NOTCONTAINS;
326        if ("eval".equals(codeString))
327          return AssertionOperatorType.EVAL;
328        throw new IllegalArgumentException("Unknown AssertionOperatorType code '"+codeString+"'");
329        }
330        public Enumeration<AssertionOperatorType> fromType(Base code) throws FHIRException {
331          if (code == null)
332            return null;
333          if (code.isEmpty())
334            return new Enumeration<AssertionOperatorType>(this);
335          String codeString = ((PrimitiveType) code).asStringValue();
336          if (codeString == null || "".equals(codeString))
337            return null;
338        if ("equals".equals(codeString))
339          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EQUALS);
340        if ("notEquals".equals(codeString))
341          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEQUALS);
342        if ("in".equals(codeString))
343          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.IN);
344        if ("notIn".equals(codeString))
345          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTIN);
346        if ("greaterThan".equals(codeString))
347          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.GREATERTHAN);
348        if ("lessThan".equals(codeString))
349          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.LESSTHAN);
350        if ("empty".equals(codeString))
351          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EMPTY);
352        if ("notEmpty".equals(codeString))
353          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEMPTY);
354        if ("contains".equals(codeString))
355          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.CONTAINS);
356        if ("notContains".equals(codeString))
357          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTCONTAINS);
358        if ("eval".equals(codeString))
359          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EVAL);
360        throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'");
361        }
362    public String toCode(AssertionOperatorType code) {
363      if (code == AssertionOperatorType.EQUALS)
364        return "equals";
365      if (code == AssertionOperatorType.NOTEQUALS)
366        return "notEquals";
367      if (code == AssertionOperatorType.IN)
368        return "in";
369      if (code == AssertionOperatorType.NOTIN)
370        return "notIn";
371      if (code == AssertionOperatorType.GREATERTHAN)
372        return "greaterThan";
373      if (code == AssertionOperatorType.LESSTHAN)
374        return "lessThan";
375      if (code == AssertionOperatorType.EMPTY)
376        return "empty";
377      if (code == AssertionOperatorType.NOTEMPTY)
378        return "notEmpty";
379      if (code == AssertionOperatorType.CONTAINS)
380        return "contains";
381      if (code == AssertionOperatorType.NOTCONTAINS)
382        return "notContains";
383      if (code == AssertionOperatorType.EVAL)
384        return "eval";
385      return "?";
386      }
387    public String toSystem(AssertionOperatorType code) {
388      return code.getSystem();
389      }
390    }
391
392    public enum AssertionResponseTypes {
393        /**
394         * Response code is 200.
395         */
396        OKAY, 
397        /**
398         * Response code is 201.
399         */
400        CREATED, 
401        /**
402         * Response code is 204.
403         */
404        NOCONTENT, 
405        /**
406         * Response code is 304.
407         */
408        NOTMODIFIED, 
409        /**
410         * Response code is 400.
411         */
412        BAD, 
413        /**
414         * Response code is 403.
415         */
416        FORBIDDEN, 
417        /**
418         * Response code is 404.
419         */
420        NOTFOUND, 
421        /**
422         * Response code is 405.
423         */
424        METHODNOTALLOWED, 
425        /**
426         * Response code is 409.
427         */
428        CONFLICT, 
429        /**
430         * Response code is 410.
431         */
432        GONE, 
433        /**
434         * Response code is 412.
435         */
436        PRECONDITIONFAILED, 
437        /**
438         * Response code is 422.
439         */
440        UNPROCESSABLE, 
441        /**
442         * added to help the parsers with the generic types
443         */
444        NULL;
445        public static AssertionResponseTypes fromCode(String codeString) throws FHIRException {
446            if (codeString == null || "".equals(codeString))
447                return null;
448        if ("okay".equals(codeString))
449          return OKAY;
450        if ("created".equals(codeString))
451          return CREATED;
452        if ("noContent".equals(codeString))
453          return NOCONTENT;
454        if ("notModified".equals(codeString))
455          return NOTMODIFIED;
456        if ("bad".equals(codeString))
457          return BAD;
458        if ("forbidden".equals(codeString))
459          return FORBIDDEN;
460        if ("notFound".equals(codeString))
461          return NOTFOUND;
462        if ("methodNotAllowed".equals(codeString))
463          return METHODNOTALLOWED;
464        if ("conflict".equals(codeString))
465          return CONFLICT;
466        if ("gone".equals(codeString))
467          return GONE;
468        if ("preconditionFailed".equals(codeString))
469          return PRECONDITIONFAILED;
470        if ("unprocessable".equals(codeString))
471          return UNPROCESSABLE;
472        if (Configuration.isAcceptInvalidEnums())
473          return null;
474        else
475          throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'");
476        }
477        public String toCode() {
478          switch (this) {
479            case OKAY: return "okay";
480            case CREATED: return "created";
481            case NOCONTENT: return "noContent";
482            case NOTMODIFIED: return "notModified";
483            case BAD: return "bad";
484            case FORBIDDEN: return "forbidden";
485            case NOTFOUND: return "notFound";
486            case METHODNOTALLOWED: return "methodNotAllowed";
487            case CONFLICT: return "conflict";
488            case GONE: return "gone";
489            case PRECONDITIONFAILED: return "preconditionFailed";
490            case UNPROCESSABLE: return "unprocessable";
491            case NULL: return null;
492            default: return "?";
493          }
494        }
495        public String getSystem() {
496          switch (this) {
497            case OKAY: return "http://hl7.org/fhir/assert-response-code-types";
498            case CREATED: return "http://hl7.org/fhir/assert-response-code-types";
499            case NOCONTENT: return "http://hl7.org/fhir/assert-response-code-types";
500            case NOTMODIFIED: return "http://hl7.org/fhir/assert-response-code-types";
501            case BAD: return "http://hl7.org/fhir/assert-response-code-types";
502            case FORBIDDEN: return "http://hl7.org/fhir/assert-response-code-types";
503            case NOTFOUND: return "http://hl7.org/fhir/assert-response-code-types";
504            case METHODNOTALLOWED: return "http://hl7.org/fhir/assert-response-code-types";
505            case CONFLICT: return "http://hl7.org/fhir/assert-response-code-types";
506            case GONE: return "http://hl7.org/fhir/assert-response-code-types";
507            case PRECONDITIONFAILED: return "http://hl7.org/fhir/assert-response-code-types";
508            case UNPROCESSABLE: return "http://hl7.org/fhir/assert-response-code-types";
509            case NULL: return null;
510            default: return "?";
511          }
512        }
513        public String getDefinition() {
514          switch (this) {
515            case OKAY: return "Response code is 200.";
516            case CREATED: return "Response code is 201.";
517            case NOCONTENT: return "Response code is 204.";
518            case NOTMODIFIED: return "Response code is 304.";
519            case BAD: return "Response code is 400.";
520            case FORBIDDEN: return "Response code is 403.";
521            case NOTFOUND: return "Response code is 404.";
522            case METHODNOTALLOWED: return "Response code is 405.";
523            case CONFLICT: return "Response code is 409.";
524            case GONE: return "Response code is 410.";
525            case PRECONDITIONFAILED: return "Response code is 412.";
526            case UNPROCESSABLE: return "Response code is 422.";
527            case NULL: return null;
528            default: return "?";
529          }
530        }
531        public String getDisplay() {
532          switch (this) {
533            case OKAY: return "okay";
534            case CREATED: return "created";
535            case NOCONTENT: return "noContent";
536            case NOTMODIFIED: return "notModified";
537            case BAD: return "bad";
538            case FORBIDDEN: return "forbidden";
539            case NOTFOUND: return "notFound";
540            case METHODNOTALLOWED: return "methodNotAllowed";
541            case CONFLICT: return "conflict";
542            case GONE: return "gone";
543            case PRECONDITIONFAILED: return "preconditionFailed";
544            case UNPROCESSABLE: return "unprocessable";
545            case NULL: return null;
546            default: return "?";
547          }
548        }
549    }
550
551  public static class AssertionResponseTypesEnumFactory implements EnumFactory<AssertionResponseTypes> {
552    public AssertionResponseTypes fromCode(String codeString) throws IllegalArgumentException {
553      if (codeString == null || "".equals(codeString))
554            if (codeString == null || "".equals(codeString))
555                return null;
556        if ("okay".equals(codeString))
557          return AssertionResponseTypes.OKAY;
558        if ("created".equals(codeString))
559          return AssertionResponseTypes.CREATED;
560        if ("noContent".equals(codeString))
561          return AssertionResponseTypes.NOCONTENT;
562        if ("notModified".equals(codeString))
563          return AssertionResponseTypes.NOTMODIFIED;
564        if ("bad".equals(codeString))
565          return AssertionResponseTypes.BAD;
566        if ("forbidden".equals(codeString))
567          return AssertionResponseTypes.FORBIDDEN;
568        if ("notFound".equals(codeString))
569          return AssertionResponseTypes.NOTFOUND;
570        if ("methodNotAllowed".equals(codeString))
571          return AssertionResponseTypes.METHODNOTALLOWED;
572        if ("conflict".equals(codeString))
573          return AssertionResponseTypes.CONFLICT;
574        if ("gone".equals(codeString))
575          return AssertionResponseTypes.GONE;
576        if ("preconditionFailed".equals(codeString))
577          return AssertionResponseTypes.PRECONDITIONFAILED;
578        if ("unprocessable".equals(codeString))
579          return AssertionResponseTypes.UNPROCESSABLE;
580        throw new IllegalArgumentException("Unknown AssertionResponseTypes code '"+codeString+"'");
581        }
582        public Enumeration<AssertionResponseTypes> fromType(Base code) throws FHIRException {
583          if (code == null)
584            return null;
585          if (code.isEmpty())
586            return new Enumeration<AssertionResponseTypes>(this);
587          String codeString = ((PrimitiveType) code).asStringValue();
588          if (codeString == null || "".equals(codeString))
589            return null;
590        if ("okay".equals(codeString))
591          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.OKAY);
592        if ("created".equals(codeString))
593          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CREATED);
594        if ("noContent".equals(codeString))
595          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOCONTENT);
596        if ("notModified".equals(codeString))
597          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTMODIFIED);
598        if ("bad".equals(codeString))
599          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.BAD);
600        if ("forbidden".equals(codeString))
601          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.FORBIDDEN);
602        if ("notFound".equals(codeString))
603          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTFOUND);
604        if ("methodNotAllowed".equals(codeString))
605          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.METHODNOTALLOWED);
606        if ("conflict".equals(codeString))
607          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CONFLICT);
608        if ("gone".equals(codeString))
609          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.GONE);
610        if ("preconditionFailed".equals(codeString))
611          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.PRECONDITIONFAILED);
612        if ("unprocessable".equals(codeString))
613          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.UNPROCESSABLE);
614        throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'");
615        }
616    public String toCode(AssertionResponseTypes code) {
617      if (code == AssertionResponseTypes.OKAY)
618        return "okay";
619      if (code == AssertionResponseTypes.CREATED)
620        return "created";
621      if (code == AssertionResponseTypes.NOCONTENT)
622        return "noContent";
623      if (code == AssertionResponseTypes.NOTMODIFIED)
624        return "notModified";
625      if (code == AssertionResponseTypes.BAD)
626        return "bad";
627      if (code == AssertionResponseTypes.FORBIDDEN)
628        return "forbidden";
629      if (code == AssertionResponseTypes.NOTFOUND)
630        return "notFound";
631      if (code == AssertionResponseTypes.METHODNOTALLOWED)
632        return "methodNotAllowed";
633      if (code == AssertionResponseTypes.CONFLICT)
634        return "conflict";
635      if (code == AssertionResponseTypes.GONE)
636        return "gone";
637      if (code == AssertionResponseTypes.PRECONDITIONFAILED)
638        return "preconditionFailed";
639      if (code == AssertionResponseTypes.UNPROCESSABLE)
640        return "unprocessable";
641      return "?";
642      }
643    public String toSystem(AssertionResponseTypes code) {
644      return code.getSystem();
645      }
646    }
647
648    public enum FHIRDefinedType {
649        /**
650         * An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.
651         */
652        ADDRESS, 
653        /**
654         * A duration of time during which an organism (or a process) has existed.
655         */
656        AGE, 
657        /**
658         * A  text note which also  contains information about who made the statement and when.
659         */
660        ANNOTATION, 
661        /**
662         * For referring to data content defined in other formats.
663         */
664        ATTACHMENT, 
665        /**
666         * Base definition for all elements that are defined inside a resource - but not those in a data type.
667         */
668        BACKBONEELEMENT, 
669        /**
670         * Base definition for the few data types that are allowed to carry modifier extensions.
671         */
672        BACKBONETYPE, 
673        /**
674         * Base definition for all types defined in FHIR type system.
675         */
676        BASE, 
677        /**
678         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
679         */
680        CODEABLECONCEPT, 
681        /**
682         * A reference to a resource (by instance), or instead, a reference to a concept defined in a terminology or ontology (by class).
683         */
684        CODEABLEREFERENCE, 
685        /**
686         * A reference to a code defined by a terminology system.
687         */
688        CODING, 
689        /**
690         * Specifies contact information for a person or organization.
691         */
692        CONTACTDETAIL, 
693        /**
694         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
695         */
696        CONTACTPOINT, 
697        /**
698         * A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.
699         */
700        CONTRIBUTOR, 
701        /**
702         * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.
703         */
704        COUNT, 
705        /**
706         * Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.
707         */
708        DATAREQUIREMENT, 
709        /**
710         * The base class for all re-useable types defined as part of the FHIR Specification.
711         */
712        DATATYPE, 
713        /**
714         * A length - a value with a unit that is a physical distance.
715         */
716        DISTANCE, 
717        /**
718         * Indicates how the medication is/was taken or should be taken by the patient.
719         */
720        DOSAGE, 
721        /**
722         * A length of time.
723         */
724        DURATION, 
725        /**
726         * Base definition for all elements in a resource.
727         */
728        ELEMENT, 
729        /**
730         * Captures constraints on each element within the resource, profile, or extension.
731         */
732        ELEMENTDEFINITION, 
733        /**
734         * A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used.
735         */
736        EXPRESSION, 
737        /**
738         * Specifies contact information for a specific purpose over a period of time, might be handled/monitored by a specific named person or organization.
739         */
740        EXTENDEDCONTACTDETAIL, 
741        /**
742         * Optional Extension Element - found in all resources.
743         */
744        EXTENSION, 
745        /**
746         * A human's name with the ability to identify parts and usage.
747         */
748        HUMANNAME, 
749        /**
750         * An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.
751         */
752        IDENTIFIER, 
753        /**
754         * The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.
755         */
756        MARKETINGSTATUS, 
757        /**
758         * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
759         */
760        META, 
761        /**
762         * An amount of economic utility in some recognized currency.
763         */
764        MONEY, 
765        /**
766         * 
767         */
768        MONEYQUANTITY, 
769        /**
770         * A human-readable summary of the resource conveying the essential clinical and business information for the resource.
771         */
772        NARRATIVE, 
773        /**
774         * The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.
775         */
776        PARAMETERDEFINITION, 
777        /**
778         * A time period defined by a start and end date and optionally time.
779         */
780        PERIOD, 
781        /**
782         * A populatioof people with some set of grouping criteria.
783         */
784        POPULATION, 
785        /**
786         * The base type for all re-useable types defined that have a simple property.
787         */
788        PRIMITIVETYPE, 
789        /**
790         * The shelf-life and storage information for a medicinal product item or container can be described using this class.
791         */
792        PRODUCTSHELFLIFE, 
793        /**
794         * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.
795         */
796        QUANTITY, 
797        /**
798         * A set of ordered Quantities defined by a low and high limit.
799         */
800        RANGE, 
801        /**
802         * A relationship of two Quantity values - expressed as a numerator and a denominator.
803         */
804        RATIO, 
805        /**
806         * A range of ratios expressed as a low and high numerator and a denominator.
807         */
808        RATIORANGE, 
809        /**
810         * A reference from one resource to another.
811         */
812        REFERENCE, 
813        /**
814         * Related artifacts such as additional documentation, justification, or bibliographic references.
815         */
816        RELATEDARTIFACT, 
817        /**
818         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
819         */
820        SAMPLEDDATA, 
821        /**
822         * A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.
823         */
824        SIGNATURE, 
825        /**
826         * 
827         */
828        SIMPLEQUANTITY, 
829        /**
830         * Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.
831         */
832        TIMING, 
833        /**
834         * A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.
835         */
836        TRIGGERDEFINITION, 
837        /**
838         * Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).
839         */
840        USAGECONTEXT, 
841        /**
842         * A stream of bytes
843         */
844        BASE64BINARY, 
845        /**
846         * Value of \"true\" or \"false\"
847         */
848        BOOLEAN, 
849        /**
850         * A URI that is a reference to a canonical URL on a FHIR resource
851         */
852        CANONICAL, 
853        /**
854         * A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents
855         */
856        CODE, 
857        /**
858         * A date or partial date (e.g. just year or year + month). There is no UTC offset. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.
859         */
860        DATE, 
861        /**
862         * A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a UTC offset SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.
863         */
864        DATETIME, 
865        /**
866         * A rational number with implicit precision
867         */
868        DECIMAL, 
869        /**
870         * Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.
871         */
872        ID, 
873        /**
874         * An instant in time - known at least to the second
875         */
876        INSTANT, 
877        /**
878         * A whole number
879         */
880        INTEGER, 
881        /**
882         * A very large whole number
883         */
884        INTEGER64, 
885        /**
886         * A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine
887         */
888        MARKDOWN, 
889        /**
890         * An OID represented as a URI
891         */
892        OID, 
893        /**
894         * An integer with a value that is positive (e.g. >0)
895         */
896        POSITIVEINT, 
897        /**
898         * A sequence of Unicode characters
899         */
900        STRING, 
901        /**
902         * A time during the day, with no date specified
903         */
904        TIME, 
905        /**
906         * An integer with a value that is not negative (e.g. >= 0)
907         */
908        UNSIGNEDINT, 
909        /**
910         * String of characters used to identify a name or a resource
911         */
912        URI, 
913        /**
914         * A URI that is a literal reference
915         */
916        URL, 
917        /**
918         * A UUID, represented as a URI
919         */
920        UUID, 
921        /**
922         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
923         */
924        XHTML, 
925        /**
926         * --- Abstract Type! ---This is the base resource type for everything.
927         */
928        RESOURCE, 
929        /**
930         * A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.
931         */
932        BINARY, 
933        /**
934         * A container for a collection of resources.
935         */
936        BUNDLE, 
937        /**
938         * --- Abstract Type! ---A resource that includes narrative, extensions, and contained resources.
939         */
940        DOMAINRESOURCE, 
941        /**
942         * A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.
943         */
944        ACCOUNT, 
945        /**
946         * A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed).
947         */
948        ADMINISTRABLEPRODUCTDEFINITION, 
949        /**
950         * An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research subject.  The unintended effects may require additional monitoring, treatment or hospitalization or may result in death.  The AdverseEvent resource also extends to potential or avoided events that could have had such effects.
951         */
952        ADVERSEEVENT, 
953        /**
954         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
955         */
956        ALLERGYINTOLERANCE, 
957        /**
958         * A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).
959         */
960        APPOINTMENT, 
961        /**
962         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
963         */
964        APPOINTMENTRESPONSE, 
965        /**
966         * This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content.
967         */
968        ARTIFACTASSESSMENT, 
969        /**
970         * A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.
971         */
972        AUDITEVENT, 
973        /**
974         * Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.
975         */
976        BASIC, 
977        /**
978         * A biological material originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity.
979         */
980        BIOLOGICALLYDERIVEDPRODUCT, 
981        /**
982         * Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.
983         */
984        BODYSTRUCTURE, 
985        /**
986         * --- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.
987         */
988        CANONICALRESOURCE, 
989        /**
990         * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
991         */
992        CAPABILITYSTATEMENT, 
993        /**
994         * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
995         */
996        CAPABILITYSTATEMENT2, 
997        /**
998         * The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.
999         */
1000        CODESYSTEM, 
1001        /**
1002         * A compartment definition that defines how resources are accessed on a server.
1003         */
1004        COMPARTMENTDEFINITION, 
1005        /**
1006         * Example of workflow instance.
1007         */
1008        EXAMPLESCENARIO, 
1009        /**
1010         * A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.
1011         */
1012        GRAPHDEFINITION, 
1013        /**
1014         * A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.
1015         */
1016        IMPLEMENTATIONGUIDE, 
1017        /**
1018         * Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.
1019         */
1020        MESSAGEDEFINITION, 
1021        /**
1022         * --- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.
1023         */
1024        METADATARESOURCE, 
1025        /**
1026         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
1027         */
1028        ACTIVITYDEFINITION, 
1029        /**
1030         * The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.
1031         */
1032        CHARGEITEMDEFINITION, 
1033        /**
1034         * The Citation Resource enables reference to any knowledge artifact for purposes of identification and attribution. The Citation Resource supports existing reference structures and developing publication practices such as versioning, expressing complex contributorship roles, and referencing computable resources.
1035         */
1036        CITATION, 
1037        /**
1038         * A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.
1039         */
1040        CONCEPTMAP, 
1041        /**
1042         * A definition of a condition and information relevant to managing it.
1043         */
1044        CONDITIONDEFINITION, 
1045        /**
1046         * The EventDefinition resource provides a reusable description of when a particular event can occur.
1047         */
1048        EVENTDEFINITION, 
1049        /**
1050         * The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.
1051         */
1052        EVIDENCE, 
1053        /**
1054         * The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.
1055         */
1056        EVIDENCEREPORT, 
1057        /**
1058         * The EvidenceVariable resource describes an element that knowledge (Evidence) is about.
1059         */
1060        EVIDENCEVARIABLE, 
1061        /**
1062         * The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.
1063         */
1064        LIBRARY, 
1065        /**
1066         * The Measure resource provides the definition of a quality measure.
1067         */
1068        MEASURE, 
1069        /**
1070         * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a \"System\" used within the Identifier and Coding data types.
1071         */
1072        NAMINGSYSTEM, 
1073        /**
1074         * This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.
1075         */
1076        PLANDEFINITION, 
1077        /**
1078         * A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.
1079         */
1080        QUESTIONNAIRE, 
1081        /**
1082         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
1083         */
1084        OPERATIONDEFINITION, 
1085        /**
1086         * A search parameter that defines a named search item that can be used to search/filter on a resource.
1087         */
1088        SEARCHPARAMETER, 
1089        /**
1090         * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.
1091         */
1092        STRUCTUREDEFINITION, 
1093        /**
1094         * A Map of relationships between 2 structures that can be used to transform data.
1095         */
1096        STRUCTUREMAP, 
1097        /**
1098         * Describes a stream of resource state changes identified by trigger criteria and annotated with labels useful to filter projections from this topic.
1099         */
1100        SUBSCRIPTIONTOPIC, 
1101        /**
1102         * A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
1103         */
1104        TERMINOLOGYCAPABILITIES, 
1105        /**
1106         * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
1107         */
1108        TESTSCRIPT, 
1109        /**
1110         * A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).
1111         */
1112        VALUESET, 
1113        /**
1114         * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.
1115         */
1116        CAREPLAN, 
1117        /**
1118         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care.
1119         */
1120        CARETEAM, 
1121        /**
1122         * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.
1123         */
1124        CHARGEITEM, 
1125        /**
1126         * A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.
1127         */
1128        CLAIM, 
1129        /**
1130         * This resource provides the adjudication details from the processing of a Claim resource.
1131         */
1132        CLAIMRESPONSE, 
1133        /**
1134         * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score.
1135         */
1136        CLINICALIMPRESSION, 
1137        /**
1138         * A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.
1139         */
1140        CLINICALUSEDEFINITION, 
1141        /**
1142         * A clinical or business level record of information being transmitted or shared; e.g. an alert that was sent to a responsible provider, a public health agency communication to a provider/reporter in response to a case report for a reportable condition.
1143         */
1144        COMMUNICATION, 
1145        /**
1146         * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.
1147         */
1148        COMMUNICATIONREQUEST, 
1149        /**
1150         * A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).
1151         */
1152        COMPOSITION, 
1153        /**
1154         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
1155         */
1156        CONDITION, 
1157        /**
1158         * A record of a healthcare consumer?s  choices  or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.
1159         */
1160        CONSENT, 
1161        /**
1162         * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.
1163         */
1164        CONTRACT, 
1165        /**
1166         * Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.
1167         */
1168        COVERAGE, 
1169        /**
1170         * The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.
1171         */
1172        COVERAGEELIGIBILITYREQUEST, 
1173        /**
1174         * This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.
1175         */
1176        COVERAGEELIGIBILITYRESPONSE, 
1177        /**
1178         * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.
1179         */
1180        DETECTEDISSUE, 
1181        /**
1182         * This resource describes the properties (regulated, has real time clock, etc.), adminstrative (manufacturer name, model number, serial number, firmware, etc), and type (knee replacement, blood pressure cuff, MRI, etc.) of a physical unit (these values do not change much within a given module, for example the serail number, manufacturer name, and model number). An actual unit may consist of several modules in a distinct hierarchy and these are represented by multiple Device resources and bound through the 'parent' element.
1183         */
1184        DEVICE, 
1185        /**
1186         * This is a specialized resource that defines the characteristics and capabilities of a device.
1187         */
1188        DEVICEDEFINITION, 
1189        /**
1190         * Indicates that a device is to be or has been dispensed for a named person/patient.  This includes a description of the product (supply) provided and the instructions for using the device.
1191         */
1192        DEVICEDISPENSE, 
1193        /**
1194         * Describes a measurement, calculation or setting capability of a medical device.
1195         */
1196        DEVICEMETRIC, 
1197        /**
1198         * Represents a request a device to be provided to a specific patient. The device may be an implantable device to be subsequently implanted, or an external assistive device, such as a walker, to be delivered and subsequently be used.
1199         */
1200        DEVICEREQUEST, 
1201        /**
1202         * A record of a device being used by a patient where the record is the result of a report from the patient or a clinician.
1203         */
1204        DEVICEUSAGE, 
1205        /**
1206         * The findings and interpretation of diagnostic tests performed on patients, groups of patients, products, substances, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. The report also includes non-clinical context such as batch analysis and stability reporting of products and substances.
1207         */
1208        DIAGNOSTICREPORT, 
1209        /**
1210         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
1211         */
1212        DOCUMENTMANIFEST, 
1213        /**
1214         * A reference to a document of any kind for any purpose. While the term ?document? implies a more narrow focus, for this resource this \"document\" encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference.
1215         */
1216        DOCUMENTREFERENCE, 
1217        /**
1218         * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.
1219         */
1220        ENCOUNTER, 
1221        /**
1222         * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b, a REST endpoint for another FHIR server, or a s/Mime email address. This may include any security context information.
1223         */
1224        ENDPOINT, 
1225        /**
1226         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
1227         */
1228        ENROLLMENTREQUEST, 
1229        /**
1230         * This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.
1231         */
1232        ENROLLMENTRESPONSE, 
1233        /**
1234         * An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.
1235         */
1236        EPISODEOFCARE, 
1237        /**
1238         * This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.
1239         */
1240        EXPLANATIONOFBENEFIT, 
1241        /**
1242         * Significant health conditions for a person related to the patient relevant in the context of care for the patient.
1243         */
1244        FAMILYMEMBERHISTORY, 
1245        /**
1246         * Prospective warnings of potential issues when providing care to the patient.
1247         */
1248        FLAG, 
1249        /**
1250         * This resource describes a product or service that is available through a program and includes the conditions and constraints of availability.  All of the information in this resource is specific to the inclusion of the item in the formulary and is not inherent to the item itself.
1251         */
1252        FORMULARYITEM, 
1253        /**
1254         * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.
1255         */
1256        GOAL, 
1257        /**
1258         * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.
1259         */
1260        GROUP, 
1261        /**
1262         * A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.
1263         */
1264        GUIDANCERESPONSE, 
1265        /**
1266         * The details of a healthcare service available at a location.
1267         */
1268        HEALTHCARESERVICE, 
1269        /**
1270         * A selection of DICOM SOP instances and/or frames within a single Study and Series. This might include additional specifics such as an image region, an Observation UID or a Segmentation Number, allowing linkage to an Observation Resource or transferring this information along with the ImagingStudy Resource.
1271         */
1272        IMAGINGSELECTION, 
1273        /**
1274         * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.
1275         */
1276        IMAGINGSTUDY, 
1277        /**
1278         * Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.
1279         */
1280        IMMUNIZATION, 
1281        /**
1282         * Describes a comparison of an immunization event against published recommendations to determine if the administration is \"valid\" in relation to those  recommendations.
1283         */
1284        IMMUNIZATIONEVALUATION, 
1285        /**
1286         * A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.
1287         */
1288        IMMUNIZATIONRECOMMENDATION, 
1289        /**
1290         * An ingredient of a manufactured item or pharmaceutical product.
1291         */
1292        INGREDIENT, 
1293        /**
1294         * Details of a Health Insurance product/plan provided by an organization.
1295         */
1296        INSURANCEPLAN, 
1297        /**
1298         * A report of inventory or stock items.
1299         */
1300        INVENTORYREPORT, 
1301        /**
1302         * Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.
1303         */
1304        INVOICE, 
1305        /**
1306         * Identifies two or more records (resource instances) that refer to the same real-world \"occurrence\".
1307         */
1308        LINKAGE, 
1309        /**
1310         * A list is a curated collection of resources.
1311         */
1312        LIST, 
1313        /**
1314         * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.
1315         */
1316        LOCATION, 
1317        /**
1318         * The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.
1319         */
1320        MANUFACTUREDITEMDEFINITION, 
1321        /**
1322         * The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.
1323         */
1324        MEASUREREPORT, 
1325        /**
1326         * This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.
1327         */
1328        MEDICATION, 
1329        /**
1330         * Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.
1331         */
1332        MEDICATIONADMINISTRATION, 
1333        /**
1334         * Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.
1335         */
1336        MEDICATIONDISPENSE, 
1337        /**
1338         * Information about a medication that is used to support knowledge.
1339         */
1340        MEDICATIONKNOWLEDGE, 
1341        /**
1342         * An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.
1343         */
1344        MEDICATIONREQUEST, 
1345        /**
1346         * A record of a medication that is being consumed by a patient.   A MedicationUsage may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. \n\nThe primary difference between a medicationusage and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medicationusage is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the Medication Usage information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.
1347         */
1348        MEDICATIONUSAGE, 
1349        /**
1350         * Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use, drug catalogs, to support prescribing, adverse events management etc.).
1351         */
1352        MEDICINALPRODUCTDEFINITION, 
1353        /**
1354         * The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.
1355         */
1356        MESSAGEHEADER, 
1357        /**
1358         * Representation of a molecular sequence.
1359         */
1360        MOLECULARSEQUENCE, 
1361        /**
1362         * A record of food or fluid that is being consumed by a patient.  A NutritionIntake may indicate that the patient may be consuming the food or fluid now or has consumed the food or fluid in the past.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay or through an app that tracks food or fluids consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label,  or from a clinician documenting observed intake.
1363         */
1364        NUTRITIONINTAKE, 
1365        /**
1366         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
1367         */
1368        NUTRITIONORDER, 
1369        /**
1370         * A food or supplement that is consumed by patients.
1371         */
1372        NUTRITIONPRODUCT, 
1373        /**
1374         * Measurements and simple assertions made about a patient, device or other subject.
1375         */
1376        OBSERVATION, 
1377        /**
1378         * Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.
1379         */
1380        OBSERVATIONDEFINITION, 
1381        /**
1382         * A collection of error, warning, or information messages that result from a system action.
1383         */
1384        OPERATIONOUTCOME, 
1385        /**
1386         * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.
1387         */
1388        ORGANIZATION, 
1389        /**
1390         * Defines an affiliation/assotiation/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship.
1391         */
1392        ORGANIZATIONAFFILIATION, 
1393        /**
1394         * A medically related item or items, in a container or package.
1395         */
1396        PACKAGEDPRODUCTDEFINITION, 
1397        /**
1398         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
1399         */
1400        PATIENT, 
1401        /**
1402         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
1403         */
1404        PAYMENTNOTICE, 
1405        /**
1406         * This resource provides the details including amount of a payment and allocates the payment items being paid.
1407         */
1408        PAYMENTRECONCILIATION, 
1409        /**
1410         * Permission.
1411         */
1412        PERMISSION, 
1413        /**
1414         * Demographics and administrative information about a person independent of a specific health-related context.
1415         */
1416        PERSON, 
1417        /**
1418         * A person who is directly or indirectly involved in the provisioning of healthcare.
1419         */
1420        PRACTITIONER, 
1421        /**
1422         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
1423         */
1424        PRACTITIONERROLE, 
1425        /**
1426         * An action that is or was performed on or for a patient, practitioner, device, organization, or location. For example, this can be a physical intervention on a patient like an operation, or less invasive like long term services, counseling, or hypnotherapy.  This can be a quality or safety inspection for a location, organization, or device.  This can be an accreditation procedure on a practitioner for licensing.
1427         */
1428        PROCEDURE, 
1429        /**
1430         * Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.
1431         */
1432        PROVENANCE, 
1433        /**
1434         * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.
1435         */
1436        QUESTIONNAIRERESPONSE, 
1437        /**
1438         * Regulatory approval, clearance or licencing related to a regulated product, treatment, facility or activity that is cited in a guidance, regulation, rule or legislative act. An example is Market Authorization relating to a Medicinal Product.
1439         */
1440        REGULATEDAUTHORIZATION, 
1441        /**
1442         * Information about a person that is involved in a patient's health or the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.
1443         */
1444        RELATEDPERSON, 
1445        /**
1446         * A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\".
1447         */
1448        REQUESTGROUP, 
1449        /**
1450         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
1451         */
1452        RESEARCHSTUDY, 
1453        /**
1454         * A physical entity which is the primary unit of operational and/or administrative interest in a study.
1455         */
1456        RESEARCHSUBJECT, 
1457        /**
1458         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
1459         */
1460        RISKASSESSMENT, 
1461        /**
1462         * A container for slots of time that may be available for booking appointments.
1463         */
1464        SCHEDULE, 
1465        /**
1466         * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.
1467         */
1468        SERVICEREQUEST, 
1469        /**
1470         * A slot of time on a schedule that may be available for booking appointments.
1471         */
1472        SLOT, 
1473        /**
1474         * A sample to be used for analysis.
1475         */
1476        SPECIMEN, 
1477        /**
1478         * A kind of specimen with associated set of requirements.
1479         */
1480        SPECIMENDEFINITION, 
1481        /**
1482         * The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.
1483         */
1484        SUBSCRIPTION, 
1485        /**
1486         * The SubscriptionStatus resource describes the state of a Subscription during notifications.
1487         */
1488        SUBSCRIPTIONSTATUS, 
1489        /**
1490         * A homogeneous material with a definite composition.
1491         */
1492        SUBSTANCE, 
1493        /**
1494         * The detailed description of a substance, typically at a level beyond what is used for prescribing.
1495         */
1496        SUBSTANCEDEFINITION, 
1497        /**
1498         * Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5?-3? direction.
1499         */
1500        SUBSTANCENUCLEICACID, 
1501        /**
1502         * Properties of a substance specific to it being a polymer.
1503         */
1504        SUBSTANCEPOLYMER, 
1505        /**
1506         * A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators.
1507         */
1508        SUBSTANCEPROTEIN, 
1509        /**
1510         * Todo.
1511         */
1512        SUBSTANCEREFERENCEINFORMATION, 
1513        /**
1514         * Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex.
1515         */
1516        SUBSTANCESOURCEMATERIAL, 
1517        /**
1518         * Record of delivery of what is supplied.
1519         */
1520        SUPPLYDELIVERY, 
1521        /**
1522         * A record of a non-patient specific request for a medication, substance, device, certain types of biologically derived product, and nutrition product used in the healthcare setting.
1523         */
1524        SUPPLYREQUEST, 
1525        /**
1526         * A task to be performed.
1527         */
1528        TASK, 
1529        /**
1530         * A summary of information based on the results of executing a TestScript.
1531         */
1532        TESTREPORT, 
1533        /**
1534         * Record of transport.
1535         */
1536        TRANSPORT, 
1537        /**
1538         * Describes validation requirements, source(s), status and dates for one or more elements.
1539         */
1540        VERIFICATIONRESULT, 
1541        /**
1542         * An authorization for the provision of glasses and/or contact lenses to a patient.
1543         */
1544        VISIONPRESCRIPTION, 
1545        /**
1546         * This resource is a non-persisted resource primarily used to pass information into and back from an [operation](operations.html). There is no RESTful endpoint associated with it.
1547         */
1548        PARAMETERS, 
1549        /**
1550         * added to help the parsers with the generic types
1551         */
1552        NULL;
1553        public static FHIRDefinedType fromCode(String codeString) throws FHIRException {
1554            if (codeString == null || "".equals(codeString))
1555                return null;
1556        if ("Address".equals(codeString))
1557          return ADDRESS;
1558        if ("Age".equals(codeString))
1559          return AGE;
1560        if ("Annotation".equals(codeString))
1561          return ANNOTATION;
1562        if ("Attachment".equals(codeString))
1563          return ATTACHMENT;
1564        if ("BackboneElement".equals(codeString))
1565          return BACKBONEELEMENT;
1566        if ("BackboneType".equals(codeString))
1567          return BACKBONETYPE;
1568        if ("Base".equals(codeString))
1569          return BASE;
1570        if ("CodeableConcept".equals(codeString))
1571          return CODEABLECONCEPT;
1572        if ("CodeableReference".equals(codeString))
1573          return CODEABLEREFERENCE;
1574        if ("Coding".equals(codeString))
1575          return CODING;
1576        if ("ContactDetail".equals(codeString))
1577          return CONTACTDETAIL;
1578        if ("ContactPoint".equals(codeString))
1579          return CONTACTPOINT;
1580        if ("Contributor".equals(codeString))
1581          return CONTRIBUTOR;
1582        if ("Count".equals(codeString))
1583          return COUNT;
1584        if ("DataRequirement".equals(codeString))
1585          return DATAREQUIREMENT;
1586        if ("DataType".equals(codeString))
1587          return DATATYPE;
1588        if ("Distance".equals(codeString))
1589          return DISTANCE;
1590        if ("Dosage".equals(codeString))
1591          return DOSAGE;
1592        if ("Duration".equals(codeString))
1593          return DURATION;
1594        if ("Element".equals(codeString))
1595          return ELEMENT;
1596        if ("ElementDefinition".equals(codeString))
1597          return ELEMENTDEFINITION;
1598        if ("Expression".equals(codeString))
1599          return EXPRESSION;
1600        if ("ExtendedContactDetail".equals(codeString))
1601          return EXTENDEDCONTACTDETAIL;
1602        if ("Extension".equals(codeString))
1603          return EXTENSION;
1604        if ("HumanName".equals(codeString))
1605          return HUMANNAME;
1606        if ("Identifier".equals(codeString))
1607          return IDENTIFIER;
1608        if ("MarketingStatus".equals(codeString))
1609          return MARKETINGSTATUS;
1610        if ("Meta".equals(codeString))
1611          return META;
1612        if ("Money".equals(codeString))
1613          return MONEY;
1614        if ("MoneyQuantity".equals(codeString))
1615          return MONEYQUANTITY;
1616        if ("Narrative".equals(codeString))
1617          return NARRATIVE;
1618        if ("ParameterDefinition".equals(codeString))
1619          return PARAMETERDEFINITION;
1620        if ("Period".equals(codeString))
1621          return PERIOD;
1622        if ("Population".equals(codeString))
1623          return POPULATION;
1624        if ("PrimitiveType".equals(codeString))
1625          return PRIMITIVETYPE;
1626        if ("ProductShelfLife".equals(codeString))
1627          return PRODUCTSHELFLIFE;
1628        if ("Quantity".equals(codeString))
1629          return QUANTITY;
1630        if ("Range".equals(codeString))
1631          return RANGE;
1632        if ("Ratio".equals(codeString))
1633          return RATIO;
1634        if ("RatioRange".equals(codeString))
1635          return RATIORANGE;
1636        if ("Reference".equals(codeString))
1637          return REFERENCE;
1638        if ("RelatedArtifact".equals(codeString))
1639          return RELATEDARTIFACT;
1640        if ("SampledData".equals(codeString))
1641          return SAMPLEDDATA;
1642        if ("Signature".equals(codeString))
1643          return SIGNATURE;
1644        if ("SimpleQuantity".equals(codeString))
1645          return SIMPLEQUANTITY;
1646        if ("Timing".equals(codeString))
1647          return TIMING;
1648        if ("TriggerDefinition".equals(codeString))
1649          return TRIGGERDEFINITION;
1650        if ("UsageContext".equals(codeString))
1651          return USAGECONTEXT;
1652        if ("base64Binary".equals(codeString))
1653          return BASE64BINARY;
1654        if ("boolean".equals(codeString))
1655          return BOOLEAN;
1656        if ("canonical".equals(codeString))
1657          return CANONICAL;
1658        if ("code".equals(codeString))
1659          return CODE;
1660        if ("date".equals(codeString))
1661          return DATE;
1662        if ("dateTime".equals(codeString))
1663          return DATETIME;
1664        if ("decimal".equals(codeString))
1665          return DECIMAL;
1666        if ("id".equals(codeString))
1667          return ID;
1668        if ("instant".equals(codeString))
1669          return INSTANT;
1670        if ("integer".equals(codeString))
1671          return INTEGER;
1672        if ("integer64".equals(codeString))
1673          return INTEGER64;
1674        if ("markdown".equals(codeString))
1675          return MARKDOWN;
1676        if ("oid".equals(codeString))
1677          return OID;
1678        if ("positiveInt".equals(codeString))
1679          return POSITIVEINT;
1680        if ("string".equals(codeString))
1681          return STRING;
1682        if ("time".equals(codeString))
1683          return TIME;
1684        if ("unsignedInt".equals(codeString))
1685          return UNSIGNEDINT;
1686        if ("uri".equals(codeString))
1687          return URI;
1688        if ("url".equals(codeString))
1689          return URL;
1690        if ("uuid".equals(codeString))
1691          return UUID;
1692        if ("xhtml".equals(codeString))
1693          return XHTML;
1694        if ("Resource".equals(codeString))
1695          return RESOURCE;
1696        if ("Binary".equals(codeString))
1697          return BINARY;
1698        if ("Bundle".equals(codeString))
1699          return BUNDLE;
1700        if ("DomainResource".equals(codeString))
1701          return DOMAINRESOURCE;
1702        if ("Account".equals(codeString))
1703          return ACCOUNT;
1704        if ("AdministrableProductDefinition".equals(codeString))
1705          return ADMINISTRABLEPRODUCTDEFINITION;
1706        if ("AdverseEvent".equals(codeString))
1707          return ADVERSEEVENT;
1708        if ("AllergyIntolerance".equals(codeString))
1709          return ALLERGYINTOLERANCE;
1710        if ("Appointment".equals(codeString))
1711          return APPOINTMENT;
1712        if ("AppointmentResponse".equals(codeString))
1713          return APPOINTMENTRESPONSE;
1714        if ("ArtifactAssessment".equals(codeString))
1715          return ARTIFACTASSESSMENT;
1716        if ("AuditEvent".equals(codeString))
1717          return AUDITEVENT;
1718        if ("Basic".equals(codeString))
1719          return BASIC;
1720        if ("BiologicallyDerivedProduct".equals(codeString))
1721          return BIOLOGICALLYDERIVEDPRODUCT;
1722        if ("BodyStructure".equals(codeString))
1723          return BODYSTRUCTURE;
1724        if ("CanonicalResource".equals(codeString))
1725          return CANONICALRESOURCE;
1726        if ("CapabilityStatement".equals(codeString))
1727          return CAPABILITYSTATEMENT;
1728        if ("CapabilityStatement2".equals(codeString))
1729          return CAPABILITYSTATEMENT2;
1730        if ("CodeSystem".equals(codeString))
1731          return CODESYSTEM;
1732        if ("CompartmentDefinition".equals(codeString))
1733          return COMPARTMENTDEFINITION;
1734        if ("ExampleScenario".equals(codeString))
1735          return EXAMPLESCENARIO;
1736        if ("GraphDefinition".equals(codeString))
1737          return GRAPHDEFINITION;
1738        if ("ImplementationGuide".equals(codeString))
1739          return IMPLEMENTATIONGUIDE;
1740        if ("MessageDefinition".equals(codeString))
1741          return MESSAGEDEFINITION;
1742        if ("MetadataResource".equals(codeString))
1743          return METADATARESOURCE;
1744        if ("ActivityDefinition".equals(codeString))
1745          return ACTIVITYDEFINITION;
1746        if ("ChargeItemDefinition".equals(codeString))
1747          return CHARGEITEMDEFINITION;
1748        if ("Citation".equals(codeString))
1749          return CITATION;
1750        if ("ConceptMap".equals(codeString))
1751          return CONCEPTMAP;
1752        if ("ConditionDefinition".equals(codeString))
1753          return CONDITIONDEFINITION;
1754        if ("EventDefinition".equals(codeString))
1755          return EVENTDEFINITION;
1756        if ("Evidence".equals(codeString))
1757          return EVIDENCE;
1758        if ("EvidenceReport".equals(codeString))
1759          return EVIDENCEREPORT;
1760        if ("EvidenceVariable".equals(codeString))
1761          return EVIDENCEVARIABLE;
1762        if ("Library".equals(codeString))
1763          return LIBRARY;
1764        if ("Measure".equals(codeString))
1765          return MEASURE;
1766        if ("NamingSystem".equals(codeString))
1767          return NAMINGSYSTEM;
1768        if ("PlanDefinition".equals(codeString))
1769          return PLANDEFINITION;
1770        if ("Questionnaire".equals(codeString))
1771          return QUESTIONNAIRE;
1772        if ("OperationDefinition".equals(codeString))
1773          return OPERATIONDEFINITION;
1774        if ("SearchParameter".equals(codeString))
1775          return SEARCHPARAMETER;
1776        if ("StructureDefinition".equals(codeString))
1777          return STRUCTUREDEFINITION;
1778        if ("StructureMap".equals(codeString))
1779          return STRUCTUREMAP;
1780        if ("SubscriptionTopic".equals(codeString))
1781          return SUBSCRIPTIONTOPIC;
1782        if ("TerminologyCapabilities".equals(codeString))
1783          return TERMINOLOGYCAPABILITIES;
1784        if ("TestScript".equals(codeString))
1785          return TESTSCRIPT;
1786        if ("ValueSet".equals(codeString))
1787          return VALUESET;
1788        if ("CarePlan".equals(codeString))
1789          return CAREPLAN;
1790        if ("CareTeam".equals(codeString))
1791          return CARETEAM;
1792        if ("ChargeItem".equals(codeString))
1793          return CHARGEITEM;
1794        if ("Claim".equals(codeString))
1795          return CLAIM;
1796        if ("ClaimResponse".equals(codeString))
1797          return CLAIMRESPONSE;
1798        if ("ClinicalImpression".equals(codeString))
1799          return CLINICALIMPRESSION;
1800        if ("ClinicalUseDefinition".equals(codeString))
1801          return CLINICALUSEDEFINITION;
1802        if ("Communication".equals(codeString))
1803          return COMMUNICATION;
1804        if ("CommunicationRequest".equals(codeString))
1805          return COMMUNICATIONREQUEST;
1806        if ("Composition".equals(codeString))
1807          return COMPOSITION;
1808        if ("Condition".equals(codeString))
1809          return CONDITION;
1810        if ("Consent".equals(codeString))
1811          return CONSENT;
1812        if ("Contract".equals(codeString))
1813          return CONTRACT;
1814        if ("Coverage".equals(codeString))
1815          return COVERAGE;
1816        if ("CoverageEligibilityRequest".equals(codeString))
1817          return COVERAGEELIGIBILITYREQUEST;
1818        if ("CoverageEligibilityResponse".equals(codeString))
1819          return COVERAGEELIGIBILITYRESPONSE;
1820        if ("DetectedIssue".equals(codeString))
1821          return DETECTEDISSUE;
1822        if ("Device".equals(codeString))
1823          return DEVICE;
1824        if ("DeviceDefinition".equals(codeString))
1825          return DEVICEDEFINITION;
1826        if ("DeviceDispense".equals(codeString))
1827          return DEVICEDISPENSE;
1828        if ("DeviceMetric".equals(codeString))
1829          return DEVICEMETRIC;
1830        if ("DeviceRequest".equals(codeString))
1831          return DEVICEREQUEST;
1832        if ("DeviceUsage".equals(codeString))
1833          return DEVICEUSAGE;
1834        if ("DiagnosticReport".equals(codeString))
1835          return DIAGNOSTICREPORT;
1836        if ("DocumentManifest".equals(codeString))
1837          return DOCUMENTMANIFEST;
1838        if ("DocumentReference".equals(codeString))
1839          return DOCUMENTREFERENCE;
1840        if ("Encounter".equals(codeString))
1841          return ENCOUNTER;
1842        if ("Endpoint".equals(codeString))
1843          return ENDPOINT;
1844        if ("EnrollmentRequest".equals(codeString))
1845          return ENROLLMENTREQUEST;
1846        if ("EnrollmentResponse".equals(codeString))
1847          return ENROLLMENTRESPONSE;
1848        if ("EpisodeOfCare".equals(codeString))
1849          return EPISODEOFCARE;
1850        if ("ExplanationOfBenefit".equals(codeString))
1851          return EXPLANATIONOFBENEFIT;
1852        if ("FamilyMemberHistory".equals(codeString))
1853          return FAMILYMEMBERHISTORY;
1854        if ("Flag".equals(codeString))
1855          return FLAG;
1856        if ("FormularyItem".equals(codeString))
1857          return FORMULARYITEM;
1858        if ("Goal".equals(codeString))
1859          return GOAL;
1860        if ("Group".equals(codeString))
1861          return GROUP;
1862        if ("GuidanceResponse".equals(codeString))
1863          return GUIDANCERESPONSE;
1864        if ("HealthcareService".equals(codeString))
1865          return HEALTHCARESERVICE;
1866        if ("ImagingSelection".equals(codeString))
1867          return IMAGINGSELECTION;
1868        if ("ImagingStudy".equals(codeString))
1869          return IMAGINGSTUDY;
1870        if ("Immunization".equals(codeString))
1871          return IMMUNIZATION;
1872        if ("ImmunizationEvaluation".equals(codeString))
1873          return IMMUNIZATIONEVALUATION;
1874        if ("ImmunizationRecommendation".equals(codeString))
1875          return IMMUNIZATIONRECOMMENDATION;
1876        if ("Ingredient".equals(codeString))
1877          return INGREDIENT;
1878        if ("InsurancePlan".equals(codeString))
1879          return INSURANCEPLAN;
1880        if ("InventoryReport".equals(codeString))
1881          return INVENTORYREPORT;
1882        if ("Invoice".equals(codeString))
1883          return INVOICE;
1884        if ("Linkage".equals(codeString))
1885          return LINKAGE;
1886        if ("List".equals(codeString))
1887          return LIST;
1888        if ("Location".equals(codeString))
1889          return LOCATION;
1890        if ("ManufacturedItemDefinition".equals(codeString))
1891          return MANUFACTUREDITEMDEFINITION;
1892        if ("MeasureReport".equals(codeString))
1893          return MEASUREREPORT;
1894        if ("Medication".equals(codeString))
1895          return MEDICATION;
1896        if ("MedicationAdministration".equals(codeString))
1897          return MEDICATIONADMINISTRATION;
1898        if ("MedicationDispense".equals(codeString))
1899          return MEDICATIONDISPENSE;
1900        if ("MedicationKnowledge".equals(codeString))
1901          return MEDICATIONKNOWLEDGE;
1902        if ("MedicationRequest".equals(codeString))
1903          return MEDICATIONREQUEST;
1904        if ("MedicationUsage".equals(codeString))
1905          return MEDICATIONUSAGE;
1906        if ("MedicinalProductDefinition".equals(codeString))
1907          return MEDICINALPRODUCTDEFINITION;
1908        if ("MessageHeader".equals(codeString))
1909          return MESSAGEHEADER;
1910        if ("MolecularSequence".equals(codeString))
1911          return MOLECULARSEQUENCE;
1912        if ("NutritionIntake".equals(codeString))
1913          return NUTRITIONINTAKE;
1914        if ("NutritionOrder".equals(codeString))
1915          return NUTRITIONORDER;
1916        if ("NutritionProduct".equals(codeString))
1917          return NUTRITIONPRODUCT;
1918        if ("Observation".equals(codeString))
1919          return OBSERVATION;
1920        if ("ObservationDefinition".equals(codeString))
1921          return OBSERVATIONDEFINITION;
1922        if ("OperationOutcome".equals(codeString))
1923          return OPERATIONOUTCOME;
1924        if ("Organization".equals(codeString))
1925          return ORGANIZATION;
1926        if ("OrganizationAffiliation".equals(codeString))
1927          return ORGANIZATIONAFFILIATION;
1928        if ("PackagedProductDefinition".equals(codeString))
1929          return PACKAGEDPRODUCTDEFINITION;
1930        if ("Patient".equals(codeString))
1931          return PATIENT;
1932        if ("PaymentNotice".equals(codeString))
1933          return PAYMENTNOTICE;
1934        if ("PaymentReconciliation".equals(codeString))
1935          return PAYMENTRECONCILIATION;
1936        if ("Permission".equals(codeString))
1937          return PERMISSION;
1938        if ("Person".equals(codeString))
1939          return PERSON;
1940        if ("Practitioner".equals(codeString))
1941          return PRACTITIONER;
1942        if ("PractitionerRole".equals(codeString))
1943          return PRACTITIONERROLE;
1944        if ("Procedure".equals(codeString))
1945          return PROCEDURE;
1946        if ("Provenance".equals(codeString))
1947          return PROVENANCE;
1948        if ("QuestionnaireResponse".equals(codeString))
1949          return QUESTIONNAIRERESPONSE;
1950        if ("RegulatedAuthorization".equals(codeString))
1951          return REGULATEDAUTHORIZATION;
1952        if ("RelatedPerson".equals(codeString))
1953          return RELATEDPERSON;
1954        if ("RequestGroup".equals(codeString))
1955          return REQUESTGROUP;
1956        if ("ResearchStudy".equals(codeString))
1957          return RESEARCHSTUDY;
1958        if ("ResearchSubject".equals(codeString))
1959          return RESEARCHSUBJECT;
1960        if ("RiskAssessment".equals(codeString))
1961          return RISKASSESSMENT;
1962        if ("Schedule".equals(codeString))
1963          return SCHEDULE;
1964        if ("ServiceRequest".equals(codeString))
1965          return SERVICEREQUEST;
1966        if ("Slot".equals(codeString))
1967          return SLOT;
1968        if ("Specimen".equals(codeString))
1969          return SPECIMEN;
1970        if ("SpecimenDefinition".equals(codeString))
1971          return SPECIMENDEFINITION;
1972        if ("Subscription".equals(codeString))
1973          return SUBSCRIPTION;
1974        if ("SubscriptionStatus".equals(codeString))
1975          return SUBSCRIPTIONSTATUS;
1976        if ("Substance".equals(codeString))
1977          return SUBSTANCE;
1978        if ("SubstanceDefinition".equals(codeString))
1979          return SUBSTANCEDEFINITION;
1980        if ("SubstanceNucleicAcid".equals(codeString))
1981          return SUBSTANCENUCLEICACID;
1982        if ("SubstancePolymer".equals(codeString))
1983          return SUBSTANCEPOLYMER;
1984        if ("SubstanceProtein".equals(codeString))
1985          return SUBSTANCEPROTEIN;
1986        if ("SubstanceReferenceInformation".equals(codeString))
1987          return SUBSTANCEREFERENCEINFORMATION;
1988        if ("SubstanceSourceMaterial".equals(codeString))
1989          return SUBSTANCESOURCEMATERIAL;
1990        if ("SupplyDelivery".equals(codeString))
1991          return SUPPLYDELIVERY;
1992        if ("SupplyRequest".equals(codeString))
1993          return SUPPLYREQUEST;
1994        if ("Task".equals(codeString))
1995          return TASK;
1996        if ("TestReport".equals(codeString))
1997          return TESTREPORT;
1998        if ("Transport".equals(codeString))
1999          return TRANSPORT;
2000        if ("VerificationResult".equals(codeString))
2001          return VERIFICATIONRESULT;
2002        if ("VisionPrescription".equals(codeString))
2003          return VISIONPRESCRIPTION;
2004        if ("Parameters".equals(codeString))
2005          return PARAMETERS;
2006        if (Configuration.isAcceptInvalidEnums())
2007          return null;
2008        else
2009          throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'");
2010        }
2011        public String toCode() {
2012          switch (this) {
2013            case ADDRESS: return "Address";
2014            case AGE: return "Age";
2015            case ANNOTATION: return "Annotation";
2016            case ATTACHMENT: return "Attachment";
2017            case BACKBONEELEMENT: return "BackboneElement";
2018            case BACKBONETYPE: return "BackboneType";
2019            case BASE: return "Base";
2020            case CODEABLECONCEPT: return "CodeableConcept";
2021            case CODEABLEREFERENCE: return "CodeableReference";
2022            case CODING: return "Coding";
2023            case CONTACTDETAIL: return "ContactDetail";
2024            case CONTACTPOINT: return "ContactPoint";
2025            case CONTRIBUTOR: return "Contributor";
2026            case COUNT: return "Count";
2027            case DATAREQUIREMENT: return "DataRequirement";
2028            case DATATYPE: return "DataType";
2029            case DISTANCE: return "Distance";
2030            case DOSAGE: return "Dosage";
2031            case DURATION: return "Duration";
2032            case ELEMENT: return "Element";
2033            case ELEMENTDEFINITION: return "ElementDefinition";
2034            case EXPRESSION: return "Expression";
2035            case EXTENDEDCONTACTDETAIL: return "ExtendedContactDetail";
2036            case EXTENSION: return "Extension";
2037            case HUMANNAME: return "HumanName";
2038            case IDENTIFIER: return "Identifier";
2039            case MARKETINGSTATUS: return "MarketingStatus";
2040            case META: return "Meta";
2041            case MONEY: return "Money";
2042            case MONEYQUANTITY: return "MoneyQuantity";
2043            case NARRATIVE: return "Narrative";
2044            case PARAMETERDEFINITION: return "ParameterDefinition";
2045            case PERIOD: return "Period";
2046            case POPULATION: return "Population";
2047            case PRIMITIVETYPE: return "PrimitiveType";
2048            case PRODUCTSHELFLIFE: return "ProductShelfLife";
2049            case QUANTITY: return "Quantity";
2050            case RANGE: return "Range";
2051            case RATIO: return "Ratio";
2052            case RATIORANGE: return "RatioRange";
2053            case REFERENCE: return "Reference";
2054            case RELATEDARTIFACT: return "RelatedArtifact";
2055            case SAMPLEDDATA: return "SampledData";
2056            case SIGNATURE: return "Signature";
2057            case SIMPLEQUANTITY: return "SimpleQuantity";
2058            case TIMING: return "Timing";
2059            case TRIGGERDEFINITION: return "TriggerDefinition";
2060            case USAGECONTEXT: return "UsageContext";
2061            case BASE64BINARY: return "base64Binary";
2062            case BOOLEAN: return "boolean";
2063            case CANONICAL: return "canonical";
2064            case CODE: return "code";
2065            case DATE: return "date";
2066            case DATETIME: return "dateTime";
2067            case DECIMAL: return "decimal";
2068            case ID: return "id";
2069            case INSTANT: return "instant";
2070            case INTEGER: return "integer";
2071            case INTEGER64: return "integer64";
2072            case MARKDOWN: return "markdown";
2073            case OID: return "oid";
2074            case POSITIVEINT: return "positiveInt";
2075            case STRING: return "string";
2076            case TIME: return "time";
2077            case UNSIGNEDINT: return "unsignedInt";
2078            case URI: return "uri";
2079            case URL: return "url";
2080            case UUID: return "uuid";
2081            case XHTML: return "xhtml";
2082            case RESOURCE: return "Resource";
2083            case BINARY: return "Binary";
2084            case BUNDLE: return "Bundle";
2085            case DOMAINRESOURCE: return "DomainResource";
2086            case ACCOUNT: return "Account";
2087            case ADMINISTRABLEPRODUCTDEFINITION: return "AdministrableProductDefinition";
2088            case ADVERSEEVENT: return "AdverseEvent";
2089            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
2090            case APPOINTMENT: return "Appointment";
2091            case APPOINTMENTRESPONSE: return "AppointmentResponse";
2092            case ARTIFACTASSESSMENT: return "ArtifactAssessment";
2093            case AUDITEVENT: return "AuditEvent";
2094            case BASIC: return "Basic";
2095            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
2096            case BODYSTRUCTURE: return "BodyStructure";
2097            case CANONICALRESOURCE: return "CanonicalResource";
2098            case CAPABILITYSTATEMENT: return "CapabilityStatement";
2099            case CAPABILITYSTATEMENT2: return "CapabilityStatement2";
2100            case CODESYSTEM: return "CodeSystem";
2101            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
2102            case EXAMPLESCENARIO: return "ExampleScenario";
2103            case GRAPHDEFINITION: return "GraphDefinition";
2104            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
2105            case MESSAGEDEFINITION: return "MessageDefinition";
2106            case METADATARESOURCE: return "MetadataResource";
2107            case ACTIVITYDEFINITION: return "ActivityDefinition";
2108            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
2109            case CITATION: return "Citation";
2110            case CONCEPTMAP: return "ConceptMap";
2111            case CONDITIONDEFINITION: return "ConditionDefinition";
2112            case EVENTDEFINITION: return "EventDefinition";
2113            case EVIDENCE: return "Evidence";
2114            case EVIDENCEREPORT: return "EvidenceReport";
2115            case EVIDENCEVARIABLE: return "EvidenceVariable";
2116            case LIBRARY: return "Library";
2117            case MEASURE: return "Measure";
2118            case NAMINGSYSTEM: return "NamingSystem";
2119            case PLANDEFINITION: return "PlanDefinition";
2120            case QUESTIONNAIRE: return "Questionnaire";
2121            case OPERATIONDEFINITION: return "OperationDefinition";
2122            case SEARCHPARAMETER: return "SearchParameter";
2123            case STRUCTUREDEFINITION: return "StructureDefinition";
2124            case STRUCTUREMAP: return "StructureMap";
2125            case SUBSCRIPTIONTOPIC: return "SubscriptionTopic";
2126            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
2127            case TESTSCRIPT: return "TestScript";
2128            case VALUESET: return "ValueSet";
2129            case CAREPLAN: return "CarePlan";
2130            case CARETEAM: return "CareTeam";
2131            case CHARGEITEM: return "ChargeItem";
2132            case CLAIM: return "Claim";
2133            case CLAIMRESPONSE: return "ClaimResponse";
2134            case CLINICALIMPRESSION: return "ClinicalImpression";
2135            case CLINICALUSEDEFINITION: return "ClinicalUseDefinition";
2136            case COMMUNICATION: return "Communication";
2137            case COMMUNICATIONREQUEST: return "CommunicationRequest";
2138            case COMPOSITION: return "Composition";
2139            case CONDITION: return "Condition";
2140            case CONSENT: return "Consent";
2141            case CONTRACT: return "Contract";
2142            case COVERAGE: return "Coverage";
2143            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
2144            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
2145            case DETECTEDISSUE: return "DetectedIssue";
2146            case DEVICE: return "Device";
2147            case DEVICEDEFINITION: return "DeviceDefinition";
2148            case DEVICEDISPENSE: return "DeviceDispense";
2149            case DEVICEMETRIC: return "DeviceMetric";
2150            case DEVICEREQUEST: return "DeviceRequest";
2151            case DEVICEUSAGE: return "DeviceUsage";
2152            case DIAGNOSTICREPORT: return "DiagnosticReport";
2153            case DOCUMENTMANIFEST: return "DocumentManifest";
2154            case DOCUMENTREFERENCE: return "DocumentReference";
2155            case ENCOUNTER: return "Encounter";
2156            case ENDPOINT: return "Endpoint";
2157            case ENROLLMENTREQUEST: return "EnrollmentRequest";
2158            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
2159            case EPISODEOFCARE: return "EpisodeOfCare";
2160            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
2161            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
2162            case FLAG: return "Flag";
2163            case FORMULARYITEM: return "FormularyItem";
2164            case GOAL: return "Goal";
2165            case GROUP: return "Group";
2166            case GUIDANCERESPONSE: return "GuidanceResponse";
2167            case HEALTHCARESERVICE: return "HealthcareService";
2168            case IMAGINGSELECTION: return "ImagingSelection";
2169            case IMAGINGSTUDY: return "ImagingStudy";
2170            case IMMUNIZATION: return "Immunization";
2171            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
2172            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
2173            case INGREDIENT: return "Ingredient";
2174            case INSURANCEPLAN: return "InsurancePlan";
2175            case INVENTORYREPORT: return "InventoryReport";
2176            case INVOICE: return "Invoice";
2177            case LINKAGE: return "Linkage";
2178            case LIST: return "List";
2179            case LOCATION: return "Location";
2180            case MANUFACTUREDITEMDEFINITION: return "ManufacturedItemDefinition";
2181            case MEASUREREPORT: return "MeasureReport";
2182            case MEDICATION: return "Medication";
2183            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
2184            case MEDICATIONDISPENSE: return "MedicationDispense";
2185            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
2186            case MEDICATIONREQUEST: return "MedicationRequest";
2187            case MEDICATIONUSAGE: return "MedicationUsage";
2188            case MEDICINALPRODUCTDEFINITION: return "MedicinalProductDefinition";
2189            case MESSAGEHEADER: return "MessageHeader";
2190            case MOLECULARSEQUENCE: return "MolecularSequence";
2191            case NUTRITIONINTAKE: return "NutritionIntake";
2192            case NUTRITIONORDER: return "NutritionOrder";
2193            case NUTRITIONPRODUCT: return "NutritionProduct";
2194            case OBSERVATION: return "Observation";
2195            case OBSERVATIONDEFINITION: return "ObservationDefinition";
2196            case OPERATIONOUTCOME: return "OperationOutcome";
2197            case ORGANIZATION: return "Organization";
2198            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
2199            case PACKAGEDPRODUCTDEFINITION: return "PackagedProductDefinition";
2200            case PATIENT: return "Patient";
2201            case PAYMENTNOTICE: return "PaymentNotice";
2202            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
2203            case PERMISSION: return "Permission";
2204            case PERSON: return "Person";
2205            case PRACTITIONER: return "Practitioner";
2206            case PRACTITIONERROLE: return "PractitionerRole";
2207            case PROCEDURE: return "Procedure";
2208            case PROVENANCE: return "Provenance";
2209            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
2210            case REGULATEDAUTHORIZATION: return "RegulatedAuthorization";
2211            case RELATEDPERSON: return "RelatedPerson";
2212            case REQUESTGROUP: return "RequestGroup";
2213            case RESEARCHSTUDY: return "ResearchStudy";
2214            case RESEARCHSUBJECT: return "ResearchSubject";
2215            case RISKASSESSMENT: return "RiskAssessment";
2216            case SCHEDULE: return "Schedule";
2217            case SERVICEREQUEST: return "ServiceRequest";
2218            case SLOT: return "Slot";
2219            case SPECIMEN: return "Specimen";
2220            case SPECIMENDEFINITION: return "SpecimenDefinition";
2221            case SUBSCRIPTION: return "Subscription";
2222            case SUBSCRIPTIONSTATUS: return "SubscriptionStatus";
2223            case SUBSTANCE: return "Substance";
2224            case SUBSTANCEDEFINITION: return "SubstanceDefinition";
2225            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
2226            case SUBSTANCEPOLYMER: return "SubstancePolymer";
2227            case SUBSTANCEPROTEIN: return "SubstanceProtein";
2228            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
2229            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
2230            case SUPPLYDELIVERY: return "SupplyDelivery";
2231            case SUPPLYREQUEST: return "SupplyRequest";
2232            case TASK: return "Task";
2233            case TESTREPORT: return "TestReport";
2234            case TRANSPORT: return "Transport";
2235            case VERIFICATIONRESULT: return "VerificationResult";
2236            case VISIONPRESCRIPTION: return "VisionPrescription";
2237            case PARAMETERS: return "Parameters";
2238            case NULL: return null;
2239            default: return "?";
2240          }
2241        }
2242        public String getSystem() {
2243          switch (this) {
2244            case ADDRESS: return "http://hl7.org/fhir/data-types";
2245            case AGE: return "http://hl7.org/fhir/data-types";
2246            case ANNOTATION: return "http://hl7.org/fhir/data-types";
2247            case ATTACHMENT: return "http://hl7.org/fhir/data-types";
2248            case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types";
2249            case BACKBONETYPE: return "http://hl7.org/fhir/data-types";
2250            case BASE: return "http://hl7.org/fhir/data-types";
2251            case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types";
2252            case CODEABLEREFERENCE: return "http://hl7.org/fhir/data-types";
2253            case CODING: return "http://hl7.org/fhir/data-types";
2254            case CONTACTDETAIL: return "http://hl7.org/fhir/data-types";
2255            case CONTACTPOINT: return "http://hl7.org/fhir/data-types";
2256            case CONTRIBUTOR: return "http://hl7.org/fhir/data-types";
2257            case COUNT: return "http://hl7.org/fhir/data-types";
2258            case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types";
2259            case DATATYPE: return "http://hl7.org/fhir/data-types";
2260            case DISTANCE: return "http://hl7.org/fhir/data-types";
2261            case DOSAGE: return "http://hl7.org/fhir/data-types";
2262            case DURATION: return "http://hl7.org/fhir/data-types";
2263            case ELEMENT: return "http://hl7.org/fhir/data-types";
2264            case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types";
2265            case EXPRESSION: return "http://hl7.org/fhir/data-types";
2266            case EXTENDEDCONTACTDETAIL: return "http://hl7.org/fhir/data-types";
2267            case EXTENSION: return "http://hl7.org/fhir/data-types";
2268            case HUMANNAME: return "http://hl7.org/fhir/data-types";
2269            case IDENTIFIER: return "http://hl7.org/fhir/data-types";
2270            case MARKETINGSTATUS: return "http://hl7.org/fhir/data-types";
2271            case META: return "http://hl7.org/fhir/data-types";
2272            case MONEY: return "http://hl7.org/fhir/data-types";
2273            case MONEYQUANTITY: return "http://hl7.org/fhir/data-types";
2274            case NARRATIVE: return "http://hl7.org/fhir/data-types";
2275            case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types";
2276            case PERIOD: return "http://hl7.org/fhir/data-types";
2277            case POPULATION: return "http://hl7.org/fhir/data-types";
2278            case PRIMITIVETYPE: return "http://hl7.org/fhir/data-types";
2279            case PRODUCTSHELFLIFE: return "http://hl7.org/fhir/data-types";
2280            case QUANTITY: return "http://hl7.org/fhir/data-types";
2281            case RANGE: return "http://hl7.org/fhir/data-types";
2282            case RATIO: return "http://hl7.org/fhir/data-types";
2283            case RATIORANGE: return "http://hl7.org/fhir/data-types";
2284            case REFERENCE: return "http://hl7.org/fhir/data-types";
2285            case RELATEDARTIFACT: return "http://hl7.org/fhir/data-types";
2286            case SAMPLEDDATA: return "http://hl7.org/fhir/data-types";
2287            case SIGNATURE: return "http://hl7.org/fhir/data-types";
2288            case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types";
2289            case TIMING: return "http://hl7.org/fhir/data-types";
2290            case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types";
2291            case USAGECONTEXT: return "http://hl7.org/fhir/data-types";
2292            case BASE64BINARY: return "http://hl7.org/fhir/data-types";
2293            case BOOLEAN: return "http://hl7.org/fhir/data-types";
2294            case CANONICAL: return "http://hl7.org/fhir/data-types";
2295            case CODE: return "http://hl7.org/fhir/data-types";
2296            case DATE: return "http://hl7.org/fhir/data-types";
2297            case DATETIME: return "http://hl7.org/fhir/data-types";
2298            case DECIMAL: return "http://hl7.org/fhir/data-types";
2299            case ID: return "http://hl7.org/fhir/data-types";
2300            case INSTANT: return "http://hl7.org/fhir/data-types";
2301            case INTEGER: return "http://hl7.org/fhir/data-types";
2302            case INTEGER64: return "http://hl7.org/fhir/data-types";
2303            case MARKDOWN: return "http://hl7.org/fhir/data-types";
2304            case OID: return "http://hl7.org/fhir/data-types";
2305            case POSITIVEINT: return "http://hl7.org/fhir/data-types";
2306            case STRING: return "http://hl7.org/fhir/data-types";
2307            case TIME: return "http://hl7.org/fhir/data-types";
2308            case UNSIGNEDINT: return "http://hl7.org/fhir/data-types";
2309            case URI: return "http://hl7.org/fhir/data-types";
2310            case URL: return "http://hl7.org/fhir/data-types";
2311            case UUID: return "http://hl7.org/fhir/data-types";
2312            case XHTML: return "http://hl7.org/fhir/data-types";
2313            case RESOURCE: return "http://hl7.org/fhir/resource-types";
2314            case BINARY: return "http://hl7.org/fhir/resource-types";
2315            case BUNDLE: return "http://hl7.org/fhir/resource-types";
2316            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
2317            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
2318            case ADMINISTRABLEPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
2319            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
2320            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
2321            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
2322            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
2323            case ARTIFACTASSESSMENT: return "http://hl7.org/fhir/resource-types";
2324            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
2325            case BASIC: return "http://hl7.org/fhir/resource-types";
2326            case BIOLOGICALLYDERIVEDPRODUCT: return "http://hl7.org/fhir/resource-types";
2327            case BODYSTRUCTURE: return "http://hl7.org/fhir/resource-types";
2328            case CANONICALRESOURCE: return "http://hl7.org/fhir/resource-types";
2329            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
2330            case CAPABILITYSTATEMENT2: return "http://hl7.org/fhir/resource-types";
2331            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
2332            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
2333            case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types";
2334            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
2335            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
2336            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
2337            case METADATARESOURCE: return "http://hl7.org/fhir/resource-types";
2338            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
2339            case CHARGEITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
2340            case CITATION: return "http://hl7.org/fhir/resource-types";
2341            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
2342            case CONDITIONDEFINITION: return "http://hl7.org/fhir/resource-types";
2343            case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types";
2344            case EVIDENCE: return "http://hl7.org/fhir/resource-types";
2345            case EVIDENCEREPORT: return "http://hl7.org/fhir/resource-types";
2346            case EVIDENCEVARIABLE: return "http://hl7.org/fhir/resource-types";
2347            case LIBRARY: return "http://hl7.org/fhir/resource-types";
2348            case MEASURE: return "http://hl7.org/fhir/resource-types";
2349            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
2350            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
2351            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
2352            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
2353            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
2354            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
2355            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
2356            case SUBSCRIPTIONTOPIC: return "http://hl7.org/fhir/resource-types";
2357            case TERMINOLOGYCAPABILITIES: return "http://hl7.org/fhir/resource-types";
2358            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
2359            case VALUESET: return "http://hl7.org/fhir/resource-types";
2360            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
2361            case CARETEAM: return "http://hl7.org/fhir/resource-types";
2362            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
2363            case CLAIM: return "http://hl7.org/fhir/resource-types";
2364            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
2365            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
2366            case CLINICALUSEDEFINITION: return "http://hl7.org/fhir/resource-types";
2367            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
2368            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
2369            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
2370            case CONDITION: return "http://hl7.org/fhir/resource-types";
2371            case CONSENT: return "http://hl7.org/fhir/resource-types";
2372            case CONTRACT: return "http://hl7.org/fhir/resource-types";
2373            case COVERAGE: return "http://hl7.org/fhir/resource-types";
2374            case COVERAGEELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
2375            case COVERAGEELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
2376            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
2377            case DEVICE: return "http://hl7.org/fhir/resource-types";
2378            case DEVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
2379            case DEVICEDISPENSE: return "http://hl7.org/fhir/resource-types";
2380            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
2381            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
2382            case DEVICEUSAGE: return "http://hl7.org/fhir/resource-types";
2383            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
2384            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
2385            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
2386            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
2387            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
2388            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
2389            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
2390            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
2391            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
2392            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
2393            case FLAG: return "http://hl7.org/fhir/resource-types";
2394            case FORMULARYITEM: return "http://hl7.org/fhir/resource-types";
2395            case GOAL: return "http://hl7.org/fhir/resource-types";
2396            case GROUP: return "http://hl7.org/fhir/resource-types";
2397            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
2398            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
2399            case IMAGINGSELECTION: return "http://hl7.org/fhir/resource-types";
2400            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
2401            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
2402            case IMMUNIZATIONEVALUATION: return "http://hl7.org/fhir/resource-types";
2403            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
2404            case INGREDIENT: return "http://hl7.org/fhir/resource-types";
2405            case INSURANCEPLAN: return "http://hl7.org/fhir/resource-types";
2406            case INVENTORYREPORT: return "http://hl7.org/fhir/resource-types";
2407            case INVOICE: return "http://hl7.org/fhir/resource-types";
2408            case LINKAGE: return "http://hl7.org/fhir/resource-types";
2409            case LIST: return "http://hl7.org/fhir/resource-types";
2410            case LOCATION: return "http://hl7.org/fhir/resource-types";
2411            case MANUFACTUREDITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
2412            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
2413            case MEDICATION: return "http://hl7.org/fhir/resource-types";
2414            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
2415            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
2416            case MEDICATIONKNOWLEDGE: return "http://hl7.org/fhir/resource-types";
2417            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
2418            case MEDICATIONUSAGE: return "http://hl7.org/fhir/resource-types";
2419            case MEDICINALPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
2420            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
2421            case MOLECULARSEQUENCE: return "http://hl7.org/fhir/resource-types";
2422            case NUTRITIONINTAKE: return "http://hl7.org/fhir/resource-types";
2423            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
2424            case NUTRITIONPRODUCT: return "http://hl7.org/fhir/resource-types";
2425            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
2426            case OBSERVATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
2427            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
2428            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
2429            case ORGANIZATIONAFFILIATION: return "http://hl7.org/fhir/resource-types";
2430            case PACKAGEDPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
2431            case PATIENT: return "http://hl7.org/fhir/resource-types";
2432            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
2433            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
2434            case PERMISSION: return "http://hl7.org/fhir/resource-types";
2435            case PERSON: return "http://hl7.org/fhir/resource-types";
2436            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
2437            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
2438            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
2439            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
2440            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
2441            case REGULATEDAUTHORIZATION: return "http://hl7.org/fhir/resource-types";
2442            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
2443            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
2444            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
2445            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
2446            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
2447            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
2448            case SERVICEREQUEST: return "http://hl7.org/fhir/resource-types";
2449            case SLOT: return "http://hl7.org/fhir/resource-types";
2450            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
2451            case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types";
2452            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
2453            case SUBSCRIPTIONSTATUS: return "http://hl7.org/fhir/resource-types";
2454            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
2455            case SUBSTANCEDEFINITION: return "http://hl7.org/fhir/resource-types";
2456            case SUBSTANCENUCLEICACID: return "http://hl7.org/fhir/resource-types";
2457            case SUBSTANCEPOLYMER: return "http://hl7.org/fhir/resource-types";
2458            case SUBSTANCEPROTEIN: return "http://hl7.org/fhir/resource-types";
2459            case SUBSTANCEREFERENCEINFORMATION: return "http://hl7.org/fhir/resource-types";
2460            case SUBSTANCESOURCEMATERIAL: return "http://hl7.org/fhir/resource-types";
2461            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
2462            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
2463            case TASK: return "http://hl7.org/fhir/resource-types";
2464            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
2465            case TRANSPORT: return "http://hl7.org/fhir/resource-types";
2466            case VERIFICATIONRESULT: return "http://hl7.org/fhir/resource-types";
2467            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
2468            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
2469            case NULL: return null;
2470            default: return "?";
2471          }
2472        }
2473        public String getDefinition() {
2474          switch (this) {
2475            case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.";
2476            case AGE: return "A duration of time during which an organism (or a process) has existed.";
2477            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
2478            case ATTACHMENT: return "For referring to data content defined in other formats.";
2479            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
2480            case BACKBONETYPE: return "Base definition for the few data types that are allowed to carry modifier extensions.";
2481            case BASE: return "Base definition for all types defined in FHIR type system.";
2482            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
2483            case CODEABLEREFERENCE: return "A reference to a resource (by instance), or instead, a reference to a concept defined in a terminology or ontology (by class).";
2484            case CODING: return "A reference to a code defined by a terminology system.";
2485            case CONTACTDETAIL: return "Specifies contact information for a person or organization.";
2486            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
2487            case CONTRIBUTOR: return "A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.";
2488            case COUNT: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
2489            case DATAREQUIREMENT: return "Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.";
2490            case DATATYPE: return "The base class for all re-useable types defined as part of the FHIR Specification.";
2491            case DISTANCE: return "A length - a value with a unit that is a physical distance.";
2492            case DOSAGE: return "Indicates how the medication is/was taken or should be taken by the patient.";
2493            case DURATION: return "A length of time.";
2494            case ELEMENT: return "Base definition for all elements in a resource.";
2495            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
2496            case EXPRESSION: return "A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used.";
2497            case EXTENDEDCONTACTDETAIL: return "Specifies contact information for a specific purpose over a period of time, might be handled/monitored by a specific named person or organization.";
2498            case EXTENSION: return "Optional Extension Element - found in all resources.";
2499            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
2500            case IDENTIFIER: return "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.";
2501            case MARKETINGSTATUS: return "The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.";
2502            case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.";
2503            case MONEY: return "An amount of economic utility in some recognized currency.";
2504            case MONEYQUANTITY: return "";
2505            case NARRATIVE: return "A human-readable summary of the resource conveying the essential clinical and business information for the resource.";
2506            case PARAMETERDEFINITION: return "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.";
2507            case PERIOD: return "A time period defined by a start and end date and optionally time.";
2508            case POPULATION: return "A populatioof people with some set of grouping criteria.";
2509            case PRIMITIVETYPE: return "The base type for all re-useable types defined that have a simple property.";
2510            case PRODUCTSHELFLIFE: return "The shelf-life and storage information for a medicinal product item or container can be described using this class.";
2511            case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
2512            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
2513            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
2514            case RATIORANGE: return "A range of ratios expressed as a low and high numerator and a denominator.";
2515            case REFERENCE: return "A reference from one resource to another.";
2516            case RELATEDARTIFACT: return "Related artifacts such as additional documentation, justification, or bibliographic references.";
2517            case SAMPLEDDATA: return "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.";
2518            case SIGNATURE: return "A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.";
2519            case SIMPLEQUANTITY: return "";
2520            case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.";
2521            case TRIGGERDEFINITION: return "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.";
2522            case USAGECONTEXT: return "Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).";
2523            case BASE64BINARY: return "A stream of bytes";
2524            case BOOLEAN: return "Value of \"true\" or \"false\"";
2525            case CANONICAL: return "A URI that is a reference to a canonical URL on a FHIR resource";
2526            case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents";
2527            case DATE: return "A date or partial date (e.g. just year or year + month). There is no UTC offset. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.";
2528            case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a UTC offset SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.";
2529            case DECIMAL: return "A rational number with implicit precision";
2530            case ID: return "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.";
2531            case INSTANT: return "An instant in time - known at least to the second";
2532            case INTEGER: return "A whole number";
2533            case INTEGER64: return "A very large whole number";
2534            case MARKDOWN: return "A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine";
2535            case OID: return "An OID represented as a URI";
2536            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
2537            case STRING: return "A sequence of Unicode characters";
2538            case TIME: return "A time during the day, with no date specified";
2539            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
2540            case URI: return "String of characters used to identify a name or a resource";
2541            case URL: return "A URI that is a literal reference";
2542            case UUID: return "A UUID, represented as a URI";
2543            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
2544            case RESOURCE: return "--- Abstract Type! ---This is the base resource type for everything.";
2545            case BINARY: return "A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
2546            case BUNDLE: return "A container for a collection of resources.";
2547            case DOMAINRESOURCE: return "--- Abstract Type! ---A resource that includes narrative, extensions, and contained resources.";
2548            case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.";
2549            case ADMINISTRABLEPRODUCTDEFINITION: return "A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed).";
2550            case ADVERSEEVENT: return "An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research subject.  The unintended effects may require additional monitoring, treatment or hospitalization or may result in death.  The AdverseEvent resource also extends to potential or avoided events that could have had such effects.";
2551            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
2552            case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).";
2553            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
2554            case ARTIFACTASSESSMENT: return "This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content.";
2555            case AUDITEVENT: return "A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.";
2556            case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.";
2557            case BIOLOGICALLYDERIVEDPRODUCT: return "A biological material originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity.";
2558            case BODYSTRUCTURE: return "Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.";
2559            case CANONICALRESOURCE: return "--- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.";
2560            case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
2561            case CAPABILITYSTATEMENT2: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
2562            case CODESYSTEM: return "The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.";
2563            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
2564            case EXAMPLESCENARIO: return "Example of workflow instance.";
2565            case GRAPHDEFINITION: return "A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.";
2566            case IMPLEMENTATIONGUIDE: return "A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.";
2567            case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.";
2568            case METADATARESOURCE: return "--- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.";
2569            case ACTIVITYDEFINITION: return "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.";
2570            case CHARGEITEMDEFINITION: return "The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.";
2571            case CITATION: return "The Citation Resource enables reference to any knowledge artifact for purposes of identification and attribution. The Citation Resource supports existing reference structures and developing publication practices such as versioning, expressing complex contributorship roles, and referencing computable resources.";
2572            case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.";
2573            case CONDITIONDEFINITION: return "A definition of a condition and information relevant to managing it.";
2574            case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur.";
2575            case EVIDENCE: return "The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.";
2576            case EVIDENCEREPORT: return "The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.";
2577            case EVIDENCEVARIABLE: return "The EvidenceVariable resource describes an element that knowledge (Evidence) is about.";
2578            case LIBRARY: return "The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.";
2579            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
2580            case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a \"System\" used within the Identifier and Coding data types.";
2581            case PLANDEFINITION: return "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.";
2582            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.";
2583            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
2584            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
2585            case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.";
2586            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
2587            case SUBSCRIPTIONTOPIC: return "Describes a stream of resource state changes identified by trigger criteria and annotated with labels useful to filter projections from this topic.";
2588            case TERMINOLOGYCAPABILITIES: return "A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
2589            case TESTSCRIPT: return "A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.";
2590            case VALUESET: return "A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).";
2591            case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.";
2592            case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care.";
2593            case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.";
2594            case CLAIM: return "A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.";
2595            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
2596            case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score.";
2597            case CLINICALUSEDEFINITION: return "A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.";
2598            case COMMUNICATION: return "A clinical or business level record of information being transmitted or shared; e.g. an alert that was sent to a responsible provider, a public health agency communication to a provider/reporter in response to a case report for a reportable condition.";
2599            case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.";
2600            case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).";
2601            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
2602            case CONSENT: return "A record of a healthcare consumer?s  choices  or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.";
2603            case CONTRACT: return "Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.";
2604            case COVERAGE: return "Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.";
2605            case COVERAGEELIGIBILITYREQUEST: return "The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.";
2606            case COVERAGEELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.";
2607            case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.";
2608            case DEVICE: return "This resource describes the properties (regulated, has real time clock, etc.), adminstrative (manufacturer name, model number, serial number, firmware, etc), and type (knee replacement, blood pressure cuff, MRI, etc.) of a physical unit (these values do not change much within a given module, for example the serail number, manufacturer name, and model number). An actual unit may consist of several modules in a distinct hierarchy and these are represented by multiple Device resources and bound through the 'parent' element.";
2609            case DEVICEDEFINITION: return "This is a specialized resource that defines the characteristics and capabilities of a device.";
2610            case DEVICEDISPENSE: return "Indicates that a device is to be or has been dispensed for a named person/patient.  This includes a description of the product (supply) provided and the instructions for using the device.";
2611            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
2612            case DEVICEREQUEST: return "Represents a request a device to be provided to a specific patient. The device may be an implantable device to be subsequently implanted, or an external assistive device, such as a walker, to be delivered and subsequently be used.";
2613            case DEVICEUSAGE: return "A record of a device being used by a patient where the record is the result of a report from the patient or a clinician.";
2614            case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic tests performed on patients, groups of patients, products, substances, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. The report also includes non-clinical context such as batch analysis and stability reporting of products and substances.";
2615            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
2616            case DOCUMENTREFERENCE: return "A reference to a document of any kind for any purpose. While the term ?document? implies a more narrow focus, for this resource this \"document\" encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference.";
2617            case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.";
2618            case ENDPOINT: return "The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b, a REST endpoint for another FHIR server, or a s/Mime email address. This may include any security context information.";
2619            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
2620            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.";
2621            case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.";
2622            case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.";
2623            case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient.";
2624            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
2625            case FORMULARYITEM: return "This resource describes a product or service that is available through a program and includes the conditions and constraints of availability.  All of the information in this resource is specific to the inclusion of the item in the formulary and is not inherent to the item itself.";
2626            case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.";
2627            case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.";
2628            case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.";
2629            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
2630            case IMAGINGSELECTION: return "A selection of DICOM SOP instances and/or frames within a single Study and Series. This might include additional specifics such as an image region, an Observation UID or a Segmentation Number, allowing linkage to an Observation Resource or transferring this information along with the ImagingStudy Resource.";
2631            case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.";
2632            case IMMUNIZATION: return "Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.";
2633            case IMMUNIZATIONEVALUATION: return "Describes a comparison of an immunization event against published recommendations to determine if the administration is \"valid\" in relation to those  recommendations.";
2634            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.";
2635            case INGREDIENT: return "An ingredient of a manufactured item or pharmaceutical product.";
2636            case INSURANCEPLAN: return "Details of a Health Insurance product/plan provided by an organization.";
2637            case INVENTORYREPORT: return "A report of inventory or stock items.";
2638            case INVOICE: return "Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.";
2639            case LINKAGE: return "Identifies two or more records (resource instances) that refer to the same real-world \"occurrence\".";
2640            case LIST: return "A list is a curated collection of resources.";
2641            case LOCATION: return "Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.";
2642            case MANUFACTUREDITEMDEFINITION: return "The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.";
2643            case MEASUREREPORT: return "The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.";
2644            case MEDICATION: return "This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.";
2645            case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.";
2646            case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.";
2647            case MEDICATIONKNOWLEDGE: return "Information about a medication that is used to support knowledge.";
2648            case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.";
2649            case MEDICATIONUSAGE: return "A record of a medication that is being consumed by a patient.   A MedicationUsage may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. \n\nThe primary difference between a medicationusage and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medicationusage is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the Medication Usage information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.";
2650            case MEDICINALPRODUCTDEFINITION: return "Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use, drug catalogs, to support prescribing, adverse events management etc.).";
2651            case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.";
2652            case MOLECULARSEQUENCE: return "Representation of a molecular sequence.";
2653            case NUTRITIONINTAKE: return "A record of food or fluid that is being consumed by a patient.  A NutritionIntake may indicate that the patient may be consuming the food or fluid now or has consumed the food or fluid in the past.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay or through an app that tracks food or fluids consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label,  or from a clinician documenting observed intake.";
2654            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
2655            case NUTRITIONPRODUCT: return "A food or supplement that is consumed by patients.";
2656            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
2657            case OBSERVATIONDEFINITION: return "Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.";
2658            case OPERATIONOUTCOME: return "A collection of error, warning, or information messages that result from a system action.";
2659            case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.";
2660            case ORGANIZATIONAFFILIATION: return "Defines an affiliation/assotiation/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship.";
2661            case PACKAGEDPRODUCTDEFINITION: return "A medically related item or items, in a container or package.";
2662            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
2663            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
2664            case PAYMENTRECONCILIATION: return "This resource provides the details including amount of a payment and allocates the payment items being paid.";
2665            case PERMISSION: return "Permission.";
2666            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
2667            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
2668            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
2669            case PROCEDURE: return "An action that is or was performed on or for a patient, practitioner, device, organization, or location. For example, this can be a physical intervention on a patient like an operation, or less invasive like long term services, counseling, or hypnotherapy.  This can be a quality or safety inspection for a location, organization, or device.  This can be an accreditation procedure on a practitioner for licensing.";
2670            case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.";
2671            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.";
2672            case REGULATEDAUTHORIZATION: return "Regulatory approval, clearance or licencing related to a regulated product, treatment, facility or activity that is cited in a guidance, regulation, rule or legislative act. An example is Market Authorization relating to a Medicinal Product.";
2673            case RELATEDPERSON: return "Information about a person that is involved in a patient's health or the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.";
2674            case REQUESTGROUP: return "A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\".";
2675            case RESEARCHSTUDY: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
2676            case RESEARCHSUBJECT: return "A physical entity which is the primary unit of operational and/or administrative interest in a study.";
2677            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
2678            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
2679            case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.";
2680            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
2681            case SPECIMEN: return "A sample to be used for analysis.";
2682            case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements.";
2683            case SUBSCRIPTION: return "The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.";
2684            case SUBSCRIPTIONSTATUS: return "The SubscriptionStatus resource describes the state of a Subscription during notifications.";
2685            case SUBSTANCE: return "A homogeneous material with a definite composition.";
2686            case SUBSTANCEDEFINITION: return "The detailed description of a substance, typically at a level beyond what is used for prescribing.";
2687            case SUBSTANCENUCLEICACID: return "Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5?-3? direction.";
2688            case SUBSTANCEPOLYMER: return "Properties of a substance specific to it being a polymer.";
2689            case SUBSTANCEPROTEIN: return "A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators.";
2690            case SUBSTANCEREFERENCEINFORMATION: return "Todo.";
2691            case SUBSTANCESOURCEMATERIAL: return "Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex.";
2692            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
2693            case SUPPLYREQUEST: return "A record of a non-patient specific request for a medication, substance, device, certain types of biologically derived product, and nutrition product used in the healthcare setting.";
2694            case TASK: return "A task to be performed.";
2695            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
2696            case TRANSPORT: return "Record of transport.";
2697            case VERIFICATIONRESULT: return "Describes validation requirements, source(s), status and dates for one or more elements.";
2698            case VISIONPRESCRIPTION: return "An authorization for the provision of glasses and/or contact lenses to a patient.";
2699            case PARAMETERS: return "This resource is a non-persisted resource primarily used to pass information into and back from an [operation](operations.html). There is no RESTful endpoint associated with it.";
2700            case NULL: return null;
2701            default: return "?";
2702          }
2703        }
2704        public String getDisplay() {
2705          switch (this) {
2706            case ADDRESS: return "Address";
2707            case AGE: return "Age";
2708            case ANNOTATION: return "Annotation";
2709            case ATTACHMENT: return "Attachment";
2710            case BACKBONEELEMENT: return "BackboneElement";
2711            case BACKBONETYPE: return "BackboneType";
2712            case BASE: return "Base";
2713            case CODEABLECONCEPT: return "CodeableConcept";
2714            case CODEABLEREFERENCE: return "CodeableReference";
2715            case CODING: return "Coding";
2716            case CONTACTDETAIL: return "ContactDetail";
2717            case CONTACTPOINT: return "ContactPoint";
2718            case CONTRIBUTOR: return "Contributor";
2719            case COUNT: return "Count";
2720            case DATAREQUIREMENT: return "DataRequirement";
2721            case DATATYPE: return "DataType";
2722            case DISTANCE: return "Distance";
2723            case DOSAGE: return "Dosage";
2724            case DURATION: return "Duration";
2725            case ELEMENT: return "Element";
2726            case ELEMENTDEFINITION: return "ElementDefinition";
2727            case EXPRESSION: return "Expression";
2728            case EXTENDEDCONTACTDETAIL: return "ExtendedContactDetail";
2729            case EXTENSION: return "Extension";
2730            case HUMANNAME: return "HumanName";
2731            case IDENTIFIER: return "Identifier";
2732            case MARKETINGSTATUS: return "MarketingStatus";
2733            case META: return "Meta";
2734            case MONEY: return "Money";
2735            case MONEYQUANTITY: return "MoneyQuantity";
2736            case NARRATIVE: return "Narrative";
2737            case PARAMETERDEFINITION: return "ParameterDefinition";
2738            case PERIOD: return "Period";
2739            case POPULATION: return "Population";
2740            case PRIMITIVETYPE: return "PrimitiveType";
2741            case PRODUCTSHELFLIFE: return "ProductShelfLife";
2742            case QUANTITY: return "Quantity";
2743            case RANGE: return "Range";
2744            case RATIO: return "Ratio";
2745            case RATIORANGE: return "RatioRange";
2746            case REFERENCE: return "Reference";
2747            case RELATEDARTIFACT: return "RelatedArtifact";
2748            case SAMPLEDDATA: return "SampledData";
2749            case SIGNATURE: return "Signature";
2750            case SIMPLEQUANTITY: return "SimpleQuantity";
2751            case TIMING: return "Timing";
2752            case TRIGGERDEFINITION: return "TriggerDefinition";
2753            case USAGECONTEXT: return "UsageContext";
2754            case BASE64BINARY: return "base64Binary";
2755            case BOOLEAN: return "boolean";
2756            case CANONICAL: return "canonical";
2757            case CODE: return "code";
2758            case DATE: return "date";
2759            case DATETIME: return "dateTime";
2760            case DECIMAL: return "decimal";
2761            case ID: return "id";
2762            case INSTANT: return "instant";
2763            case INTEGER: return "integer";
2764            case INTEGER64: return "integer64";
2765            case MARKDOWN: return "markdown";
2766            case OID: return "oid";
2767            case POSITIVEINT: return "positiveInt";
2768            case STRING: return "string";
2769            case TIME: return "time";
2770            case UNSIGNEDINT: return "unsignedInt";
2771            case URI: return "uri";
2772            case URL: return "url";
2773            case UUID: return "uuid";
2774            case XHTML: return "XHTML";
2775            case RESOURCE: return "Resource";
2776            case BINARY: return "Binary";
2777            case BUNDLE: return "Bundle";
2778            case DOMAINRESOURCE: return "DomainResource";
2779            case ACCOUNT: return "Account";
2780            case ADMINISTRABLEPRODUCTDEFINITION: return "AdministrableProductDefinition";
2781            case ADVERSEEVENT: return "AdverseEvent";
2782            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
2783            case APPOINTMENT: return "Appointment";
2784            case APPOINTMENTRESPONSE: return "AppointmentResponse";
2785            case ARTIFACTASSESSMENT: return "ArtifactAssessment";
2786            case AUDITEVENT: return "AuditEvent";
2787            case BASIC: return "Basic";
2788            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
2789            case BODYSTRUCTURE: return "BodyStructure";
2790            case CANONICALRESOURCE: return "CanonicalResource";
2791            case CAPABILITYSTATEMENT: return "CapabilityStatement";
2792            case CAPABILITYSTATEMENT2: return "CapabilityStatement2";
2793            case CODESYSTEM: return "CodeSystem";
2794            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
2795            case EXAMPLESCENARIO: return "ExampleScenario";
2796            case GRAPHDEFINITION: return "GraphDefinition";
2797            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
2798            case MESSAGEDEFINITION: return "MessageDefinition";
2799            case METADATARESOURCE: return "MetadataResource";
2800            case ACTIVITYDEFINITION: return "ActivityDefinition";
2801            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
2802            case CITATION: return "Citation";
2803            case CONCEPTMAP: return "ConceptMap";
2804            case CONDITIONDEFINITION: return "ConditionDefinition";
2805            case EVENTDEFINITION: return "EventDefinition";
2806            case EVIDENCE: return "Evidence";
2807            case EVIDENCEREPORT: return "EvidenceReport";
2808            case EVIDENCEVARIABLE: return "EvidenceVariable";
2809            case LIBRARY: return "Library";
2810            case MEASURE: return "Measure";
2811            case NAMINGSYSTEM: return "NamingSystem";
2812            case PLANDEFINITION: return "PlanDefinition";
2813            case QUESTIONNAIRE: return "Questionnaire";
2814            case OPERATIONDEFINITION: return "OperationDefinition";
2815            case SEARCHPARAMETER: return "SearchParameter";
2816            case STRUCTUREDEFINITION: return "StructureDefinition";
2817            case STRUCTUREMAP: return "StructureMap";
2818            case SUBSCRIPTIONTOPIC: return "SubscriptionTopic";
2819            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
2820            case TESTSCRIPT: return "TestScript";
2821            case VALUESET: return "ValueSet";
2822            case CAREPLAN: return "CarePlan";
2823            case CARETEAM: return "CareTeam";
2824            case CHARGEITEM: return "ChargeItem";
2825            case CLAIM: return "Claim";
2826            case CLAIMRESPONSE: return "ClaimResponse";
2827            case CLINICALIMPRESSION: return "ClinicalImpression";
2828            case CLINICALUSEDEFINITION: return "ClinicalUseDefinition";
2829            case COMMUNICATION: return "Communication";
2830            case COMMUNICATIONREQUEST: return "CommunicationRequest";
2831            case COMPOSITION: return "Composition";
2832            case CONDITION: return "Condition";
2833            case CONSENT: return "Consent";
2834            case CONTRACT: return "Contract";
2835            case COVERAGE: return "Coverage";
2836            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
2837            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
2838            case DETECTEDISSUE: return "DetectedIssue";
2839            case DEVICE: return "Device";
2840            case DEVICEDEFINITION: return "DeviceDefinition";
2841            case DEVICEDISPENSE: return "DeviceDispense";
2842            case DEVICEMETRIC: return "DeviceMetric";
2843            case DEVICEREQUEST: return "DeviceRequest";
2844            case DEVICEUSAGE: return "DeviceUsage";
2845            case DIAGNOSTICREPORT: return "DiagnosticReport";
2846            case DOCUMENTMANIFEST: return "DocumentManifest";
2847            case DOCUMENTREFERENCE: return "DocumentReference";
2848            case ENCOUNTER: return "Encounter";
2849            case ENDPOINT: return "Endpoint";
2850            case ENROLLMENTREQUEST: return "EnrollmentRequest";
2851            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
2852            case EPISODEOFCARE: return "EpisodeOfCare";
2853            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
2854            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
2855            case FLAG: return "Flag";
2856            case FORMULARYITEM: return "FormularyItem";
2857            case GOAL: return "Goal";
2858            case GROUP: return "Group";
2859            case GUIDANCERESPONSE: return "GuidanceResponse";
2860            case HEALTHCARESERVICE: return "HealthcareService";
2861            case IMAGINGSELECTION: return "ImagingSelection";
2862            case IMAGINGSTUDY: return "ImagingStudy";
2863            case IMMUNIZATION: return "Immunization";
2864            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
2865            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
2866            case INGREDIENT: return "Ingredient";
2867            case INSURANCEPLAN: return "InsurancePlan";
2868            case INVENTORYREPORT: return "InventoryReport";
2869            case INVOICE: return "Invoice";
2870            case LINKAGE: return "Linkage";
2871            case LIST: return "List";
2872            case LOCATION: return "Location";
2873            case MANUFACTUREDITEMDEFINITION: return "ManufacturedItemDefinition";
2874            case MEASUREREPORT: return "MeasureReport";
2875            case MEDICATION: return "Medication";
2876            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
2877            case MEDICATIONDISPENSE: return "MedicationDispense";
2878            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
2879            case MEDICATIONREQUEST: return "MedicationRequest";
2880            case MEDICATIONUSAGE: return "MedicationUsage";
2881            case MEDICINALPRODUCTDEFINITION: return "MedicinalProductDefinition";
2882            case MESSAGEHEADER: return "MessageHeader";
2883            case MOLECULARSEQUENCE: return "MolecularSequence";
2884            case NUTRITIONINTAKE: return "NutritionIntake";
2885            case NUTRITIONORDER: return "NutritionOrder";
2886            case NUTRITIONPRODUCT: return "NutritionProduct";
2887            case OBSERVATION: return "Observation";
2888            case OBSERVATIONDEFINITION: return "ObservationDefinition";
2889            case OPERATIONOUTCOME: return "OperationOutcome";
2890            case ORGANIZATION: return "Organization";
2891            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
2892            case PACKAGEDPRODUCTDEFINITION: return "PackagedProductDefinition";
2893            case PATIENT: return "Patient";
2894            case PAYMENTNOTICE: return "PaymentNotice";
2895            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
2896            case PERMISSION: return "Permission";
2897            case PERSON: return "Person";
2898            case PRACTITIONER: return "Practitioner";
2899            case PRACTITIONERROLE: return "PractitionerRole";
2900            case PROCEDURE: return "Procedure";
2901            case PROVENANCE: return "Provenance";
2902            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
2903            case REGULATEDAUTHORIZATION: return "RegulatedAuthorization";
2904            case RELATEDPERSON: return "RelatedPerson";
2905            case REQUESTGROUP: return "RequestGroup";
2906            case RESEARCHSTUDY: return "ResearchStudy";
2907            case RESEARCHSUBJECT: return "ResearchSubject";
2908            case RISKASSESSMENT: return "RiskAssessment";
2909            case SCHEDULE: return "Schedule";
2910            case SERVICEREQUEST: return "ServiceRequest";
2911            case SLOT: return "Slot";
2912            case SPECIMEN: return "Specimen";
2913            case SPECIMENDEFINITION: return "SpecimenDefinition";
2914            case SUBSCRIPTION: return "Subscription";
2915            case SUBSCRIPTIONSTATUS: return "SubscriptionStatus";
2916            case SUBSTANCE: return "Substance";
2917            case SUBSTANCEDEFINITION: return "SubstanceDefinition";
2918            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
2919            case SUBSTANCEPOLYMER: return "SubstancePolymer";
2920            case SUBSTANCEPROTEIN: return "SubstanceProtein";
2921            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
2922            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
2923            case SUPPLYDELIVERY: return "SupplyDelivery";
2924            case SUPPLYREQUEST: return "SupplyRequest";
2925            case TASK: return "Task";
2926            case TESTREPORT: return "TestReport";
2927            case TRANSPORT: return "Transport";
2928            case VERIFICATIONRESULT: return "VerificationResult";
2929            case VISIONPRESCRIPTION: return "VisionPrescription";
2930            case PARAMETERS: return "Parameters";
2931            case NULL: return null;
2932            default: return "?";
2933          }
2934        }
2935    }
2936
2937  public static class FHIRDefinedTypeEnumFactory implements EnumFactory<FHIRDefinedType> {
2938    public FHIRDefinedType fromCode(String codeString) throws IllegalArgumentException {
2939      if (codeString == null || "".equals(codeString))
2940            if (codeString == null || "".equals(codeString))
2941                return null;
2942        if ("Address".equals(codeString))
2943          return FHIRDefinedType.ADDRESS;
2944        if ("Age".equals(codeString))
2945          return FHIRDefinedType.AGE;
2946        if ("Annotation".equals(codeString))
2947          return FHIRDefinedType.ANNOTATION;
2948        if ("Attachment".equals(codeString))
2949          return FHIRDefinedType.ATTACHMENT;
2950        if ("BackboneElement".equals(codeString))
2951          return FHIRDefinedType.BACKBONEELEMENT;
2952        if ("BackboneType".equals(codeString))
2953          return FHIRDefinedType.BACKBONETYPE;
2954        if ("Base".equals(codeString))
2955          return FHIRDefinedType.BASE;
2956        if ("CodeableConcept".equals(codeString))
2957          return FHIRDefinedType.CODEABLECONCEPT;
2958        if ("CodeableReference".equals(codeString))
2959          return FHIRDefinedType.CODEABLEREFERENCE;
2960        if ("Coding".equals(codeString))
2961          return FHIRDefinedType.CODING;
2962        if ("ContactDetail".equals(codeString))
2963          return FHIRDefinedType.CONTACTDETAIL;
2964        if ("ContactPoint".equals(codeString))
2965          return FHIRDefinedType.CONTACTPOINT;
2966        if ("Contributor".equals(codeString))
2967          return FHIRDefinedType.CONTRIBUTOR;
2968        if ("Count".equals(codeString))
2969          return FHIRDefinedType.COUNT;
2970        if ("DataRequirement".equals(codeString))
2971          return FHIRDefinedType.DATAREQUIREMENT;
2972        if ("DataType".equals(codeString))
2973          return FHIRDefinedType.DATATYPE;
2974        if ("Distance".equals(codeString))
2975          return FHIRDefinedType.DISTANCE;
2976        if ("Dosage".equals(codeString))
2977          return FHIRDefinedType.DOSAGE;
2978        if ("Duration".equals(codeString))
2979          return FHIRDefinedType.DURATION;
2980        if ("Element".equals(codeString))
2981          return FHIRDefinedType.ELEMENT;
2982        if ("ElementDefinition".equals(codeString))
2983          return FHIRDefinedType.ELEMENTDEFINITION;
2984        if ("Expression".equals(codeString))
2985          return FHIRDefinedType.EXPRESSION;
2986        if ("ExtendedContactDetail".equals(codeString))
2987          return FHIRDefinedType.EXTENDEDCONTACTDETAIL;
2988        if ("Extension".equals(codeString))
2989          return FHIRDefinedType.EXTENSION;
2990        if ("HumanName".equals(codeString))
2991          return FHIRDefinedType.HUMANNAME;
2992        if ("Identifier".equals(codeString))
2993          return FHIRDefinedType.IDENTIFIER;
2994        if ("MarketingStatus".equals(codeString))
2995          return FHIRDefinedType.MARKETINGSTATUS;
2996        if ("Meta".equals(codeString))
2997          return FHIRDefinedType.META;
2998        if ("Money".equals(codeString))
2999          return FHIRDefinedType.MONEY;
3000        if ("MoneyQuantity".equals(codeString))
3001          return FHIRDefinedType.MONEYQUANTITY;
3002        if ("Narrative".equals(codeString))
3003          return FHIRDefinedType.NARRATIVE;
3004        if ("ParameterDefinition".equals(codeString))
3005          return FHIRDefinedType.PARAMETERDEFINITION;
3006        if ("Period".equals(codeString))
3007          return FHIRDefinedType.PERIOD;
3008        if ("Population".equals(codeString))
3009          return FHIRDefinedType.POPULATION;
3010        if ("PrimitiveType".equals(codeString))
3011          return FHIRDefinedType.PRIMITIVETYPE;
3012        if ("ProductShelfLife".equals(codeString))
3013          return FHIRDefinedType.PRODUCTSHELFLIFE;
3014        if ("Quantity".equals(codeString))
3015          return FHIRDefinedType.QUANTITY;
3016        if ("Range".equals(codeString))
3017          return FHIRDefinedType.RANGE;
3018        if ("Ratio".equals(codeString))
3019          return FHIRDefinedType.RATIO;
3020        if ("RatioRange".equals(codeString))
3021          return FHIRDefinedType.RATIORANGE;
3022        if ("Reference".equals(codeString))
3023          return FHIRDefinedType.REFERENCE;
3024        if ("RelatedArtifact".equals(codeString))
3025          return FHIRDefinedType.RELATEDARTIFACT;
3026        if ("SampledData".equals(codeString))
3027          return FHIRDefinedType.SAMPLEDDATA;
3028        if ("Signature".equals(codeString))
3029          return FHIRDefinedType.SIGNATURE;
3030        if ("SimpleQuantity".equals(codeString))
3031          return FHIRDefinedType.SIMPLEQUANTITY;
3032        if ("Timing".equals(codeString))
3033          return FHIRDefinedType.TIMING;
3034        if ("TriggerDefinition".equals(codeString))
3035          return FHIRDefinedType.TRIGGERDEFINITION;
3036        if ("UsageContext".equals(codeString))
3037          return FHIRDefinedType.USAGECONTEXT;
3038        if ("base64Binary".equals(codeString))
3039          return FHIRDefinedType.BASE64BINARY;
3040        if ("boolean".equals(codeString))
3041          return FHIRDefinedType.BOOLEAN;
3042        if ("canonical".equals(codeString))
3043          return FHIRDefinedType.CANONICAL;
3044        if ("code".equals(codeString))
3045          return FHIRDefinedType.CODE;
3046        if ("date".equals(codeString))
3047          return FHIRDefinedType.DATE;
3048        if ("dateTime".equals(codeString))
3049          return FHIRDefinedType.DATETIME;
3050        if ("decimal".equals(codeString))
3051          return FHIRDefinedType.DECIMAL;
3052        if ("id".equals(codeString))
3053          return FHIRDefinedType.ID;
3054        if ("instant".equals(codeString))
3055          return FHIRDefinedType.INSTANT;
3056        if ("integer".equals(codeString))
3057          return FHIRDefinedType.INTEGER;
3058        if ("integer64".equals(codeString))
3059          return FHIRDefinedType.INTEGER64;
3060        if ("markdown".equals(codeString))
3061          return FHIRDefinedType.MARKDOWN;
3062        if ("oid".equals(codeString))
3063          return FHIRDefinedType.OID;
3064        if ("positiveInt".equals(codeString))
3065          return FHIRDefinedType.POSITIVEINT;
3066        if ("string".equals(codeString))
3067          return FHIRDefinedType.STRING;
3068        if ("time".equals(codeString))
3069          return FHIRDefinedType.TIME;
3070        if ("unsignedInt".equals(codeString))
3071          return FHIRDefinedType.UNSIGNEDINT;
3072        if ("uri".equals(codeString))
3073          return FHIRDefinedType.URI;
3074        if ("url".equals(codeString))
3075          return FHIRDefinedType.URL;
3076        if ("uuid".equals(codeString))
3077          return FHIRDefinedType.UUID;
3078        if ("xhtml".equals(codeString))
3079          return FHIRDefinedType.XHTML;
3080        if ("Resource".equals(codeString))
3081          return FHIRDefinedType.RESOURCE;
3082        if ("Binary".equals(codeString))
3083          return FHIRDefinedType.BINARY;
3084        if ("Bundle".equals(codeString))
3085          return FHIRDefinedType.BUNDLE;
3086        if ("DomainResource".equals(codeString))
3087          return FHIRDefinedType.DOMAINRESOURCE;
3088        if ("Account".equals(codeString))
3089          return FHIRDefinedType.ACCOUNT;
3090        if ("AdministrableProductDefinition".equals(codeString))
3091          return FHIRDefinedType.ADMINISTRABLEPRODUCTDEFINITION;
3092        if ("AdverseEvent".equals(codeString))
3093          return FHIRDefinedType.ADVERSEEVENT;
3094        if ("AllergyIntolerance".equals(codeString))
3095          return FHIRDefinedType.ALLERGYINTOLERANCE;
3096        if ("Appointment".equals(codeString))
3097          return FHIRDefinedType.APPOINTMENT;
3098        if ("AppointmentResponse".equals(codeString))
3099          return FHIRDefinedType.APPOINTMENTRESPONSE;
3100        if ("ArtifactAssessment".equals(codeString))
3101          return FHIRDefinedType.ARTIFACTASSESSMENT;
3102        if ("AuditEvent".equals(codeString))
3103          return FHIRDefinedType.AUDITEVENT;
3104        if ("Basic".equals(codeString))
3105          return FHIRDefinedType.BASIC;
3106        if ("BiologicallyDerivedProduct".equals(codeString))
3107          return FHIRDefinedType.BIOLOGICALLYDERIVEDPRODUCT;
3108        if ("BodyStructure".equals(codeString))
3109          return FHIRDefinedType.BODYSTRUCTURE;
3110        if ("CanonicalResource".equals(codeString))
3111          return FHIRDefinedType.CANONICALRESOURCE;
3112        if ("CapabilityStatement".equals(codeString))
3113          return FHIRDefinedType.CAPABILITYSTATEMENT;
3114        if ("CapabilityStatement2".equals(codeString))
3115          return FHIRDefinedType.CAPABILITYSTATEMENT2;
3116        if ("CodeSystem".equals(codeString))
3117          return FHIRDefinedType.CODESYSTEM;
3118        if ("CompartmentDefinition".equals(codeString))
3119          return FHIRDefinedType.COMPARTMENTDEFINITION;
3120        if ("ExampleScenario".equals(codeString))
3121          return FHIRDefinedType.EXAMPLESCENARIO;
3122        if ("GraphDefinition".equals(codeString))
3123          return FHIRDefinedType.GRAPHDEFINITION;
3124        if ("ImplementationGuide".equals(codeString))
3125          return FHIRDefinedType.IMPLEMENTATIONGUIDE;
3126        if ("MessageDefinition".equals(codeString))
3127          return FHIRDefinedType.MESSAGEDEFINITION;
3128        if ("MetadataResource".equals(codeString))
3129          return FHIRDefinedType.METADATARESOURCE;
3130        if ("ActivityDefinition".equals(codeString))
3131          return FHIRDefinedType.ACTIVITYDEFINITION;
3132        if ("ChargeItemDefinition".equals(codeString))
3133          return FHIRDefinedType.CHARGEITEMDEFINITION;
3134        if ("Citation".equals(codeString))
3135          return FHIRDefinedType.CITATION;
3136        if ("ConceptMap".equals(codeString))
3137          return FHIRDefinedType.CONCEPTMAP;
3138        if ("ConditionDefinition".equals(codeString))
3139          return FHIRDefinedType.CONDITIONDEFINITION;
3140        if ("EventDefinition".equals(codeString))
3141          return FHIRDefinedType.EVENTDEFINITION;
3142        if ("Evidence".equals(codeString))
3143          return FHIRDefinedType.EVIDENCE;
3144        if ("EvidenceReport".equals(codeString))
3145          return FHIRDefinedType.EVIDENCEREPORT;
3146        if ("EvidenceVariable".equals(codeString))
3147          return FHIRDefinedType.EVIDENCEVARIABLE;
3148        if ("Library".equals(codeString))
3149          return FHIRDefinedType.LIBRARY;
3150        if ("Measure".equals(codeString))
3151          return FHIRDefinedType.MEASURE;
3152        if ("NamingSystem".equals(codeString))
3153          return FHIRDefinedType.NAMINGSYSTEM;
3154        if ("PlanDefinition".equals(codeString))
3155          return FHIRDefinedType.PLANDEFINITION;
3156        if ("Questionnaire".equals(codeString))
3157          return FHIRDefinedType.QUESTIONNAIRE;
3158        if ("OperationDefinition".equals(codeString))
3159          return FHIRDefinedType.OPERATIONDEFINITION;
3160        if ("SearchParameter".equals(codeString))
3161          return FHIRDefinedType.SEARCHPARAMETER;
3162        if ("StructureDefinition".equals(codeString))
3163          return FHIRDefinedType.STRUCTUREDEFINITION;
3164        if ("StructureMap".equals(codeString))
3165          return FHIRDefinedType.STRUCTUREMAP;
3166        if ("SubscriptionTopic".equals(codeString))
3167          return FHIRDefinedType.SUBSCRIPTIONTOPIC;
3168        if ("TerminologyCapabilities".equals(codeString))
3169          return FHIRDefinedType.TERMINOLOGYCAPABILITIES;
3170        if ("TestScript".equals(codeString))
3171          return FHIRDefinedType.TESTSCRIPT;
3172        if ("ValueSet".equals(codeString))
3173          return FHIRDefinedType.VALUESET;
3174        if ("CarePlan".equals(codeString))
3175          return FHIRDefinedType.CAREPLAN;
3176        if ("CareTeam".equals(codeString))
3177          return FHIRDefinedType.CARETEAM;
3178        if ("ChargeItem".equals(codeString))
3179          return FHIRDefinedType.CHARGEITEM;
3180        if ("Claim".equals(codeString))
3181          return FHIRDefinedType.CLAIM;
3182        if ("ClaimResponse".equals(codeString))
3183          return FHIRDefinedType.CLAIMRESPONSE;
3184        if ("ClinicalImpression".equals(codeString))
3185          return FHIRDefinedType.CLINICALIMPRESSION;
3186        if ("ClinicalUseDefinition".equals(codeString))
3187          return FHIRDefinedType.CLINICALUSEDEFINITION;
3188        if ("Communication".equals(codeString))
3189          return FHIRDefinedType.COMMUNICATION;
3190        if ("CommunicationRequest".equals(codeString))
3191          return FHIRDefinedType.COMMUNICATIONREQUEST;
3192        if ("Composition".equals(codeString))
3193          return FHIRDefinedType.COMPOSITION;
3194        if ("Condition".equals(codeString))
3195          return FHIRDefinedType.CONDITION;
3196        if ("Consent".equals(codeString))
3197          return FHIRDefinedType.CONSENT;
3198        if ("Contract".equals(codeString))
3199          return FHIRDefinedType.CONTRACT;
3200        if ("Coverage".equals(codeString))
3201          return FHIRDefinedType.COVERAGE;
3202        if ("CoverageEligibilityRequest".equals(codeString))
3203          return FHIRDefinedType.COVERAGEELIGIBILITYREQUEST;
3204        if ("CoverageEligibilityResponse".equals(codeString))
3205          return FHIRDefinedType.COVERAGEELIGIBILITYRESPONSE;
3206        if ("DetectedIssue".equals(codeString))
3207          return FHIRDefinedType.DETECTEDISSUE;
3208        if ("Device".equals(codeString))
3209          return FHIRDefinedType.DEVICE;
3210        if ("DeviceDefinition".equals(codeString))
3211          return FHIRDefinedType.DEVICEDEFINITION;
3212        if ("DeviceDispense".equals(codeString))
3213          return FHIRDefinedType.DEVICEDISPENSE;
3214        if ("DeviceMetric".equals(codeString))
3215          return FHIRDefinedType.DEVICEMETRIC;
3216        if ("DeviceRequest".equals(codeString))
3217          return FHIRDefinedType.DEVICEREQUEST;
3218        if ("DeviceUsage".equals(codeString))
3219          return FHIRDefinedType.DEVICEUSAGE;
3220        if ("DiagnosticReport".equals(codeString))
3221          return FHIRDefinedType.DIAGNOSTICREPORT;
3222        if ("DocumentManifest".equals(codeString))
3223          return FHIRDefinedType.DOCUMENTMANIFEST;
3224        if ("DocumentReference".equals(codeString))
3225          return FHIRDefinedType.DOCUMENTREFERENCE;
3226        if ("Encounter".equals(codeString))
3227          return FHIRDefinedType.ENCOUNTER;
3228        if ("Endpoint".equals(codeString))
3229          return FHIRDefinedType.ENDPOINT;
3230        if ("EnrollmentRequest".equals(codeString))
3231          return FHIRDefinedType.ENROLLMENTREQUEST;
3232        if ("EnrollmentResponse".equals(codeString))
3233          return FHIRDefinedType.ENROLLMENTRESPONSE;
3234        if ("EpisodeOfCare".equals(codeString))
3235          return FHIRDefinedType.EPISODEOFCARE;
3236        if ("ExplanationOfBenefit".equals(codeString))
3237          return FHIRDefinedType.EXPLANATIONOFBENEFIT;
3238        if ("FamilyMemberHistory".equals(codeString))
3239          return FHIRDefinedType.FAMILYMEMBERHISTORY;
3240        if ("Flag".equals(codeString))
3241          return FHIRDefinedType.FLAG;
3242        if ("FormularyItem".equals(codeString))
3243          return FHIRDefinedType.FORMULARYITEM;
3244        if ("Goal".equals(codeString))
3245          return FHIRDefinedType.GOAL;
3246        if ("Group".equals(codeString))
3247          return FHIRDefinedType.GROUP;
3248        if ("GuidanceResponse".equals(codeString))
3249          return FHIRDefinedType.GUIDANCERESPONSE;
3250        if ("HealthcareService".equals(codeString))
3251          return FHIRDefinedType.HEALTHCARESERVICE;
3252        if ("ImagingSelection".equals(codeString))
3253          return FHIRDefinedType.IMAGINGSELECTION;
3254        if ("ImagingStudy".equals(codeString))
3255          return FHIRDefinedType.IMAGINGSTUDY;
3256        if ("Immunization".equals(codeString))
3257          return FHIRDefinedType.IMMUNIZATION;
3258        if ("ImmunizationEvaluation".equals(codeString))
3259          return FHIRDefinedType.IMMUNIZATIONEVALUATION;
3260        if ("ImmunizationRecommendation".equals(codeString))
3261          return FHIRDefinedType.IMMUNIZATIONRECOMMENDATION;
3262        if ("Ingredient".equals(codeString))
3263          return FHIRDefinedType.INGREDIENT;
3264        if ("InsurancePlan".equals(codeString))
3265          return FHIRDefinedType.INSURANCEPLAN;
3266        if ("InventoryReport".equals(codeString))
3267          return FHIRDefinedType.INVENTORYREPORT;
3268        if ("Invoice".equals(codeString))
3269          return FHIRDefinedType.INVOICE;
3270        if ("Linkage".equals(codeString))
3271          return FHIRDefinedType.LINKAGE;
3272        if ("List".equals(codeString))
3273          return FHIRDefinedType.LIST;
3274        if ("Location".equals(codeString))
3275          return FHIRDefinedType.LOCATION;
3276        if ("ManufacturedItemDefinition".equals(codeString))
3277          return FHIRDefinedType.MANUFACTUREDITEMDEFINITION;
3278        if ("MeasureReport".equals(codeString))
3279          return FHIRDefinedType.MEASUREREPORT;
3280        if ("Medication".equals(codeString))
3281          return FHIRDefinedType.MEDICATION;
3282        if ("MedicationAdministration".equals(codeString))
3283          return FHIRDefinedType.MEDICATIONADMINISTRATION;
3284        if ("MedicationDispense".equals(codeString))
3285          return FHIRDefinedType.MEDICATIONDISPENSE;
3286        if ("MedicationKnowledge".equals(codeString))
3287          return FHIRDefinedType.MEDICATIONKNOWLEDGE;
3288        if ("MedicationRequest".equals(codeString))
3289          return FHIRDefinedType.MEDICATIONREQUEST;
3290        if ("MedicationUsage".equals(codeString))
3291          return FHIRDefinedType.MEDICATIONUSAGE;
3292        if ("MedicinalProductDefinition".equals(codeString))
3293          return FHIRDefinedType.MEDICINALPRODUCTDEFINITION;
3294        if ("MessageHeader".equals(codeString))
3295          return FHIRDefinedType.MESSAGEHEADER;
3296        if ("MolecularSequence".equals(codeString))
3297          return FHIRDefinedType.MOLECULARSEQUENCE;
3298        if ("NutritionIntake".equals(codeString))
3299          return FHIRDefinedType.NUTRITIONINTAKE;
3300        if ("NutritionOrder".equals(codeString))
3301          return FHIRDefinedType.NUTRITIONORDER;
3302        if ("NutritionProduct".equals(codeString))
3303          return FHIRDefinedType.NUTRITIONPRODUCT;
3304        if ("Observation".equals(codeString))
3305          return FHIRDefinedType.OBSERVATION;
3306        if ("ObservationDefinition".equals(codeString))
3307          return FHIRDefinedType.OBSERVATIONDEFINITION;
3308        if ("OperationOutcome".equals(codeString))
3309          return FHIRDefinedType.OPERATIONOUTCOME;
3310        if ("Organization".equals(codeString))
3311          return FHIRDefinedType.ORGANIZATION;
3312        if ("OrganizationAffiliation".equals(codeString))
3313          return FHIRDefinedType.ORGANIZATIONAFFILIATION;
3314        if ("PackagedProductDefinition".equals(codeString))
3315          return FHIRDefinedType.PACKAGEDPRODUCTDEFINITION;
3316        if ("Patient".equals(codeString))
3317          return FHIRDefinedType.PATIENT;
3318        if ("PaymentNotice".equals(codeString))
3319          return FHIRDefinedType.PAYMENTNOTICE;
3320        if ("PaymentReconciliation".equals(codeString))
3321          return FHIRDefinedType.PAYMENTRECONCILIATION;
3322        if ("Permission".equals(codeString))
3323          return FHIRDefinedType.PERMISSION;
3324        if ("Person".equals(codeString))
3325          return FHIRDefinedType.PERSON;
3326        if ("Practitioner".equals(codeString))
3327          return FHIRDefinedType.PRACTITIONER;
3328        if ("PractitionerRole".equals(codeString))
3329          return FHIRDefinedType.PRACTITIONERROLE;
3330        if ("Procedure".equals(codeString))
3331          return FHIRDefinedType.PROCEDURE;
3332        if ("Provenance".equals(codeString))
3333          return FHIRDefinedType.PROVENANCE;
3334        if ("QuestionnaireResponse".equals(codeString))
3335          return FHIRDefinedType.QUESTIONNAIRERESPONSE;
3336        if ("RegulatedAuthorization".equals(codeString))
3337          return FHIRDefinedType.REGULATEDAUTHORIZATION;
3338        if ("RelatedPerson".equals(codeString))
3339          return FHIRDefinedType.RELATEDPERSON;
3340        if ("RequestGroup".equals(codeString))
3341          return FHIRDefinedType.REQUESTGROUP;
3342        if ("ResearchStudy".equals(codeString))
3343          return FHIRDefinedType.RESEARCHSTUDY;
3344        if ("ResearchSubject".equals(codeString))
3345          return FHIRDefinedType.RESEARCHSUBJECT;
3346        if ("RiskAssessment".equals(codeString))
3347          return FHIRDefinedType.RISKASSESSMENT;
3348        if ("Schedule".equals(codeString))
3349          return FHIRDefinedType.SCHEDULE;
3350        if ("ServiceRequest".equals(codeString))
3351          return FHIRDefinedType.SERVICEREQUEST;
3352        if ("Slot".equals(codeString))
3353          return FHIRDefinedType.SLOT;
3354        if ("Specimen".equals(codeString))
3355          return FHIRDefinedType.SPECIMEN;
3356        if ("SpecimenDefinition".equals(codeString))
3357          return FHIRDefinedType.SPECIMENDEFINITION;
3358        if ("Subscription".equals(codeString))
3359          return FHIRDefinedType.SUBSCRIPTION;
3360        if ("SubscriptionStatus".equals(codeString))
3361          return FHIRDefinedType.SUBSCRIPTIONSTATUS;
3362        if ("Substance".equals(codeString))
3363          return FHIRDefinedType.SUBSTANCE;
3364        if ("SubstanceDefinition".equals(codeString))
3365          return FHIRDefinedType.SUBSTANCEDEFINITION;
3366        if ("SubstanceNucleicAcid".equals(codeString))
3367          return FHIRDefinedType.SUBSTANCENUCLEICACID;
3368        if ("SubstancePolymer".equals(codeString))
3369          return FHIRDefinedType.SUBSTANCEPOLYMER;
3370        if ("SubstanceProtein".equals(codeString))
3371          return FHIRDefinedType.SUBSTANCEPROTEIN;
3372        if ("SubstanceReferenceInformation".equals(codeString))
3373          return FHIRDefinedType.SUBSTANCEREFERENCEINFORMATION;
3374        if ("SubstanceSourceMaterial".equals(codeString))
3375          return FHIRDefinedType.SUBSTANCESOURCEMATERIAL;
3376        if ("SupplyDelivery".equals(codeString))
3377          return FHIRDefinedType.SUPPLYDELIVERY;
3378        if ("SupplyRequest".equals(codeString))
3379          return FHIRDefinedType.SUPPLYREQUEST;
3380        if ("Task".equals(codeString))
3381          return FHIRDefinedType.TASK;
3382        if ("TestReport".equals(codeString))
3383          return FHIRDefinedType.TESTREPORT;
3384        if ("Transport".equals(codeString))
3385          return FHIRDefinedType.TRANSPORT;
3386        if ("VerificationResult".equals(codeString))
3387          return FHIRDefinedType.VERIFICATIONRESULT;
3388        if ("VisionPrescription".equals(codeString))
3389          return FHIRDefinedType.VISIONPRESCRIPTION;
3390        if ("Parameters".equals(codeString))
3391          return FHIRDefinedType.PARAMETERS;
3392        throw new IllegalArgumentException("Unknown FHIRDefinedType code '"+codeString+"'");
3393        }
3394        public Enumeration<FHIRDefinedType> fromType(Base code) throws FHIRException {
3395          if (code == null)
3396            return null;
3397          if (code.isEmpty())
3398            return new Enumeration<FHIRDefinedType>(this);
3399          String codeString = ((PrimitiveType) code).asStringValue();
3400          if (codeString == null || "".equals(codeString))
3401            return null;
3402        if ("Address".equals(codeString))
3403          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ADDRESS);
3404        if ("Age".equals(codeString))
3405          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.AGE);
3406        if ("Annotation".equals(codeString))
3407          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ANNOTATION);
3408        if ("Attachment".equals(codeString))
3409          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ATTACHMENT);
3410        if ("BackboneElement".equals(codeString))
3411          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BACKBONEELEMENT);
3412        if ("BackboneType".equals(codeString))
3413          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BACKBONETYPE);
3414        if ("Base".equals(codeString))
3415          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BASE);
3416        if ("CodeableConcept".equals(codeString))
3417          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODEABLECONCEPT);
3418        if ("CodeableReference".equals(codeString))
3419          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODEABLEREFERENCE);
3420        if ("Coding".equals(codeString))
3421          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODING);
3422        if ("ContactDetail".equals(codeString))
3423          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTACTDETAIL);
3424        if ("ContactPoint".equals(codeString))
3425          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTACTPOINT);
3426        if ("Contributor".equals(codeString))
3427          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTRIBUTOR);
3428        if ("Count".equals(codeString))
3429          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COUNT);
3430        if ("DataRequirement".equals(codeString))
3431          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATAREQUIREMENT);
3432        if ("DataType".equals(codeString))
3433          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATATYPE);
3434        if ("Distance".equals(codeString))
3435          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DISTANCE);
3436        if ("Dosage".equals(codeString))
3437          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOSAGE);
3438        if ("Duration".equals(codeString))
3439          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DURATION);
3440        if ("Element".equals(codeString))
3441          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ELEMENT);
3442        if ("ElementDefinition".equals(codeString))
3443          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ELEMENTDEFINITION);
3444        if ("Expression".equals(codeString))
3445          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXPRESSION);
3446        if ("ExtendedContactDetail".equals(codeString))
3447          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXTENDEDCONTACTDETAIL);
3448        if ("Extension".equals(codeString))
3449          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXTENSION);
3450        if ("HumanName".equals(codeString))
3451          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.HUMANNAME);
3452        if ("Identifier".equals(codeString))
3453          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IDENTIFIER);
3454        if ("MarketingStatus".equals(codeString))
3455          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MARKETINGSTATUS);
3456        if ("Meta".equals(codeString))
3457          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.META);
3458        if ("Money".equals(codeString))
3459          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MONEY);
3460        if ("MoneyQuantity".equals(codeString))
3461          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MONEYQUANTITY);
3462        if ("Narrative".equals(codeString))
3463          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NARRATIVE);
3464        if ("ParameterDefinition".equals(codeString))
3465          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PARAMETERDEFINITION);
3466        if ("Period".equals(codeString))
3467          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PERIOD);
3468        if ("Population".equals(codeString))
3469          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.POPULATION);
3470        if ("PrimitiveType".equals(codeString))
3471          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PRIMITIVETYPE);
3472        if ("ProductShelfLife".equals(codeString))
3473          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PRODUCTSHELFLIFE);
3474        if ("Quantity".equals(codeString))
3475          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.QUANTITY);
3476        if ("Range".equals(codeString))
3477          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RANGE);
3478        if ("Ratio".equals(codeString))
3479          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RATIO);
3480        if ("RatioRange".equals(codeString))
3481          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RATIORANGE);
3482        if ("Reference".equals(codeString))
3483          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.REFERENCE);
3484        if ("RelatedArtifact".equals(codeString))
3485          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RELATEDARTIFACT);
3486        if ("SampledData".equals(codeString))
3487          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SAMPLEDDATA);
3488        if ("Signature".equals(codeString))
3489          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SIGNATURE);
3490        if ("SimpleQuantity".equals(codeString))
3491          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SIMPLEQUANTITY);
3492        if ("Timing".equals(codeString))
3493          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TIMING);
3494        if ("TriggerDefinition".equals(codeString))
3495          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TRIGGERDEFINITION);
3496        if ("UsageContext".equals(codeString))
3497          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.USAGECONTEXT);
3498        if ("base64Binary".equals(codeString))
3499          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BASE64BINARY);
3500        if ("boolean".equals(codeString))
3501          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BOOLEAN);
3502        if ("canonical".equals(codeString))
3503          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CANONICAL);
3504        if ("code".equals(codeString))
3505          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODE);
3506        if ("date".equals(codeString))
3507          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATE);
3508        if ("dateTime".equals(codeString))
3509          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATETIME);
3510        if ("decimal".equals(codeString))
3511          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DECIMAL);
3512        if ("id".equals(codeString))
3513          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ID);
3514        if ("instant".equals(codeString))
3515          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INSTANT);
3516        if ("integer".equals(codeString))
3517          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INTEGER);
3518        if ("integer64".equals(codeString))
3519          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INTEGER64);
3520        if ("markdown".equals(codeString))
3521          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MARKDOWN);
3522        if ("oid".equals(codeString))
3523          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OID);
3524        if ("positiveInt".equals(codeString))
3525          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.POSITIVEINT);
3526        if ("string".equals(codeString))
3527          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.STRING);
3528        if ("time".equals(codeString))
3529          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TIME);
3530        if ("unsignedInt".equals(codeString))
3531          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.UNSIGNEDINT);
3532        if ("uri".equals(codeString))
3533          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.URI);
3534        if ("url".equals(codeString))
3535          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.URL);
3536        if ("uuid".equals(codeString))
3537          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.UUID);
3538        if ("xhtml".equals(codeString))
3539          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.XHTML);
3540        if ("Resource".equals(codeString))
3541          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RESOURCE);
3542        if ("Binary".equals(codeString))
3543          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BINARY);
3544        if ("Bundle".equals(codeString))
3545          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BUNDLE);
3546        if ("DomainResource".equals(codeString))
3547          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOMAINRESOURCE);
3548        if ("Account".equals(codeString))
3549          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ACCOUNT);
3550        if ("AdministrableProductDefinition".equals(codeString))
3551          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ADMINISTRABLEPRODUCTDEFINITION);
3552        if ("AdverseEvent".equals(codeString))
3553          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ADVERSEEVENT);
3554        if ("AllergyIntolerance".equals(codeString))
3555          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ALLERGYINTOLERANCE);
3556        if ("Appointment".equals(codeString))
3557          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.APPOINTMENT);
3558        if ("AppointmentResponse".equals(codeString))
3559          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.APPOINTMENTRESPONSE);
3560        if ("ArtifactAssessment".equals(codeString))
3561          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ARTIFACTASSESSMENT);
3562        if ("AuditEvent".equals(codeString))
3563          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.AUDITEVENT);
3564        if ("Basic".equals(codeString))
3565          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BASIC);
3566        if ("BiologicallyDerivedProduct".equals(codeString))
3567          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BIOLOGICALLYDERIVEDPRODUCT);
3568        if ("BodyStructure".equals(codeString))
3569          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BODYSTRUCTURE);
3570        if ("CanonicalResource".equals(codeString))
3571          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CANONICALRESOURCE);
3572        if ("CapabilityStatement".equals(codeString))
3573          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CAPABILITYSTATEMENT);
3574        if ("CapabilityStatement2".equals(codeString))
3575          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CAPABILITYSTATEMENT2);
3576        if ("CodeSystem".equals(codeString))
3577          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODESYSTEM);
3578        if ("CompartmentDefinition".equals(codeString))
3579          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMPARTMENTDEFINITION);
3580        if ("ExampleScenario".equals(codeString))
3581          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXAMPLESCENARIO);
3582        if ("GraphDefinition".equals(codeString))
3583          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GRAPHDEFINITION);
3584        if ("ImplementationGuide".equals(codeString))
3585          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMPLEMENTATIONGUIDE);
3586        if ("MessageDefinition".equals(codeString))
3587          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MESSAGEDEFINITION);
3588        if ("MetadataResource".equals(codeString))
3589          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.METADATARESOURCE);
3590        if ("ActivityDefinition".equals(codeString))
3591          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ACTIVITYDEFINITION);
3592        if ("ChargeItemDefinition".equals(codeString))
3593          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CHARGEITEMDEFINITION);
3594        if ("Citation".equals(codeString))
3595          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CITATION);
3596        if ("ConceptMap".equals(codeString))
3597          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONCEPTMAP);
3598        if ("ConditionDefinition".equals(codeString))
3599          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONDITIONDEFINITION);
3600        if ("EventDefinition".equals(codeString))
3601          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EVENTDEFINITION);
3602        if ("Evidence".equals(codeString))
3603          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EVIDENCE);
3604        if ("EvidenceReport".equals(codeString))
3605          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EVIDENCEREPORT);
3606        if ("EvidenceVariable".equals(codeString))
3607          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EVIDENCEVARIABLE);
3608        if ("Library".equals(codeString))
3609          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LIBRARY);
3610        if ("Measure".equals(codeString))
3611          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEASURE);
3612        if ("NamingSystem".equals(codeString))
3613          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NAMINGSYSTEM);
3614        if ("PlanDefinition".equals(codeString))
3615          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PLANDEFINITION);
3616        if ("Questionnaire".equals(codeString))
3617          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.QUESTIONNAIRE);
3618        if ("OperationDefinition".equals(codeString))
3619          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OPERATIONDEFINITION);
3620        if ("SearchParameter".equals(codeString))
3621          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SEARCHPARAMETER);
3622        if ("StructureDefinition".equals(codeString))
3623          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.STRUCTUREDEFINITION);
3624        if ("StructureMap".equals(codeString))
3625          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.STRUCTUREMAP);
3626        if ("SubscriptionTopic".equals(codeString))
3627          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSCRIPTIONTOPIC);
3628        if ("TerminologyCapabilities".equals(codeString))
3629          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TERMINOLOGYCAPABILITIES);
3630        if ("TestScript".equals(codeString))
3631          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TESTSCRIPT);
3632        if ("ValueSet".equals(codeString))
3633          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.VALUESET);
3634        if ("CarePlan".equals(codeString))
3635          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CAREPLAN);
3636        if ("CareTeam".equals(codeString))
3637          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CARETEAM);
3638        if ("ChargeItem".equals(codeString))
3639          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CHARGEITEM);
3640        if ("Claim".equals(codeString))
3641          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CLAIM);
3642        if ("ClaimResponse".equals(codeString))
3643          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CLAIMRESPONSE);
3644        if ("ClinicalImpression".equals(codeString))
3645          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CLINICALIMPRESSION);
3646        if ("ClinicalUseDefinition".equals(codeString))
3647          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CLINICALUSEDEFINITION);
3648        if ("Communication".equals(codeString))
3649          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMMUNICATION);
3650        if ("CommunicationRequest".equals(codeString))
3651          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMMUNICATIONREQUEST);
3652        if ("Composition".equals(codeString))
3653          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMPOSITION);
3654        if ("Condition".equals(codeString))
3655          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONDITION);
3656        if ("Consent".equals(codeString))
3657          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONSENT);
3658        if ("Contract".equals(codeString))
3659          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTRACT);
3660        if ("Coverage".equals(codeString))
3661          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COVERAGE);
3662        if ("CoverageEligibilityRequest".equals(codeString))
3663          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COVERAGEELIGIBILITYREQUEST);
3664        if ("CoverageEligibilityResponse".equals(codeString))
3665          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COVERAGEELIGIBILITYRESPONSE);
3666        if ("DetectedIssue".equals(codeString))
3667          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DETECTEDISSUE);
3668        if ("Device".equals(codeString))
3669          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICE);
3670        if ("DeviceDefinition".equals(codeString))
3671          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEDEFINITION);
3672        if ("DeviceDispense".equals(codeString))
3673          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEDISPENSE);
3674        if ("DeviceMetric".equals(codeString))
3675          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEMETRIC);
3676        if ("DeviceRequest".equals(codeString))
3677          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEREQUEST);
3678        if ("DeviceUsage".equals(codeString))
3679          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEUSAGE);
3680        if ("DiagnosticReport".equals(codeString))
3681          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DIAGNOSTICREPORT);
3682        if ("DocumentManifest".equals(codeString))
3683          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOCUMENTMANIFEST);
3684        if ("DocumentReference".equals(codeString))
3685          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOCUMENTREFERENCE);
3686        if ("Encounter".equals(codeString))
3687          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENCOUNTER);
3688        if ("Endpoint".equals(codeString))
3689          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENDPOINT);
3690        if ("EnrollmentRequest".equals(codeString))
3691          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENROLLMENTREQUEST);
3692        if ("EnrollmentResponse".equals(codeString))
3693          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENROLLMENTRESPONSE);
3694        if ("EpisodeOfCare".equals(codeString))
3695          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EPISODEOFCARE);
3696        if ("ExplanationOfBenefit".equals(codeString))
3697          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXPLANATIONOFBENEFIT);
3698        if ("FamilyMemberHistory".equals(codeString))
3699          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.FAMILYMEMBERHISTORY);
3700        if ("Flag".equals(codeString))
3701          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.FLAG);
3702        if ("FormularyItem".equals(codeString))
3703          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.FORMULARYITEM);
3704        if ("Goal".equals(codeString))
3705          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GOAL);
3706        if ("Group".equals(codeString))
3707          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GROUP);
3708        if ("GuidanceResponse".equals(codeString))
3709          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GUIDANCERESPONSE);
3710        if ("HealthcareService".equals(codeString))
3711          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.HEALTHCARESERVICE);
3712        if ("ImagingSelection".equals(codeString))
3713          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMAGINGSELECTION);
3714        if ("ImagingStudy".equals(codeString))
3715          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMAGINGSTUDY);
3716        if ("Immunization".equals(codeString))
3717          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMMUNIZATION);
3718        if ("ImmunizationEvaluation".equals(codeString))
3719          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMMUNIZATIONEVALUATION);
3720        if ("ImmunizationRecommendation".equals(codeString))
3721          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMMUNIZATIONRECOMMENDATION);
3722        if ("Ingredient".equals(codeString))
3723          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INGREDIENT);
3724        if ("InsurancePlan".equals(codeString))
3725          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INSURANCEPLAN);
3726        if ("InventoryReport".equals(codeString))
3727          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INVENTORYREPORT);
3728        if ("Invoice".equals(codeString))
3729          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INVOICE);
3730        if ("Linkage".equals(codeString))
3731          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LINKAGE);
3732        if ("List".equals(codeString))
3733          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LIST);
3734        if ("Location".equals(codeString))
3735          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LOCATION);
3736        if ("ManufacturedItemDefinition".equals(codeString))
3737          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MANUFACTUREDITEMDEFINITION);
3738        if ("MeasureReport".equals(codeString))
3739          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEASUREREPORT);
3740        if ("Medication".equals(codeString))
3741          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATION);
3742        if ("MedicationAdministration".equals(codeString))
3743          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONADMINISTRATION);
3744        if ("MedicationDispense".equals(codeString))
3745          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONDISPENSE);
3746        if ("MedicationKnowledge".equals(codeString))
3747          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONKNOWLEDGE);
3748        if ("MedicationRequest".equals(codeString))
3749          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONREQUEST);
3750        if ("MedicationUsage".equals(codeString))
3751          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONUSAGE);
3752        if ("MedicinalProductDefinition".equals(codeString))
3753          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICINALPRODUCTDEFINITION);
3754        if ("MessageHeader".equals(codeString))
3755          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MESSAGEHEADER);
3756        if ("MolecularSequence".equals(codeString))
3757          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MOLECULARSEQUENCE);
3758        if ("NutritionIntake".equals(codeString))
3759          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NUTRITIONINTAKE);
3760        if ("NutritionOrder".equals(codeString))
3761          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NUTRITIONORDER);
3762        if ("NutritionProduct".equals(codeString))
3763          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NUTRITIONPRODUCT);
3764        if ("Observation".equals(codeString))
3765          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OBSERVATION);
3766        if ("ObservationDefinition".equals(codeString))
3767          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OBSERVATIONDEFINITION);
3768        if ("OperationOutcome".equals(codeString))
3769          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OPERATIONOUTCOME);
3770        if ("Organization".equals(codeString))
3771          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ORGANIZATION);
3772        if ("OrganizationAffiliation".equals(codeString))
3773          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ORGANIZATIONAFFILIATION);
3774        if ("PackagedProductDefinition".equals(codeString))
3775          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PACKAGEDPRODUCTDEFINITION);
3776        if ("Patient".equals(codeString))
3777          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PATIENT);
3778        if ("PaymentNotice".equals(codeString))
3779          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PAYMENTNOTICE);
3780        if ("PaymentReconciliation".equals(codeString))
3781          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PAYMENTRECONCILIATION);
3782        if ("Permission".equals(codeString))
3783          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PERMISSION);
3784        if ("Person".equals(codeString))
3785          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PERSON);
3786        if ("Practitioner".equals(codeString))
3787          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PRACTITIONER);
3788        if ("PractitionerRole".equals(codeString))
3789          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PRACTITIONERROLE);
3790        if ("Procedure".equals(codeString))
3791          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROCEDURE);
3792        if ("Provenance".equals(codeString))
3793          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROVENANCE);
3794        if ("QuestionnaireResponse".equals(codeString))
3795          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.QUESTIONNAIRERESPONSE);
3796        if ("RegulatedAuthorization".equals(codeString))
3797          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.REGULATEDAUTHORIZATION);
3798        if ("RelatedPerson".equals(codeString))
3799          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RELATEDPERSON);
3800        if ("RequestGroup".equals(codeString))
3801          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.REQUESTGROUP);
3802        if ("ResearchStudy".equals(codeString))
3803          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RESEARCHSTUDY);
3804        if ("ResearchSubject".equals(codeString))
3805          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RESEARCHSUBJECT);
3806        if ("RiskAssessment".equals(codeString))
3807          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RISKASSESSMENT);
3808        if ("Schedule".equals(codeString))
3809          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SCHEDULE);
3810        if ("ServiceRequest".equals(codeString))
3811          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SERVICEREQUEST);
3812        if ("Slot".equals(codeString))
3813          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SLOT);
3814        if ("Specimen".equals(codeString))
3815          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SPECIMEN);
3816        if ("SpecimenDefinition".equals(codeString))
3817          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SPECIMENDEFINITION);
3818        if ("Subscription".equals(codeString))
3819          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSCRIPTION);
3820        if ("SubscriptionStatus".equals(codeString))
3821          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSCRIPTIONSTATUS);
3822        if ("Substance".equals(codeString))
3823          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCE);
3824        if ("SubstanceDefinition".equals(codeString))
3825          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCEDEFINITION);
3826        if ("SubstanceNucleicAcid".equals(codeString))
3827          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCENUCLEICACID);
3828        if ("SubstancePolymer".equals(codeString))
3829          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCEPOLYMER);
3830        if ("SubstanceProtein".equals(codeString))
3831          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCEPROTEIN);
3832        if ("SubstanceReferenceInformation".equals(codeString))
3833          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCEREFERENCEINFORMATION);
3834        if ("SubstanceSourceMaterial".equals(codeString))
3835          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCESOURCEMATERIAL);
3836        if ("SupplyDelivery".equals(codeString))
3837          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUPPLYDELIVERY);
3838        if ("SupplyRequest".equals(codeString))
3839          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUPPLYREQUEST);
3840        if ("Task".equals(codeString))
3841          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TASK);
3842        if ("TestReport".equals(codeString))
3843          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TESTREPORT);
3844        if ("Transport".equals(codeString))
3845          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TRANSPORT);
3846        if ("VerificationResult".equals(codeString))
3847          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.VERIFICATIONRESULT);
3848        if ("VisionPrescription".equals(codeString))
3849          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.VISIONPRESCRIPTION);
3850        if ("Parameters".equals(codeString))
3851          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PARAMETERS);
3852        throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'");
3853        }
3854    public String toCode(FHIRDefinedType code) {
3855      if (code == FHIRDefinedType.ADDRESS)
3856        return "Address";
3857      if (code == FHIRDefinedType.AGE)
3858        return "Age";
3859      if (code == FHIRDefinedType.ANNOTATION)
3860        return "Annotation";
3861      if (code == FHIRDefinedType.ATTACHMENT)
3862        return "Attachment";
3863      if (code == FHIRDefinedType.BACKBONEELEMENT)
3864        return "BackboneElement";
3865      if (code == FHIRDefinedType.BACKBONETYPE)
3866        return "BackboneType";
3867      if (code == FHIRDefinedType.BASE)
3868        return "Base";
3869      if (code == FHIRDefinedType.CODEABLECONCEPT)
3870        return "CodeableConcept";
3871      if (code == FHIRDefinedType.CODEABLEREFERENCE)
3872        return "CodeableReference";
3873      if (code == FHIRDefinedType.CODING)
3874        return "Coding";
3875      if (code == FHIRDefinedType.CONTACTDETAIL)
3876        return "ContactDetail";
3877      if (code == FHIRDefinedType.CONTACTPOINT)
3878        return "ContactPoint";
3879      if (code == FHIRDefinedType.CONTRIBUTOR)
3880        return "Contributor";
3881      if (code == FHIRDefinedType.COUNT)
3882        return "Count";
3883      if (code == FHIRDefinedType.DATAREQUIREMENT)
3884        return "DataRequirement";
3885      if (code == FHIRDefinedType.DATATYPE)
3886        return "DataType";
3887      if (code == FHIRDefinedType.DISTANCE)
3888        return "Distance";
3889      if (code == FHIRDefinedType.DOSAGE)
3890        return "Dosage";
3891      if (code == FHIRDefinedType.DURATION)
3892        return "Duration";
3893      if (code == FHIRDefinedType.ELEMENT)
3894        return "Element";
3895      if (code == FHIRDefinedType.ELEMENTDEFINITION)
3896        return "ElementDefinition";
3897      if (code == FHIRDefinedType.EXPRESSION)
3898        return "Expression";
3899      if (code == FHIRDefinedType.EXTENDEDCONTACTDETAIL)
3900        return "ExtendedContactDetail";
3901      if (code == FHIRDefinedType.EXTENSION)
3902        return "Extension";
3903      if (code == FHIRDefinedType.HUMANNAME)
3904        return "HumanName";
3905      if (code == FHIRDefinedType.IDENTIFIER)
3906        return "Identifier";
3907      if (code == FHIRDefinedType.MARKETINGSTATUS)
3908        return "MarketingStatus";
3909      if (code == FHIRDefinedType.META)
3910        return "Meta";
3911      if (code == FHIRDefinedType.MONEY)
3912        return "Money";
3913      if (code == FHIRDefinedType.MONEYQUANTITY)
3914        return "MoneyQuantity";
3915      if (code == FHIRDefinedType.NARRATIVE)
3916        return "Narrative";
3917      if (code == FHIRDefinedType.PARAMETERDEFINITION)
3918        return "ParameterDefinition";
3919      if (code == FHIRDefinedType.PERIOD)
3920        return "Period";
3921      if (code == FHIRDefinedType.POPULATION)
3922        return "Population";
3923      if (code == FHIRDefinedType.PRIMITIVETYPE)
3924        return "PrimitiveType";
3925      if (code == FHIRDefinedType.PRODUCTSHELFLIFE)
3926        return "ProductShelfLife";
3927      if (code == FHIRDefinedType.QUANTITY)
3928        return "Quantity";
3929      if (code == FHIRDefinedType.RANGE)
3930        return "Range";
3931      if (code == FHIRDefinedType.RATIO)
3932        return "Ratio";
3933      if (code == FHIRDefinedType.RATIORANGE)
3934        return "RatioRange";
3935      if (code == FHIRDefinedType.REFERENCE)
3936        return "Reference";
3937      if (code == FHIRDefinedType.RELATEDARTIFACT)
3938        return "RelatedArtifact";
3939      if (code == FHIRDefinedType.SAMPLEDDATA)
3940        return "SampledData";
3941      if (code == FHIRDefinedType.SIGNATURE)
3942        return "Signature";
3943      if (code == FHIRDefinedType.SIMPLEQUANTITY)
3944        return "SimpleQuantity";
3945      if (code == FHIRDefinedType.TIMING)
3946        return "Timing";
3947      if (code == FHIRDefinedType.TRIGGERDEFINITION)
3948        return "TriggerDefinition";
3949      if (code == FHIRDefinedType.USAGECONTEXT)
3950        return "UsageContext";
3951      if (code == FHIRDefinedType.BASE64BINARY)
3952        return "base64Binary";
3953      if (code == FHIRDefinedType.BOOLEAN)
3954        return "boolean";
3955      if (code == FHIRDefinedType.CANONICAL)
3956        return "canonical";
3957      if (code == FHIRDefinedType.CODE)
3958        return "code";
3959      if (code == FHIRDefinedType.DATE)
3960        return "date";
3961      if (code == FHIRDefinedType.DATETIME)
3962        return "dateTime";
3963      if (code == FHIRDefinedType.DECIMAL)
3964        return "decimal";
3965      if (code == FHIRDefinedType.ID)
3966        return "id";
3967      if (code == FHIRDefinedType.INSTANT)
3968        return "instant";
3969      if (code == FHIRDefinedType.INTEGER)
3970        return "integer";
3971      if (code == FHIRDefinedType.INTEGER64)
3972        return "integer64";
3973      if (code == FHIRDefinedType.MARKDOWN)
3974        return "markdown";
3975      if (code == FHIRDefinedType.OID)
3976        return "oid";
3977      if (code == FHIRDefinedType.POSITIVEINT)
3978        return "positiveInt";
3979      if (code == FHIRDefinedType.STRING)
3980        return "string";
3981      if (code == FHIRDefinedType.TIME)
3982        return "time";
3983      if (code == FHIRDefinedType.UNSIGNEDINT)
3984        return "unsignedInt";
3985      if (code == FHIRDefinedType.URI)
3986        return "uri";
3987      if (code == FHIRDefinedType.URL)
3988        return "url";
3989      if (code == FHIRDefinedType.UUID)
3990        return "uuid";
3991      if (code == FHIRDefinedType.XHTML)
3992        return "xhtml";
3993      if (code == FHIRDefinedType.RESOURCE)
3994        return "Resource";
3995      if (code == FHIRDefinedType.BINARY)
3996        return "Binary";
3997      if (code == FHIRDefinedType.BUNDLE)
3998        return "Bundle";
3999      if (code == FHIRDefinedType.DOMAINRESOURCE)
4000        return "DomainResource";
4001      if (code == FHIRDefinedType.ACCOUNT)
4002        return "Account";
4003      if (code == FHIRDefinedType.ADMINISTRABLEPRODUCTDEFINITION)
4004        return "AdministrableProductDefinition";
4005      if (code == FHIRDefinedType.ADVERSEEVENT)
4006        return "AdverseEvent";
4007      if (code == FHIRDefinedType.ALLERGYINTOLERANCE)
4008        return "AllergyIntolerance";
4009      if (code == FHIRDefinedType.APPOINTMENT)
4010        return "Appointment";
4011      if (code == FHIRDefinedType.APPOINTMENTRESPONSE)
4012        return "AppointmentResponse";
4013      if (code == FHIRDefinedType.ARTIFACTASSESSMENT)
4014        return "ArtifactAssessment";
4015      if (code == FHIRDefinedType.AUDITEVENT)
4016        return "AuditEvent";
4017      if (code == FHIRDefinedType.BASIC)
4018        return "Basic";
4019      if (code == FHIRDefinedType.BIOLOGICALLYDERIVEDPRODUCT)
4020        return "BiologicallyDerivedProduct";
4021      if (code == FHIRDefinedType.BODYSTRUCTURE)
4022        return "BodyStructure";
4023      if (code == FHIRDefinedType.CANONICALRESOURCE)
4024        return "CanonicalResource";
4025      if (code == FHIRDefinedType.CAPABILITYSTATEMENT)
4026        return "CapabilityStatement";
4027      if (code == FHIRDefinedType.CAPABILITYSTATEMENT2)
4028        return "CapabilityStatement2";
4029      if (code == FHIRDefinedType.CODESYSTEM)
4030        return "CodeSystem";
4031      if (code == FHIRDefinedType.COMPARTMENTDEFINITION)
4032        return "CompartmentDefinition";
4033      if (code == FHIRDefinedType.EXAMPLESCENARIO)
4034        return "ExampleScenario";
4035      if (code == FHIRDefinedType.GRAPHDEFINITION)
4036        return "GraphDefinition";
4037      if (code == FHIRDefinedType.IMPLEMENTATIONGUIDE)
4038        return "ImplementationGuide";
4039      if (code == FHIRDefinedType.MESSAGEDEFINITION)
4040        return "MessageDefinition";
4041      if (code == FHIRDefinedType.METADATARESOURCE)
4042        return "MetadataResource";
4043      if (code == FHIRDefinedType.ACTIVITYDEFINITION)
4044        return "ActivityDefinition";
4045      if (code == FHIRDefinedType.CHARGEITEMDEFINITION)
4046        return "ChargeItemDefinition";
4047      if (code == FHIRDefinedType.CITATION)
4048        return "Citation";
4049      if (code == FHIRDefinedType.CONCEPTMAP)
4050        return "ConceptMap";
4051      if (code == FHIRDefinedType.CONDITIONDEFINITION)
4052        return "ConditionDefinition";
4053      if (code == FHIRDefinedType.EVENTDEFINITION)
4054        return "EventDefinition";
4055      if (code == FHIRDefinedType.EVIDENCE)
4056        return "Evidence";
4057      if (code == FHIRDefinedType.EVIDENCEREPORT)
4058        return "EvidenceReport";
4059      if (code == FHIRDefinedType.EVIDENCEVARIABLE)
4060        return "EvidenceVariable";
4061      if (code == FHIRDefinedType.LIBRARY)
4062        return "Library";
4063      if (code == FHIRDefinedType.MEASURE)
4064        return "Measure";
4065      if (code == FHIRDefinedType.NAMINGSYSTEM)
4066        return "NamingSystem";
4067      if (code == FHIRDefinedType.PLANDEFINITION)
4068        return "PlanDefinition";
4069      if (code == FHIRDefinedType.QUESTIONNAIRE)
4070        return "Questionnaire";
4071      if (code == FHIRDefinedType.OPERATIONDEFINITION)
4072        return "OperationDefinition";
4073      if (code == FHIRDefinedType.SEARCHPARAMETER)
4074        return "SearchParameter";
4075      if (code == FHIRDefinedType.STRUCTUREDEFINITION)
4076        return "StructureDefinition";
4077      if (code == FHIRDefinedType.STRUCTUREMAP)
4078        return "StructureMap";
4079      if (code == FHIRDefinedType.SUBSCRIPTIONTOPIC)
4080        return "SubscriptionTopic";
4081      if (code == FHIRDefinedType.TERMINOLOGYCAPABILITIES)
4082        return "TerminologyCapabilities";
4083      if (code == FHIRDefinedType.TESTSCRIPT)
4084        return "TestScript";
4085      if (code == FHIRDefinedType.VALUESET)
4086        return "ValueSet";
4087      if (code == FHIRDefinedType.CAREPLAN)
4088        return "CarePlan";
4089      if (code == FHIRDefinedType.CARETEAM)
4090        return "CareTeam";
4091      if (code == FHIRDefinedType.CHARGEITEM)
4092        return "ChargeItem";
4093      if (code == FHIRDefinedType.CLAIM)
4094        return "Claim";
4095      if (code == FHIRDefinedType.CLAIMRESPONSE)
4096        return "ClaimResponse";
4097      if (code == FHIRDefinedType.CLINICALIMPRESSION)
4098        return "ClinicalImpression";
4099      if (code == FHIRDefinedType.CLINICALUSEDEFINITION)
4100        return "ClinicalUseDefinition";
4101      if (code == FHIRDefinedType.COMMUNICATION)
4102        return "Communication";
4103      if (code == FHIRDefinedType.COMMUNICATIONREQUEST)
4104        return "CommunicationRequest";
4105      if (code == FHIRDefinedType.COMPOSITION)
4106        return "Composition";
4107      if (code == FHIRDefinedType.CONDITION)
4108        return "Condition";
4109      if (code == FHIRDefinedType.CONSENT)
4110        return "Consent";
4111      if (code == FHIRDefinedType.CONTRACT)
4112        return "Contract";
4113      if (code == FHIRDefinedType.COVERAGE)
4114        return "Coverage";
4115      if (code == FHIRDefinedType.COVERAGEELIGIBILITYREQUEST)
4116        return "CoverageEligibilityRequest";
4117      if (code == FHIRDefinedType.COVERAGEELIGIBILITYRESPONSE)
4118        return "CoverageEligibilityResponse";
4119      if (code == FHIRDefinedType.DETECTEDISSUE)
4120        return "DetectedIssue";
4121      if (code == FHIRDefinedType.DEVICE)
4122        return "Device";
4123      if (code == FHIRDefinedType.DEVICEDEFINITION)
4124        return "DeviceDefinition";
4125      if (code == FHIRDefinedType.DEVICEDISPENSE)
4126        return "DeviceDispense";
4127      if (code == FHIRDefinedType.DEVICEMETRIC)
4128        return "DeviceMetric";
4129      if (code == FHIRDefinedType.DEVICEREQUEST)
4130        return "DeviceRequest";
4131      if (code == FHIRDefinedType.DEVICEUSAGE)
4132        return "DeviceUsage";
4133      if (code == FHIRDefinedType.DIAGNOSTICREPORT)
4134        return "DiagnosticReport";
4135      if (code == FHIRDefinedType.DOCUMENTMANIFEST)
4136        return "DocumentManifest";
4137      if (code == FHIRDefinedType.DOCUMENTREFERENCE)
4138        return "DocumentReference";
4139      if (code == FHIRDefinedType.ENCOUNTER)
4140        return "Encounter";
4141      if (code == FHIRDefinedType.ENDPOINT)
4142        return "Endpoint";
4143      if (code == FHIRDefinedType.ENROLLMENTREQUEST)
4144        return "EnrollmentRequest";
4145      if (code == FHIRDefinedType.ENROLLMENTRESPONSE)
4146        return "EnrollmentResponse";
4147      if (code == FHIRDefinedType.EPISODEOFCARE)
4148        return "EpisodeOfCare";
4149      if (code == FHIRDefinedType.EXPLANATIONOFBENEFIT)
4150        return "ExplanationOfBenefit";
4151      if (code == FHIRDefinedType.FAMILYMEMBERHISTORY)
4152        return "FamilyMemberHistory";
4153      if (code == FHIRDefinedType.FLAG)
4154        return "Flag";
4155      if (code == FHIRDefinedType.FORMULARYITEM)
4156        return "FormularyItem";
4157      if (code == FHIRDefinedType.GOAL)
4158        return "Goal";
4159      if (code == FHIRDefinedType.GROUP)
4160        return "Group";
4161      if (code == FHIRDefinedType.GUIDANCERESPONSE)
4162        return "GuidanceResponse";
4163      if (code == FHIRDefinedType.HEALTHCARESERVICE)
4164        return "HealthcareService";
4165      if (code == FHIRDefinedType.IMAGINGSELECTION)
4166        return "ImagingSelection";
4167      if (code == FHIRDefinedType.IMAGINGSTUDY)
4168        return "ImagingStudy";
4169      if (code == FHIRDefinedType.IMMUNIZATION)
4170        return "Immunization";
4171      if (code == FHIRDefinedType.IMMUNIZATIONEVALUATION)
4172        return "ImmunizationEvaluation";
4173      if (code == FHIRDefinedType.IMMUNIZATIONRECOMMENDATION)
4174        return "ImmunizationRecommendation";
4175      if (code == FHIRDefinedType.INGREDIENT)
4176        return "Ingredient";
4177      if (code == FHIRDefinedType.INSURANCEPLAN)
4178        return "InsurancePlan";
4179      if (code == FHIRDefinedType.INVENTORYREPORT)
4180        return "InventoryReport";
4181      if (code == FHIRDefinedType.INVOICE)
4182        return "Invoice";
4183      if (code == FHIRDefinedType.LINKAGE)
4184        return "Linkage";
4185      if (code == FHIRDefinedType.LIST)
4186        return "List";
4187      if (code == FHIRDefinedType.LOCATION)
4188        return "Location";
4189      if (code == FHIRDefinedType.MANUFACTUREDITEMDEFINITION)
4190        return "ManufacturedItemDefinition";
4191      if (code == FHIRDefinedType.MEASUREREPORT)
4192        return "MeasureReport";
4193      if (code == FHIRDefinedType.MEDICATION)
4194        return "Medication";
4195      if (code == FHIRDefinedType.MEDICATIONADMINISTRATION)
4196        return "MedicationAdministration";
4197      if (code == FHIRDefinedType.MEDICATIONDISPENSE)
4198        return "MedicationDispense";
4199      if (code == FHIRDefinedType.MEDICATIONKNOWLEDGE)
4200        return "MedicationKnowledge";
4201      if (code == FHIRDefinedType.MEDICATIONREQUEST)
4202        return "MedicationRequest";
4203      if (code == FHIRDefinedType.MEDICATIONUSAGE)
4204        return "MedicationUsage";
4205      if (code == FHIRDefinedType.MEDICINALPRODUCTDEFINITION)
4206        return "MedicinalProductDefinition";
4207      if (code == FHIRDefinedType.MESSAGEHEADER)
4208        return "MessageHeader";
4209      if (code == FHIRDefinedType.MOLECULARSEQUENCE)
4210        return "MolecularSequence";
4211      if (code == FHIRDefinedType.NUTRITIONINTAKE)
4212        return "NutritionIntake";
4213      if (code == FHIRDefinedType.NUTRITIONORDER)
4214        return "NutritionOrder";
4215      if (code == FHIRDefinedType.NUTRITIONPRODUCT)
4216        return "NutritionProduct";
4217      if (code == FHIRDefinedType.OBSERVATION)
4218        return "Observation";
4219      if (code == FHIRDefinedType.OBSERVATIONDEFINITION)
4220        return "ObservationDefinition";
4221      if (code == FHIRDefinedType.OPERATIONOUTCOME)
4222        return "OperationOutcome";
4223      if (code == FHIRDefinedType.ORGANIZATION)
4224        return "Organization";
4225      if (code == FHIRDefinedType.ORGANIZATIONAFFILIATION)
4226        return "OrganizationAffiliation";
4227      if (code == FHIRDefinedType.PACKAGEDPRODUCTDEFINITION)
4228        return "PackagedProductDefinition";
4229      if (code == FHIRDefinedType.PATIENT)
4230        return "Patient";
4231      if (code == FHIRDefinedType.PAYMENTNOTICE)
4232        return "PaymentNotice";
4233      if (code == FHIRDefinedType.PAYMENTRECONCILIATION)
4234        return "PaymentReconciliation";
4235      if (code == FHIRDefinedType.PERMISSION)
4236        return "Permission";
4237      if (code == FHIRDefinedType.PERSON)
4238        return "Person";
4239      if (code == FHIRDefinedType.PRACTITIONER)
4240        return "Practitioner";
4241      if (code == FHIRDefinedType.PRACTITIONERROLE)
4242        return "PractitionerRole";
4243      if (code == FHIRDefinedType.PROCEDURE)
4244        return "Procedure";
4245      if (code == FHIRDefinedType.PROVENANCE)
4246        return "Provenance";
4247      if (code == FHIRDefinedType.QUESTIONNAIRERESPONSE)
4248        return "QuestionnaireResponse";
4249      if (code == FHIRDefinedType.REGULATEDAUTHORIZATION)
4250        return "RegulatedAuthorization";
4251      if (code == FHIRDefinedType.RELATEDPERSON)
4252        return "RelatedPerson";
4253      if (code == FHIRDefinedType.REQUESTGROUP)
4254        return "RequestGroup";
4255      if (code == FHIRDefinedType.RESEARCHSTUDY)
4256        return "ResearchStudy";
4257      if (code == FHIRDefinedType.RESEARCHSUBJECT)
4258        return "ResearchSubject";
4259      if (code == FHIRDefinedType.RISKASSESSMENT)
4260        return "RiskAssessment";
4261      if (code == FHIRDefinedType.SCHEDULE)
4262        return "Schedule";
4263      if (code == FHIRDefinedType.SERVICEREQUEST)
4264        return "ServiceRequest";
4265      if (code == FHIRDefinedType.SLOT)
4266        return "Slot";
4267      if (code == FHIRDefinedType.SPECIMEN)
4268        return "Specimen";
4269      if (code == FHIRDefinedType.SPECIMENDEFINITION)
4270        return "SpecimenDefinition";
4271      if (code == FHIRDefinedType.SUBSCRIPTION)
4272        return "Subscription";
4273      if (code == FHIRDefinedType.SUBSCRIPTIONSTATUS)
4274        return "SubscriptionStatus";
4275      if (code == FHIRDefinedType.SUBSTANCE)
4276        return "Substance";
4277      if (code == FHIRDefinedType.SUBSTANCEDEFINITION)
4278        return "SubstanceDefinition";
4279      if (code == FHIRDefinedType.SUBSTANCENUCLEICACID)
4280        return "SubstanceNucleicAcid";
4281      if (code == FHIRDefinedType.SUBSTANCEPOLYMER)
4282        return "SubstancePolymer";
4283      if (code == FHIRDefinedType.SUBSTANCEPROTEIN)
4284        return "SubstanceProtein";
4285      if (code == FHIRDefinedType.SUBSTANCEREFERENCEINFORMATION)
4286        return "SubstanceReferenceInformation";
4287      if (code == FHIRDefinedType.SUBSTANCESOURCEMATERIAL)
4288        return "SubstanceSourceMaterial";
4289      if (code == FHIRDefinedType.SUPPLYDELIVERY)
4290        return "SupplyDelivery";
4291      if (code == FHIRDefinedType.SUPPLYREQUEST)
4292        return "SupplyRequest";
4293      if (code == FHIRDefinedType.TASK)
4294        return "Task";
4295      if (code == FHIRDefinedType.TESTREPORT)
4296        return "TestReport";
4297      if (code == FHIRDefinedType.TRANSPORT)
4298        return "Transport";
4299      if (code == FHIRDefinedType.VERIFICATIONRESULT)
4300        return "VerificationResult";
4301      if (code == FHIRDefinedType.VISIONPRESCRIPTION)
4302        return "VisionPrescription";
4303      if (code == FHIRDefinedType.PARAMETERS)
4304        return "Parameters";
4305      return "?";
4306      }
4307    public String toSystem(FHIRDefinedType code) {
4308      return code.getSystem();
4309      }
4310    }
4311
4312    public enum TestScriptRequestMethodCode {
4313        /**
4314         * HTTP DELETE operation.
4315         */
4316        DELETE, 
4317        /**
4318         * HTTP GET operation.
4319         */
4320        GET, 
4321        /**
4322         * HTTP OPTIONS operation.
4323         */
4324        OPTIONS, 
4325        /**
4326         * HTTP PATCH operation.
4327         */
4328        PATCH, 
4329        /**
4330         * HTTP POST operation.
4331         */
4332        POST, 
4333        /**
4334         * HTTP PUT operation.
4335         */
4336        PUT, 
4337        /**
4338         * HTTP HEAD operation.
4339         */
4340        HEAD, 
4341        /**
4342         * added to help the parsers with the generic types
4343         */
4344        NULL;
4345        public static TestScriptRequestMethodCode fromCode(String codeString) throws FHIRException {
4346            if (codeString == null || "".equals(codeString))
4347                return null;
4348        if ("delete".equals(codeString))
4349          return DELETE;
4350        if ("get".equals(codeString))
4351          return GET;
4352        if ("options".equals(codeString))
4353          return OPTIONS;
4354        if ("patch".equals(codeString))
4355          return PATCH;
4356        if ("post".equals(codeString))
4357          return POST;
4358        if ("put".equals(codeString))
4359          return PUT;
4360        if ("head".equals(codeString))
4361          return HEAD;
4362        if (Configuration.isAcceptInvalidEnums())
4363          return null;
4364        else
4365          throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
4366        }
4367        public String toCode() {
4368          switch (this) {
4369            case DELETE: return "delete";
4370            case GET: return "get";
4371            case OPTIONS: return "options";
4372            case PATCH: return "patch";
4373            case POST: return "post";
4374            case PUT: return "put";
4375            case HEAD: return "head";
4376            case NULL: return null;
4377            default: return "?";
4378          }
4379        }
4380        public String getSystem() {
4381          switch (this) {
4382            case DELETE: return "http://hl7.org/fhir/http-operations";
4383            case GET: return "http://hl7.org/fhir/http-operations";
4384            case OPTIONS: return "http://hl7.org/fhir/http-operations";
4385            case PATCH: return "http://hl7.org/fhir/http-operations";
4386            case POST: return "http://hl7.org/fhir/http-operations";
4387            case PUT: return "http://hl7.org/fhir/http-operations";
4388            case HEAD: return "http://hl7.org/fhir/http-operations";
4389            case NULL: return null;
4390            default: return "?";
4391          }
4392        }
4393        public String getDefinition() {
4394          switch (this) {
4395            case DELETE: return "HTTP DELETE operation.";
4396            case GET: return "HTTP GET operation.";
4397            case OPTIONS: return "HTTP OPTIONS operation.";
4398            case PATCH: return "HTTP PATCH operation.";
4399            case POST: return "HTTP POST operation.";
4400            case PUT: return "HTTP PUT operation.";
4401            case HEAD: return "HTTP HEAD operation.";
4402            case NULL: return null;
4403            default: return "?";
4404          }
4405        }
4406        public String getDisplay() {
4407          switch (this) {
4408            case DELETE: return "DELETE";
4409            case GET: return "GET";
4410            case OPTIONS: return "OPTIONS";
4411            case PATCH: return "PATCH";
4412            case POST: return "POST";
4413            case PUT: return "PUT";
4414            case HEAD: return "HEAD";
4415            case NULL: return null;
4416            default: return "?";
4417          }
4418        }
4419    }
4420
4421  public static class TestScriptRequestMethodCodeEnumFactory implements EnumFactory<TestScriptRequestMethodCode> {
4422    public TestScriptRequestMethodCode fromCode(String codeString) throws IllegalArgumentException {
4423      if (codeString == null || "".equals(codeString))
4424            if (codeString == null || "".equals(codeString))
4425                return null;
4426        if ("delete".equals(codeString))
4427          return TestScriptRequestMethodCode.DELETE;
4428        if ("get".equals(codeString))
4429          return TestScriptRequestMethodCode.GET;
4430        if ("options".equals(codeString))
4431          return TestScriptRequestMethodCode.OPTIONS;
4432        if ("patch".equals(codeString))
4433          return TestScriptRequestMethodCode.PATCH;
4434        if ("post".equals(codeString))
4435          return TestScriptRequestMethodCode.POST;
4436        if ("put".equals(codeString))
4437          return TestScriptRequestMethodCode.PUT;
4438        if ("head".equals(codeString))
4439          return TestScriptRequestMethodCode.HEAD;
4440        throw new IllegalArgumentException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
4441        }
4442        public Enumeration<TestScriptRequestMethodCode> fromType(Base code) throws FHIRException {
4443          if (code == null)
4444            return null;
4445          if (code.isEmpty())
4446            return new Enumeration<TestScriptRequestMethodCode>(this);
4447          String codeString = ((PrimitiveType) code).asStringValue();
4448          if (codeString == null || "".equals(codeString))
4449            return null;
4450        if ("delete".equals(codeString))
4451          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.DELETE);
4452        if ("get".equals(codeString))
4453          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.GET);
4454        if ("options".equals(codeString))
4455          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.OPTIONS);
4456        if ("patch".equals(codeString))
4457          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PATCH);
4458        if ("post".equals(codeString))
4459          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.POST);
4460        if ("put".equals(codeString))
4461          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PUT);
4462        if ("head".equals(codeString))
4463          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.HEAD);
4464        throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
4465        }
4466    public String toCode(TestScriptRequestMethodCode code) {
4467      if (code == TestScriptRequestMethodCode.DELETE)
4468        return "delete";
4469      if (code == TestScriptRequestMethodCode.GET)
4470        return "get";
4471      if (code == TestScriptRequestMethodCode.OPTIONS)
4472        return "options";
4473      if (code == TestScriptRequestMethodCode.PATCH)
4474        return "patch";
4475      if (code == TestScriptRequestMethodCode.POST)
4476        return "post";
4477      if (code == TestScriptRequestMethodCode.PUT)
4478        return "put";
4479      if (code == TestScriptRequestMethodCode.HEAD)
4480        return "head";
4481      return "?";
4482      }
4483    public String toSystem(TestScriptRequestMethodCode code) {
4484      return code.getSystem();
4485      }
4486    }
4487
4488    @Block()
4489    public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement {
4490        /**
4491         * Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
4492         */
4493        @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false)
4494        @Description(shortDefinition="The index of the abstract origin server starting at 1", formalDefinition="Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1." )
4495        protected IntegerType index;
4496
4497        /**
4498         * The type of origin profile the test system supports.
4499         */
4500        @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false)
4501        @Description(shortDefinition="FHIR-Client | FHIR-SDC-FormFiller", formalDefinition="The type of origin profile the test system supports." )
4502        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-origin-types")
4503        protected Coding profile;
4504
4505        private static final long serialVersionUID = -1239935149L;
4506
4507    /**
4508     * Constructor
4509     */
4510      public TestScriptOriginComponent() {
4511        super();
4512      }
4513
4514    /**
4515     * Constructor
4516     */
4517      public TestScriptOriginComponent(int index, Coding profile) {
4518        super();
4519        this.setIndex(index);
4520        this.setProfile(profile);
4521      }
4522
4523        /**
4524         * @return {@link #index} (Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value
4525         */
4526        public IntegerType getIndexElement() { 
4527          if (this.index == null)
4528            if (Configuration.errorOnAutoCreate())
4529              throw new Error("Attempt to auto-create TestScriptOriginComponent.index");
4530            else if (Configuration.doAutoCreate())
4531              this.index = new IntegerType(); // bb
4532          return this.index;
4533        }
4534
4535        public boolean hasIndexElement() { 
4536          return this.index != null && !this.index.isEmpty();
4537        }
4538
4539        public boolean hasIndex() { 
4540          return this.index != null && !this.index.isEmpty();
4541        }
4542
4543        /**
4544         * @param value {@link #index} (Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value
4545         */
4546        public TestScriptOriginComponent setIndexElement(IntegerType value) { 
4547          this.index = value;
4548          return this;
4549        }
4550
4551        /**
4552         * @return Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
4553         */
4554        public int getIndex() { 
4555          return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue();
4556        }
4557
4558        /**
4559         * @param value Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
4560         */
4561        public TestScriptOriginComponent setIndex(int value) { 
4562            if (this.index == null)
4563              this.index = new IntegerType();
4564            this.index.setValue(value);
4565          return this;
4566        }
4567
4568        /**
4569         * @return {@link #profile} (The type of origin profile the test system supports.)
4570         */
4571        public Coding getProfile() { 
4572          if (this.profile == null)
4573            if (Configuration.errorOnAutoCreate())
4574              throw new Error("Attempt to auto-create TestScriptOriginComponent.profile");
4575            else if (Configuration.doAutoCreate())
4576              this.profile = new Coding(); // cc
4577          return this.profile;
4578        }
4579
4580        public boolean hasProfile() { 
4581          return this.profile != null && !this.profile.isEmpty();
4582        }
4583
4584        /**
4585         * @param value {@link #profile} (The type of origin profile the test system supports.)
4586         */
4587        public TestScriptOriginComponent setProfile(Coding value) { 
4588          this.profile = value;
4589          return this;
4590        }
4591
4592        protected void listChildren(List<Property> children) {
4593          super.listChildren(children);
4594          children.add(new Property("index", "integer", "Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.", 0, 1, index));
4595          children.add(new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile));
4596        }
4597
4598        @Override
4599        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4600          switch (_hash) {
4601          case 100346066: /*index*/  return new Property("index", "integer", "Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.", 0, 1, index);
4602          case -309425751: /*profile*/  return new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile);
4603          default: return super.getNamedProperty(_hash, _name, _checkValid);
4604          }
4605
4606        }
4607
4608      @Override
4609      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4610        switch (hash) {
4611        case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType
4612        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding
4613        default: return super.getProperty(hash, name, checkValid);
4614        }
4615
4616      }
4617
4618      @Override
4619      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4620        switch (hash) {
4621        case 100346066: // index
4622          this.index = TypeConvertor.castToInteger(value); // IntegerType
4623          return value;
4624        case -309425751: // profile
4625          this.profile = TypeConvertor.castToCoding(value); // Coding
4626          return value;
4627        default: return super.setProperty(hash, name, value);
4628        }
4629
4630      }
4631
4632      @Override
4633      public Base setProperty(String name, Base value) throws FHIRException {
4634        if (name.equals("index")) {
4635          this.index = TypeConvertor.castToInteger(value); // IntegerType
4636        } else if (name.equals("profile")) {
4637          this.profile = TypeConvertor.castToCoding(value); // Coding
4638        } else
4639          return super.setProperty(name, value);
4640        return value;
4641      }
4642
4643      @Override
4644      public Base makeProperty(int hash, String name) throws FHIRException {
4645        switch (hash) {
4646        case 100346066:  return getIndexElement();
4647        case -309425751:  return getProfile();
4648        default: return super.makeProperty(hash, name);
4649        }
4650
4651      }
4652
4653      @Override
4654      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4655        switch (hash) {
4656        case 100346066: /*index*/ return new String[] {"integer"};
4657        case -309425751: /*profile*/ return new String[] {"Coding"};
4658        default: return super.getTypesForProperty(hash, name);
4659        }
4660
4661      }
4662
4663      @Override
4664      public Base addChild(String name) throws FHIRException {
4665        if (name.equals("index")) {
4666          throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin.index");
4667        }
4668        else if (name.equals("profile")) {
4669          this.profile = new Coding();
4670          return this.profile;
4671        }
4672        else
4673          return super.addChild(name);
4674      }
4675
4676      public TestScriptOriginComponent copy() {
4677        TestScriptOriginComponent dst = new TestScriptOriginComponent();
4678        copyValues(dst);
4679        return dst;
4680      }
4681
4682      public void copyValues(TestScriptOriginComponent dst) {
4683        super.copyValues(dst);
4684        dst.index = index == null ? null : index.copy();
4685        dst.profile = profile == null ? null : profile.copy();
4686      }
4687
4688      @Override
4689      public boolean equalsDeep(Base other_) {
4690        if (!super.equalsDeep(other_))
4691          return false;
4692        if (!(other_ instanceof TestScriptOriginComponent))
4693          return false;
4694        TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
4695        return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
4696      }
4697
4698      @Override
4699      public boolean equalsShallow(Base other_) {
4700        if (!super.equalsShallow(other_))
4701          return false;
4702        if (!(other_ instanceof TestScriptOriginComponent))
4703          return false;
4704        TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
4705        return compareValues(index, o.index, true);
4706      }
4707
4708      public boolean isEmpty() {
4709        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
4710      }
4711
4712  public String fhirType() {
4713    return "TestScript.origin";
4714
4715  }
4716
4717  }
4718
4719    @Block()
4720    public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement {
4721        /**
4722         * Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
4723         */
4724        @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false)
4725        @Description(shortDefinition="The index of the abstract destination server starting at 1", formalDefinition="Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1." )
4726        protected IntegerType index;
4727
4728        /**
4729         * The type of destination profile the test system supports.
4730         */
4731        @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false)
4732        @Description(shortDefinition="FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", formalDefinition="The type of destination profile the test system supports." )
4733        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-destination-types")
4734        protected Coding profile;
4735
4736        private static final long serialVersionUID = -1239935149L;
4737
4738    /**
4739     * Constructor
4740     */
4741      public TestScriptDestinationComponent() {
4742        super();
4743      }
4744
4745    /**
4746     * Constructor
4747     */
4748      public TestScriptDestinationComponent(int index, Coding profile) {
4749        super();
4750        this.setIndex(index);
4751        this.setProfile(profile);
4752      }
4753
4754        /**
4755         * @return {@link #index} (Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value
4756         */
4757        public IntegerType getIndexElement() { 
4758          if (this.index == null)
4759            if (Configuration.errorOnAutoCreate())
4760              throw new Error("Attempt to auto-create TestScriptDestinationComponent.index");
4761            else if (Configuration.doAutoCreate())
4762              this.index = new IntegerType(); // bb
4763          return this.index;
4764        }
4765
4766        public boolean hasIndexElement() { 
4767          return this.index != null && !this.index.isEmpty();
4768        }
4769
4770        public boolean hasIndex() { 
4771          return this.index != null && !this.index.isEmpty();
4772        }
4773
4774        /**
4775         * @param value {@link #index} (Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value
4776         */
4777        public TestScriptDestinationComponent setIndexElement(IntegerType value) { 
4778          this.index = value;
4779          return this;
4780        }
4781
4782        /**
4783         * @return Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
4784         */
4785        public int getIndex() { 
4786          return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue();
4787        }
4788
4789        /**
4790         * @param value Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
4791         */
4792        public TestScriptDestinationComponent setIndex(int value) { 
4793            if (this.index == null)
4794              this.index = new IntegerType();
4795            this.index.setValue(value);
4796          return this;
4797        }
4798
4799        /**
4800         * @return {@link #profile} (The type of destination profile the test system supports.)
4801         */
4802        public Coding getProfile() { 
4803          if (this.profile == null)
4804            if (Configuration.errorOnAutoCreate())
4805              throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile");
4806            else if (Configuration.doAutoCreate())
4807              this.profile = new Coding(); // cc
4808          return this.profile;
4809        }
4810
4811        public boolean hasProfile() { 
4812          return this.profile != null && !this.profile.isEmpty();
4813        }
4814
4815        /**
4816         * @param value {@link #profile} (The type of destination profile the test system supports.)
4817         */
4818        public TestScriptDestinationComponent setProfile(Coding value) { 
4819          this.profile = value;
4820          return this;
4821        }
4822
4823        protected void listChildren(List<Property> children) {
4824          super.listChildren(children);
4825          children.add(new Property("index", "integer", "Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.", 0, 1, index));
4826          children.add(new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile));
4827        }
4828
4829        @Override
4830        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4831          switch (_hash) {
4832          case 100346066: /*index*/  return new Property("index", "integer", "Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.", 0, 1, index);
4833          case -309425751: /*profile*/  return new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile);
4834          default: return super.getNamedProperty(_hash, _name, _checkValid);
4835          }
4836
4837        }
4838
4839      @Override
4840      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4841        switch (hash) {
4842        case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType
4843        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding
4844        default: return super.getProperty(hash, name, checkValid);
4845        }
4846
4847      }
4848
4849      @Override
4850      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4851        switch (hash) {
4852        case 100346066: // index
4853          this.index = TypeConvertor.castToInteger(value); // IntegerType
4854          return value;
4855        case -309425751: // profile
4856          this.profile = TypeConvertor.castToCoding(value); // Coding
4857          return value;
4858        default: return super.setProperty(hash, name, value);
4859        }
4860
4861      }
4862
4863      @Override
4864      public Base setProperty(String name, Base value) throws FHIRException {
4865        if (name.equals("index")) {
4866          this.index = TypeConvertor.castToInteger(value); // IntegerType
4867        } else if (name.equals("profile")) {
4868          this.profile = TypeConvertor.castToCoding(value); // Coding
4869        } else
4870          return super.setProperty(name, value);
4871        return value;
4872      }
4873
4874      @Override
4875      public Base makeProperty(int hash, String name) throws FHIRException {
4876        switch (hash) {
4877        case 100346066:  return getIndexElement();
4878        case -309425751:  return getProfile();
4879        default: return super.makeProperty(hash, name);
4880        }
4881
4882      }
4883
4884      @Override
4885      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4886        switch (hash) {
4887        case 100346066: /*index*/ return new String[] {"integer"};
4888        case -309425751: /*profile*/ return new String[] {"Coding"};
4889        default: return super.getTypesForProperty(hash, name);
4890        }
4891
4892      }
4893
4894      @Override
4895      public Base addChild(String name) throws FHIRException {
4896        if (name.equals("index")) {
4897          throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination.index");
4898        }
4899        else if (name.equals("profile")) {
4900          this.profile = new Coding();
4901          return this.profile;
4902        }
4903        else
4904          return super.addChild(name);
4905      }
4906
4907      public TestScriptDestinationComponent copy() {
4908        TestScriptDestinationComponent dst = new TestScriptDestinationComponent();
4909        copyValues(dst);
4910        return dst;
4911      }
4912
4913      public void copyValues(TestScriptDestinationComponent dst) {
4914        super.copyValues(dst);
4915        dst.index = index == null ? null : index.copy();
4916        dst.profile = profile == null ? null : profile.copy();
4917      }
4918
4919      @Override
4920      public boolean equalsDeep(Base other_) {
4921        if (!super.equalsDeep(other_))
4922          return false;
4923        if (!(other_ instanceof TestScriptDestinationComponent))
4924          return false;
4925        TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
4926        return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
4927      }
4928
4929      @Override
4930      public boolean equalsShallow(Base other_) {
4931        if (!super.equalsShallow(other_))
4932          return false;
4933        if (!(other_ instanceof TestScriptDestinationComponent))
4934          return false;
4935        TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
4936        return compareValues(index, o.index, true);
4937      }
4938
4939      public boolean isEmpty() {
4940        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
4941      }
4942
4943  public String fhirType() {
4944    return "TestScript.destination";
4945
4946  }
4947
4948  }
4949
4950    @Block()
4951    public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement {
4952        /**
4953         * A link to the FHIR specification that this test is covering.
4954         */
4955        @Child(name = "link", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
4956        @Description(shortDefinition="Links to the FHIR specification", formalDefinition="A link to the FHIR specification that this test is covering." )
4957        protected List<TestScriptMetadataLinkComponent> link;
4958
4959        /**
4960         * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.
4961         */
4962        @Child(name = "capability", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
4963        @Description(shortDefinition="Capabilities  that are assumed to function correctly on the FHIR server being tested", formalDefinition="Capabilities that must exist and are assumed to function correctly on the FHIR server being tested." )
4964        protected List<TestScriptMetadataCapabilityComponent> capability;
4965
4966        private static final long serialVersionUID = 745183328L;
4967
4968    /**
4969     * Constructor
4970     */
4971      public TestScriptMetadataComponent() {
4972        super();
4973      }
4974
4975    /**
4976     * Constructor
4977     */
4978      public TestScriptMetadataComponent(TestScriptMetadataCapabilityComponent capability) {
4979        super();
4980        this.addCapability(capability);
4981      }
4982
4983        /**
4984         * @return {@link #link} (A link to the FHIR specification that this test is covering.)
4985         */
4986        public List<TestScriptMetadataLinkComponent> getLink() { 
4987          if (this.link == null)
4988            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
4989          return this.link;
4990        }
4991
4992        /**
4993         * @return Returns a reference to <code>this</code> for easy method chaining
4994         */
4995        public TestScriptMetadataComponent setLink(List<TestScriptMetadataLinkComponent> theLink) { 
4996          this.link = theLink;
4997          return this;
4998        }
4999
5000        public boolean hasLink() { 
5001          if (this.link == null)
5002            return false;
5003          for (TestScriptMetadataLinkComponent item : this.link)
5004            if (!item.isEmpty())
5005              return true;
5006          return false;
5007        }
5008
5009        public TestScriptMetadataLinkComponent addLink() { //3
5010          TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent();
5011          if (this.link == null)
5012            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
5013          this.link.add(t);
5014          return t;
5015        }
5016
5017        public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { //3
5018          if (t == null)
5019            return this;
5020          if (this.link == null)
5021            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
5022          this.link.add(t);
5023          return this;
5024        }
5025
5026        /**
5027         * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist {3}
5028         */
5029        public TestScriptMetadataLinkComponent getLinkFirstRep() { 
5030          if (getLink().isEmpty()) {
5031            addLink();
5032          }
5033          return getLink().get(0);
5034        }
5035
5036        /**
5037         * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.)
5038         */
5039        public List<TestScriptMetadataCapabilityComponent> getCapability() { 
5040          if (this.capability == null)
5041            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
5042          return this.capability;
5043        }
5044
5045        /**
5046         * @return Returns a reference to <code>this</code> for easy method chaining
5047         */
5048        public TestScriptMetadataComponent setCapability(List<TestScriptMetadataCapabilityComponent> theCapability) { 
5049          this.capability = theCapability;
5050          return this;
5051        }
5052
5053        public boolean hasCapability() { 
5054          if (this.capability == null)
5055            return false;
5056          for (TestScriptMetadataCapabilityComponent item : this.capability)
5057            if (!item.isEmpty())
5058              return true;
5059          return false;
5060        }
5061
5062        public TestScriptMetadataCapabilityComponent addCapability() { //3
5063          TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent();
5064          if (this.capability == null)
5065            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
5066          this.capability.add(t);
5067          return t;
5068        }
5069
5070        public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { //3
5071          if (t == null)
5072            return this;
5073          if (this.capability == null)
5074            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
5075          this.capability.add(t);
5076          return this;
5077        }
5078
5079        /**
5080         * @return The first repetition of repeating field {@link #capability}, creating it if it does not already exist {3}
5081         */
5082        public TestScriptMetadataCapabilityComponent getCapabilityFirstRep() { 
5083          if (getCapability().isEmpty()) {
5084            addCapability();
5085          }
5086          return getCapability().get(0);
5087        }
5088
5089        protected void listChildren(List<Property> children) {
5090          super.listChildren(children);
5091          children.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link));
5092          children.add(new Property("capability", "", "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, capability));
5093        }
5094
5095        @Override
5096        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5097          switch (_hash) {
5098          case 3321850: /*link*/  return new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link);
5099          case -783669992: /*capability*/  return new Property("capability", "", "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, capability);
5100          default: return super.getNamedProperty(_hash, _name, _checkValid);
5101          }
5102
5103        }
5104
5105      @Override
5106      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5107        switch (hash) {
5108        case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // TestScriptMetadataLinkComponent
5109        case -783669992: /*capability*/ return this.capability == null ? new Base[0] : this.capability.toArray(new Base[this.capability.size()]); // TestScriptMetadataCapabilityComponent
5110        default: return super.getProperty(hash, name, checkValid);
5111        }
5112
5113      }
5114
5115      @Override
5116      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5117        switch (hash) {
5118        case 3321850: // link
5119          this.getLink().add((TestScriptMetadataLinkComponent) value); // TestScriptMetadataLinkComponent
5120          return value;
5121        case -783669992: // capability
5122          this.getCapability().add((TestScriptMetadataCapabilityComponent) value); // TestScriptMetadataCapabilityComponent
5123          return value;
5124        default: return super.setProperty(hash, name, value);
5125        }
5126
5127      }
5128
5129      @Override
5130      public Base setProperty(String name, Base value) throws FHIRException {
5131        if (name.equals("link")) {
5132          this.getLink().add((TestScriptMetadataLinkComponent) value);
5133        } else if (name.equals("capability")) {
5134          this.getCapability().add((TestScriptMetadataCapabilityComponent) value);
5135        } else
5136          return super.setProperty(name, value);
5137        return value;
5138      }
5139
5140      @Override
5141      public Base makeProperty(int hash, String name) throws FHIRException {
5142        switch (hash) {
5143        case 3321850:  return addLink(); 
5144        case -783669992:  return addCapability(); 
5145        default: return super.makeProperty(hash, name);
5146        }
5147
5148      }
5149
5150      @Override
5151      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5152        switch (hash) {
5153        case 3321850: /*link*/ return new String[] {};
5154        case -783669992: /*capability*/ return new String[] {};
5155        default: return super.getTypesForProperty(hash, name);
5156        }
5157
5158      }
5159
5160      @Override
5161      public Base addChild(String name) throws FHIRException {
5162        if (name.equals("link")) {
5163          return addLink();
5164        }
5165        else if (name.equals("capability")) {
5166          return addCapability();
5167        }
5168        else
5169          return super.addChild(name);
5170      }
5171
5172      public TestScriptMetadataComponent copy() {
5173        TestScriptMetadataComponent dst = new TestScriptMetadataComponent();
5174        copyValues(dst);
5175        return dst;
5176      }
5177
5178      public void copyValues(TestScriptMetadataComponent dst) {
5179        super.copyValues(dst);
5180        if (link != null) {
5181          dst.link = new ArrayList<TestScriptMetadataLinkComponent>();
5182          for (TestScriptMetadataLinkComponent i : link)
5183            dst.link.add(i.copy());
5184        };
5185        if (capability != null) {
5186          dst.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
5187          for (TestScriptMetadataCapabilityComponent i : capability)
5188            dst.capability.add(i.copy());
5189        };
5190      }
5191
5192      @Override
5193      public boolean equalsDeep(Base other_) {
5194        if (!super.equalsDeep(other_))
5195          return false;
5196        if (!(other_ instanceof TestScriptMetadataComponent))
5197          return false;
5198        TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
5199        return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true);
5200      }
5201
5202      @Override
5203      public boolean equalsShallow(Base other_) {
5204        if (!super.equalsShallow(other_))
5205          return false;
5206        if (!(other_ instanceof TestScriptMetadataComponent))
5207          return false;
5208        TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
5209        return true;
5210      }
5211
5212      public boolean isEmpty() {
5213        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, capability);
5214      }
5215
5216  public String fhirType() {
5217    return "TestScript.metadata";
5218
5219  }
5220
5221  }
5222
5223    @Block()
5224    public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement {
5225        /**
5226         * URL to a particular requirement or feature within the FHIR specification.
5227         */
5228        @Child(name = "url", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false)
5229        @Description(shortDefinition="URL to the specification", formalDefinition="URL to a particular requirement or feature within the FHIR specification." )
5230        protected UriType url;
5231
5232        /**
5233         * Short description of the link.
5234         */
5235        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
5236        @Description(shortDefinition="Short description", formalDefinition="Short description of the link." )
5237        protected StringType description;
5238
5239        private static final long serialVersionUID = 213372298L;
5240
5241    /**
5242     * Constructor
5243     */
5244      public TestScriptMetadataLinkComponent() {
5245        super();
5246      }
5247
5248    /**
5249     * Constructor
5250     */
5251      public TestScriptMetadataLinkComponent(String url) {
5252        super();
5253        this.setUrl(url);
5254      }
5255
5256        /**
5257         * @return {@link #url} (URL to a particular requirement or feature within the FHIR specification.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
5258         */
5259        public UriType getUrlElement() { 
5260          if (this.url == null)
5261            if (Configuration.errorOnAutoCreate())
5262              throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url");
5263            else if (Configuration.doAutoCreate())
5264              this.url = new UriType(); // bb
5265          return this.url;
5266        }
5267
5268        public boolean hasUrlElement() { 
5269          return this.url != null && !this.url.isEmpty();
5270        }
5271
5272        public boolean hasUrl() { 
5273          return this.url != null && !this.url.isEmpty();
5274        }
5275
5276        /**
5277         * @param value {@link #url} (URL to a particular requirement or feature within the FHIR specification.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
5278         */
5279        public TestScriptMetadataLinkComponent setUrlElement(UriType value) { 
5280          this.url = value;
5281          return this;
5282        }
5283
5284        /**
5285         * @return URL to a particular requirement or feature within the FHIR specification.
5286         */
5287        public String getUrl() { 
5288          return this.url == null ? null : this.url.getValue();
5289        }
5290
5291        /**
5292         * @param value URL to a particular requirement or feature within the FHIR specification.
5293         */
5294        public TestScriptMetadataLinkComponent setUrl(String value) { 
5295            if (this.url == null)
5296              this.url = new UriType();
5297            this.url.setValue(value);
5298          return this;
5299        }
5300
5301        /**
5302         * @return {@link #description} (Short description of the link.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
5303         */
5304        public StringType getDescriptionElement() { 
5305          if (this.description == null)
5306            if (Configuration.errorOnAutoCreate())
5307              throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description");
5308            else if (Configuration.doAutoCreate())
5309              this.description = new StringType(); // bb
5310          return this.description;
5311        }
5312
5313        public boolean hasDescriptionElement() { 
5314          return this.description != null && !this.description.isEmpty();
5315        }
5316
5317        public boolean hasDescription() { 
5318          return this.description != null && !this.description.isEmpty();
5319        }
5320
5321        /**
5322         * @param value {@link #description} (Short description of the link.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
5323         */
5324        public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) { 
5325          this.description = value;
5326          return this;
5327        }
5328
5329        /**
5330         * @return Short description of the link.
5331         */
5332        public String getDescription() { 
5333          return this.description == null ? null : this.description.getValue();
5334        }
5335
5336        /**
5337         * @param value Short description of the link.
5338         */
5339        public TestScriptMetadataLinkComponent setDescription(String value) { 
5340          if (Utilities.noString(value))
5341            this.description = null;
5342          else {
5343            if (this.description == null)
5344              this.description = new StringType();
5345            this.description.setValue(value);
5346          }
5347          return this;
5348        }
5349
5350        protected void listChildren(List<Property> children) {
5351          super.listChildren(children);
5352          children.add(new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url));
5353          children.add(new Property("description", "string", "Short description of the link.", 0, 1, description));
5354        }
5355
5356        @Override
5357        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5358          switch (_hash) {
5359          case 116079: /*url*/  return new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url);
5360          case -1724546052: /*description*/  return new Property("description", "string", "Short description of the link.", 0, 1, description);
5361          default: return super.getNamedProperty(_hash, _name, _checkValid);
5362          }
5363
5364        }
5365
5366      @Override
5367      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5368        switch (hash) {
5369        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
5370        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
5371        default: return super.getProperty(hash, name, checkValid);
5372        }
5373
5374      }
5375
5376      @Override
5377      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5378        switch (hash) {
5379        case 116079: // url
5380          this.url = TypeConvertor.castToUri(value); // UriType
5381          return value;
5382        case -1724546052: // description
5383          this.description = TypeConvertor.castToString(value); // StringType
5384          return value;
5385        default: return super.setProperty(hash, name, value);
5386        }
5387
5388      }
5389
5390      @Override
5391      public Base setProperty(String name, Base value) throws FHIRException {
5392        if (name.equals("url")) {
5393          this.url = TypeConvertor.castToUri(value); // UriType
5394        } else if (name.equals("description")) {
5395          this.description = TypeConvertor.castToString(value); // StringType
5396        } else
5397          return super.setProperty(name, value);
5398        return value;
5399      }
5400
5401      @Override
5402      public Base makeProperty(int hash, String name) throws FHIRException {
5403        switch (hash) {
5404        case 116079:  return getUrlElement();
5405        case -1724546052:  return getDescriptionElement();
5406        default: return super.makeProperty(hash, name);
5407        }
5408
5409      }
5410
5411      @Override
5412      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5413        switch (hash) {
5414        case 116079: /*url*/ return new String[] {"uri"};
5415        case -1724546052: /*description*/ return new String[] {"string"};
5416        default: return super.getTypesForProperty(hash, name);
5417        }
5418
5419      }
5420
5421      @Override
5422      public Base addChild(String name) throws FHIRException {
5423        if (name.equals("url")) {
5424          throw new FHIRException("Cannot call addChild on a primitive type TestScript.metadata.link.url");
5425        }
5426        else if (name.equals("description")) {
5427          throw new FHIRException("Cannot call addChild on a primitive type TestScript.metadata.link.description");
5428        }
5429        else
5430          return super.addChild(name);
5431      }
5432
5433      public TestScriptMetadataLinkComponent copy() {
5434        TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent();
5435        copyValues(dst);
5436        return dst;
5437      }
5438
5439      public void copyValues(TestScriptMetadataLinkComponent dst) {
5440        super.copyValues(dst);
5441        dst.url = url == null ? null : url.copy();
5442        dst.description = description == null ? null : description.copy();
5443      }
5444
5445      @Override
5446      public boolean equalsDeep(Base other_) {
5447        if (!super.equalsDeep(other_))
5448          return false;
5449        if (!(other_ instanceof TestScriptMetadataLinkComponent))
5450          return false;
5451        TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
5452        return compareDeep(url, o.url, true) && compareDeep(description, o.description, true);
5453      }
5454
5455      @Override
5456      public boolean equalsShallow(Base other_) {
5457        if (!super.equalsShallow(other_))
5458          return false;
5459        if (!(other_ instanceof TestScriptMetadataLinkComponent))
5460          return false;
5461        TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
5462        return compareValues(url, o.url, true) && compareValues(description, o.description, true);
5463      }
5464
5465      public boolean isEmpty() {
5466        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, description);
5467      }
5468
5469  public String fhirType() {
5470    return "TestScript.metadata.link";
5471
5472  }
5473
5474  }
5475
5476    @Block()
5477    public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement {
5478        /**
5479         * Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
5480         */
5481        @Child(name = "required", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=false)
5482        @Description(shortDefinition="Are the capabilities required?", formalDefinition="Whether or not the test execution will require the given capabilities of the server in order for this test script to execute." )
5483        protected BooleanType required;
5484
5485        /**
5486         * Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
5487         */
5488        @Child(name = "validated", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=false)
5489        @Description(shortDefinition="Are the capabilities validated?", formalDefinition="Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute." )
5490        protected BooleanType validated;
5491
5492        /**
5493         * Description of the capabilities that this test script is requiring the server to support.
5494         */
5495        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
5496        @Description(shortDefinition="The expected capabilities of the server", formalDefinition="Description of the capabilities that this test script is requiring the server to support." )
5497        protected StringType description;
5498
5499        /**
5500         * Which origin server these requirements apply to.
5501         */
5502        @Child(name = "origin", type = {IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
5503        @Description(shortDefinition="Which origin server these requirements apply to", formalDefinition="Which origin server these requirements apply to." )
5504        protected List<IntegerType> origin;
5505
5506        /**
5507         * Which server these requirements apply to.
5508         */
5509        @Child(name = "destination", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=false)
5510        @Description(shortDefinition="Which server these requirements apply to", formalDefinition="Which server these requirements apply to." )
5511        protected IntegerType destination;
5512
5513        /**
5514         * Links to the FHIR specification that describes this interaction and the resources involved in more detail.
5515         */
5516        @Child(name = "link", type = {UriType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
5517        @Description(shortDefinition="Links to the FHIR specification", formalDefinition="Links to the FHIR specification that describes this interaction and the resources involved in more detail." )
5518        protected List<UriType> link;
5519
5520        /**
5521         * Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.
5522         */
5523        @Child(name = "capabilities", type = {CanonicalType.class}, order=7, min=1, max=1, modifier=false, summary=false)
5524        @Description(shortDefinition="Required Capability Statement", formalDefinition="Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped." )
5525        protected CanonicalType capabilities;
5526
5527        private static final long serialVersionUID = -1368199288L;
5528
5529    /**
5530     * Constructor
5531     */
5532      public TestScriptMetadataCapabilityComponent() {
5533        super();
5534      }
5535
5536    /**
5537     * Constructor
5538     */
5539      public TestScriptMetadataCapabilityComponent(boolean required, boolean validated, String capabilities) {
5540        super();
5541        this.setRequired(required);
5542        this.setValidated(validated);
5543        this.setCapabilities(capabilities);
5544      }
5545
5546        /**
5547         * @return {@link #required} (Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value
5548         */
5549        public BooleanType getRequiredElement() { 
5550          if (this.required == null)
5551            if (Configuration.errorOnAutoCreate())
5552              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required");
5553            else if (Configuration.doAutoCreate())
5554              this.required = new BooleanType(); // bb
5555          return this.required;
5556        }
5557
5558        public boolean hasRequiredElement() { 
5559          return this.required != null && !this.required.isEmpty();
5560        }
5561
5562        public boolean hasRequired() { 
5563          return this.required != null && !this.required.isEmpty();
5564        }
5565
5566        /**
5567         * @param value {@link #required} (Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value
5568         */
5569        public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) { 
5570          this.required = value;
5571          return this;
5572        }
5573
5574        /**
5575         * @return Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
5576         */
5577        public boolean getRequired() { 
5578          return this.required == null || this.required.isEmpty() ? false : this.required.getValue();
5579        }
5580
5581        /**
5582         * @param value Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
5583         */
5584        public TestScriptMetadataCapabilityComponent setRequired(boolean value) { 
5585            if (this.required == null)
5586              this.required = new BooleanType();
5587            this.required.setValue(value);
5588          return this;
5589        }
5590
5591        /**
5592         * @return {@link #validated} (Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getValidated" gives direct access to the value
5593         */
5594        public BooleanType getValidatedElement() { 
5595          if (this.validated == null)
5596            if (Configuration.errorOnAutoCreate())
5597              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated");
5598            else if (Configuration.doAutoCreate())
5599              this.validated = new BooleanType(); // bb
5600          return this.validated;
5601        }
5602
5603        public boolean hasValidatedElement() { 
5604          return this.validated != null && !this.validated.isEmpty();
5605        }
5606
5607        public boolean hasValidated() { 
5608          return this.validated != null && !this.validated.isEmpty();
5609        }
5610
5611        /**
5612         * @param value {@link #validated} (Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getValidated" gives direct access to the value
5613         */
5614        public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) { 
5615          this.validated = value;
5616          return this;
5617        }
5618
5619        /**
5620         * @return Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
5621         */
5622        public boolean getValidated() { 
5623          return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue();
5624        }
5625
5626        /**
5627         * @param value Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
5628         */
5629        public TestScriptMetadataCapabilityComponent setValidated(boolean value) { 
5630            if (this.validated == null)
5631              this.validated = new BooleanType();
5632            this.validated.setValue(value);
5633          return this;
5634        }
5635
5636        /**
5637         * @return {@link #description} (Description of the capabilities that this test script is requiring the server to support.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
5638         */
5639        public StringType getDescriptionElement() { 
5640          if (this.description == null)
5641            if (Configuration.errorOnAutoCreate())
5642              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description");
5643            else if (Configuration.doAutoCreate())
5644              this.description = new StringType(); // bb
5645          return this.description;
5646        }
5647
5648        public boolean hasDescriptionElement() { 
5649          return this.description != null && !this.description.isEmpty();
5650        }
5651
5652        public boolean hasDescription() { 
5653          return this.description != null && !this.description.isEmpty();
5654        }
5655
5656        /**
5657         * @param value {@link #description} (Description of the capabilities that this test script is requiring the server to support.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
5658         */
5659        public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) { 
5660          this.description = value;
5661          return this;
5662        }
5663
5664        /**
5665         * @return Description of the capabilities that this test script is requiring the server to support.
5666         */
5667        public String getDescription() { 
5668          return this.description == null ? null : this.description.getValue();
5669        }
5670
5671        /**
5672         * @param value Description of the capabilities that this test script is requiring the server to support.
5673         */
5674        public TestScriptMetadataCapabilityComponent setDescription(String value) { 
5675          if (Utilities.noString(value))
5676            this.description = null;
5677          else {
5678            if (this.description == null)
5679              this.description = new StringType();
5680            this.description.setValue(value);
5681          }
5682          return this;
5683        }
5684
5685        /**
5686         * @return {@link #origin} (Which origin server these requirements apply to.)
5687         */
5688        public List<IntegerType> getOrigin() { 
5689          if (this.origin == null)
5690            this.origin = new ArrayList<IntegerType>();
5691          return this.origin;
5692        }
5693
5694        /**
5695         * @return Returns a reference to <code>this</code> for easy method chaining
5696         */
5697        public TestScriptMetadataCapabilityComponent setOrigin(List<IntegerType> theOrigin) { 
5698          this.origin = theOrigin;
5699          return this;
5700        }
5701
5702        public boolean hasOrigin() { 
5703          if (this.origin == null)
5704            return false;
5705          for (IntegerType item : this.origin)
5706            if (!item.isEmpty())
5707              return true;
5708          return false;
5709        }
5710
5711        /**
5712         * @return {@link #origin} (Which origin server these requirements apply to.)
5713         */
5714        public IntegerType addOriginElement() {//2 
5715          IntegerType t = new IntegerType();
5716          if (this.origin == null)
5717            this.origin = new ArrayList<IntegerType>();
5718          this.origin.add(t);
5719          return t;
5720        }
5721
5722        /**
5723         * @param value {@link #origin} (Which origin server these requirements apply to.)
5724         */
5725        public TestScriptMetadataCapabilityComponent addOrigin(int value) { //1
5726          IntegerType t = new IntegerType();
5727          t.setValue(value);
5728          if (this.origin == null)
5729            this.origin = new ArrayList<IntegerType>();
5730          this.origin.add(t);
5731          return this;
5732        }
5733
5734        /**
5735         * @param value {@link #origin} (Which origin server these requirements apply to.)
5736         */
5737        public boolean hasOrigin(int value) { 
5738          if (this.origin == null)
5739            return false;
5740          for (IntegerType v : this.origin)
5741            if (v.getValue().equals(value)) // integer
5742              return true;
5743          return false;
5744        }
5745
5746        /**
5747         * @return {@link #destination} (Which server these requirements apply to.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value
5748         */
5749        public IntegerType getDestinationElement() { 
5750          if (this.destination == null)
5751            if (Configuration.errorOnAutoCreate())
5752              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination");
5753            else if (Configuration.doAutoCreate())
5754              this.destination = new IntegerType(); // bb
5755          return this.destination;
5756        }
5757
5758        public boolean hasDestinationElement() { 
5759          return this.destination != null && !this.destination.isEmpty();
5760        }
5761
5762        public boolean hasDestination() { 
5763          return this.destination != null && !this.destination.isEmpty();
5764        }
5765
5766        /**
5767         * @param value {@link #destination} (Which server these requirements apply to.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value
5768         */
5769        public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) { 
5770          this.destination = value;
5771          return this;
5772        }
5773
5774        /**
5775         * @return Which server these requirements apply to.
5776         */
5777        public int getDestination() { 
5778          return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue();
5779        }
5780
5781        /**
5782         * @param value Which server these requirements apply to.
5783         */
5784        public TestScriptMetadataCapabilityComponent setDestination(int value) { 
5785            if (this.destination == null)
5786              this.destination = new IntegerType();
5787            this.destination.setValue(value);
5788          return this;
5789        }
5790
5791        /**
5792         * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
5793         */
5794        public List<UriType> getLink() { 
5795          if (this.link == null)
5796            this.link = new ArrayList<UriType>();
5797          return this.link;
5798        }
5799
5800        /**
5801         * @return Returns a reference to <code>this</code> for easy method chaining
5802         */
5803        public TestScriptMetadataCapabilityComponent setLink(List<UriType> theLink) { 
5804          this.link = theLink;
5805          return this;
5806        }
5807
5808        public boolean hasLink() { 
5809          if (this.link == null)
5810            return false;
5811          for (UriType item : this.link)
5812            if (!item.isEmpty())
5813              return true;
5814          return false;
5815        }
5816
5817        /**
5818         * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
5819         */
5820        public UriType addLinkElement() {//2 
5821          UriType t = new UriType();
5822          if (this.link == null)
5823            this.link = new ArrayList<UriType>();
5824          this.link.add(t);
5825          return t;
5826        }
5827
5828        /**
5829         * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
5830         */
5831        public TestScriptMetadataCapabilityComponent addLink(String value) { //1
5832          UriType t = new UriType();
5833          t.setValue(value);
5834          if (this.link == null)
5835            this.link = new ArrayList<UriType>();
5836          this.link.add(t);
5837          return this;
5838        }
5839
5840        /**
5841         * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
5842         */
5843        public boolean hasLink(String value) { 
5844          if (this.link == null)
5845            return false;
5846          for (UriType v : this.link)
5847            if (v.getValue().equals(value)) // uri
5848              return true;
5849          return false;
5850        }
5851
5852        /**
5853         * @return {@link #capabilities} (Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.). This is the underlying object with id, value and extensions. The accessor "getCapabilities" gives direct access to the value
5854         */
5855        public CanonicalType getCapabilitiesElement() { 
5856          if (this.capabilities == null)
5857            if (Configuration.errorOnAutoCreate())
5858              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities");
5859            else if (Configuration.doAutoCreate())
5860              this.capabilities = new CanonicalType(); // bb
5861          return this.capabilities;
5862        }
5863
5864        public boolean hasCapabilitiesElement() { 
5865          return this.capabilities != null && !this.capabilities.isEmpty();
5866        }
5867
5868        public boolean hasCapabilities() { 
5869          return this.capabilities != null && !this.capabilities.isEmpty();
5870        }
5871
5872        /**
5873         * @param value {@link #capabilities} (Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.). This is the underlying object with id, value and extensions. The accessor "getCapabilities" gives direct access to the value
5874         */
5875        public TestScriptMetadataCapabilityComponent setCapabilitiesElement(CanonicalType value) { 
5876          this.capabilities = value;
5877          return this;
5878        }
5879
5880        /**
5881         * @return Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.
5882         */
5883        public String getCapabilities() { 
5884          return this.capabilities == null ? null : this.capabilities.getValue();
5885        }
5886
5887        /**
5888         * @param value Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.
5889         */
5890        public TestScriptMetadataCapabilityComponent setCapabilities(String value) { 
5891            if (this.capabilities == null)
5892              this.capabilities = new CanonicalType();
5893            this.capabilities.setValue(value);
5894          return this;
5895        }
5896
5897        protected void listChildren(List<Property> children) {
5898          super.listChildren(children);
5899          children.add(new Property("required", "boolean", "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.", 0, 1, required));
5900          children.add(new Property("validated", "boolean", "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.", 0, 1, validated));
5901          children.add(new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, 1, description));
5902          children.add(new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin));
5903          children.add(new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination));
5904          children.add(new Property("link", "uri", "Links to the FHIR specification that describes this interaction and the resources involved in more detail.", 0, java.lang.Integer.MAX_VALUE, link));
5905          children.add(new Property("capabilities", "canonical(CapabilityStatement)", "Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.", 0, 1, capabilities));
5906        }
5907
5908        @Override
5909        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5910          switch (_hash) {
5911          case -393139297: /*required*/  return new Property("required", "boolean", "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.", 0, 1, required);
5912          case -1109784050: /*validated*/  return new Property("validated", "boolean", "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.", 0, 1, validated);
5913          case -1724546052: /*description*/  return new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, 1, description);
5914          case -1008619738: /*origin*/  return new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin);
5915          case -1429847026: /*destination*/  return new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination);
5916          case 3321850: /*link*/  return new Property("link", "uri", "Links to the FHIR specification that describes this interaction and the resources involved in more detail.", 0, java.lang.Integer.MAX_VALUE, link);
5917          case -1487597642: /*capabilities*/  return new Property("capabilities", "canonical(CapabilityStatement)", "Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.", 0, 1, capabilities);
5918          default: return super.getNamedProperty(_hash, _name, _checkValid);
5919          }
5920
5921        }
5922
5923      @Override
5924      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5925        switch (hash) {
5926        case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType
5927        case -1109784050: /*validated*/ return this.validated == null ? new Base[0] : new Base[] {this.validated}; // BooleanType
5928        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
5929        case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // IntegerType
5930        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType
5931        case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // UriType
5932        case -1487597642: /*capabilities*/ return this.capabilities == null ? new Base[0] : new Base[] {this.capabilities}; // CanonicalType
5933        default: return super.getProperty(hash, name, checkValid);
5934        }
5935
5936      }
5937
5938      @Override
5939      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5940        switch (hash) {
5941        case -393139297: // required
5942          this.required = TypeConvertor.castToBoolean(value); // BooleanType
5943          return value;
5944        case -1109784050: // validated
5945          this.validated = TypeConvertor.castToBoolean(value); // BooleanType
5946          return value;
5947        case -1724546052: // description
5948          this.description = TypeConvertor.castToString(value); // StringType
5949          return value;
5950        case -1008619738: // origin
5951          this.getOrigin().add(TypeConvertor.castToInteger(value)); // IntegerType
5952          return value;
5953        case -1429847026: // destination
5954          this.destination = TypeConvertor.castToInteger(value); // IntegerType
5955          return value;
5956        case 3321850: // link
5957          this.getLink().add(TypeConvertor.castToUri(value)); // UriType
5958          return value;
5959        case -1487597642: // capabilities
5960          this.capabilities = TypeConvertor.castToCanonical(value); // CanonicalType
5961          return value;
5962        default: return super.setProperty(hash, name, value);
5963        }
5964
5965      }
5966
5967      @Override
5968      public Base setProperty(String name, Base value) throws FHIRException {
5969        if (name.equals("required")) {
5970          this.required = TypeConvertor.castToBoolean(value); // BooleanType
5971        } else if (name.equals("validated")) {
5972          this.validated = TypeConvertor.castToBoolean(value); // BooleanType
5973        } else if (name.equals("description")) {
5974          this.description = TypeConvertor.castToString(value); // StringType
5975        } else if (name.equals("origin")) {
5976          this.getOrigin().add(TypeConvertor.castToInteger(value));
5977        } else if (name.equals("destination")) {
5978          this.destination = TypeConvertor.castToInteger(value); // IntegerType
5979        } else if (name.equals("link")) {
5980          this.getLink().add(TypeConvertor.castToUri(value));
5981        } else if (name.equals("capabilities")) {
5982          this.capabilities = TypeConvertor.castToCanonical(value); // CanonicalType
5983        } else
5984          return super.setProperty(name, value);
5985        return value;
5986      }
5987
5988      @Override
5989      public Base makeProperty(int hash, String name) throws FHIRException {
5990        switch (hash) {
5991        case -393139297:  return getRequiredElement();
5992        case -1109784050:  return getValidatedElement();
5993        case -1724546052:  return getDescriptionElement();
5994        case -1008619738:  return addOriginElement();
5995        case -1429847026:  return getDestinationElement();
5996        case 3321850:  return addLinkElement();
5997        case -1487597642:  return getCapabilitiesElement();
5998        default: return super.makeProperty(hash, name);
5999        }
6000
6001      }
6002
6003      @Override
6004      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6005        switch (hash) {
6006        case -393139297: /*required*/ return new String[] {"boolean"};
6007        case -1109784050: /*validated*/ return new String[] {"boolean"};
6008        case -1724546052: /*description*/ return new String[] {"string"};
6009        case -1008619738: /*origin*/ return new String[] {"integer"};
6010        case -1429847026: /*destination*/ return new String[] {"integer"};
6011        case 3321850: /*link*/ return new String[] {"uri"};
6012        case -1487597642: /*capabilities*/ return new String[] {"canonical"};
6013        default: return super.getTypesForProperty(hash, name);
6014        }
6015
6016      }
6017
6018      @Override
6019      public Base addChild(String name) throws FHIRException {
6020        if (name.equals("required")) {
6021          throw new FHIRException("Cannot call addChild on a primitive type TestScript.metadata.capability.required");
6022        }
6023        else if (name.equals("validated")) {
6024          throw new FHIRException("Cannot call addChild on a primitive type TestScript.metadata.capability.validated");
6025        }
6026        else if (name.equals("description")) {
6027          throw new FHIRException("Cannot call addChild on a primitive type TestScript.metadata.capability.description");
6028        }
6029        else if (name.equals("origin")) {
6030          throw new FHIRException("Cannot call addChild on a primitive type TestScript.metadata.capability.origin");
6031        }
6032        else if (name.equals("destination")) {
6033          throw new FHIRException("Cannot call addChild on a primitive type TestScript.metadata.capability.destination");
6034        }
6035        else if (name.equals("link")) {
6036          throw new FHIRException("Cannot call addChild on a primitive type TestScript.metadata.capability.link");
6037        }
6038        else if (name.equals("capabilities")) {
6039          throw new FHIRException("Cannot call addChild on a primitive type TestScript.metadata.capability.capabilities");
6040        }
6041        else
6042          return super.addChild(name);
6043      }
6044
6045      public TestScriptMetadataCapabilityComponent copy() {
6046        TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent();
6047        copyValues(dst);
6048        return dst;
6049      }
6050
6051      public void copyValues(TestScriptMetadataCapabilityComponent dst) {
6052        super.copyValues(dst);
6053        dst.required = required == null ? null : required.copy();
6054        dst.validated = validated == null ? null : validated.copy();
6055        dst.description = description == null ? null : description.copy();
6056        if (origin != null) {
6057          dst.origin = new ArrayList<IntegerType>();
6058          for (IntegerType i : origin)
6059            dst.origin.add(i.copy());
6060        };
6061        dst.destination = destination == null ? null : destination.copy();
6062        if (link != null) {
6063          dst.link = new ArrayList<UriType>();
6064          for (UriType i : link)
6065            dst.link.add(i.copy());
6066        };
6067        dst.capabilities = capabilities == null ? null : capabilities.copy();
6068      }
6069
6070      @Override
6071      public boolean equalsDeep(Base other_) {
6072        if (!super.equalsDeep(other_))
6073          return false;
6074        if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
6075          return false;
6076        TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
6077        return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true) && compareDeep(description, o.description, true)
6078           && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true)
6079           && compareDeep(capabilities, o.capabilities, true);
6080      }
6081
6082      @Override
6083      public boolean equalsShallow(Base other_) {
6084        if (!super.equalsShallow(other_))
6085          return false;
6086        if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
6087          return false;
6088        TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
6089        return compareValues(required, o.required, true) && compareValues(validated, o.validated, true) && compareValues(description, o.description, true)
6090           && compareValues(origin, o.origin, true) && compareValues(destination, o.destination, true) && compareValues(link, o.link, true)
6091           && compareValues(capabilities, o.capabilities, true);
6092      }
6093
6094      public boolean isEmpty() {
6095        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(required, validated, description
6096          , origin, destination, link, capabilities);
6097      }
6098
6099  public String fhirType() {
6100    return "TestScript.metadata.capability";
6101
6102  }
6103
6104  }
6105
6106    @Block()
6107    public static class TestScriptScopeComponent extends BackboneElement implements IBaseBackboneElement {
6108        /**
6109         * The specific conformance artifact being tested. The canonical reference can be version-specific.
6110         */
6111        @Child(name = "artifact", type = {CanonicalType.class}, order=1, min=1, max=1, modifier=false, summary=false)
6112        @Description(shortDefinition="The specific conformance artifact being tested", formalDefinition="The specific conformance artifact being tested. The canonical reference can be version-specific." )
6113        protected CanonicalType artifact;
6114
6115        /**
6116         * The expectation of whether the test must pass for the system to be considered conformant with the artifact: required - all tests are expected to pass, optional - all test are expected to pass but non-pass status may be allowed, strict - all tests are expected to pass and warnings are treated as a failure.
6117         */
6118        @Child(name = "conformance", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
6119        @Description(shortDefinition="required | optional | strict", formalDefinition="The expectation of whether the test must pass for the system to be considered conformant with the artifact: required - all tests are expected to pass, optional - all test are expected to pass but non-pass status may be allowed, strict - all tests are expected to pass and warnings are treated as a failure." )
6120        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-scope-conformance-codes")
6121        protected CodeableConcept conformance;
6122
6123        /**
6124         * The phase of testing for this artifact: unit - development / implementation phase, integration - internal system to system phase, production - live system to system phase (Note, this may involve pii/phi data).
6125         */
6126        @Child(name = "phase", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
6127        @Description(shortDefinition="unit | integration | production", formalDefinition="The phase of testing for this artifact: unit - development / implementation phase, integration - internal system to system phase, production - live system to system phase (Note, this may involve pii/phi data)." )
6128        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-scope-phase-codes")
6129        protected CodeableConcept phase;
6130
6131        private static final long serialVersionUID = 1236847076L;
6132
6133    /**
6134     * Constructor
6135     */
6136      public TestScriptScopeComponent() {
6137        super();
6138      }
6139
6140    /**
6141     * Constructor
6142     */
6143      public TestScriptScopeComponent(String artifact) {
6144        super();
6145        this.setArtifact(artifact);
6146      }
6147
6148        /**
6149         * @return {@link #artifact} (The specific conformance artifact being tested. The canonical reference can be version-specific.). This is the underlying object with id, value and extensions. The accessor "getArtifact" gives direct access to the value
6150         */
6151        public CanonicalType getArtifactElement() { 
6152          if (this.artifact == null)
6153            if (Configuration.errorOnAutoCreate())
6154              throw new Error("Attempt to auto-create TestScriptScopeComponent.artifact");
6155            else if (Configuration.doAutoCreate())
6156              this.artifact = new CanonicalType(); // bb
6157          return this.artifact;
6158        }
6159
6160        public boolean hasArtifactElement() { 
6161          return this.artifact != null && !this.artifact.isEmpty();
6162        }
6163
6164        public boolean hasArtifact() { 
6165          return this.artifact != null && !this.artifact.isEmpty();
6166        }
6167
6168        /**
6169         * @param value {@link #artifact} (The specific conformance artifact being tested. The canonical reference can be version-specific.). This is the underlying object with id, value and extensions. The accessor "getArtifact" gives direct access to the value
6170         */
6171        public TestScriptScopeComponent setArtifactElement(CanonicalType value) { 
6172          this.artifact = value;
6173          return this;
6174        }
6175
6176        /**
6177         * @return The specific conformance artifact being tested. The canonical reference can be version-specific.
6178         */
6179        public String getArtifact() { 
6180          return this.artifact == null ? null : this.artifact.getValue();
6181        }
6182
6183        /**
6184         * @param value The specific conformance artifact being tested. The canonical reference can be version-specific.
6185         */
6186        public TestScriptScopeComponent setArtifact(String value) { 
6187            if (this.artifact == null)
6188              this.artifact = new CanonicalType();
6189            this.artifact.setValue(value);
6190          return this;
6191        }
6192
6193        /**
6194         * @return {@link #conformance} (The expectation of whether the test must pass for the system to be considered conformant with the artifact: required - all tests are expected to pass, optional - all test are expected to pass but non-pass status may be allowed, strict - all tests are expected to pass and warnings are treated as a failure.)
6195         */
6196        public CodeableConcept getConformance() { 
6197          if (this.conformance == null)
6198            if (Configuration.errorOnAutoCreate())
6199              throw new Error("Attempt to auto-create TestScriptScopeComponent.conformance");
6200            else if (Configuration.doAutoCreate())
6201              this.conformance = new CodeableConcept(); // cc
6202          return this.conformance;
6203        }
6204
6205        public boolean hasConformance() { 
6206          return this.conformance != null && !this.conformance.isEmpty();
6207        }
6208
6209        /**
6210         * @param value {@link #conformance} (The expectation of whether the test must pass for the system to be considered conformant with the artifact: required - all tests are expected to pass, optional - all test are expected to pass but non-pass status may be allowed, strict - all tests are expected to pass and warnings are treated as a failure.)
6211         */
6212        public TestScriptScopeComponent setConformance(CodeableConcept value) { 
6213          this.conformance = value;
6214          return this;
6215        }
6216
6217        /**
6218         * @return {@link #phase} (The phase of testing for this artifact: unit - development / implementation phase, integration - internal system to system phase, production - live system to system phase (Note, this may involve pii/phi data).)
6219         */
6220        public CodeableConcept getPhase() { 
6221          if (this.phase == null)
6222            if (Configuration.errorOnAutoCreate())
6223              throw new Error("Attempt to auto-create TestScriptScopeComponent.phase");
6224            else if (Configuration.doAutoCreate())
6225              this.phase = new CodeableConcept(); // cc
6226          return this.phase;
6227        }
6228
6229        public boolean hasPhase() { 
6230          return this.phase != null && !this.phase.isEmpty();
6231        }
6232
6233        /**
6234         * @param value {@link #phase} (The phase of testing for this artifact: unit - development / implementation phase, integration - internal system to system phase, production - live system to system phase (Note, this may involve pii/phi data).)
6235         */
6236        public TestScriptScopeComponent setPhase(CodeableConcept value) { 
6237          this.phase = value;
6238          return this;
6239        }
6240
6241        protected void listChildren(List<Property> children) {
6242          super.listChildren(children);
6243          children.add(new Property("artifact", "canonical(Any)", "The specific conformance artifact being tested. The canonical reference can be version-specific.", 0, 1, artifact));
6244          children.add(new Property("conformance", "CodeableConcept", "The expectation of whether the test must pass for the system to be considered conformant with the artifact: required - all tests are expected to pass, optional - all test are expected to pass but non-pass status may be allowed, strict - all tests are expected to pass and warnings are treated as a failure.", 0, 1, conformance));
6245          children.add(new Property("phase", "CodeableConcept", "The phase of testing for this artifact: unit - development / implementation phase, integration - internal system to system phase, production - live system to system phase (Note, this may involve pii/phi data).", 0, 1, phase));
6246        }
6247
6248        @Override
6249        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6250          switch (_hash) {
6251          case -1228798510: /*artifact*/  return new Property("artifact", "canonical(Any)", "The specific conformance artifact being tested. The canonical reference can be version-specific.", 0, 1, artifact);
6252          case 1374858133: /*conformance*/  return new Property("conformance", "CodeableConcept", "The expectation of whether the test must pass for the system to be considered conformant with the artifact: required - all tests are expected to pass, optional - all test are expected to pass but non-pass status may be allowed, strict - all tests are expected to pass and warnings are treated as a failure.", 0, 1, conformance);
6253          case 106629499: /*phase*/  return new Property("phase", "CodeableConcept", "The phase of testing for this artifact: unit - development / implementation phase, integration - internal system to system phase, production - live system to system phase (Note, this may involve pii/phi data).", 0, 1, phase);
6254          default: return super.getNamedProperty(_hash, _name, _checkValid);
6255          }
6256
6257        }
6258
6259      @Override
6260      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6261        switch (hash) {
6262        case -1228798510: /*artifact*/ return this.artifact == null ? new Base[0] : new Base[] {this.artifact}; // CanonicalType
6263        case 1374858133: /*conformance*/ return this.conformance == null ? new Base[0] : new Base[] {this.conformance}; // CodeableConcept
6264        case 106629499: /*phase*/ return this.phase == null ? new Base[0] : new Base[] {this.phase}; // CodeableConcept
6265        default: return super.getProperty(hash, name, checkValid);
6266        }
6267
6268      }
6269
6270      @Override
6271      public Base setProperty(int hash, String name, Base value) throws FHIRException {
6272        switch (hash) {
6273        case -1228798510: // artifact
6274          this.artifact = TypeConvertor.castToCanonical(value); // CanonicalType
6275          return value;
6276        case 1374858133: // conformance
6277          this.conformance = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
6278          return value;
6279        case 106629499: // phase
6280          this.phase = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
6281          return value;
6282        default: return super.setProperty(hash, name, value);
6283        }
6284
6285      }
6286
6287      @Override
6288      public Base setProperty(String name, Base value) throws FHIRException {
6289        if (name.equals("artifact")) {
6290          this.artifact = TypeConvertor.castToCanonical(value); // CanonicalType
6291        } else if (name.equals("conformance")) {
6292          this.conformance = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
6293        } else if (name.equals("phase")) {
6294          this.phase = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
6295        } else
6296          return super.setProperty(name, value);
6297        return value;
6298      }
6299
6300      @Override
6301      public Base makeProperty(int hash, String name) throws FHIRException {
6302        switch (hash) {
6303        case -1228798510:  return getArtifactElement();
6304        case 1374858133:  return getConformance();
6305        case 106629499:  return getPhase();
6306        default: return super.makeProperty(hash, name);
6307        }
6308
6309      }
6310
6311      @Override
6312      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6313        switch (hash) {
6314        case -1228798510: /*artifact*/ return new String[] {"canonical"};
6315        case 1374858133: /*conformance*/ return new String[] {"CodeableConcept"};
6316        case 106629499: /*phase*/ return new String[] {"CodeableConcept"};
6317        default: return super.getTypesForProperty(hash, name);
6318        }
6319
6320      }
6321
6322      @Override
6323      public Base addChild(String name) throws FHIRException {
6324        if (name.equals("artifact")) {
6325          throw new FHIRException("Cannot call addChild on a primitive type TestScript.scope.artifact");
6326        }
6327        else if (name.equals("conformance")) {
6328          this.conformance = new CodeableConcept();
6329          return this.conformance;
6330        }
6331        else if (name.equals("phase")) {
6332          this.phase = new CodeableConcept();
6333          return this.phase;
6334        }
6335        else
6336          return super.addChild(name);
6337      }
6338
6339      public TestScriptScopeComponent copy() {
6340        TestScriptScopeComponent dst = new TestScriptScopeComponent();
6341        copyValues(dst);
6342        return dst;
6343      }
6344
6345      public void copyValues(TestScriptScopeComponent dst) {
6346        super.copyValues(dst);
6347        dst.artifact = artifact == null ? null : artifact.copy();
6348        dst.conformance = conformance == null ? null : conformance.copy();
6349        dst.phase = phase == null ? null : phase.copy();
6350      }
6351
6352      @Override
6353      public boolean equalsDeep(Base other_) {
6354        if (!super.equalsDeep(other_))
6355          return false;
6356        if (!(other_ instanceof TestScriptScopeComponent))
6357          return false;
6358        TestScriptScopeComponent o = (TestScriptScopeComponent) other_;
6359        return compareDeep(artifact, o.artifact, true) && compareDeep(conformance, o.conformance, true)
6360           && compareDeep(phase, o.phase, true);
6361      }
6362
6363      @Override
6364      public boolean equalsShallow(Base other_) {
6365        if (!super.equalsShallow(other_))
6366          return false;
6367        if (!(other_ instanceof TestScriptScopeComponent))
6368          return false;
6369        TestScriptScopeComponent o = (TestScriptScopeComponent) other_;
6370        return compareValues(artifact, o.artifact, true);
6371      }
6372
6373      public boolean isEmpty() {
6374        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(artifact, conformance, phase
6375          );
6376      }
6377
6378  public String fhirType() {
6379    return "TestScript.scope";
6380
6381  }
6382
6383  }
6384
6385    @Block()
6386    public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement {
6387        /**
6388         * Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.
6389         */
6390        @Child(name = "autocreate", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=false)
6391        @Description(shortDefinition="Whether or not to implicitly create the fixture during setup", formalDefinition="Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section." )
6392        protected BooleanType autocreate;
6393
6394        /**
6395         * Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.
6396         */
6397        @Child(name = "autodelete", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=false)
6398        @Description(shortDefinition="Whether or not to implicitly delete the fixture during teardown", formalDefinition="Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section." )
6399        protected BooleanType autodelete;
6400
6401        /**
6402         * Reference to the resource (containing the contents of the resource needed for operations).
6403         */
6404        @Child(name = "resource", type = {Reference.class}, order=3, min=0, max=1, modifier=false, summary=false)
6405        @Description(shortDefinition="Reference of the resource", formalDefinition="Reference to the resource (containing the contents of the resource needed for operations)." )
6406        protected Reference resource;
6407
6408        private static final long serialVersionUID = 672117234L;
6409
6410    /**
6411     * Constructor
6412     */
6413      public TestScriptFixtureComponent() {
6414        super();
6415      }
6416
6417    /**
6418     * Constructor
6419     */
6420      public TestScriptFixtureComponent(boolean autocreate, boolean autodelete) {
6421        super();
6422        this.setAutocreate(autocreate);
6423        this.setAutodelete(autodelete);
6424      }
6425
6426        /**
6427         * @return {@link #autocreate} (Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.). This is the underlying object with id, value and extensions. The accessor "getAutocreate" gives direct access to the value
6428         */
6429        public BooleanType getAutocreateElement() { 
6430          if (this.autocreate == null)
6431            if (Configuration.errorOnAutoCreate())
6432              throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate");
6433            else if (Configuration.doAutoCreate())
6434              this.autocreate = new BooleanType(); // bb
6435          return this.autocreate;
6436        }
6437
6438        public boolean hasAutocreateElement() { 
6439          return this.autocreate != null && !this.autocreate.isEmpty();
6440        }
6441
6442        public boolean hasAutocreate() { 
6443          return this.autocreate != null && !this.autocreate.isEmpty();
6444        }
6445
6446        /**
6447         * @param value {@link #autocreate} (Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.). This is the underlying object with id, value and extensions. The accessor "getAutocreate" gives direct access to the value
6448         */
6449        public TestScriptFixtureComponent setAutocreateElement(BooleanType value) { 
6450          this.autocreate = value;
6451          return this;
6452        }
6453
6454        /**
6455         * @return Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.
6456         */
6457        public boolean getAutocreate() { 
6458          return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue();
6459        }
6460
6461        /**
6462         * @param value Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.
6463         */
6464        public TestScriptFixtureComponent setAutocreate(boolean value) { 
6465            if (this.autocreate == null)
6466              this.autocreate = new BooleanType();
6467            this.autocreate.setValue(value);
6468          return this;
6469        }
6470
6471        /**
6472         * @return {@link #autodelete} (Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.). This is the underlying object with id, value and extensions. The accessor "getAutodelete" gives direct access to the value
6473         */
6474        public BooleanType getAutodeleteElement() { 
6475          if (this.autodelete == null)
6476            if (Configuration.errorOnAutoCreate())
6477              throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete");
6478            else if (Configuration.doAutoCreate())
6479              this.autodelete = new BooleanType(); // bb
6480          return this.autodelete;
6481        }
6482
6483        public boolean hasAutodeleteElement() { 
6484          return this.autodelete != null && !this.autodelete.isEmpty();
6485        }
6486
6487        public boolean hasAutodelete() { 
6488          return this.autodelete != null && !this.autodelete.isEmpty();
6489        }
6490
6491        /**
6492         * @param value {@link #autodelete} (Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.). This is the underlying object with id, value and extensions. The accessor "getAutodelete" gives direct access to the value
6493         */
6494        public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) { 
6495          this.autodelete = value;
6496          return this;
6497        }
6498
6499        /**
6500         * @return Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.
6501         */
6502        public boolean getAutodelete() { 
6503          return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue();
6504        }
6505
6506        /**
6507         * @param value Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.
6508         */
6509        public TestScriptFixtureComponent setAutodelete(boolean value) { 
6510            if (this.autodelete == null)
6511              this.autodelete = new BooleanType();
6512            this.autodelete.setValue(value);
6513          return this;
6514        }
6515
6516        /**
6517         * @return {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).)
6518         */
6519        public Reference getResource() { 
6520          if (this.resource == null)
6521            if (Configuration.errorOnAutoCreate())
6522              throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource");
6523            else if (Configuration.doAutoCreate())
6524              this.resource = new Reference(); // cc
6525          return this.resource;
6526        }
6527
6528        public boolean hasResource() { 
6529          return this.resource != null && !this.resource.isEmpty();
6530        }
6531
6532        /**
6533         * @param value {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).)
6534         */
6535        public TestScriptFixtureComponent setResource(Reference value) { 
6536          this.resource = value;
6537          return this;
6538        }
6539
6540        protected void listChildren(List<Property> children) {
6541          super.listChildren(children);
6542          children.add(new Property("autocreate", "boolean", "Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.", 0, 1, autocreate));
6543          children.add(new Property("autodelete", "boolean", "Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.", 0, 1, autodelete));
6544          children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1, resource));
6545        }
6546
6547        @Override
6548        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6549          switch (_hash) {
6550          case 73154411: /*autocreate*/  return new Property("autocreate", "boolean", "Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.", 0, 1, autocreate);
6551          case 89990170: /*autodelete*/  return new Property("autodelete", "boolean", "Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.", 0, 1, autodelete);
6552          case -341064690: /*resource*/  return new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1, resource);
6553          default: return super.getNamedProperty(_hash, _name, _checkValid);
6554          }
6555
6556        }
6557
6558      @Override
6559      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6560        switch (hash) {
6561        case 73154411: /*autocreate*/ return this.autocreate == null ? new Base[0] : new Base[] {this.autocreate}; // BooleanType
6562        case 89990170: /*autodelete*/ return this.autodelete == null ? new Base[0] : new Base[] {this.autodelete}; // BooleanType
6563        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference
6564        default: return super.getProperty(hash, name, checkValid);
6565        }
6566
6567      }
6568
6569      @Override
6570      public Base setProperty(int hash, String name, Base value) throws FHIRException {
6571        switch (hash) {
6572        case 73154411: // autocreate
6573          this.autocreate = TypeConvertor.castToBoolean(value); // BooleanType
6574          return value;
6575        case 89990170: // autodelete
6576          this.autodelete = TypeConvertor.castToBoolean(value); // BooleanType
6577          return value;
6578        case -341064690: // resource
6579          this.resource = TypeConvertor.castToReference(value); // Reference
6580          return value;
6581        default: return super.setProperty(hash, name, value);
6582        }
6583
6584      }
6585
6586      @Override
6587      public Base setProperty(String name, Base value) throws FHIRException {
6588        if (name.equals("autocreate")) {
6589          this.autocreate = TypeConvertor.castToBoolean(value); // BooleanType
6590        } else if (name.equals("autodelete")) {
6591          this.autodelete = TypeConvertor.castToBoolean(value); // BooleanType
6592        } else if (name.equals("resource")) {
6593          this.resource = TypeConvertor.castToReference(value); // Reference
6594        } else
6595          return super.setProperty(name, value);
6596        return value;
6597      }
6598
6599      @Override
6600      public Base makeProperty(int hash, String name) throws FHIRException {
6601        switch (hash) {
6602        case 73154411:  return getAutocreateElement();
6603        case 89990170:  return getAutodeleteElement();
6604        case -341064690:  return getResource();
6605        default: return super.makeProperty(hash, name);
6606        }
6607
6608      }
6609
6610      @Override
6611      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6612        switch (hash) {
6613        case 73154411: /*autocreate*/ return new String[] {"boolean"};
6614        case 89990170: /*autodelete*/ return new String[] {"boolean"};
6615        case -341064690: /*resource*/ return new String[] {"Reference"};
6616        default: return super.getTypesForProperty(hash, name);
6617        }
6618
6619      }
6620
6621      @Override
6622      public Base addChild(String name) throws FHIRException {
6623        if (name.equals("autocreate")) {
6624          throw new FHIRException("Cannot call addChild on a primitive type TestScript.fixture.autocreate");
6625        }
6626        else if (name.equals("autodelete")) {
6627          throw new FHIRException("Cannot call addChild on a primitive type TestScript.fixture.autodelete");
6628        }
6629        else if (name.equals("resource")) {
6630          this.resource = new Reference();
6631          return this.resource;
6632        }
6633        else
6634          return super.addChild(name);
6635      }
6636
6637      public TestScriptFixtureComponent copy() {
6638        TestScriptFixtureComponent dst = new TestScriptFixtureComponent();
6639        copyValues(dst);
6640        return dst;
6641      }
6642
6643      public void copyValues(TestScriptFixtureComponent dst) {
6644        super.copyValues(dst);
6645        dst.autocreate = autocreate == null ? null : autocreate.copy();
6646        dst.autodelete = autodelete == null ? null : autodelete.copy();
6647        dst.resource = resource == null ? null : resource.copy();
6648      }
6649
6650      @Override
6651      public boolean equalsDeep(Base other_) {
6652        if (!super.equalsDeep(other_))
6653          return false;
6654        if (!(other_ instanceof TestScriptFixtureComponent))
6655          return false;
6656        TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_;
6657        return compareDeep(autocreate, o.autocreate, true) && compareDeep(autodelete, o.autodelete, true)
6658           && compareDeep(resource, o.resource, true);
6659      }
6660
6661      @Override
6662      public boolean equalsShallow(Base other_) {
6663        if (!super.equalsShallow(other_))
6664          return false;
6665        if (!(other_ instanceof TestScriptFixtureComponent))
6666          return false;
6667        TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_;
6668        return compareValues(autocreate, o.autocreate, true) && compareValues(autodelete, o.autodelete, true)
6669          ;
6670      }
6671
6672      public boolean isEmpty() {
6673        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(autocreate, autodelete, resource
6674          );
6675      }
6676
6677  public String fhirType() {
6678    return "TestScript.fixture";
6679
6680  }
6681
6682  }
6683
6684    @Block()
6685    public static class TestScriptVariableComponent extends BackboneElement implements IBaseBackboneElement {
6686        /**
6687         * Descriptive name for this variable.
6688         */
6689        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
6690        @Description(shortDefinition="Descriptive name for this variable", formalDefinition="Descriptive name for this variable." )
6691        protected StringType name;
6692
6693        /**
6694         * A default, hard-coded, or user-defined value for this variable.
6695         */
6696        @Child(name = "defaultValue", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
6697        @Description(shortDefinition="Default, hard-coded, or user-defined value for this variable", formalDefinition="A default, hard-coded, or user-defined value for this variable." )
6698        protected StringType defaultValue;
6699
6700        /**
6701         * A free text natural language description of the variable and its purpose.
6702         */
6703        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
6704        @Description(shortDefinition="Natural language description of the variable", formalDefinition="A free text natural language description of the variable and its purpose." )
6705        protected StringType description;
6706
6707        /**
6708         * The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.
6709         */
6710        @Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
6711        @Description(shortDefinition="The FHIRPath expression against the fixture body", formalDefinition="The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified." )
6712        protected StringType expression;
6713
6714        /**
6715         * Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.
6716         */
6717        @Child(name = "headerField", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
6718        @Description(shortDefinition="HTTP header field name for source", formalDefinition="Will be used to grab the HTTP header field value from the headers that sourceId is pointing to." )
6719        protected StringType headerField;
6720
6721        /**
6722         * Displayable text string with hint help information to the user when entering a default value.
6723         */
6724        @Child(name = "hint", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
6725        @Description(shortDefinition="Hint help text for default value to enter", formalDefinition="Displayable text string with hint help information to the user when entering a default value." )
6726        protected StringType hint;
6727
6728        /**
6729         * XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.
6730         */
6731        @Child(name = "path", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false)
6732        @Description(shortDefinition="XPath or JSONPath against the fixture body", formalDefinition="XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified." )
6733        protected StringType path;
6734
6735        /**
6736         * Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.
6737         */
6738        @Child(name = "sourceId", type = {IdType.class}, order=8, min=0, max=1, modifier=false, summary=false)
6739        @Description(shortDefinition="Fixture Id of source expression or headerField within this variable", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable." )
6740        protected IdType sourceId;
6741
6742        private static final long serialVersionUID = -1592325432L;
6743
6744    /**
6745     * Constructor
6746     */
6747      public TestScriptVariableComponent() {
6748        super();
6749      }
6750
6751    /**
6752     * Constructor
6753     */
6754      public TestScriptVariableComponent(String name) {
6755        super();
6756        this.setName(name);
6757      }
6758
6759        /**
6760         * @return {@link #name} (Descriptive name for this variable.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
6761         */
6762        public StringType getNameElement() { 
6763          if (this.name == null)
6764            if (Configuration.errorOnAutoCreate())
6765              throw new Error("Attempt to auto-create TestScriptVariableComponent.name");
6766            else if (Configuration.doAutoCreate())
6767              this.name = new StringType(); // bb
6768          return this.name;
6769        }
6770
6771        public boolean hasNameElement() { 
6772          return this.name != null && !this.name.isEmpty();
6773        }
6774
6775        public boolean hasName() { 
6776          return this.name != null && !this.name.isEmpty();
6777        }
6778
6779        /**
6780         * @param value {@link #name} (Descriptive name for this variable.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
6781         */
6782        public TestScriptVariableComponent setNameElement(StringType value) { 
6783          this.name = value;
6784          return this;
6785        }
6786
6787        /**
6788         * @return Descriptive name for this variable.
6789         */
6790        public String getName() { 
6791          return this.name == null ? null : this.name.getValue();
6792        }
6793
6794        /**
6795         * @param value Descriptive name for this variable.
6796         */
6797        public TestScriptVariableComponent setName(String value) { 
6798            if (this.name == null)
6799              this.name = new StringType();
6800            this.name.setValue(value);
6801          return this;
6802        }
6803
6804        /**
6805         * @return {@link #defaultValue} (A default, hard-coded, or user-defined value for this variable.). This is the underlying object with id, value and extensions. The accessor "getDefaultValue" gives direct access to the value
6806         */
6807        public StringType getDefaultValueElement() { 
6808          if (this.defaultValue == null)
6809            if (Configuration.errorOnAutoCreate())
6810              throw new Error("Attempt to auto-create TestScriptVariableComponent.defaultValue");
6811            else if (Configuration.doAutoCreate())
6812              this.defaultValue = new StringType(); // bb
6813          return this.defaultValue;
6814        }
6815
6816        public boolean hasDefaultValueElement() { 
6817          return this.defaultValue != null && !this.defaultValue.isEmpty();
6818        }
6819
6820        public boolean hasDefaultValue() { 
6821          return this.defaultValue != null && !this.defaultValue.isEmpty();
6822        }
6823
6824        /**
6825         * @param value {@link #defaultValue} (A default, hard-coded, or user-defined value for this variable.). This is the underlying object with id, value and extensions. The accessor "getDefaultValue" gives direct access to the value
6826         */
6827        public TestScriptVariableComponent setDefaultValueElement(StringType value) { 
6828          this.defaultValue = value;
6829          return this;
6830        }
6831
6832        /**
6833         * @return A default, hard-coded, or user-defined value for this variable.
6834         */
6835        public String getDefaultValue() { 
6836          return this.defaultValue == null ? null : this.defaultValue.getValue();
6837        }
6838
6839        /**
6840         * @param value A default, hard-coded, or user-defined value for this variable.
6841         */
6842        public TestScriptVariableComponent setDefaultValue(String value) { 
6843          if (Utilities.noString(value))
6844            this.defaultValue = null;
6845          else {
6846            if (this.defaultValue == null)
6847              this.defaultValue = new StringType();
6848            this.defaultValue.setValue(value);
6849          }
6850          return this;
6851        }
6852
6853        /**
6854         * @return {@link #description} (A free text natural language description of the variable and its purpose.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
6855         */
6856        public StringType getDescriptionElement() { 
6857          if (this.description == null)
6858            if (Configuration.errorOnAutoCreate())
6859              throw new Error("Attempt to auto-create TestScriptVariableComponent.description");
6860            else if (Configuration.doAutoCreate())
6861              this.description = new StringType(); // bb
6862          return this.description;
6863        }
6864
6865        public boolean hasDescriptionElement() { 
6866          return this.description != null && !this.description.isEmpty();
6867        }
6868
6869        public boolean hasDescription() { 
6870          return this.description != null && !this.description.isEmpty();
6871        }
6872
6873        /**
6874         * @param value {@link #description} (A free text natural language description of the variable and its purpose.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
6875         */
6876        public TestScriptVariableComponent setDescriptionElement(StringType value) { 
6877          this.description = value;
6878          return this;
6879        }
6880
6881        /**
6882         * @return A free text natural language description of the variable and its purpose.
6883         */
6884        public String getDescription() { 
6885          return this.description == null ? null : this.description.getValue();
6886        }
6887
6888        /**
6889         * @param value A free text natural language description of the variable and its purpose.
6890         */
6891        public TestScriptVariableComponent setDescription(String value) { 
6892          if (Utilities.noString(value))
6893            this.description = null;
6894          else {
6895            if (this.description == null)
6896              this.description = new StringType();
6897            this.description.setValue(value);
6898          }
6899          return this;
6900        }
6901
6902        /**
6903         * @return {@link #expression} (The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
6904         */
6905        public StringType getExpressionElement() { 
6906          if (this.expression == null)
6907            if (Configuration.errorOnAutoCreate())
6908              throw new Error("Attempt to auto-create TestScriptVariableComponent.expression");
6909            else if (Configuration.doAutoCreate())
6910              this.expression = new StringType(); // bb
6911          return this.expression;
6912        }
6913
6914        public boolean hasExpressionElement() { 
6915          return this.expression != null && !this.expression.isEmpty();
6916        }
6917
6918        public boolean hasExpression() { 
6919          return this.expression != null && !this.expression.isEmpty();
6920        }
6921
6922        /**
6923         * @param value {@link #expression} (The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
6924         */
6925        public TestScriptVariableComponent setExpressionElement(StringType value) { 
6926          this.expression = value;
6927          return this;
6928        }
6929
6930        /**
6931         * @return The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.
6932         */
6933        public String getExpression() { 
6934          return this.expression == null ? null : this.expression.getValue();
6935        }
6936
6937        /**
6938         * @param value The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.
6939         */
6940        public TestScriptVariableComponent setExpression(String value) { 
6941          if (Utilities.noString(value))
6942            this.expression = null;
6943          else {
6944            if (this.expression == null)
6945              this.expression = new StringType();
6946            this.expression.setValue(value);
6947          }
6948          return this;
6949        }
6950
6951        /**
6952         * @return {@link #headerField} (Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value
6953         */
6954        public StringType getHeaderFieldElement() { 
6955          if (this.headerField == null)
6956            if (Configuration.errorOnAutoCreate())
6957              throw new Error("Attempt to auto-create TestScriptVariableComponent.headerField");
6958            else if (Configuration.doAutoCreate())
6959              this.headerField = new StringType(); // bb
6960          return this.headerField;
6961        }
6962
6963        public boolean hasHeaderFieldElement() { 
6964          return this.headerField != null && !this.headerField.isEmpty();
6965        }
6966
6967        public boolean hasHeaderField() { 
6968          return this.headerField != null && !this.headerField.isEmpty();
6969        }
6970
6971        /**
6972         * @param value {@link #headerField} (Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value
6973         */
6974        public TestScriptVariableComponent setHeaderFieldElement(StringType value) { 
6975          this.headerField = value;
6976          return this;
6977        }
6978
6979        /**
6980         * @return Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.
6981         */
6982        public String getHeaderField() { 
6983          return this.headerField == null ? null : this.headerField.getValue();
6984        }
6985
6986        /**
6987         * @param value Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.
6988         */
6989        public TestScriptVariableComponent setHeaderField(String value) { 
6990          if (Utilities.noString(value))
6991            this.headerField = null;
6992          else {
6993            if (this.headerField == null)
6994              this.headerField = new StringType();
6995            this.headerField.setValue(value);
6996          }
6997          return this;
6998        }
6999
7000        /**
7001         * @return {@link #hint} (Displayable text string with hint help information to the user when entering a default value.). This is the underlying object with id, value and extensions. The accessor "getHint" gives direct access to the value
7002         */
7003        public StringType getHintElement() { 
7004          if (this.hint == null)
7005            if (Configuration.errorOnAutoCreate())
7006              throw new Error("Attempt to auto-create TestScriptVariableComponent.hint");
7007            else if (Configuration.doAutoCreate())
7008              this.hint = new StringType(); // bb
7009          return this.hint;
7010        }
7011
7012        public boolean hasHintElement() { 
7013          return this.hint != null && !this.hint.isEmpty();
7014        }
7015
7016        public boolean hasHint() { 
7017          return this.hint != null && !this.hint.isEmpty();
7018        }
7019
7020        /**
7021         * @param value {@link #hint} (Displayable text string with hint help information to the user when entering a default value.). This is the underlying object with id, value and extensions. The accessor "getHint" gives direct access to the value
7022         */
7023        public TestScriptVariableComponent setHintElement(StringType value) { 
7024          this.hint = value;
7025          return this;
7026        }
7027
7028        /**
7029         * @return Displayable text string with hint help information to the user when entering a default value.
7030         */
7031        public String getHint() { 
7032          return this.hint == null ? null : this.hint.getValue();
7033        }
7034
7035        /**
7036         * @param value Displayable text string with hint help information to the user when entering a default value.
7037         */
7038        public TestScriptVariableComponent setHint(String value) { 
7039          if (Utilities.noString(value))
7040            this.hint = null;
7041          else {
7042            if (this.hint == null)
7043              this.hint = new StringType();
7044            this.hint.setValue(value);
7045          }
7046          return this;
7047        }
7048
7049        /**
7050         * @return {@link #path} (XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
7051         */
7052        public StringType getPathElement() { 
7053          if (this.path == null)
7054            if (Configuration.errorOnAutoCreate())
7055              throw new Error("Attempt to auto-create TestScriptVariableComponent.path");
7056            else if (Configuration.doAutoCreate())
7057              this.path = new StringType(); // bb
7058          return this.path;
7059        }
7060
7061        public boolean hasPathElement() { 
7062          return this.path != null && !this.path.isEmpty();
7063        }
7064
7065        public boolean hasPath() { 
7066          return this.path != null && !this.path.isEmpty();
7067        }
7068
7069        /**
7070         * @param value {@link #path} (XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
7071         */
7072        public TestScriptVariableComponent setPathElement(StringType value) { 
7073          this.path = value;
7074          return this;
7075        }
7076
7077        /**
7078         * @return XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.
7079         */
7080        public String getPath() { 
7081          return this.path == null ? null : this.path.getValue();
7082        }
7083
7084        /**
7085         * @param value XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.
7086         */
7087        public TestScriptVariableComponent setPath(String value) { 
7088          if (Utilities.noString(value))
7089            this.path = null;
7090          else {
7091            if (this.path == null)
7092              this.path = new StringType();
7093            this.path.setValue(value);
7094          }
7095          return this;
7096        }
7097
7098        /**
7099         * @return {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value
7100         */
7101        public IdType getSourceIdElement() { 
7102          if (this.sourceId == null)
7103            if (Configuration.errorOnAutoCreate())
7104              throw new Error("Attempt to auto-create TestScriptVariableComponent.sourceId");
7105            else if (Configuration.doAutoCreate())
7106              this.sourceId = new IdType(); // bb
7107          return this.sourceId;
7108        }
7109
7110        public boolean hasSourceIdElement() { 
7111          return this.sourceId != null && !this.sourceId.isEmpty();
7112        }
7113
7114        public boolean hasSourceId() { 
7115          return this.sourceId != null && !this.sourceId.isEmpty();
7116        }
7117
7118        /**
7119         * @param value {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value
7120         */
7121        public TestScriptVariableComponent setSourceIdElement(IdType value) { 
7122          this.sourceId = value;
7123          return this;
7124        }
7125
7126        /**
7127         * @return Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.
7128         */
7129        public String getSourceId() { 
7130          return this.sourceId == null ? null : this.sourceId.getValue();
7131        }
7132
7133        /**
7134         * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.
7135         */
7136        public TestScriptVariableComponent setSourceId(String value) { 
7137          if (Utilities.noString(value))
7138            this.sourceId = null;
7139          else {
7140            if (this.sourceId == null)
7141              this.sourceId = new IdType();
7142            this.sourceId.setValue(value);
7143          }
7144          return this;
7145        }
7146
7147        protected void listChildren(List<Property> children) {
7148          super.listChildren(children);
7149          children.add(new Property("name", "string", "Descriptive name for this variable.", 0, 1, name));
7150          children.add(new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue));
7151          children.add(new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description));
7152          children.add(new Property("expression", "string", "The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", 0, 1, expression));
7153          children.add(new Property("headerField", "string", "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", 0, 1, headerField));
7154          children.add(new Property("hint", "string", "Displayable text string with hint help information to the user when entering a default value.", 0, 1, hint));
7155          children.add(new Property("path", "string", "XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.", 0, 1, path));
7156          children.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.", 0, 1, sourceId));
7157        }
7158
7159        @Override
7160        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
7161          switch (_hash) {
7162          case 3373707: /*name*/  return new Property("name", "string", "Descriptive name for this variable.", 0, 1, name);
7163          case -659125328: /*defaultValue*/  return new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue);
7164          case -1724546052: /*description*/  return new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description);
7165          case -1795452264: /*expression*/  return new Property("expression", "string", "The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", 0, 1, expression);
7166          case 1160732269: /*headerField*/  return new Property("headerField", "string", "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", 0, 1, headerField);
7167          case 3202695: /*hint*/  return new Property("hint", "string", "Displayable text string with hint help information to the user when entering a default value.", 0, 1, hint);
7168          case 3433509: /*path*/  return new Property("path", "string", "XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.", 0, 1, path);
7169          case 1746327190: /*sourceId*/  return new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.", 0, 1, sourceId);
7170          default: return super.getNamedProperty(_hash, _name, _checkValid);
7171          }
7172
7173        }
7174
7175      @Override
7176      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
7177        switch (hash) {
7178        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
7179        case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // StringType
7180        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
7181        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
7182        case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType
7183        case 3202695: /*hint*/ return this.hint == null ? new Base[0] : new Base[] {this.hint}; // StringType
7184        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
7185        case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType
7186        default: return super.getProperty(hash, name, checkValid);
7187        }
7188
7189      }
7190
7191      @Override
7192      public Base setProperty(int hash, String name, Base value) throws FHIRException {
7193        switch (hash) {
7194        case 3373707: // name
7195          this.name = TypeConvertor.castToString(value); // StringType
7196          return value;
7197        case -659125328: // defaultValue
7198          this.defaultValue = TypeConvertor.castToString(value); // StringType
7199          return value;
7200        case -1724546052: // description
7201          this.description = TypeConvertor.castToString(value); // StringType
7202          return value;
7203        case -1795452264: // expression
7204          this.expression = TypeConvertor.castToString(value); // StringType
7205          return value;
7206        case 1160732269: // headerField
7207          this.headerField = TypeConvertor.castToString(value); // StringType
7208          return value;
7209        case 3202695: // hint
7210          this.hint = TypeConvertor.castToString(value); // StringType
7211          return value;
7212        case 3433509: // path
7213          this.path = TypeConvertor.castToString(value); // StringType
7214          return value;
7215        case 1746327190: // sourceId
7216          this.sourceId = TypeConvertor.castToId(value); // IdType
7217          return value;
7218        default: return super.setProperty(hash, name, value);
7219        }
7220
7221      }
7222
7223      @Override
7224      public Base setProperty(String name, Base value) throws FHIRException {
7225        if (name.equals("name")) {
7226          this.name = TypeConvertor.castToString(value); // StringType
7227        } else if (name.equals("defaultValue")) {
7228          this.defaultValue = TypeConvertor.castToString(value); // StringType
7229        } else if (name.equals("description")) {
7230          this.description = TypeConvertor.castToString(value); // StringType
7231        } else if (name.equals("expression")) {
7232          this.expression = TypeConvertor.castToString(value); // StringType
7233        } else if (name.equals("headerField")) {
7234          this.headerField = TypeConvertor.castToString(value); // StringType
7235        } else if (name.equals("hint")) {
7236          this.hint = TypeConvertor.castToString(value); // StringType
7237        } else if (name.equals("path")) {
7238          this.path = TypeConvertor.castToString(value); // StringType
7239        } else if (name.equals("sourceId")) {
7240          this.sourceId = TypeConvertor.castToId(value); // IdType
7241        } else
7242          return super.setProperty(name, value);
7243        return value;
7244      }
7245
7246      @Override
7247      public Base makeProperty(int hash, String name) throws FHIRException {
7248        switch (hash) {
7249        case 3373707:  return getNameElement();
7250        case -659125328:  return getDefaultValueElement();
7251        case -1724546052:  return getDescriptionElement();
7252        case -1795452264:  return getExpressionElement();
7253        case 1160732269:  return getHeaderFieldElement();
7254        case 3202695:  return getHintElement();
7255        case 3433509:  return getPathElement();
7256        case 1746327190:  return getSourceIdElement();
7257        default: return super.makeProperty(hash, name);
7258        }
7259
7260      }
7261
7262      @Override
7263      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
7264        switch (hash) {
7265        case 3373707: /*name*/ return new String[] {"string"};
7266        case -659125328: /*defaultValue*/ return new String[] {"string"};
7267        case -1724546052: /*description*/ return new String[] {"string"};
7268        case -1795452264: /*expression*/ return new String[] {"string"};
7269        case 1160732269: /*headerField*/ return new String[] {"string"};
7270        case 3202695: /*hint*/ return new String[] {"string"};
7271        case 3433509: /*path*/ return new String[] {"string"};
7272        case 1746327190: /*sourceId*/ return new String[] {"id"};
7273        default: return super.getTypesForProperty(hash, name);
7274        }
7275
7276      }
7277
7278      @Override
7279      public Base addChild(String name) throws FHIRException {
7280        if (name.equals("name")) {
7281          throw new FHIRException("Cannot call addChild on a primitive type TestScript.variable.name");
7282        }
7283        else if (name.equals("defaultValue")) {
7284          throw new FHIRException("Cannot call addChild on a primitive type TestScript.variable.defaultValue");
7285        }
7286        else if (name.equals("description")) {
7287          throw new FHIRException("Cannot call addChild on a primitive type TestScript.variable.description");
7288        }
7289        else if (name.equals("expression")) {
7290          throw new FHIRException("Cannot call addChild on a primitive type TestScript.variable.expression");
7291        }
7292        else if (name.equals("headerField")) {
7293          throw new FHIRException("Cannot call addChild on a primitive type TestScript.variable.headerField");
7294        }
7295        else if (name.equals("hint")) {
7296          throw new FHIRException("Cannot call addChild on a primitive type TestScript.variable.hint");
7297        }
7298        else if (name.equals("path")) {
7299          throw new FHIRException("Cannot call addChild on a primitive type TestScript.variable.path");
7300        }
7301        else if (name.equals("sourceId")) {
7302          throw new FHIRException("Cannot call addChild on a primitive type TestScript.variable.sourceId");
7303        }
7304        else
7305          return super.addChild(name);
7306      }
7307
7308      public TestScriptVariableComponent copy() {
7309        TestScriptVariableComponent dst = new TestScriptVariableComponent();
7310        copyValues(dst);
7311        return dst;
7312      }
7313
7314      public void copyValues(TestScriptVariableComponent dst) {
7315        super.copyValues(dst);
7316        dst.name = name == null ? null : name.copy();
7317        dst.defaultValue = defaultValue == null ? null : defaultValue.copy();
7318        dst.description = description == null ? null : description.copy();
7319        dst.expression = expression == null ? null : expression.copy();
7320        dst.headerField = headerField == null ? null : headerField.copy();
7321        dst.hint = hint == null ? null : hint.copy();
7322        dst.path = path == null ? null : path.copy();
7323        dst.sourceId = sourceId == null ? null : sourceId.copy();
7324      }
7325
7326      @Override
7327      public boolean equalsDeep(Base other_) {
7328        if (!super.equalsDeep(other_))
7329          return false;
7330        if (!(other_ instanceof TestScriptVariableComponent))
7331          return false;
7332        TestScriptVariableComponent o = (TestScriptVariableComponent) other_;
7333        return compareDeep(name, o.name, true) && compareDeep(defaultValue, o.defaultValue, true) && compareDeep(description, o.description, true)
7334           && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true)
7335           && compareDeep(hint, o.hint, true) && compareDeep(path, o.path, true) && compareDeep(sourceId, o.sourceId, true)
7336          ;
7337      }
7338
7339      @Override
7340      public boolean equalsShallow(Base other_) {
7341        if (!super.equalsShallow(other_))
7342          return false;
7343        if (!(other_ instanceof TestScriptVariableComponent))
7344          return false;
7345        TestScriptVariableComponent o = (TestScriptVariableComponent) other_;
7346        return compareValues(name, o.name, true) && compareValues(defaultValue, o.defaultValue, true) && compareValues(description, o.description, true)
7347           && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true)
7348           && compareValues(hint, o.hint, true) && compareValues(path, o.path, true) && compareValues(sourceId, o.sourceId, true)
7349          ;
7350      }
7351
7352      public boolean isEmpty() {
7353        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, defaultValue, description
7354          , expression, headerField, hint, path, sourceId);
7355      }
7356
7357  public String fhirType() {
7358    return "TestScript.variable";
7359
7360  }
7361
7362  }
7363
7364    @Block()
7365    public static class TestScriptSetupComponent extends BackboneElement implements IBaseBackboneElement {
7366        /**
7367         * Action would contain either an operation or an assertion.
7368         */
7369        @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
7370        @Description(shortDefinition="A setup operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." )
7371        protected List<SetupActionComponent> action;
7372
7373        private static final long serialVersionUID = -123374486L;
7374
7375    /**
7376     * Constructor
7377     */
7378      public TestScriptSetupComponent() {
7379        super();
7380      }
7381
7382    /**
7383     * Constructor
7384     */
7385      public TestScriptSetupComponent(SetupActionComponent action) {
7386        super();
7387        this.addAction(action);
7388      }
7389
7390        /**
7391         * @return {@link #action} (Action would contain either an operation or an assertion.)
7392         */
7393        public List<SetupActionComponent> getAction() { 
7394          if (this.action == null)
7395            this.action = new ArrayList<SetupActionComponent>();
7396          return this.action;
7397        }
7398
7399        /**
7400         * @return Returns a reference to <code>this</code> for easy method chaining
7401         */
7402        public TestScriptSetupComponent setAction(List<SetupActionComponent> theAction) { 
7403          this.action = theAction;
7404          return this;
7405        }
7406
7407        public boolean hasAction() { 
7408          if (this.action == null)
7409            return false;
7410          for (SetupActionComponent item : this.action)
7411            if (!item.isEmpty())
7412              return true;
7413          return false;
7414        }
7415
7416        public SetupActionComponent addAction() { //3
7417          SetupActionComponent t = new SetupActionComponent();
7418          if (this.action == null)
7419            this.action = new ArrayList<SetupActionComponent>();
7420          this.action.add(t);
7421          return t;
7422        }
7423
7424        public TestScriptSetupComponent addAction(SetupActionComponent t) { //3
7425          if (t == null)
7426            return this;
7427          if (this.action == null)
7428            this.action = new ArrayList<SetupActionComponent>();
7429          this.action.add(t);
7430          return this;
7431        }
7432
7433        /**
7434         * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist {3}
7435         */
7436        public SetupActionComponent getActionFirstRep() { 
7437          if (getAction().isEmpty()) {
7438            addAction();
7439          }
7440          return getAction().get(0);
7441        }
7442
7443        protected void listChildren(List<Property> children) {
7444          super.listChildren(children);
7445          children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action));
7446        }
7447
7448        @Override
7449        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
7450          switch (_hash) {
7451          case -1422950858: /*action*/  return new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action);
7452          default: return super.getNamedProperty(_hash, _name, _checkValid);
7453          }
7454
7455        }
7456
7457      @Override
7458      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
7459        switch (hash) {
7460        case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // SetupActionComponent
7461        default: return super.getProperty(hash, name, checkValid);
7462        }
7463
7464      }
7465
7466      @Override
7467      public Base setProperty(int hash, String name, Base value) throws FHIRException {
7468        switch (hash) {
7469        case -1422950858: // action
7470          this.getAction().add((SetupActionComponent) value); // SetupActionComponent
7471          return value;
7472        default: return super.setProperty(hash, name, value);
7473        }
7474
7475      }
7476
7477      @Override
7478      public Base setProperty(String name, Base value) throws FHIRException {
7479        if (name.equals("action")) {
7480          this.getAction().add((SetupActionComponent) value);
7481        } else
7482          return super.setProperty(name, value);
7483        return value;
7484      }
7485
7486      @Override
7487      public Base makeProperty(int hash, String name) throws FHIRException {
7488        switch (hash) {
7489        case -1422950858:  return addAction(); 
7490        default: return super.makeProperty(hash, name);
7491        }
7492
7493      }
7494
7495      @Override
7496      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
7497        switch (hash) {
7498        case -1422950858: /*action*/ return new String[] {};
7499        default: return super.getTypesForProperty(hash, name);
7500        }
7501
7502      }
7503
7504      @Override
7505      public Base addChild(String name) throws FHIRException {
7506        if (name.equals("action")) {
7507          return addAction();
7508        }
7509        else
7510          return super.addChild(name);
7511      }
7512
7513      public TestScriptSetupComponent copy() {
7514        TestScriptSetupComponent dst = new TestScriptSetupComponent();
7515        copyValues(dst);
7516        return dst;
7517      }
7518
7519      public void copyValues(TestScriptSetupComponent dst) {
7520        super.copyValues(dst);
7521        if (action != null) {
7522          dst.action = new ArrayList<SetupActionComponent>();
7523          for (SetupActionComponent i : action)
7524            dst.action.add(i.copy());
7525        };
7526      }
7527
7528      @Override
7529      public boolean equalsDeep(Base other_) {
7530        if (!super.equalsDeep(other_))
7531          return false;
7532        if (!(other_ instanceof TestScriptSetupComponent))
7533          return false;
7534        TestScriptSetupComponent o = (TestScriptSetupComponent) other_;
7535        return compareDeep(action, o.action, true);
7536      }
7537
7538      @Override
7539      public boolean equalsShallow(Base other_) {
7540        if (!super.equalsShallow(other_))
7541          return false;
7542        if (!(other_ instanceof TestScriptSetupComponent))
7543          return false;
7544        TestScriptSetupComponent o = (TestScriptSetupComponent) other_;
7545        return true;
7546      }
7547
7548      public boolean isEmpty() {
7549        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action);
7550      }
7551
7552  public String fhirType() {
7553    return "TestScript.setup";
7554
7555  }
7556
7557  }
7558
7559    @Block()
7560    public static class SetupActionComponent extends BackboneElement implements IBaseBackboneElement {
7561        /**
7562         * The operation to perform.
7563         */
7564        @Child(name = "operation", type = {}, order=1, min=0, max=1, modifier=false, summary=false)
7565        @Description(shortDefinition="The setup operation to perform", formalDefinition="The operation to perform." )
7566        protected SetupActionOperationComponent operation;
7567
7568        /**
7569         * Evaluates the results of previous operations to determine if the server under test behaves appropriately.
7570         */
7571        @Child(name = "assert", type = {}, order=2, min=0, max=1, modifier=false, summary=false)
7572        @Description(shortDefinition="The assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." )
7573        protected SetupActionAssertComponent assert_;
7574
7575        private static final long serialVersionUID = -252088305L;
7576
7577    /**
7578     * Constructor
7579     */
7580      public SetupActionComponent() {
7581        super();
7582      }
7583
7584        /**
7585         * @return {@link #operation} (The operation to perform.)
7586         */
7587        public SetupActionOperationComponent getOperation() { 
7588          if (this.operation == null)
7589            if (Configuration.errorOnAutoCreate())
7590              throw new Error("Attempt to auto-create SetupActionComponent.operation");
7591            else if (Configuration.doAutoCreate())
7592              this.operation = new SetupActionOperationComponent(); // cc
7593          return this.operation;
7594        }
7595
7596        public boolean hasOperation() { 
7597          return this.operation != null && !this.operation.isEmpty();
7598        }
7599
7600        /**
7601         * @param value {@link #operation} (The operation to perform.)
7602         */
7603        public SetupActionComponent setOperation(SetupActionOperationComponent value) { 
7604          this.operation = value;
7605          return this;
7606        }
7607
7608        /**
7609         * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
7610         */
7611        public SetupActionAssertComponent getAssert() { 
7612          if (this.assert_ == null)
7613            if (Configuration.errorOnAutoCreate())
7614              throw new Error("Attempt to auto-create SetupActionComponent.assert_");
7615            else if (Configuration.doAutoCreate())
7616              this.assert_ = new SetupActionAssertComponent(); // cc
7617          return this.assert_;
7618        }
7619
7620        public boolean hasAssert() { 
7621          return this.assert_ != null && !this.assert_.isEmpty();
7622        }
7623
7624        /**
7625         * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
7626         */
7627        public SetupActionComponent setAssert(SetupActionAssertComponent value) { 
7628          this.assert_ = value;
7629          return this;
7630        }
7631
7632        protected void listChildren(List<Property> children) {
7633          super.listChildren(children);
7634          children.add(new Property("operation", "", "The operation to perform.", 0, 1, operation));
7635          children.add(new Property("assert", "", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_));
7636        }
7637
7638        @Override
7639        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
7640          switch (_hash) {
7641          case 1662702951: /*operation*/  return new Property("operation", "", "The operation to perform.", 0, 1, operation);
7642          case -1408208058: /*assert*/  return new Property("assert", "", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_);
7643          default: return super.getNamedProperty(_hash, _name, _checkValid);
7644          }
7645
7646        }
7647
7648      @Override
7649      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
7650        switch (hash) {
7651        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent
7652        case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent
7653        default: return super.getProperty(hash, name, checkValid);
7654        }
7655
7656      }
7657
7658      @Override
7659      public Base setProperty(int hash, String name, Base value) throws FHIRException {
7660        switch (hash) {
7661        case 1662702951: // operation
7662          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
7663          return value;
7664        case -1408208058: // assert
7665          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
7666          return value;
7667        default: return super.setProperty(hash, name, value);
7668        }
7669
7670      }
7671
7672      @Override
7673      public Base setProperty(String name, Base value) throws FHIRException {
7674        if (name.equals("operation")) {
7675          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
7676        } else if (name.equals("assert")) {
7677          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
7678        } else
7679          return super.setProperty(name, value);
7680        return value;
7681      }
7682
7683      @Override
7684      public Base makeProperty(int hash, String name) throws FHIRException {
7685        switch (hash) {
7686        case 1662702951:  return getOperation();
7687        case -1408208058:  return getAssert();
7688        default: return super.makeProperty(hash, name);
7689        }
7690
7691      }
7692
7693      @Override
7694      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
7695        switch (hash) {
7696        case 1662702951: /*operation*/ return new String[] {};
7697        case -1408208058: /*assert*/ return new String[] {};
7698        default: return super.getTypesForProperty(hash, name);
7699        }
7700
7701      }
7702
7703      @Override
7704      public Base addChild(String name) throws FHIRException {
7705        if (name.equals("operation")) {
7706          this.operation = new SetupActionOperationComponent();
7707          return this.operation;
7708        }
7709        else if (name.equals("assert")) {
7710          this.assert_ = new SetupActionAssertComponent();
7711          return this.assert_;
7712        }
7713        else
7714          return super.addChild(name);
7715      }
7716
7717      public SetupActionComponent copy() {
7718        SetupActionComponent dst = new SetupActionComponent();
7719        copyValues(dst);
7720        return dst;
7721      }
7722
7723      public void copyValues(SetupActionComponent dst) {
7724        super.copyValues(dst);
7725        dst.operation = operation == null ? null : operation.copy();
7726        dst.assert_ = assert_ == null ? null : assert_.copy();
7727      }
7728
7729      @Override
7730      public boolean equalsDeep(Base other_) {
7731        if (!super.equalsDeep(other_))
7732          return false;
7733        if (!(other_ instanceof SetupActionComponent))
7734          return false;
7735        SetupActionComponent o = (SetupActionComponent) other_;
7736        return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true);
7737      }
7738
7739      @Override
7740      public boolean equalsShallow(Base other_) {
7741        if (!super.equalsShallow(other_))
7742          return false;
7743        if (!(other_ instanceof SetupActionComponent))
7744          return false;
7745        SetupActionComponent o = (SetupActionComponent) other_;
7746        return true;
7747      }
7748
7749      public boolean isEmpty() {
7750        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_);
7751      }
7752
7753  public String fhirType() {
7754    return "TestScript.setup.action";
7755
7756  }
7757
7758  }
7759
7760    @Block()
7761    public static class SetupActionOperationComponent extends BackboneElement implements IBaseBackboneElement {
7762        /**
7763         * Server interaction or operation type.
7764         */
7765        @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=false)
7766        @Description(shortDefinition="The operation code type that will be executed", formalDefinition="Server interaction or operation type." )
7767        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-operation-codes")
7768        protected Coding type;
7769
7770        /**
7771         * The type of the FHIR resource. See http://build.fhir.org/resourcelist.html. Data type of uri is needed when non-HL7 artifacts are identified.
7772         */
7773        @Child(name = "resource", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false)
7774        @Description(shortDefinition="Resource type", formalDefinition="The type of the FHIR resource. See http://build.fhir.org/resourcelist.html. Data type of uri is needed when non-HL7 artifacts are identified." )
7775        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types")
7776        protected UriType resource;
7777
7778        /**
7779         * The label would be used for tracking/logging purposes by test engines.
7780         */
7781        @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
7782        @Description(shortDefinition="Tracking/logging operation label", formalDefinition="The label would be used for tracking/logging purposes by test engines." )
7783        protected StringType label;
7784
7785        /**
7786         * The description would be used by test engines for tracking and reporting purposes.
7787         */
7788        @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
7789        @Description(shortDefinition="Tracking/reporting operation description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." )
7790        protected StringType description;
7791
7792        /**
7793         * The mime-type to use for RESTful operation in the 'Accept' header.
7794         */
7795        @Child(name = "accept", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false)
7796        @Description(shortDefinition="Mime type to accept in the payload of the response, with charset etc.", formalDefinition="The mime-type to use for RESTful operation in the 'Accept' header." )
7797        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
7798        protected CodeType accept;
7799
7800        /**
7801         * The mime-type to use for RESTful operation in the 'Content-Type' header.
7802         */
7803        @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false)
7804        @Description(shortDefinition="Mime type of the request payload contents, with charset etc.", formalDefinition="The mime-type to use for RESTful operation in the 'Content-Type' header." )
7805        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
7806        protected CodeType contentType;
7807
7808        /**
7809         * The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.
7810         */
7811        @Child(name = "destination", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=false)
7812        @Description(shortDefinition="Server responding to the request", formalDefinition="The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section." )
7813        protected IntegerType destination;
7814
7815        /**
7816         * Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.
7817         */
7818        @Child(name = "encodeRequestUrl", type = {BooleanType.class}, order=8, min=1, max=1, modifier=false, summary=false)
7819        @Description(shortDefinition="Whether or not to send the request url in encoded format", formalDefinition="Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths." )
7820        protected BooleanType encodeRequestUrl;
7821
7822        /**
7823         * The HTTP method the test engine MUST use for this operation regardless of any other operation details.
7824         */
7825        @Child(name = "method", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=false)
7826        @Description(shortDefinition="delete | get | options | patch | post | put | head", formalDefinition="The HTTP method the test engine MUST use for this operation regardless of any other operation details." )
7827        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/http-operations")
7828        protected Enumeration<TestScriptRequestMethodCode> method;
7829
7830        /**
7831         * The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.
7832         */
7833        @Child(name = "origin", type = {IntegerType.class}, order=10, min=0, max=1, modifier=false, summary=false)
7834        @Description(shortDefinition="Server initiating the request", formalDefinition="The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section." )
7835        protected IntegerType origin;
7836
7837        /**
7838         * Path plus parameters after [type].  Used to set parts of the request URL explicitly.
7839         */
7840        @Child(name = "params", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false)
7841        @Description(shortDefinition="Explicitly defined path parameters", formalDefinition="Path plus parameters after [type].  Used to set parts of the request URL explicitly." )
7842        protected StringType params;
7843
7844        /**
7845         * Header elements would be used to set HTTP headers.
7846         */
7847        @Child(name = "requestHeader", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
7848        @Description(shortDefinition="Each operation can have one or more header elements", formalDefinition="Header elements would be used to set HTTP headers." )
7849        protected List<SetupActionOperationRequestHeaderComponent> requestHeader;
7850
7851        /**
7852         * The fixture id (maybe new) to map to the request.
7853         */
7854        @Child(name = "requestId", type = {IdType.class}, order=13, min=0, max=1, modifier=false, summary=false)
7855        @Description(shortDefinition="Fixture Id of mapped request", formalDefinition="The fixture id (maybe new) to map to the request." )
7856        protected IdType requestId;
7857
7858        /**
7859         * The fixture id (maybe new) to map to the response.
7860         */
7861        @Child(name = "responseId", type = {IdType.class}, order=14, min=0, max=1, modifier=false, summary=false)
7862        @Description(shortDefinition="Fixture Id of mapped response", formalDefinition="The fixture id (maybe new) to map to the response." )
7863        protected IdType responseId;
7864
7865        /**
7866         * The id of the fixture used as the body of a PUT or POST request.
7867         */
7868        @Child(name = "sourceId", type = {IdType.class}, order=15, min=0, max=1, modifier=false, summary=false)
7869        @Description(shortDefinition="Fixture Id of body for PUT and POST requests", formalDefinition="The id of the fixture used as the body of a PUT or POST request." )
7870        protected IdType sourceId;
7871
7872        /**
7873         * Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.
7874         */
7875        @Child(name = "targetId", type = {IdType.class}, order=16, min=0, max=1, modifier=false, summary=false)
7876        @Description(shortDefinition="Id of fixture used for extracting the [id],  [type], and [vid] for GET requests", formalDefinition="Id of fixture used for extracting the [id],  [type], and [vid] for GET requests." )
7877        protected IdType targetId;
7878
7879        /**
7880         * Complete request URL.
7881         */
7882        @Child(name = "url", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false)
7883        @Description(shortDefinition="Request URL", formalDefinition="Complete request URL." )
7884        protected StringType url;
7885
7886        private static final long serialVersionUID = 308704897L;
7887
7888    /**
7889     * Constructor
7890     */
7891      public SetupActionOperationComponent() {
7892        super();
7893      }
7894
7895    /**
7896     * Constructor
7897     */
7898      public SetupActionOperationComponent(boolean encodeRequestUrl) {
7899        super();
7900        this.setEncodeRequestUrl(encodeRequestUrl);
7901      }
7902
7903        /**
7904         * @return {@link #type} (Server interaction or operation type.)
7905         */
7906        public Coding getType() { 
7907          if (this.type == null)
7908            if (Configuration.errorOnAutoCreate())
7909              throw new Error("Attempt to auto-create SetupActionOperationComponent.type");
7910            else if (Configuration.doAutoCreate())
7911              this.type = new Coding(); // cc
7912          return this.type;
7913        }
7914
7915        public boolean hasType() { 
7916          return this.type != null && !this.type.isEmpty();
7917        }
7918
7919        /**
7920         * @param value {@link #type} (Server interaction or operation type.)
7921         */
7922        public SetupActionOperationComponent setType(Coding value) { 
7923          this.type = value;
7924          return this;
7925        }
7926
7927        /**
7928         * @return {@link #resource} (The type of the FHIR resource. See http://build.fhir.org/resourcelist.html. Data type of uri is needed when non-HL7 artifacts are identified.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value
7929         */
7930        public UriType getResourceElement() { 
7931          if (this.resource == null)
7932            if (Configuration.errorOnAutoCreate())
7933              throw new Error("Attempt to auto-create SetupActionOperationComponent.resource");
7934            else if (Configuration.doAutoCreate())
7935              this.resource = new UriType(); // bb
7936          return this.resource;
7937        }
7938
7939        public boolean hasResourceElement() { 
7940          return this.resource != null && !this.resource.isEmpty();
7941        }
7942
7943        public boolean hasResource() { 
7944          return this.resource != null && !this.resource.isEmpty();
7945        }
7946
7947        /**
7948         * @param value {@link #resource} (The type of the FHIR resource. See http://build.fhir.org/resourcelist.html. Data type of uri is needed when non-HL7 artifacts are identified.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value
7949         */
7950        public SetupActionOperationComponent setResourceElement(UriType value) { 
7951          this.resource = value;
7952          return this;
7953        }
7954
7955        /**
7956         * @return The type of the FHIR resource. See http://build.fhir.org/resourcelist.html. Data type of uri is needed when non-HL7 artifacts are identified.
7957         */
7958        public String getResource() { 
7959          return this.resource == null ? null : this.resource.getValue();
7960        }
7961
7962        /**
7963         * @param value The type of the FHIR resource. See http://build.fhir.org/resourcelist.html. Data type of uri is needed when non-HL7 artifacts are identified.
7964         */
7965        public SetupActionOperationComponent setResource(String value) { 
7966          if (Utilities.noString(value))
7967            this.resource = null;
7968          else {
7969            if (this.resource == null)
7970              this.resource = new UriType();
7971            this.resource.setValue(value);
7972          }
7973          return this;
7974        }
7975
7976        /**
7977         * @return {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
7978         */
7979        public StringType getLabelElement() { 
7980          if (this.label == null)
7981            if (Configuration.errorOnAutoCreate())
7982              throw new Error("Attempt to auto-create SetupActionOperationComponent.label");
7983            else if (Configuration.doAutoCreate())
7984              this.label = new StringType(); // bb
7985          return this.label;
7986        }
7987
7988        public boolean hasLabelElement() { 
7989          return this.label != null && !this.label.isEmpty();
7990        }
7991
7992        public boolean hasLabel() { 
7993          return this.label != null && !this.label.isEmpty();
7994        }
7995
7996        /**
7997         * @param value {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
7998         */
7999        public SetupActionOperationComponent setLabelElement(StringType value) { 
8000          this.label = value;
8001          return this;
8002        }
8003
8004        /**
8005         * @return The label would be used for tracking/logging purposes by test engines.
8006         */
8007        public String getLabel() { 
8008          return this.label == null ? null : this.label.getValue();
8009        }
8010
8011        /**
8012         * @param value The label would be used for tracking/logging purposes by test engines.
8013         */
8014        public SetupActionOperationComponent setLabel(String value) { 
8015          if (Utilities.noString(value))
8016            this.label = null;
8017          else {
8018            if (this.label == null)
8019              this.label = new StringType();
8020            this.label.setValue(value);
8021          }
8022          return this;
8023        }
8024
8025        /**
8026         * @return {@link #description} (The description would be used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
8027         */
8028        public StringType getDescriptionElement() { 
8029          if (this.description == null)
8030            if (Configuration.errorOnAutoCreate())
8031              throw new Error("Attempt to auto-create SetupActionOperationComponent.description");
8032            else if (Configuration.doAutoCreate())
8033              this.description = new StringType(); // bb
8034          return this.description;
8035        }
8036
8037        public boolean hasDescriptionElement() { 
8038          return this.description != null && !this.description.isEmpty();
8039        }
8040
8041        public boolean hasDescription() { 
8042          return this.description != null && !this.description.isEmpty();
8043        }
8044
8045        /**
8046         * @param value {@link #description} (The description would be used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
8047         */
8048        public SetupActionOperationComponent setDescriptionElement(StringType value) { 
8049          this.description = value;
8050          return this;
8051        }
8052
8053        /**
8054         * @return The description would be used by test engines for tracking and reporting purposes.
8055         */
8056        public String getDescription() { 
8057          return this.description == null ? null : this.description.getValue();
8058        }
8059
8060        /**
8061         * @param value The description would be used by test engines for tracking and reporting purposes.
8062         */
8063        public SetupActionOperationComponent setDescription(String value) { 
8064          if (Utilities.noString(value))
8065            this.description = null;
8066          else {
8067            if (this.description == null)
8068              this.description = new StringType();
8069            this.description.setValue(value);
8070          }
8071          return this;
8072        }
8073
8074        /**
8075         * @return {@link #accept} (The mime-type to use for RESTful operation in the 'Accept' header.). This is the underlying object with id, value and extensions. The accessor "getAccept" gives direct access to the value
8076         */
8077        public CodeType getAcceptElement() { 
8078          if (this.accept == null)
8079            if (Configuration.errorOnAutoCreate())
8080              throw new Error("Attempt to auto-create SetupActionOperationComponent.accept");
8081            else if (Configuration.doAutoCreate())
8082              this.accept = new CodeType(); // bb
8083          return this.accept;
8084        }
8085
8086        public boolean hasAcceptElement() { 
8087          return this.accept != null && !this.accept.isEmpty();
8088        }
8089
8090        public boolean hasAccept() { 
8091          return this.accept != null && !this.accept.isEmpty();
8092        }
8093
8094        /**
8095         * @param value {@link #accept} (The mime-type to use for RESTful operation in the 'Accept' header.). This is the underlying object with id, value and extensions. The accessor "getAccept" gives direct access to the value
8096         */
8097        public SetupActionOperationComponent setAcceptElement(CodeType value) { 
8098          this.accept = value;
8099          return this;
8100        }
8101
8102        /**
8103         * @return The mime-type to use for RESTful operation in the 'Accept' header.
8104         */
8105        public String getAccept() { 
8106          return this.accept == null ? null : this.accept.getValue();
8107        }
8108
8109        /**
8110         * @param value The mime-type to use for RESTful operation in the 'Accept' header.
8111         */
8112        public SetupActionOperationComponent setAccept(String value) { 
8113          if (Utilities.noString(value))
8114            this.accept = null;
8115          else {
8116            if (this.accept == null)
8117              this.accept = new CodeType();
8118            this.accept.setValue(value);
8119          }
8120          return this;
8121        }
8122
8123        /**
8124         * @return {@link #contentType} (The mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
8125         */
8126        public CodeType getContentTypeElement() { 
8127          if (this.contentType == null)
8128            if (Configuration.errorOnAutoCreate())
8129              throw new Error("Attempt to auto-create SetupActionOperationComponent.contentType");
8130            else if (Configuration.doAutoCreate())
8131              this.contentType = new CodeType(); // bb
8132          return this.contentType;
8133        }
8134
8135        public boolean hasContentTypeElement() { 
8136          return this.contentType != null && !this.contentType.isEmpty();
8137        }
8138
8139        public boolean hasContentType() { 
8140          return this.contentType != null && !this.contentType.isEmpty();
8141        }
8142
8143        /**
8144         * @param value {@link #contentType} (The mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
8145         */
8146        public SetupActionOperationComponent setContentTypeElement(CodeType value) { 
8147          this.contentType = value;
8148          return this;
8149        }
8150
8151        /**
8152         * @return The mime-type to use for RESTful operation in the 'Content-Type' header.
8153         */
8154        public String getContentType() { 
8155          return this.contentType == null ? null : this.contentType.getValue();
8156        }
8157
8158        /**
8159         * @param value The mime-type to use for RESTful operation in the 'Content-Type' header.
8160         */
8161        public SetupActionOperationComponent setContentType(String value) { 
8162          if (Utilities.noString(value))
8163            this.contentType = null;
8164          else {
8165            if (this.contentType == null)
8166              this.contentType = new CodeType();
8167            this.contentType.setValue(value);
8168          }
8169          return this;
8170        }
8171
8172        /**
8173         * @return {@link #destination} (The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value
8174         */
8175        public IntegerType getDestinationElement() { 
8176          if (this.destination == null)
8177            if (Configuration.errorOnAutoCreate())
8178              throw new Error("Attempt to auto-create SetupActionOperationComponent.destination");
8179            else if (Configuration.doAutoCreate())
8180              this.destination = new IntegerType(); // bb
8181          return this.destination;
8182        }
8183
8184        public boolean hasDestinationElement() { 
8185          return this.destination != null && !this.destination.isEmpty();
8186        }
8187
8188        public boolean hasDestination() { 
8189          return this.destination != null && !this.destination.isEmpty();
8190        }
8191
8192        /**
8193         * @param value {@link #destination} (The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value
8194         */
8195        public SetupActionOperationComponent setDestinationElement(IntegerType value) { 
8196          this.destination = value;
8197          return this;
8198        }
8199
8200        /**
8201         * @return The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.
8202         */
8203        public int getDestination() { 
8204          return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue();
8205        }
8206
8207        /**
8208         * @param value The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.
8209         */
8210        public SetupActionOperationComponent setDestination(int value) { 
8211            if (this.destination == null)
8212              this.destination = new IntegerType();
8213            this.destination.setValue(value);
8214          return this;
8215        }
8216
8217        /**
8218         * @return {@link #encodeRequestUrl} (Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.). This is the underlying object with id, value and extensions. The accessor "getEncodeRequestUrl" gives direct access to the value
8219         */
8220        public BooleanType getEncodeRequestUrlElement() { 
8221          if (this.encodeRequestUrl == null)
8222            if (Configuration.errorOnAutoCreate())
8223              throw new Error("Attempt to auto-create SetupActionOperationComponent.encodeRequestUrl");
8224            else if (Configuration.doAutoCreate())
8225              this.encodeRequestUrl = new BooleanType(); // bb
8226          return this.encodeRequestUrl;
8227        }
8228
8229        public boolean hasEncodeRequestUrlElement() { 
8230          return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty();
8231        }
8232
8233        public boolean hasEncodeRequestUrl() { 
8234          return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty();
8235        }
8236
8237        /**
8238         * @param value {@link #encodeRequestUrl} (Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.). This is the underlying object with id, value and extensions. The accessor "getEncodeRequestUrl" gives direct access to the value
8239         */
8240        public SetupActionOperationComponent setEncodeRequestUrlElement(BooleanType value) { 
8241          this.encodeRequestUrl = value;
8242          return this;
8243        }
8244
8245        /**
8246         * @return Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.
8247         */
8248        public boolean getEncodeRequestUrl() { 
8249          return this.encodeRequestUrl == null || this.encodeRequestUrl.isEmpty() ? false : this.encodeRequestUrl.getValue();
8250        }
8251
8252        /**
8253         * @param value Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.
8254         */
8255        public SetupActionOperationComponent setEncodeRequestUrl(boolean value) { 
8256            if (this.encodeRequestUrl == null)
8257              this.encodeRequestUrl = new BooleanType();
8258            this.encodeRequestUrl.setValue(value);
8259          return this;
8260        }
8261
8262        /**
8263         * @return {@link #method} (The HTTP method the test engine MUST use for this operation regardless of any other operation details.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value
8264         */
8265        public Enumeration<TestScriptRequestMethodCode> getMethodElement() { 
8266          if (this.method == null)
8267            if (Configuration.errorOnAutoCreate())
8268              throw new Error("Attempt to auto-create SetupActionOperationComponent.method");
8269            else if (Configuration.doAutoCreate())
8270              this.method = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); // bb
8271          return this.method;
8272        }
8273
8274        public boolean hasMethodElement() { 
8275          return this.method != null && !this.method.isEmpty();
8276        }
8277
8278        public boolean hasMethod() { 
8279          return this.method != null && !this.method.isEmpty();
8280        }
8281
8282        /**
8283         * @param value {@link #method} (The HTTP method the test engine MUST use for this operation regardless of any other operation details.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value
8284         */
8285        public SetupActionOperationComponent setMethodElement(Enumeration<TestScriptRequestMethodCode> value) { 
8286          this.method = value;
8287          return this;
8288        }
8289
8290        /**
8291         * @return The HTTP method the test engine MUST use for this operation regardless of any other operation details.
8292         */
8293        public TestScriptRequestMethodCode getMethod() { 
8294          return this.method == null ? null : this.method.getValue();
8295        }
8296
8297        /**
8298         * @param value The HTTP method the test engine MUST use for this operation regardless of any other operation details.
8299         */
8300        public SetupActionOperationComponent setMethod(TestScriptRequestMethodCode value) { 
8301          if (value == null)
8302            this.method = null;
8303          else {
8304            if (this.method == null)
8305              this.method = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory());
8306            this.method.setValue(value);
8307          }
8308          return this;
8309        }
8310
8311        /**
8312         * @return {@link #origin} (The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.). This is the underlying object with id, value and extensions. The accessor "getOrigin" gives direct access to the value
8313         */
8314        public IntegerType getOriginElement() { 
8315          if (this.origin == null)
8316            if (Configuration.errorOnAutoCreate())
8317              throw new Error("Attempt to auto-create SetupActionOperationComponent.origin");
8318            else if (Configuration.doAutoCreate())
8319              this.origin = new IntegerType(); // bb
8320          return this.origin;
8321        }
8322
8323        public boolean hasOriginElement() { 
8324          return this.origin != null && !this.origin.isEmpty();
8325        }
8326
8327        public boolean hasOrigin() { 
8328          return this.origin != null && !this.origin.isEmpty();
8329        }
8330
8331        /**
8332         * @param value {@link #origin} (The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.). This is the underlying object with id, value and extensions. The accessor "getOrigin" gives direct access to the value
8333         */
8334        public SetupActionOperationComponent setOriginElement(IntegerType value) { 
8335          this.origin = value;
8336          return this;
8337        }
8338
8339        /**
8340         * @return The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.
8341         */
8342        public int getOrigin() { 
8343          return this.origin == null || this.origin.isEmpty() ? 0 : this.origin.getValue();
8344        }
8345
8346        /**
8347         * @param value The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.
8348         */
8349        public SetupActionOperationComponent setOrigin(int value) { 
8350            if (this.origin == null)
8351              this.origin = new IntegerType();
8352            this.origin.setValue(value);
8353          return this;
8354        }
8355
8356        /**
8357         * @return {@link #params} (Path plus parameters after [type].  Used to set parts of the request URL explicitly.). This is the underlying object with id, value and extensions. The accessor "getParams" gives direct access to the value
8358         */
8359        public StringType getParamsElement() { 
8360          if (this.params == null)
8361            if (Configuration.errorOnAutoCreate())
8362              throw new Error("Attempt to auto-create SetupActionOperationComponent.params");
8363            else if (Configuration.doAutoCreate())
8364              this.params = new StringType(); // bb
8365          return this.params;
8366        }
8367
8368        public boolean hasParamsElement() { 
8369          return this.params != null && !this.params.isEmpty();
8370        }
8371
8372        public boolean hasParams() { 
8373          return this.params != null && !this.params.isEmpty();
8374        }
8375
8376        /**
8377         * @param value {@link #params} (Path plus parameters after [type].  Used to set parts of the request URL explicitly.). This is the underlying object with id, value and extensions. The accessor "getParams" gives direct access to the value
8378         */
8379        public SetupActionOperationComponent setParamsElement(StringType value) { 
8380          this.params = value;
8381          return this;
8382        }
8383
8384        /**
8385         * @return Path plus parameters after [type].  Used to set parts of the request URL explicitly.
8386         */
8387        public String getParams() { 
8388          return this.params == null ? null : this.params.getValue();
8389        }
8390
8391        /**
8392         * @param value Path plus parameters after [type].  Used to set parts of the request URL explicitly.
8393         */
8394        public SetupActionOperationComponent setParams(String value) { 
8395          if (Utilities.noString(value))
8396            this.params = null;
8397          else {
8398            if (this.params == null)
8399              this.params = new StringType();
8400            this.params.setValue(value);
8401          }
8402          return this;
8403        }
8404
8405        /**
8406         * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.)
8407         */
8408        public List<SetupActionOperationRequestHeaderComponent> getRequestHeader() { 
8409          if (this.requestHeader == null)
8410            this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
8411          return this.requestHeader;
8412        }
8413
8414        /**
8415         * @return Returns a reference to <code>this</code> for easy method chaining
8416         */
8417        public SetupActionOperationComponent setRequestHeader(List<SetupActionOperationRequestHeaderComponent> theRequestHeader) { 
8418          this.requestHeader = theRequestHeader;
8419          return this;
8420        }
8421
8422        public boolean hasRequestHeader() { 
8423          if (this.requestHeader == null)
8424            return false;
8425          for (SetupActionOperationRequestHeaderComponent item : this.requestHeader)
8426            if (!item.isEmpty())
8427              return true;
8428          return false;
8429        }
8430
8431        public SetupActionOperationRequestHeaderComponent addRequestHeader() { //3
8432          SetupActionOperationRequestHeaderComponent t = new SetupActionOperationRequestHeaderComponent();
8433          if (this.requestHeader == null)
8434            this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
8435          this.requestHeader.add(t);
8436          return t;
8437        }
8438
8439        public SetupActionOperationComponent addRequestHeader(SetupActionOperationRequestHeaderComponent t) { //3
8440          if (t == null)
8441            return this;
8442          if (this.requestHeader == null)
8443            this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
8444          this.requestHeader.add(t);
8445          return this;
8446        }
8447
8448        /**
8449         * @return The first repetition of repeating field {@link #requestHeader}, creating it if it does not already exist {3}
8450         */
8451        public SetupActionOperationRequestHeaderComponent getRequestHeaderFirstRep() { 
8452          if (getRequestHeader().isEmpty()) {
8453            addRequestHeader();
8454          }
8455          return getRequestHeader().get(0);
8456        }
8457
8458        /**
8459         * @return {@link #requestId} (The fixture id (maybe new) to map to the request.). This is the underlying object with id, value and extensions. The accessor "getRequestId" gives direct access to the value
8460         */
8461        public IdType getRequestIdElement() { 
8462          if (this.requestId == null)
8463            if (Configuration.errorOnAutoCreate())
8464              throw new Error("Attempt to auto-create SetupActionOperationComponent.requestId");
8465            else if (Configuration.doAutoCreate())
8466              this.requestId = new IdType(); // bb
8467          return this.requestId;
8468        }
8469
8470        public boolean hasRequestIdElement() { 
8471          return this.requestId != null && !this.requestId.isEmpty();
8472        }
8473
8474        public boolean hasRequestId() { 
8475          return this.requestId != null && !this.requestId.isEmpty();
8476        }
8477
8478        /**
8479         * @param value {@link #requestId} (The fixture id (maybe new) to map to the request.). This is the underlying object with id, value and extensions. The accessor "getRequestId" gives direct access to the value
8480         */
8481        public SetupActionOperationComponent setRequestIdElement(IdType value) { 
8482          this.requestId = value;
8483          return this;
8484        }
8485
8486        /**
8487         * @return The fixture id (maybe new) to map to the request.
8488         */
8489        public String getRequestId() { 
8490          return this.requestId == null ? null : this.requestId.getValue();
8491        }
8492
8493        /**
8494         * @param value The fixture id (maybe new) to map to the request.
8495         */
8496        public SetupActionOperationComponent setRequestId(String value) { 
8497          if (Utilities.noString(value))
8498            this.requestId = null;
8499          else {
8500            if (this.requestId == null)
8501              this.requestId = new IdType();
8502            this.requestId.setValue(value);
8503          }
8504          return this;
8505        }
8506
8507        /**
8508         * @return {@link #responseId} (The fixture id (maybe new) to map to the response.). This is the underlying object with id, value and extensions. The accessor "getResponseId" gives direct access to the value
8509         */
8510        public IdType getResponseIdElement() { 
8511          if (this.responseId == null)
8512            if (Configuration.errorOnAutoCreate())
8513              throw new Error("Attempt to auto-create SetupActionOperationComponent.responseId");
8514            else if (Configuration.doAutoCreate())
8515              this.responseId = new IdType(); // bb
8516          return this.responseId;
8517        }
8518
8519        public boolean hasResponseIdElement() { 
8520          return this.responseId != null && !this.responseId.isEmpty();
8521        }
8522
8523        public boolean hasResponseId() { 
8524          return this.responseId != null && !this.responseId.isEmpty();
8525        }
8526
8527        /**
8528         * @param value {@link #responseId} (The fixture id (maybe new) to map to the response.). This is the underlying object with id, value and extensions. The accessor "getResponseId" gives direct access to the value
8529         */
8530        public SetupActionOperationComponent setResponseIdElement(IdType value) { 
8531          this.responseId = value;
8532          return this;
8533        }
8534
8535        /**
8536         * @return The fixture id (maybe new) to map to the response.
8537         */
8538        public String getResponseId() { 
8539          return this.responseId == null ? null : this.responseId.getValue();
8540        }
8541
8542        /**
8543         * @param value The fixture id (maybe new) to map to the response.
8544         */
8545        public SetupActionOperationComponent setResponseId(String value) { 
8546          if (Utilities.noString(value))
8547            this.responseId = null;
8548          else {
8549            if (this.responseId == null)
8550              this.responseId = new IdType();
8551            this.responseId.setValue(value);
8552          }
8553          return this;
8554        }
8555
8556        /**
8557         * @return {@link #sourceId} (The id of the fixture used as the body of a PUT or POST request.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value
8558         */
8559        public IdType getSourceIdElement() { 
8560          if (this.sourceId == null)
8561            if (Configuration.errorOnAutoCreate())
8562              throw new Error("Attempt to auto-create SetupActionOperationComponent.sourceId");
8563            else if (Configuration.doAutoCreate())
8564              this.sourceId = new IdType(); // bb
8565          return this.sourceId;
8566        }
8567
8568        public boolean hasSourceIdElement() { 
8569          return this.sourceId != null && !this.sourceId.isEmpty();
8570        }
8571
8572        public boolean hasSourceId() { 
8573          return this.sourceId != null && !this.sourceId.isEmpty();
8574        }
8575
8576        /**
8577         * @param value {@link #sourceId} (The id of the fixture used as the body of a PUT or POST request.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value
8578         */
8579        public SetupActionOperationComponent setSourceIdElement(IdType value) { 
8580          this.sourceId = value;
8581          return this;
8582        }
8583
8584        /**
8585         * @return The id of the fixture used as the body of a PUT or POST request.
8586         */
8587        public String getSourceId() { 
8588          return this.sourceId == null ? null : this.sourceId.getValue();
8589        }
8590
8591        /**
8592         * @param value The id of the fixture used as the body of a PUT or POST request.
8593         */
8594        public SetupActionOperationComponent setSourceId(String value) { 
8595          if (Utilities.noString(value))
8596            this.sourceId = null;
8597          else {
8598            if (this.sourceId == null)
8599              this.sourceId = new IdType();
8600            this.sourceId.setValue(value);
8601          }
8602          return this;
8603        }
8604
8605        /**
8606         * @return {@link #targetId} (Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.). This is the underlying object with id, value and extensions. The accessor "getTargetId" gives direct access to the value
8607         */
8608        public IdType getTargetIdElement() { 
8609          if (this.targetId == null)
8610            if (Configuration.errorOnAutoCreate())
8611              throw new Error("Attempt to auto-create SetupActionOperationComponent.targetId");
8612            else if (Configuration.doAutoCreate())
8613              this.targetId = new IdType(); // bb
8614          return this.targetId;
8615        }
8616
8617        public boolean hasTargetIdElement() { 
8618          return this.targetId != null && !this.targetId.isEmpty();
8619        }
8620
8621        public boolean hasTargetId() { 
8622          return this.targetId != null && !this.targetId.isEmpty();
8623        }
8624
8625        /**
8626         * @param value {@link #targetId} (Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.). This is the underlying object with id, value and extensions. The accessor "getTargetId" gives direct access to the value
8627         */
8628        public SetupActionOperationComponent setTargetIdElement(IdType value) { 
8629          this.targetId = value;
8630          return this;
8631        }
8632
8633        /**
8634         * @return Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.
8635         */
8636        public String getTargetId() { 
8637          return this.targetId == null ? null : this.targetId.getValue();
8638        }
8639
8640        /**
8641         * @param value Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.
8642         */
8643        public SetupActionOperationComponent setTargetId(String value) { 
8644          if (Utilities.noString(value))
8645            this.targetId = null;
8646          else {
8647            if (this.targetId == null)
8648              this.targetId = new IdType();
8649            this.targetId.setValue(value);
8650          }
8651          return this;
8652        }
8653
8654        /**
8655         * @return {@link #url} (Complete request URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
8656         */
8657        public StringType getUrlElement() { 
8658          if (this.url == null)
8659            if (Configuration.errorOnAutoCreate())
8660              throw new Error("Attempt to auto-create SetupActionOperationComponent.url");
8661            else if (Configuration.doAutoCreate())
8662              this.url = new StringType(); // bb
8663          return this.url;
8664        }
8665
8666        public boolean hasUrlElement() { 
8667          return this.url != null && !this.url.isEmpty();
8668        }
8669
8670        public boolean hasUrl() { 
8671          return this.url != null && !this.url.isEmpty();
8672        }
8673
8674        /**
8675         * @param value {@link #url} (Complete request URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
8676         */
8677        public SetupActionOperationComponent setUrlElement(StringType value) { 
8678          this.url = value;
8679          return this;
8680        }
8681
8682        /**
8683         * @return Complete request URL.
8684         */
8685        public String getUrl() { 
8686          return this.url == null ? null : this.url.getValue();
8687        }
8688
8689        /**
8690         * @param value Complete request URL.
8691         */
8692        public SetupActionOperationComponent setUrl(String value) { 
8693          if (Utilities.noString(value))
8694            this.url = null;
8695          else {
8696            if (this.url == null)
8697              this.url = new StringType();
8698            this.url.setValue(value);
8699          }
8700          return this;
8701        }
8702
8703        protected void listChildren(List<Property> children) {
8704          super.listChildren(children);
8705          children.add(new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type));
8706          children.add(new Property("resource", "uri", "The type of the FHIR resource. See http://build.fhir.org/resourcelist.html. Data type of uri is needed when non-HL7 artifacts are identified.", 0, 1, resource));
8707          children.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label));
8708          children.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description));