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