001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content.
052 */
053@ResourceDef(name="ArtifactAssessment", profile="http://hl7.org/fhir/StructureDefinition/ArtifactAssessment")
054public class ArtifactAssessment extends DomainResource {
055
056    public enum ArtifactAssessmentDisposition {
057        /**
058         * The comment is unresolved
059         */
060        UNRESOLVED, 
061        /**
062         * The comment is not persuasive (rejected in full)
063         */
064        NOTPERSUASIVE, 
065        /**
066         * The comment is persuasive (accepted in full)
067         */
068        PERSUASIVE, 
069        /**
070         * The comment is persuasive with modification (partially accepted)
071         */
072        PERSUASIVEWITHMODIFICATION, 
073        /**
074         * The comment is not persuasive with modification (partially rejected)
075         */
076        NOTPERSUASIVEWITHMODIFICATION, 
077        /**
078         * added to help the parsers with the generic types
079         */
080        NULL;
081        public static ArtifactAssessmentDisposition fromCode(String codeString) throws FHIRException {
082            if (codeString == null || "".equals(codeString))
083                return null;
084        if ("unresolved".equals(codeString))
085          return UNRESOLVED;
086        if ("not-persuasive".equals(codeString))
087          return NOTPERSUASIVE;
088        if ("persuasive".equals(codeString))
089          return PERSUASIVE;
090        if ("persuasive-with-modification".equals(codeString))
091          return PERSUASIVEWITHMODIFICATION;
092        if ("not-persuasive-with-modification".equals(codeString))
093          return NOTPERSUASIVEWITHMODIFICATION;
094        if (Configuration.isAcceptInvalidEnums())
095          return null;
096        else
097          throw new FHIRException("Unknown ArtifactAssessmentDisposition code '"+codeString+"'");
098        }
099        public String toCode() {
100          switch (this) {
101            case UNRESOLVED: return "unresolved";
102            case NOTPERSUASIVE: return "not-persuasive";
103            case PERSUASIVE: return "persuasive";
104            case PERSUASIVEWITHMODIFICATION: return "persuasive-with-modification";
105            case NOTPERSUASIVEWITHMODIFICATION: return "not-persuasive-with-modification";
106            case NULL: return null;
107            default: return "?";
108          }
109        }
110        public String getSystem() {
111          switch (this) {
112            case UNRESOLVED: return "http://hl7.org/fhir/artifactassessment-disposition";
113            case NOTPERSUASIVE: return "http://hl7.org/fhir/artifactassessment-disposition";
114            case PERSUASIVE: return "http://hl7.org/fhir/artifactassessment-disposition";
115            case PERSUASIVEWITHMODIFICATION: return "http://hl7.org/fhir/artifactassessment-disposition";
116            case NOTPERSUASIVEWITHMODIFICATION: return "http://hl7.org/fhir/artifactassessment-disposition";
117            case NULL: return null;
118            default: return "?";
119          }
120        }
121        public String getDefinition() {
122          switch (this) {
123            case UNRESOLVED: return "The comment is unresolved";
124            case NOTPERSUASIVE: return "The comment is not persuasive (rejected in full)";
125            case PERSUASIVE: return "The comment is persuasive (accepted in full)";
126            case PERSUASIVEWITHMODIFICATION: return "The comment is persuasive with modification (partially accepted)";
127            case NOTPERSUASIVEWITHMODIFICATION: return "The comment is not persuasive with modification (partially rejected)";
128            case NULL: return null;
129            default: return "?";
130          }
131        }
132        public String getDisplay() {
133          switch (this) {
134            case UNRESOLVED: return "Unresolved";
135            case NOTPERSUASIVE: return "Not Persuasive";
136            case PERSUASIVE: return "Persuasive";
137            case PERSUASIVEWITHMODIFICATION: return "Persuasive with Modification";
138            case NOTPERSUASIVEWITHMODIFICATION: return "Not Persuasive with Modification";
139            case NULL: return null;
140            default: return "?";
141          }
142        }
143    }
144
145  public static class ArtifactAssessmentDispositionEnumFactory implements EnumFactory<ArtifactAssessmentDisposition> {
146    public ArtifactAssessmentDisposition fromCode(String codeString) throws IllegalArgumentException {
147      if (codeString == null || "".equals(codeString))
148            if (codeString == null || "".equals(codeString))
149                return null;
150        if ("unresolved".equals(codeString))
151          return ArtifactAssessmentDisposition.UNRESOLVED;
152        if ("not-persuasive".equals(codeString))
153          return ArtifactAssessmentDisposition.NOTPERSUASIVE;
154        if ("persuasive".equals(codeString))
155          return ArtifactAssessmentDisposition.PERSUASIVE;
156        if ("persuasive-with-modification".equals(codeString))
157          return ArtifactAssessmentDisposition.PERSUASIVEWITHMODIFICATION;
158        if ("not-persuasive-with-modification".equals(codeString))
159          return ArtifactAssessmentDisposition.NOTPERSUASIVEWITHMODIFICATION;
160        throw new IllegalArgumentException("Unknown ArtifactAssessmentDisposition code '"+codeString+"'");
161        }
162        public Enumeration<ArtifactAssessmentDisposition> fromType(PrimitiveType<?> code) throws FHIRException {
163          if (code == null)
164            return null;
165          if (code.isEmpty())
166            return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.NULL, code);
167          String codeString = ((PrimitiveType) code).asStringValue();
168          if (codeString == null || "".equals(codeString))
169            return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.NULL, code);
170        if ("unresolved".equals(codeString))
171          return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.UNRESOLVED, code);
172        if ("not-persuasive".equals(codeString))
173          return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.NOTPERSUASIVE, code);
174        if ("persuasive".equals(codeString))
175          return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.PERSUASIVE, code);
176        if ("persuasive-with-modification".equals(codeString))
177          return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.PERSUASIVEWITHMODIFICATION, code);
178        if ("not-persuasive-with-modification".equals(codeString))
179          return new Enumeration<ArtifactAssessmentDisposition>(this, ArtifactAssessmentDisposition.NOTPERSUASIVEWITHMODIFICATION, code);
180        throw new FHIRException("Unknown ArtifactAssessmentDisposition code '"+codeString+"'");
181        }
182    public String toCode(ArtifactAssessmentDisposition code) {
183      if (code == ArtifactAssessmentDisposition.UNRESOLVED)
184        return "unresolved";
185      if (code == ArtifactAssessmentDisposition.NOTPERSUASIVE)
186        return "not-persuasive";
187      if (code == ArtifactAssessmentDisposition.PERSUASIVE)
188        return "persuasive";
189      if (code == ArtifactAssessmentDisposition.PERSUASIVEWITHMODIFICATION)
190        return "persuasive-with-modification";
191      if (code == ArtifactAssessmentDisposition.NOTPERSUASIVEWITHMODIFICATION)
192        return "not-persuasive-with-modification";
193      return "?";
194      }
195    public String toSystem(ArtifactAssessmentDisposition code) {
196      return code.getSystem();
197      }
198    }
199
200    public enum ArtifactAssessmentInformationType {
201        /**
202         * A comment on the artifact
203         */
204        COMMENT, 
205        /**
206         * A classifier of the artifact
207         */
208        CLASSIFIER, 
209        /**
210         * A rating of the artifact
211         */
212        RATING, 
213        /**
214         * A container for multiple components
215         */
216        CONTAINER, 
217        /**
218         * A response to a comment
219         */
220        RESPONSE, 
221        /**
222         * A change request for the artifact
223         */
224        CHANGEREQUEST, 
225        /**
226         * added to help the parsers with the generic types
227         */
228        NULL;
229        public static ArtifactAssessmentInformationType fromCode(String codeString) throws FHIRException {
230            if (codeString == null || "".equals(codeString))
231                return null;
232        if ("comment".equals(codeString))
233          return COMMENT;
234        if ("classifier".equals(codeString))
235          return CLASSIFIER;
236        if ("rating".equals(codeString))
237          return RATING;
238        if ("container".equals(codeString))
239          return CONTAINER;
240        if ("response".equals(codeString))
241          return RESPONSE;
242        if ("change-request".equals(codeString))
243          return CHANGEREQUEST;
244        if (Configuration.isAcceptInvalidEnums())
245          return null;
246        else
247          throw new FHIRException("Unknown ArtifactAssessmentInformationType code '"+codeString+"'");
248        }
249        public String toCode() {
250          switch (this) {
251            case COMMENT: return "comment";
252            case CLASSIFIER: return "classifier";
253            case RATING: return "rating";
254            case CONTAINER: return "container";
255            case RESPONSE: return "response";
256            case CHANGEREQUEST: return "change-request";
257            case NULL: return null;
258            default: return "?";
259          }
260        }
261        public String getSystem() {
262          switch (this) {
263            case COMMENT: return "http://hl7.org/fhir/artifactassessment-information-type";
264            case CLASSIFIER: return "http://hl7.org/fhir/artifactassessment-information-type";
265            case RATING: return "http://hl7.org/fhir/artifactassessment-information-type";
266            case CONTAINER: return "http://hl7.org/fhir/artifactassessment-information-type";
267            case RESPONSE: return "http://hl7.org/fhir/artifactassessment-information-type";
268            case CHANGEREQUEST: return "http://hl7.org/fhir/artifactassessment-information-type";
269            case NULL: return null;
270            default: return "?";
271          }
272        }
273        public String getDefinition() {
274          switch (this) {
275            case COMMENT: return "A comment on the artifact";
276            case CLASSIFIER: return "A classifier of the artifact";
277            case RATING: return "A rating of the artifact";
278            case CONTAINER: return "A container for multiple components";
279            case RESPONSE: return "A response to a comment";
280            case CHANGEREQUEST: return "A change request for the artifact";
281            case NULL: return null;
282            default: return "?";
283          }
284        }
285        public String getDisplay() {
286          switch (this) {
287            case COMMENT: return "Comment";
288            case CLASSIFIER: return "Classifier";
289            case RATING: return "Rating";
290            case CONTAINER: return "Container";
291            case RESPONSE: return "Response";
292            case CHANGEREQUEST: return "Change Request";
293            case NULL: return null;
294            default: return "?";
295          }
296        }
297    }
298
299  public static class ArtifactAssessmentInformationTypeEnumFactory implements EnumFactory<ArtifactAssessmentInformationType> {
300    public ArtifactAssessmentInformationType fromCode(String codeString) throws IllegalArgumentException {
301      if (codeString == null || "".equals(codeString))
302            if (codeString == null || "".equals(codeString))
303                return null;
304        if ("comment".equals(codeString))
305          return ArtifactAssessmentInformationType.COMMENT;
306        if ("classifier".equals(codeString))
307          return ArtifactAssessmentInformationType.CLASSIFIER;
308        if ("rating".equals(codeString))
309          return ArtifactAssessmentInformationType.RATING;
310        if ("container".equals(codeString))
311          return ArtifactAssessmentInformationType.CONTAINER;
312        if ("response".equals(codeString))
313          return ArtifactAssessmentInformationType.RESPONSE;
314        if ("change-request".equals(codeString))
315          return ArtifactAssessmentInformationType.CHANGEREQUEST;
316        throw new IllegalArgumentException("Unknown ArtifactAssessmentInformationType code '"+codeString+"'");
317        }
318        public Enumeration<ArtifactAssessmentInformationType> fromType(PrimitiveType<?> code) throws FHIRException {
319          if (code == null)
320            return null;
321          if (code.isEmpty())
322            return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.NULL, code);
323          String codeString = ((PrimitiveType) code).asStringValue();
324          if (codeString == null || "".equals(codeString))
325            return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.NULL, code);
326        if ("comment".equals(codeString))
327          return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.COMMENT, code);
328        if ("classifier".equals(codeString))
329          return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.CLASSIFIER, code);
330        if ("rating".equals(codeString))
331          return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.RATING, code);
332        if ("container".equals(codeString))
333          return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.CONTAINER, code);
334        if ("response".equals(codeString))
335          return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.RESPONSE, code);
336        if ("change-request".equals(codeString))
337          return new Enumeration<ArtifactAssessmentInformationType>(this, ArtifactAssessmentInformationType.CHANGEREQUEST, code);
338        throw new FHIRException("Unknown ArtifactAssessmentInformationType code '"+codeString+"'");
339        }
340    public String toCode(ArtifactAssessmentInformationType code) {
341      if (code == ArtifactAssessmentInformationType.COMMENT)
342        return "comment";
343      if (code == ArtifactAssessmentInformationType.CLASSIFIER)
344        return "classifier";
345      if (code == ArtifactAssessmentInformationType.RATING)
346        return "rating";
347      if (code == ArtifactAssessmentInformationType.CONTAINER)
348        return "container";
349      if (code == ArtifactAssessmentInformationType.RESPONSE)
350        return "response";
351      if (code == ArtifactAssessmentInformationType.CHANGEREQUEST)
352        return "change-request";
353      return "?";
354      }
355    public String toSystem(ArtifactAssessmentInformationType code) {
356      return code.getSystem();
357      }
358    }
359
360    public enum ArtifactAssessmentWorkflowStatus {
361        /**
362         * The comment has been submitted, but the responsible party has not yet been determined, or the responsible party has not yet determined the next steps to be taken.
363         */
364        SUBMITTED, 
365        /**
366         * The comment has been triaged, meaning the responsible party has been determined and next steps have been identified to address the comment.
367         */
368        TRIAGED, 
369        /**
370         * The comment is waiting for input from a specific party before next steps can be taken.
371         */
372        WAITINGFORINPUT, 
373        /**
374         * The comment has been resolved and no changes resulted from the resolution
375         */
376        RESOLVEDNOCHANGE, 
377        /**
378         * The comment has been resolved and changes are required to address the comment
379         */
380        RESOLVEDCHANGEREQUIRED, 
381        /**
382         * The comment is acceptable, but resolution of the comment and application of any associated changes have been deferred
383         */
384        DEFERRED, 
385        /**
386         * The comment is a duplicate of another comment already received
387         */
388        DUPLICATE, 
389        /**
390         * The comment is resolved and any necessary changes have been applied
391         */
392        APPLIED, 
393        /**
394         * The necessary changes to the artifact have been published in a new version of the artifact
395         */
396        PUBLISHED, 
397        /**
398         * The assessment was entered in error
399         */
400        ENTEREDINERROR, 
401        /**
402         * added to help the parsers with the generic types
403         */
404        NULL;
405        public static ArtifactAssessmentWorkflowStatus fromCode(String codeString) throws FHIRException {
406            if (codeString == null || "".equals(codeString))
407                return null;
408        if ("submitted".equals(codeString))
409          return SUBMITTED;
410        if ("triaged".equals(codeString))
411          return TRIAGED;
412        if ("waiting-for-input".equals(codeString))
413          return WAITINGFORINPUT;
414        if ("resolved-no-change".equals(codeString))
415          return RESOLVEDNOCHANGE;
416        if ("resolved-change-required".equals(codeString))
417          return RESOLVEDCHANGEREQUIRED;
418        if ("deferred".equals(codeString))
419          return DEFERRED;
420        if ("duplicate".equals(codeString))
421          return DUPLICATE;
422        if ("applied".equals(codeString))
423          return APPLIED;
424        if ("published".equals(codeString))
425          return PUBLISHED;
426        if ("entered-in-error".equals(codeString))
427          return ENTEREDINERROR;
428        if (Configuration.isAcceptInvalidEnums())
429          return null;
430        else
431          throw new FHIRException("Unknown ArtifactAssessmentWorkflowStatus code '"+codeString+"'");
432        }
433        public String toCode() {
434          switch (this) {
435            case SUBMITTED: return "submitted";
436            case TRIAGED: return "triaged";
437            case WAITINGFORINPUT: return "waiting-for-input";
438            case RESOLVEDNOCHANGE: return "resolved-no-change";
439            case RESOLVEDCHANGEREQUIRED: return "resolved-change-required";
440            case DEFERRED: return "deferred";
441            case DUPLICATE: return "duplicate";
442            case APPLIED: return "applied";
443            case PUBLISHED: return "published";
444            case ENTEREDINERROR: return "entered-in-error";
445            case NULL: return null;
446            default: return "?";
447          }
448        }
449        public String getSystem() {
450          switch (this) {
451            case SUBMITTED: return "http://hl7.org/fhir/artifactassessment-workflow-status";
452            case TRIAGED: return "http://hl7.org/fhir/artifactassessment-workflow-status";
453            case WAITINGFORINPUT: return "http://hl7.org/fhir/artifactassessment-workflow-status";
454            case RESOLVEDNOCHANGE: return "http://hl7.org/fhir/artifactassessment-workflow-status";
455            case RESOLVEDCHANGEREQUIRED: return "http://hl7.org/fhir/artifactassessment-workflow-status";
456            case DEFERRED: return "http://hl7.org/fhir/artifactassessment-workflow-status";
457            case DUPLICATE: return "http://hl7.org/fhir/artifactassessment-workflow-status";
458            case APPLIED: return "http://hl7.org/fhir/artifactassessment-workflow-status";
459            case PUBLISHED: return "http://hl7.org/fhir/artifactassessment-workflow-status";
460            case ENTEREDINERROR: return "http://hl7.org/fhir/artifactassessment-workflow-status";
461            case NULL: return null;
462            default: return "?";
463          }
464        }
465        public String getDefinition() {
466          switch (this) {
467            case SUBMITTED: return "The comment has been submitted, but the responsible party has not yet been determined, or the responsible party has not yet determined the next steps to be taken.";
468            case TRIAGED: return "The comment has been triaged, meaning the responsible party has been determined and next steps have been identified to address the comment.";
469            case WAITINGFORINPUT: return "The comment is waiting for input from a specific party before next steps can be taken.";
470            case RESOLVEDNOCHANGE: return "The comment has been resolved and no changes resulted from the resolution";
471            case RESOLVEDCHANGEREQUIRED: return "The comment has been resolved and changes are required to address the comment";
472            case DEFERRED: return "The comment is acceptable, but resolution of the comment and application of any associated changes have been deferred";
473            case DUPLICATE: return "The comment is a duplicate of another comment already received";
474            case APPLIED: return "The comment is resolved and any necessary changes have been applied";
475            case PUBLISHED: return "The necessary changes to the artifact have been published in a new version of the artifact";
476            case ENTEREDINERROR: return "The assessment was entered in error";
477            case NULL: return null;
478            default: return "?";
479          }
480        }
481        public String getDisplay() {
482          switch (this) {
483            case SUBMITTED: return "Submitted";
484            case TRIAGED: return "Triaged";
485            case WAITINGFORINPUT: return "Waiting for Input";
486            case RESOLVEDNOCHANGE: return "Resolved - No Change";
487            case RESOLVEDCHANGEREQUIRED: return "Resolved - Change Required";
488            case DEFERRED: return "Deferred";
489            case DUPLICATE: return "Duplicate";
490            case APPLIED: return "Applied";
491            case PUBLISHED: return "Published";
492            case ENTEREDINERROR: return "Entered in Error";
493            case NULL: return null;
494            default: return "?";
495          }
496        }
497    }
498
499  public static class ArtifactAssessmentWorkflowStatusEnumFactory implements EnumFactory<ArtifactAssessmentWorkflowStatus> {
500    public ArtifactAssessmentWorkflowStatus fromCode(String codeString) throws IllegalArgumentException {
501      if (codeString == null || "".equals(codeString))
502            if (codeString == null || "".equals(codeString))
503                return null;
504        if ("submitted".equals(codeString))
505          return ArtifactAssessmentWorkflowStatus.SUBMITTED;
506        if ("triaged".equals(codeString))
507          return ArtifactAssessmentWorkflowStatus.TRIAGED;
508        if ("waiting-for-input".equals(codeString))
509          return ArtifactAssessmentWorkflowStatus.WAITINGFORINPUT;
510        if ("resolved-no-change".equals(codeString))
511          return ArtifactAssessmentWorkflowStatus.RESOLVEDNOCHANGE;
512        if ("resolved-change-required".equals(codeString))
513          return ArtifactAssessmentWorkflowStatus.RESOLVEDCHANGEREQUIRED;
514        if ("deferred".equals(codeString))
515          return ArtifactAssessmentWorkflowStatus.DEFERRED;
516        if ("duplicate".equals(codeString))
517          return ArtifactAssessmentWorkflowStatus.DUPLICATE;
518        if ("applied".equals(codeString))
519          return ArtifactAssessmentWorkflowStatus.APPLIED;
520        if ("published".equals(codeString))
521          return ArtifactAssessmentWorkflowStatus.PUBLISHED;
522        if ("entered-in-error".equals(codeString))
523          return ArtifactAssessmentWorkflowStatus.ENTEREDINERROR;
524        throw new IllegalArgumentException("Unknown ArtifactAssessmentWorkflowStatus code '"+codeString+"'");
525        }
526        public Enumeration<ArtifactAssessmentWorkflowStatus> fromType(PrimitiveType<?> code) throws FHIRException {
527          if (code == null)
528            return null;
529          if (code.isEmpty())
530            return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.NULL, code);
531          String codeString = ((PrimitiveType) code).asStringValue();
532          if (codeString == null || "".equals(codeString))
533            return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.NULL, code);
534        if ("submitted".equals(codeString))
535          return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.SUBMITTED, code);
536        if ("triaged".equals(codeString))
537          return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.TRIAGED, code);
538        if ("waiting-for-input".equals(codeString))
539          return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.WAITINGFORINPUT, code);
540        if ("resolved-no-change".equals(codeString))
541          return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.RESOLVEDNOCHANGE, code);
542        if ("resolved-change-required".equals(codeString))
543          return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.RESOLVEDCHANGEREQUIRED, code);
544        if ("deferred".equals(codeString))
545          return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.DEFERRED, code);
546        if ("duplicate".equals(codeString))
547          return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.DUPLICATE, code);
548        if ("applied".equals(codeString))
549          return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.APPLIED, code);
550        if ("published".equals(codeString))
551          return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.PUBLISHED, code);
552        if ("entered-in-error".equals(codeString))
553          return new Enumeration<ArtifactAssessmentWorkflowStatus>(this, ArtifactAssessmentWorkflowStatus.ENTEREDINERROR, code);
554        throw new FHIRException("Unknown ArtifactAssessmentWorkflowStatus code '"+codeString+"'");
555        }
556    public String toCode(ArtifactAssessmentWorkflowStatus code) {
557      if (code == ArtifactAssessmentWorkflowStatus.SUBMITTED)
558        return "submitted";
559      if (code == ArtifactAssessmentWorkflowStatus.TRIAGED)
560        return "triaged";
561      if (code == ArtifactAssessmentWorkflowStatus.WAITINGFORINPUT)
562        return "waiting-for-input";
563      if (code == ArtifactAssessmentWorkflowStatus.RESOLVEDNOCHANGE)
564        return "resolved-no-change";
565      if (code == ArtifactAssessmentWorkflowStatus.RESOLVEDCHANGEREQUIRED)
566        return "resolved-change-required";
567      if (code == ArtifactAssessmentWorkflowStatus.DEFERRED)
568        return "deferred";
569      if (code == ArtifactAssessmentWorkflowStatus.DUPLICATE)
570        return "duplicate";
571      if (code == ArtifactAssessmentWorkflowStatus.APPLIED)
572        return "applied";
573      if (code == ArtifactAssessmentWorkflowStatus.PUBLISHED)
574        return "published";
575      if (code == ArtifactAssessmentWorkflowStatus.ENTEREDINERROR)
576        return "entered-in-error";
577      return "?";
578      }
579    public String toSystem(ArtifactAssessmentWorkflowStatus code) {
580      return code.getSystem();
581      }
582    }
583
584    @Block()
585    public static class ArtifactAssessmentContentComponent extends BackboneElement implements IBaseBackboneElement {
586        /**
587         * The type of information this component of the content represents.
588         */
589        @Child(name = "informationType", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false)
590        @Description(shortDefinition="comment | classifier | rating | container | response | change-request", formalDefinition="The type of information this component of the content represents." )
591        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/artifactassessment-information-type")
592        protected Enumeration<ArtifactAssessmentInformationType> informationType;
593
594        /**
595         * A brief summary of the content of this component.
596         */
597        @Child(name = "summary", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
598        @Description(shortDefinition="Brief summary of the content", formalDefinition="A brief summary of the content of this component." )
599        protected MarkdownType summary;
600
601        /**
602         * Indicates what type of content this component represents.
603         */
604        @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
605        @Description(shortDefinition="What type of content", formalDefinition="Indicates what type of content this component represents." )
606        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/certainty-type")
607        protected CodeableConcept type;
608
609        /**
610         * Represents a rating, classifier, or assessment of the artifact.
611         */
612        @Child(name = "classifier", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
613        @Description(shortDefinition="Rating, classifier, or assessment", formalDefinition="Represents a rating, classifier, or assessment of the artifact." )
614        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/certainty-rating")
615        protected List<CodeableConcept> classifier;
616
617        /**
618         * A quantitative rating of the artifact.
619         */
620        @Child(name = "quantity", type = {Quantity.class}, order=5, min=0, max=1, modifier=false, summary=false)
621        @Description(shortDefinition="Quantitative rating", formalDefinition="A quantitative rating of the artifact." )
622        protected Quantity quantity;
623
624        /**
625         * Indicates who or what authored the content.
626         */
627        @Child(name = "author", type = {Patient.class, Practitioner.class, PractitionerRole.class, Organization.class, Device.class}, order=6, min=0, max=1, modifier=false, summary=false)
628        @Description(shortDefinition="Who authored the content", formalDefinition="Indicates who or what authored the content." )
629        protected Reference author;
630
631        /**
632         * A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.
633         */
634        @Child(name = "path", type = {UriType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
635        @Description(shortDefinition="What the comment is directed to", formalDefinition="A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource." )
636        protected List<UriType> path;
637
638        /**
639         * Additional related artifacts that provide supporting documentation, additional evidence, or further information related to the content.
640         */
641        @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
642        @Description(shortDefinition="Additional information", formalDefinition="Additional related artifacts that provide supporting documentation, additional evidence, or further information related to the content." )
643        protected List<RelatedArtifact> relatedArtifact;
644
645        /**
646         * Acceptable to publicly share the comment, classifier or rating.
647         */
648        @Child(name = "freeToShare", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=false)
649        @Description(shortDefinition="Acceptable to publicly share the resource content", formalDefinition="Acceptable to publicly share the comment, classifier or rating." )
650        protected BooleanType freeToShare;
651
652        /**
653         * If the informationType is container, the components of the content.
654         */
655        @Child(name = "component", type = {ArtifactAssessmentContentComponent.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
656        @Description(shortDefinition="Contained content", formalDefinition="If the informationType is container, the components of the content." )
657        protected List<ArtifactAssessmentContentComponent> component;
658
659        private static final long serialVersionUID = -111630435L;
660
661    /**
662     * Constructor
663     */
664      public ArtifactAssessmentContentComponent() {
665        super();
666      }
667
668        /**
669         * @return {@link #informationType} (The type of information this component of the content represents.). This is the underlying object with id, value and extensions. The accessor "getInformationType" gives direct access to the value
670         */
671        public Enumeration<ArtifactAssessmentInformationType> getInformationTypeElement() { 
672          if (this.informationType == null)
673            if (Configuration.errorOnAutoCreate())
674              throw new Error("Attempt to auto-create ArtifactAssessmentContentComponent.informationType");
675            else if (Configuration.doAutoCreate())
676              this.informationType = new Enumeration<ArtifactAssessmentInformationType>(new ArtifactAssessmentInformationTypeEnumFactory()); // bb
677          return this.informationType;
678        }
679
680        public boolean hasInformationTypeElement() { 
681          return this.informationType != null && !this.informationType.isEmpty();
682        }
683
684        public boolean hasInformationType() { 
685          return this.informationType != null && !this.informationType.isEmpty();
686        }
687
688        /**
689         * @param value {@link #informationType} (The type of information this component of the content represents.). This is the underlying object with id, value and extensions. The accessor "getInformationType" gives direct access to the value
690         */
691        public ArtifactAssessmentContentComponent setInformationTypeElement(Enumeration<ArtifactAssessmentInformationType> value) { 
692          this.informationType = value;
693          return this;
694        }
695
696        /**
697         * @return The type of information this component of the content represents.
698         */
699        public ArtifactAssessmentInformationType getInformationType() { 
700          return this.informationType == null ? null : this.informationType.getValue();
701        }
702
703        /**
704         * @param value The type of information this component of the content represents.
705         */
706        public ArtifactAssessmentContentComponent setInformationType(ArtifactAssessmentInformationType value) { 
707          if (value == null)
708            this.informationType = null;
709          else {
710            if (this.informationType == null)
711              this.informationType = new Enumeration<ArtifactAssessmentInformationType>(new ArtifactAssessmentInformationTypeEnumFactory());
712            this.informationType.setValue(value);
713          }
714          return this;
715        }
716
717        /**
718         * @return {@link #summary} (A brief summary of the content of this component.). This is the underlying object with id, value and extensions. The accessor "getSummary" gives direct access to the value
719         */
720        public MarkdownType getSummaryElement() { 
721          if (this.summary == null)
722            if (Configuration.errorOnAutoCreate())
723              throw new Error("Attempt to auto-create ArtifactAssessmentContentComponent.summary");
724            else if (Configuration.doAutoCreate())
725              this.summary = new MarkdownType(); // bb
726          return this.summary;
727        }
728
729        public boolean hasSummaryElement() { 
730          return this.summary != null && !this.summary.isEmpty();
731        }
732
733        public boolean hasSummary() { 
734          return this.summary != null && !this.summary.isEmpty();
735        }
736
737        /**
738         * @param value {@link #summary} (A brief summary of the content of this component.). This is the underlying object with id, value and extensions. The accessor "getSummary" gives direct access to the value
739         */
740        public ArtifactAssessmentContentComponent setSummaryElement(MarkdownType value) { 
741          this.summary = value;
742          return this;
743        }
744
745        /**
746         * @return A brief summary of the content of this component.
747         */
748        public String getSummary() { 
749          return this.summary == null ? null : this.summary.getValue();
750        }
751
752        /**
753         * @param value A brief summary of the content of this component.
754         */
755        public ArtifactAssessmentContentComponent setSummary(String value) { 
756          if (Utilities.noString(value))
757            this.summary = null;
758          else {
759            if (this.summary == null)
760              this.summary = new MarkdownType();
761            this.summary.setValue(value);
762          }
763          return this;
764        }
765
766        /**
767         * @return {@link #type} (Indicates what type of content this component represents.)
768         */
769        public CodeableConcept getType() { 
770          if (this.type == null)
771            if (Configuration.errorOnAutoCreate())
772              throw new Error("Attempt to auto-create ArtifactAssessmentContentComponent.type");
773            else if (Configuration.doAutoCreate())
774              this.type = new CodeableConcept(); // cc
775          return this.type;
776        }
777
778        public boolean hasType() { 
779          return this.type != null && !this.type.isEmpty();
780        }
781
782        /**
783         * @param value {@link #type} (Indicates what type of content this component represents.)
784         */
785        public ArtifactAssessmentContentComponent setType(CodeableConcept value) { 
786          this.type = value;
787          return this;
788        }
789
790        /**
791         * @return {@link #classifier} (Represents a rating, classifier, or assessment of the artifact.)
792         */
793        public List<CodeableConcept> getClassifier() { 
794          if (this.classifier == null)
795            this.classifier = new ArrayList<CodeableConcept>();
796          return this.classifier;
797        }
798
799        /**
800         * @return Returns a reference to <code>this</code> for easy method chaining
801         */
802        public ArtifactAssessmentContentComponent setClassifier(List<CodeableConcept> theClassifier) { 
803          this.classifier = theClassifier;
804          return this;
805        }
806
807        public boolean hasClassifier() { 
808          if (this.classifier == null)
809            return false;
810          for (CodeableConcept item : this.classifier)
811            if (!item.isEmpty())
812              return true;
813          return false;
814        }
815
816        public CodeableConcept addClassifier() { //3
817          CodeableConcept t = new CodeableConcept();
818          if (this.classifier == null)
819            this.classifier = new ArrayList<CodeableConcept>();
820          this.classifier.add(t);
821          return t;
822        }
823
824        public ArtifactAssessmentContentComponent addClassifier(CodeableConcept t) { //3
825          if (t == null)
826            return this;
827          if (this.classifier == null)
828            this.classifier = new ArrayList<CodeableConcept>();
829          this.classifier.add(t);
830          return this;
831        }
832
833        /**
834         * @return The first repetition of repeating field {@link #classifier}, creating it if it does not already exist {3}
835         */
836        public CodeableConcept getClassifierFirstRep() { 
837          if (getClassifier().isEmpty()) {
838            addClassifier();
839          }
840          return getClassifier().get(0);
841        }
842
843        /**
844         * @return {@link #quantity} (A quantitative rating of the artifact.)
845         */
846        public Quantity getQuantity() { 
847          if (this.quantity == null)
848            if (Configuration.errorOnAutoCreate())
849              throw new Error("Attempt to auto-create ArtifactAssessmentContentComponent.quantity");
850            else if (Configuration.doAutoCreate())
851              this.quantity = new Quantity(); // cc
852          return this.quantity;
853        }
854
855        public boolean hasQuantity() { 
856          return this.quantity != null && !this.quantity.isEmpty();
857        }
858
859        /**
860         * @param value {@link #quantity} (A quantitative rating of the artifact.)
861         */
862        public ArtifactAssessmentContentComponent setQuantity(Quantity value) { 
863          this.quantity = value;
864          return this;
865        }
866
867        /**
868         * @return {@link #author} (Indicates who or what authored the content.)
869         */
870        public Reference getAuthor() { 
871          if (this.author == null)
872            if (Configuration.errorOnAutoCreate())
873              throw new Error("Attempt to auto-create ArtifactAssessmentContentComponent.author");
874            else if (Configuration.doAutoCreate())
875              this.author = new Reference(); // cc
876          return this.author;
877        }
878
879        public boolean hasAuthor() { 
880          return this.author != null && !this.author.isEmpty();
881        }
882
883        /**
884         * @param value {@link #author} (Indicates who or what authored the content.)
885         */
886        public ArtifactAssessmentContentComponent setAuthor(Reference value) { 
887          this.author = value;
888          return this;
889        }
890
891        /**
892         * @return {@link #path} (A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.)
893         */
894        public List<UriType> getPath() { 
895          if (this.path == null)
896            this.path = new ArrayList<UriType>();
897          return this.path;
898        }
899
900        /**
901         * @return Returns a reference to <code>this</code> for easy method chaining
902         */
903        public ArtifactAssessmentContentComponent setPath(List<UriType> thePath) { 
904          this.path = thePath;
905          return this;
906        }
907
908        public boolean hasPath() { 
909          if (this.path == null)
910            return false;
911          for (UriType item : this.path)
912            if (!item.isEmpty())
913              return true;
914          return false;
915        }
916
917        /**
918         * @return {@link #path} (A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.)
919         */
920        public UriType addPathElement() {//2 
921          UriType t = new UriType();
922          if (this.path == null)
923            this.path = new ArrayList<UriType>();
924          this.path.add(t);
925          return t;
926        }
927
928        /**
929         * @param value {@link #path} (A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.)
930         */
931        public ArtifactAssessmentContentComponent addPath(String value) { //1
932          UriType t = new UriType();
933          t.setValue(value);
934          if (this.path == null)
935            this.path = new ArrayList<UriType>();
936          this.path.add(t);
937          return this;
938        }
939
940        /**
941         * @param value {@link #path} (A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.)
942         */
943        public boolean hasPath(String value) { 
944          if (this.path == null)
945            return false;
946          for (UriType v : this.path)
947            if (v.getValue().equals(value)) // uri
948              return true;
949          return false;
950        }
951
952        /**
953         * @return {@link #relatedArtifact} (Additional related artifacts that provide supporting documentation, additional evidence, or further information related to the content.)
954         */
955        public List<RelatedArtifact> getRelatedArtifact() { 
956          if (this.relatedArtifact == null)
957            this.relatedArtifact = new ArrayList<RelatedArtifact>();
958          return this.relatedArtifact;
959        }
960
961        /**
962         * @return Returns a reference to <code>this</code> for easy method chaining
963         */
964        public ArtifactAssessmentContentComponent setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 
965          this.relatedArtifact = theRelatedArtifact;
966          return this;
967        }
968
969        public boolean hasRelatedArtifact() { 
970          if (this.relatedArtifact == null)
971            return false;
972          for (RelatedArtifact item : this.relatedArtifact)
973            if (!item.isEmpty())
974              return true;
975          return false;
976        }
977
978        public RelatedArtifact addRelatedArtifact() { //3
979          RelatedArtifact t = new RelatedArtifact();
980          if (this.relatedArtifact == null)
981            this.relatedArtifact = new ArrayList<RelatedArtifact>();
982          this.relatedArtifact.add(t);
983          return t;
984        }
985
986        public ArtifactAssessmentContentComponent addRelatedArtifact(RelatedArtifact t) { //3
987          if (t == null)
988            return this;
989          if (this.relatedArtifact == null)
990            this.relatedArtifact = new ArrayList<RelatedArtifact>();
991          this.relatedArtifact.add(t);
992          return this;
993        }
994
995        /**
996         * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist {3}
997         */
998        public RelatedArtifact getRelatedArtifactFirstRep() { 
999          if (getRelatedArtifact().isEmpty()) {
1000            addRelatedArtifact();
1001          }
1002          return getRelatedArtifact().get(0);
1003        }
1004
1005        /**
1006         * @return {@link #freeToShare} (Acceptable to publicly share the comment, classifier or rating.). This is the underlying object with id, value and extensions. The accessor "getFreeToShare" gives direct access to the value
1007         */
1008        public BooleanType getFreeToShareElement() { 
1009          if (this.freeToShare == null)
1010            if (Configuration.errorOnAutoCreate())
1011              throw new Error("Attempt to auto-create ArtifactAssessmentContentComponent.freeToShare");
1012            else if (Configuration.doAutoCreate())
1013              this.freeToShare = new BooleanType(); // bb
1014          return this.freeToShare;
1015        }
1016
1017        public boolean hasFreeToShareElement() { 
1018          return this.freeToShare != null && !this.freeToShare.isEmpty();
1019        }
1020
1021        public boolean hasFreeToShare() { 
1022          return this.freeToShare != null && !this.freeToShare.isEmpty();
1023        }
1024
1025        /**
1026         * @param value {@link #freeToShare} (Acceptable to publicly share the comment, classifier or rating.). This is the underlying object with id, value and extensions. The accessor "getFreeToShare" gives direct access to the value
1027         */
1028        public ArtifactAssessmentContentComponent setFreeToShareElement(BooleanType value) { 
1029          this.freeToShare = value;
1030          return this;
1031        }
1032
1033        /**
1034         * @return Acceptable to publicly share the comment, classifier or rating.
1035         */
1036        public boolean getFreeToShare() { 
1037          return this.freeToShare == null || this.freeToShare.isEmpty() ? false : this.freeToShare.getValue();
1038        }
1039
1040        /**
1041         * @param value Acceptable to publicly share the comment, classifier or rating.
1042         */
1043        public ArtifactAssessmentContentComponent setFreeToShare(boolean value) { 
1044            if (this.freeToShare == null)
1045              this.freeToShare = new BooleanType();
1046            this.freeToShare.setValue(value);
1047          return this;
1048        }
1049
1050        /**
1051         * @return {@link #component} (If the informationType is container, the components of the content.)
1052         */
1053        public List<ArtifactAssessmentContentComponent> getComponent() { 
1054          if (this.component == null)
1055            this.component = new ArrayList<ArtifactAssessmentContentComponent>();
1056          return this.component;
1057        }
1058
1059        /**
1060         * @return Returns a reference to <code>this</code> for easy method chaining
1061         */
1062        public ArtifactAssessmentContentComponent setComponent(List<ArtifactAssessmentContentComponent> theComponent) { 
1063          this.component = theComponent;
1064          return this;
1065        }
1066
1067        public boolean hasComponent() { 
1068          if (this.component == null)
1069            return false;
1070          for (ArtifactAssessmentContentComponent item : this.component)
1071            if (!item.isEmpty())
1072              return true;
1073          return false;
1074        }
1075
1076        public ArtifactAssessmentContentComponent addComponent() { //3
1077          ArtifactAssessmentContentComponent t = new ArtifactAssessmentContentComponent();
1078          if (this.component == null)
1079            this.component = new ArrayList<ArtifactAssessmentContentComponent>();
1080          this.component.add(t);
1081          return t;
1082        }
1083
1084        public ArtifactAssessmentContentComponent addComponent(ArtifactAssessmentContentComponent t) { //3
1085          if (t == null)
1086            return this;
1087          if (this.component == null)
1088            this.component = new ArrayList<ArtifactAssessmentContentComponent>();
1089          this.component.add(t);
1090          return this;
1091        }
1092
1093        /**
1094         * @return The first repetition of repeating field {@link #component}, creating it if it does not already exist {3}
1095         */
1096        public ArtifactAssessmentContentComponent getComponentFirstRep() { 
1097          if (getComponent().isEmpty()) {
1098            addComponent();
1099          }
1100          return getComponent().get(0);
1101        }
1102
1103        protected void listChildren(List<Property> children) {
1104          super.listChildren(children);
1105          children.add(new Property("informationType", "code", "The type of information this component of the content represents.", 0, 1, informationType));
1106          children.add(new Property("summary", "markdown", "A brief summary of the content of this component.", 0, 1, summary));
1107          children.add(new Property("type", "CodeableConcept", "Indicates what type of content this component represents.", 0, 1, type));
1108          children.add(new Property("classifier", "CodeableConcept", "Represents a rating, classifier, or assessment of the artifact.", 0, java.lang.Integer.MAX_VALUE, classifier));
1109          children.add(new Property("quantity", "Quantity", "A quantitative rating of the artifact.", 0, 1, quantity));
1110          children.add(new Property("author", "Reference(Patient|Practitioner|PractitionerRole|Organization|Device)", "Indicates who or what authored the content.", 0, 1, author));
1111          children.add(new Property("path", "uri", "A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.", 0, java.lang.Integer.MAX_VALUE, path));
1112          children.add(new Property("relatedArtifact", "RelatedArtifact", "Additional related artifacts that provide supporting documentation, additional evidence, or further information related to the content.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact));
1113          children.add(new Property("freeToShare", "boolean", "Acceptable to publicly share the comment, classifier or rating.", 0, 1, freeToShare));
1114          children.add(new Property("component", "@ArtifactAssessment.content", "If the informationType is container, the components of the content.", 0, java.lang.Integer.MAX_VALUE, component));
1115        }
1116
1117        @Override
1118        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1119          switch (_hash) {
1120          case 1302856326: /*informationType*/  return new Property("informationType", "code", "The type of information this component of the content represents.", 0, 1, informationType);
1121          case -1857640538: /*summary*/  return new Property("summary", "markdown", "A brief summary of the content of this component.", 0, 1, summary);
1122          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Indicates what type of content this component represents.", 0, 1, type);
1123          case -281470431: /*classifier*/  return new Property("classifier", "CodeableConcept", "Represents a rating, classifier, or assessment of the artifact.", 0, java.lang.Integer.MAX_VALUE, classifier);
1124          case -1285004149: /*quantity*/  return new Property("quantity", "Quantity", "A quantitative rating of the artifact.", 0, 1, quantity);
1125          case -1406328437: /*author*/  return new Property("author", "Reference(Patient|Practitioner|PractitionerRole|Organization|Device)", "Indicates who or what authored the content.", 0, 1, author);
1126          case 3433509: /*path*/  return new Property("path", "uri", "A URI that points to what the comment is about, such as a line of text in the CQL, or a specific element in a resource.", 0, java.lang.Integer.MAX_VALUE, path);
1127          case 666807069: /*relatedArtifact*/  return new Property("relatedArtifact", "RelatedArtifact", "Additional related artifacts that provide supporting documentation, additional evidence, or further information related to the content.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact);
1128          case -1268656616: /*freeToShare*/  return new Property("freeToShare", "boolean", "Acceptable to publicly share the comment, classifier or rating.", 0, 1, freeToShare);
1129          case -1399907075: /*component*/  return new Property("component", "@ArtifactAssessment.content", "If the informationType is container, the components of the content.", 0, java.lang.Integer.MAX_VALUE, component);
1130          default: return super.getNamedProperty(_hash, _name, _checkValid);
1131          }
1132
1133        }
1134
1135      @Override
1136      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1137        switch (hash) {
1138        case 1302856326: /*informationType*/ return this.informationType == null ? new Base[0] : new Base[] {this.informationType}; // Enumeration<ArtifactAssessmentInformationType>
1139        case -1857640538: /*summary*/ return this.summary == null ? new Base[0] : new Base[] {this.summary}; // MarkdownType
1140        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1141        case -281470431: /*classifier*/ return this.classifier == null ? new Base[0] : this.classifier.toArray(new Base[this.classifier.size()]); // CodeableConcept
1142        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
1143        case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference
1144        case 3433509: /*path*/ return this.path == null ? new Base[0] : this.path.toArray(new Base[this.path.size()]); // UriType
1145        case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact
1146        case -1268656616: /*freeToShare*/ return this.freeToShare == null ? new Base[0] : new Base[] {this.freeToShare}; // BooleanType
1147        case -1399907075: /*component*/ return this.component == null ? new Base[0] : this.component.toArray(new Base[this.component.size()]); // ArtifactAssessmentContentComponent
1148        default: return super.getProperty(hash, name, checkValid);
1149        }
1150
1151      }
1152
1153      @Override
1154      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1155        switch (hash) {
1156        case 1302856326: // informationType
1157          value = new ArtifactAssessmentInformationTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1158          this.informationType = (Enumeration) value; // Enumeration<ArtifactAssessmentInformationType>
1159          return value;
1160        case -1857640538: // summary
1161          this.summary = TypeConvertor.castToMarkdown(value); // MarkdownType
1162          return value;
1163        case 3575610: // type
1164          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1165          return value;
1166        case -281470431: // classifier
1167          this.getClassifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1168          return value;
1169        case -1285004149: // quantity
1170          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
1171          return value;
1172        case -1406328437: // author
1173          this.author = TypeConvertor.castToReference(value); // Reference
1174          return value;
1175        case 3433509: // path
1176          this.getPath().add(TypeConvertor.castToUri(value)); // UriType
1177          return value;
1178        case 666807069: // relatedArtifact
1179          this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value)); // RelatedArtifact
1180          return value;
1181        case -1268656616: // freeToShare
1182          this.freeToShare = TypeConvertor.castToBoolean(value); // BooleanType
1183          return value;
1184        case -1399907075: // component
1185          this.getComponent().add((ArtifactAssessmentContentComponent) value); // ArtifactAssessmentContentComponent
1186          return value;
1187        default: return super.setProperty(hash, name, value);
1188        }
1189
1190      }
1191
1192      @Override
1193      public Base setProperty(String name, Base value) throws FHIRException {
1194        if (name.equals("informationType")) {
1195          value = new ArtifactAssessmentInformationTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1196          this.informationType = (Enumeration) value; // Enumeration<ArtifactAssessmentInformationType>
1197        } else if (name.equals("summary")) {
1198          this.summary = TypeConvertor.castToMarkdown(value); // MarkdownType
1199        } else if (name.equals("type")) {
1200          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1201        } else if (name.equals("classifier")) {
1202          this.getClassifier().add(TypeConvertor.castToCodeableConcept(value));
1203        } else if (name.equals("quantity")) {
1204          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
1205        } else if (name.equals("author")) {
1206          this.author = TypeConvertor.castToReference(value); // Reference
1207        } else if (name.equals("path")) {
1208          this.getPath().add(TypeConvertor.castToUri(value));
1209        } else if (name.equals("relatedArtifact")) {
1210          this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value));
1211        } else if (name.equals("freeToShare")) {
1212          this.freeToShare = TypeConvertor.castToBoolean(value); // BooleanType
1213        } else if (name.equals("component")) {
1214          this.getComponent().add((ArtifactAssessmentContentComponent) value);
1215        } else
1216          return super.setProperty(name, value);
1217        return value;
1218      }
1219
1220      @Override
1221      public Base makeProperty(int hash, String name) throws FHIRException {
1222        switch (hash) {
1223        case 1302856326:  return getInformationTypeElement();
1224        case -1857640538:  return getSummaryElement();
1225        case 3575610:  return getType();
1226        case -281470431:  return addClassifier(); 
1227        case -1285004149:  return getQuantity();
1228        case -1406328437:  return getAuthor();
1229        case 3433509:  return addPathElement();
1230        case 666807069:  return addRelatedArtifact(); 
1231        case -1268656616:  return getFreeToShareElement();
1232        case -1399907075:  return addComponent(); 
1233        default: return super.makeProperty(hash, name);
1234        }
1235
1236      }
1237
1238      @Override
1239      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1240        switch (hash) {
1241        case 1302856326: /*informationType*/ return new String[] {"code"};
1242        case -1857640538: /*summary*/ return new String[] {"markdown"};
1243        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1244        case -281470431: /*classifier*/ return new String[] {"CodeableConcept"};
1245        case -1285004149: /*quantity*/ return new String[] {"Quantity"};
1246        case -1406328437: /*author*/ return new String[] {"Reference"};
1247        case 3433509: /*path*/ return new String[] {"uri"};
1248        case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"};
1249        case -1268656616: /*freeToShare*/ return new String[] {"boolean"};
1250        case -1399907075: /*component*/ return new String[] {"@ArtifactAssessment.content"};
1251        default: return super.getTypesForProperty(hash, name);
1252        }
1253
1254      }
1255
1256      @Override
1257      public Base addChild(String name) throws FHIRException {
1258        if (name.equals("informationType")) {
1259          throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.content.informationType");
1260        }
1261        else if (name.equals("summary")) {
1262          throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.content.summary");
1263        }
1264        else if (name.equals("type")) {
1265          this.type = new CodeableConcept();
1266          return this.type;
1267        }
1268        else if (name.equals("classifier")) {
1269          return addClassifier();
1270        }
1271        else if (name.equals("quantity")) {
1272          this.quantity = new Quantity();
1273          return this.quantity;
1274        }
1275        else if (name.equals("author")) {
1276          this.author = new Reference();
1277          return this.author;
1278        }
1279        else if (name.equals("path")) {
1280          throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.content.path");
1281        }
1282        else if (name.equals("relatedArtifact")) {
1283          return addRelatedArtifact();
1284        }
1285        else if (name.equals("freeToShare")) {
1286          throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.content.freeToShare");
1287        }
1288        else if (name.equals("component")) {
1289          return addComponent();
1290        }
1291        else
1292          return super.addChild(name);
1293      }
1294
1295      public ArtifactAssessmentContentComponent copy() {
1296        ArtifactAssessmentContentComponent dst = new ArtifactAssessmentContentComponent();
1297        copyValues(dst);
1298        return dst;
1299      }
1300
1301      public void copyValues(ArtifactAssessmentContentComponent dst) {
1302        super.copyValues(dst);
1303        dst.informationType = informationType == null ? null : informationType.copy();
1304        dst.summary = summary == null ? null : summary.copy();
1305        dst.type = type == null ? null : type.copy();
1306        if (classifier != null) {
1307          dst.classifier = new ArrayList<CodeableConcept>();
1308          for (CodeableConcept i : classifier)
1309            dst.classifier.add(i.copy());
1310        };
1311        dst.quantity = quantity == null ? null : quantity.copy();
1312        dst.author = author == null ? null : author.copy();
1313        if (path != null) {
1314          dst.path = new ArrayList<UriType>();
1315          for (UriType i : path)
1316            dst.path.add(i.copy());
1317        };
1318        if (relatedArtifact != null) {
1319          dst.relatedArtifact = new ArrayList<RelatedArtifact>();
1320          for (RelatedArtifact i : relatedArtifact)
1321            dst.relatedArtifact.add(i.copy());
1322        };
1323        dst.freeToShare = freeToShare == null ? null : freeToShare.copy();
1324        if (component != null) {
1325          dst.component = new ArrayList<ArtifactAssessmentContentComponent>();
1326          for (ArtifactAssessmentContentComponent i : component)
1327            dst.component.add(i.copy());
1328        };
1329      }
1330
1331      @Override
1332      public boolean equalsDeep(Base other_) {
1333        if (!super.equalsDeep(other_))
1334          return false;
1335        if (!(other_ instanceof ArtifactAssessmentContentComponent))
1336          return false;
1337        ArtifactAssessmentContentComponent o = (ArtifactAssessmentContentComponent) other_;
1338        return compareDeep(informationType, o.informationType, true) && compareDeep(summary, o.summary, true)
1339           && compareDeep(type, o.type, true) && compareDeep(classifier, o.classifier, true) && compareDeep(quantity, o.quantity, true)
1340           && compareDeep(author, o.author, true) && compareDeep(path, o.path, true) && compareDeep(relatedArtifact, o.relatedArtifact, true)
1341           && compareDeep(freeToShare, o.freeToShare, true) && compareDeep(component, o.component, true);
1342      }
1343
1344      @Override
1345      public boolean equalsShallow(Base other_) {
1346        if (!super.equalsShallow(other_))
1347          return false;
1348        if (!(other_ instanceof ArtifactAssessmentContentComponent))
1349          return false;
1350        ArtifactAssessmentContentComponent o = (ArtifactAssessmentContentComponent) other_;
1351        return compareValues(informationType, o.informationType, true) && compareValues(summary, o.summary, true)
1352           && compareValues(path, o.path, true) && compareValues(freeToShare, o.freeToShare, true);
1353      }
1354
1355      public boolean isEmpty() {
1356        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(informationType, summary, type
1357          , classifier, quantity, author, path, relatedArtifact, freeToShare, component
1358          );
1359      }
1360
1361  public String fhirType() {
1362    return "ArtifactAssessment.content";
1363
1364  }
1365
1366  }
1367
1368    /**
1369     * A formal identifier that is used to identify this artifact assessment when it is represented in other formats, or referenced in a specification, model, design or an instance.
1370     */
1371    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1372    @Description(shortDefinition="Additional identifier for the artifact assessment", formalDefinition="A formal identifier that is used to identify this artifact assessment when it is represented in other formats, or referenced in a specification, model, design or an instance." )
1373    protected List<Identifier> identifier;
1374
1375    /**
1376     * A short title for the assessment for use in displaying and selecting.
1377     */
1378    @Child(name = "title", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true)
1379    @Description(shortDefinition="A short title for the assessment for use in displaying and selecting", formalDefinition="A short title for the assessment for use in displaying and selecting." )
1380    protected StringType title;
1381
1382    /**
1383     * Display of or reference to the bibliographic citation of the comment, classifier, or rating.
1384     */
1385    @Child(name = "citeAs", type = {Citation.class, MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1386    @Description(shortDefinition="How to cite the comment or rating", formalDefinition="Display of or reference to the bibliographic citation of the comment, classifier, or rating." )
1387    protected DataType citeAs;
1388
1389    /**
1390     * The date  (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes.
1391     */
1392    @Child(name = "date", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1393    @Description(shortDefinition="Date last changed", formalDefinition="The date  (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes." )
1394    protected DateTimeType date;
1395
1396    /**
1397     * A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment.
1398     */
1399    @Child(name = "copyright", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
1400    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment." )
1401    protected MarkdownType copyright;
1402
1403    /**
1404     * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
1405     */
1406    @Child(name = "approvalDate", type = {DateType.class}, order=5, min=0, max=1, modifier=false, summary=false)
1407    @Description(shortDefinition="When the artifact assessment was approved by publisher", formalDefinition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." )
1408    protected DateType approvalDate;
1409
1410    /**
1411     * The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
1412     */
1413    @Child(name = "lastReviewDate", type = {DateType.class}, order=6, min=0, max=1, modifier=false, summary=true)
1414    @Description(shortDefinition="When the artifact assessment was last reviewed by the publisher", formalDefinition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." )
1415    protected DateType lastReviewDate;
1416
1417    /**
1418     * A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.
1419     */
1420    @Child(name = "artifact", type = {Reference.class, CanonicalType.class, UriType.class}, order=7, min=1, max=1, modifier=false, summary=true)
1421    @Description(shortDefinition="The artifact assessed, commented upon or rated", formalDefinition="A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about." )
1422    protected DataType artifact;
1423
1424    /**
1425     * A component comment, classifier, or rating of the artifact.
1426     */
1427    @Child(name = "content", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1428    @Description(shortDefinition="Comment, classifier, or rating content", formalDefinition="A component comment, classifier, or rating of the artifact." )
1429    protected List<ArtifactAssessmentContentComponent> content;
1430
1431    /**
1432     * Indicates the workflow status of the comment or change request.
1433     */
1434    @Child(name = "workflowStatus", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=true)
1435    @Description(shortDefinition="submitted | triaged | waiting-for-input | resolved-no-change | resolved-change-required | deferred | duplicate | applied | published | entered-in-error", formalDefinition="Indicates the workflow status of the comment or change request." )
1436    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/artifactassessment-workflow-status")
1437    protected Enumeration<ArtifactAssessmentWorkflowStatus> workflowStatus;
1438
1439    /**
1440     * Indicates the disposition of the responsible party to the comment or change request.
1441     */
1442    @Child(name = "disposition", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=true)
1443    @Description(shortDefinition="unresolved | not-persuasive | persuasive | persuasive-with-modification | not-persuasive-with-modification", formalDefinition="Indicates the disposition of the responsible party to the comment or change request." )
1444    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/artifactassessment-disposition")
1445    protected Enumeration<ArtifactAssessmentDisposition> disposition;
1446
1447    private static final long serialVersionUID = 525457507L;
1448
1449  /**
1450   * Constructor
1451   */
1452    public ArtifactAssessment() {
1453      super();
1454    }
1455
1456  /**
1457   * Constructor
1458   */
1459    public ArtifactAssessment(DataType artifact) {
1460      super();
1461      this.setArtifact(artifact);
1462    }
1463
1464    /**
1465     * @return {@link #identifier} (A formal identifier that is used to identify this artifact assessment when it is represented in other formats, or referenced in a specification, model, design or an instance.)
1466     */
1467    public List<Identifier> getIdentifier() { 
1468      if (this.identifier == null)
1469        this.identifier = new ArrayList<Identifier>();
1470      return this.identifier;
1471    }
1472
1473    /**
1474     * @return Returns a reference to <code>this</code> for easy method chaining
1475     */
1476    public ArtifactAssessment setIdentifier(List<Identifier> theIdentifier) { 
1477      this.identifier = theIdentifier;
1478      return this;
1479    }
1480
1481    public boolean hasIdentifier() { 
1482      if (this.identifier == null)
1483        return false;
1484      for (Identifier item : this.identifier)
1485        if (!item.isEmpty())
1486          return true;
1487      return false;
1488    }
1489
1490    public Identifier addIdentifier() { //3
1491      Identifier t = new Identifier();
1492      if (this.identifier == null)
1493        this.identifier = new ArrayList<Identifier>();
1494      this.identifier.add(t);
1495      return t;
1496    }
1497
1498    public ArtifactAssessment addIdentifier(Identifier t) { //3
1499      if (t == null)
1500        return this;
1501      if (this.identifier == null)
1502        this.identifier = new ArrayList<Identifier>();
1503      this.identifier.add(t);
1504      return this;
1505    }
1506
1507    /**
1508     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1509     */
1510    public Identifier getIdentifierFirstRep() { 
1511      if (getIdentifier().isEmpty()) {
1512        addIdentifier();
1513      }
1514      return getIdentifier().get(0);
1515    }
1516
1517    /**
1518     * @return {@link #title} (A short title for the assessment for use in displaying and selecting.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1519     */
1520    public StringType getTitleElement() { 
1521      if (this.title == null)
1522        if (Configuration.errorOnAutoCreate())
1523          throw new Error("Attempt to auto-create ArtifactAssessment.title");
1524        else if (Configuration.doAutoCreate())
1525          this.title = new StringType(); // bb
1526      return this.title;
1527    }
1528
1529    public boolean hasTitleElement() { 
1530      return this.title != null && !this.title.isEmpty();
1531    }
1532
1533    public boolean hasTitle() { 
1534      return this.title != null && !this.title.isEmpty();
1535    }
1536
1537    /**
1538     * @param value {@link #title} (A short title for the assessment for use in displaying and selecting.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1539     */
1540    public ArtifactAssessment setTitleElement(StringType value) { 
1541      this.title = value;
1542      return this;
1543    }
1544
1545    /**
1546     * @return A short title for the assessment for use in displaying and selecting.
1547     */
1548    public String getTitle() { 
1549      return this.title == null ? null : this.title.getValue();
1550    }
1551
1552    /**
1553     * @param value A short title for the assessment for use in displaying and selecting.
1554     */
1555    public ArtifactAssessment setTitle(String value) { 
1556      if (Utilities.noString(value))
1557        this.title = null;
1558      else {
1559        if (this.title == null)
1560          this.title = new StringType();
1561        this.title.setValue(value);
1562      }
1563      return this;
1564    }
1565
1566    /**
1567     * @return {@link #citeAs} (Display of or reference to the bibliographic citation of the comment, classifier, or rating.)
1568     */
1569    public DataType getCiteAs() { 
1570      return this.citeAs;
1571    }
1572
1573    /**
1574     * @return {@link #citeAs} (Display of or reference to the bibliographic citation of the comment, classifier, or rating.)
1575     */
1576    public Reference getCiteAsReference() throws FHIRException { 
1577      if (this.citeAs == null)
1578        this.citeAs = new Reference();
1579      if (!(this.citeAs instanceof Reference))
1580        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.citeAs.getClass().getName()+" was encountered");
1581      return (Reference) this.citeAs;
1582    }
1583
1584    public boolean hasCiteAsReference() { 
1585      return this != null && this.citeAs instanceof Reference;
1586    }
1587
1588    /**
1589     * @return {@link #citeAs} (Display of or reference to the bibliographic citation of the comment, classifier, or rating.)
1590     */
1591    public MarkdownType getCiteAsMarkdownType() throws FHIRException { 
1592      if (this.citeAs == null)
1593        this.citeAs = new MarkdownType();
1594      if (!(this.citeAs instanceof MarkdownType))
1595        throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.citeAs.getClass().getName()+" was encountered");
1596      return (MarkdownType) this.citeAs;
1597    }
1598
1599    public boolean hasCiteAsMarkdownType() { 
1600      return this != null && this.citeAs instanceof MarkdownType;
1601    }
1602
1603    public boolean hasCiteAs() { 
1604      return this.citeAs != null && !this.citeAs.isEmpty();
1605    }
1606
1607    /**
1608     * @param value {@link #citeAs} (Display of or reference to the bibliographic citation of the comment, classifier, or rating.)
1609     */
1610    public ArtifactAssessment setCiteAs(DataType value) { 
1611      if (value != null && !(value instanceof Reference || value instanceof MarkdownType))
1612        throw new FHIRException("Not the right type for ArtifactAssessment.citeAs[x]: "+value.fhirType());
1613      this.citeAs = value;
1614      return this;
1615    }
1616
1617    /**
1618     * @return {@link #date} (The date  (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1619     */
1620    public DateTimeType getDateElement() { 
1621      if (this.date == null)
1622        if (Configuration.errorOnAutoCreate())
1623          throw new Error("Attempt to auto-create ArtifactAssessment.date");
1624        else if (Configuration.doAutoCreate())
1625          this.date = new DateTimeType(); // bb
1626      return this.date;
1627    }
1628
1629    public boolean hasDateElement() { 
1630      return this.date != null && !this.date.isEmpty();
1631    }
1632
1633    public boolean hasDate() { 
1634      return this.date != null && !this.date.isEmpty();
1635    }
1636
1637    /**
1638     * @param value {@link #date} (The date  (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1639     */
1640    public ArtifactAssessment setDateElement(DateTimeType value) { 
1641      this.date = value;
1642      return this;
1643    }
1644
1645    /**
1646     * @return The date  (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes.
1647     */
1648    public Date getDate() { 
1649      return this.date == null ? null : this.date.getValue();
1650    }
1651
1652    /**
1653     * @param value The date  (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes.
1654     */
1655    public ArtifactAssessment setDate(Date value) { 
1656      if (value == null)
1657        this.date = null;
1658      else {
1659        if (this.date == null)
1660          this.date = new DateTimeType();
1661        this.date.setValue(value);
1662      }
1663      return this;
1664    }
1665
1666    /**
1667     * @return {@link #copyright} (A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
1668     */
1669    public MarkdownType getCopyrightElement() { 
1670      if (this.copyright == null)
1671        if (Configuration.errorOnAutoCreate())
1672          throw new Error("Attempt to auto-create ArtifactAssessment.copyright");
1673        else if (Configuration.doAutoCreate())
1674          this.copyright = new MarkdownType(); // bb
1675      return this.copyright;
1676    }
1677
1678    public boolean hasCopyrightElement() { 
1679      return this.copyright != null && !this.copyright.isEmpty();
1680    }
1681
1682    public boolean hasCopyright() { 
1683      return this.copyright != null && !this.copyright.isEmpty();
1684    }
1685
1686    /**
1687     * @param value {@link #copyright} (A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
1688     */
1689    public ArtifactAssessment setCopyrightElement(MarkdownType value) { 
1690      this.copyright = value;
1691      return this;
1692    }
1693
1694    /**
1695     * @return A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment.
1696     */
1697    public String getCopyright() { 
1698      return this.copyright == null ? null : this.copyright.getValue();
1699    }
1700
1701    /**
1702     * @param value A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment.
1703     */
1704    public ArtifactAssessment setCopyright(String value) { 
1705      if (Utilities.noString(value))
1706        this.copyright = null;
1707      else {
1708        if (this.copyright == null)
1709          this.copyright = new MarkdownType();
1710        this.copyright.setValue(value);
1711      }
1712      return this;
1713    }
1714
1715    /**
1716     * @return {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
1717     */
1718    public DateType getApprovalDateElement() { 
1719      if (this.approvalDate == null)
1720        if (Configuration.errorOnAutoCreate())
1721          throw new Error("Attempt to auto-create ArtifactAssessment.approvalDate");
1722        else if (Configuration.doAutoCreate())
1723          this.approvalDate = new DateType(); // bb
1724      return this.approvalDate;
1725    }
1726
1727    public boolean hasApprovalDateElement() { 
1728      return this.approvalDate != null && !this.approvalDate.isEmpty();
1729    }
1730
1731    public boolean hasApprovalDate() { 
1732      return this.approvalDate != null && !this.approvalDate.isEmpty();
1733    }
1734
1735    /**
1736     * @param value {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
1737     */
1738    public ArtifactAssessment setApprovalDateElement(DateType value) { 
1739      this.approvalDate = value;
1740      return this;
1741    }
1742
1743    /**
1744     * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
1745     */
1746    public Date getApprovalDate() { 
1747      return this.approvalDate == null ? null : this.approvalDate.getValue();
1748    }
1749
1750    /**
1751     * @param value The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
1752     */
1753    public ArtifactAssessment setApprovalDate(Date value) { 
1754      if (value == null)
1755        this.approvalDate = null;
1756      else {
1757        if (this.approvalDate == null)
1758          this.approvalDate = new DateType();
1759        this.approvalDate.setValue(value);
1760      }
1761      return this;
1762    }
1763
1764    /**
1765     * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
1766     */
1767    public DateType getLastReviewDateElement() { 
1768      if (this.lastReviewDate == null)
1769        if (Configuration.errorOnAutoCreate())
1770          throw new Error("Attempt to auto-create ArtifactAssessment.lastReviewDate");
1771        else if (Configuration.doAutoCreate())
1772          this.lastReviewDate = new DateType(); // bb
1773      return this.lastReviewDate;
1774    }
1775
1776    public boolean hasLastReviewDateElement() { 
1777      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
1778    }
1779
1780    public boolean hasLastReviewDate() { 
1781      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
1782    }
1783
1784    /**
1785     * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
1786     */
1787    public ArtifactAssessment setLastReviewDateElement(DateType value) { 
1788      this.lastReviewDate = value;
1789      return this;
1790    }
1791
1792    /**
1793     * @return The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
1794     */
1795    public Date getLastReviewDate() { 
1796      return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
1797    }
1798
1799    /**
1800     * @param value The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
1801     */
1802    public ArtifactAssessment setLastReviewDate(Date value) { 
1803      if (value == null)
1804        this.lastReviewDate = null;
1805      else {
1806        if (this.lastReviewDate == null)
1807          this.lastReviewDate = new DateType();
1808        this.lastReviewDate.setValue(value);
1809      }
1810      return this;
1811    }
1812
1813    /**
1814     * @return {@link #artifact} (A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.)
1815     */
1816    public DataType getArtifact() { 
1817      return this.artifact;
1818    }
1819
1820    /**
1821     * @return {@link #artifact} (A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.)
1822     */
1823    public Reference getArtifactReference() throws FHIRException { 
1824      if (this.artifact == null)
1825        this.artifact = new Reference();
1826      if (!(this.artifact instanceof Reference))
1827        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.artifact.getClass().getName()+" was encountered");
1828      return (Reference) this.artifact;
1829    }
1830
1831    public boolean hasArtifactReference() { 
1832      return this != null && this.artifact instanceof Reference;
1833    }
1834
1835    /**
1836     * @return {@link #artifact} (A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.)
1837     */
1838    public CanonicalType getArtifactCanonicalType() throws FHIRException { 
1839      if (this.artifact == null)
1840        this.artifact = new CanonicalType();
1841      if (!(this.artifact instanceof CanonicalType))
1842        throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.artifact.getClass().getName()+" was encountered");
1843      return (CanonicalType) this.artifact;
1844    }
1845
1846    public boolean hasArtifactCanonicalType() { 
1847      return this != null && this.artifact instanceof CanonicalType;
1848    }
1849
1850    /**
1851     * @return {@link #artifact} (A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.)
1852     */
1853    public UriType getArtifactUriType() throws FHIRException { 
1854      if (this.artifact == null)
1855        this.artifact = new UriType();
1856      if (!(this.artifact instanceof UriType))
1857        throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.artifact.getClass().getName()+" was encountered");
1858      return (UriType) this.artifact;
1859    }
1860
1861    public boolean hasArtifactUriType() { 
1862      return this != null && this.artifact instanceof UriType;
1863    }
1864
1865    public boolean hasArtifact() { 
1866      return this.artifact != null && !this.artifact.isEmpty();
1867    }
1868
1869    /**
1870     * @param value {@link #artifact} (A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.)
1871     */
1872    public ArtifactAssessment setArtifact(DataType value) { 
1873      if (value != null && !(value instanceof Reference || value instanceof CanonicalType || value instanceof UriType))
1874        throw new FHIRException("Not the right type for ArtifactAssessment.artifact[x]: "+value.fhirType());
1875      this.artifact = value;
1876      return this;
1877    }
1878
1879    /**
1880     * @return {@link #content} (A component comment, classifier, or rating of the artifact.)
1881     */
1882    public List<ArtifactAssessmentContentComponent> getContent() { 
1883      if (this.content == null)
1884        this.content = new ArrayList<ArtifactAssessmentContentComponent>();
1885      return this.content;
1886    }
1887
1888    /**
1889     * @return Returns a reference to <code>this</code> for easy method chaining
1890     */
1891    public ArtifactAssessment setContent(List<ArtifactAssessmentContentComponent> theContent) { 
1892      this.content = theContent;
1893      return this;
1894    }
1895
1896    public boolean hasContent() { 
1897      if (this.content == null)
1898        return false;
1899      for (ArtifactAssessmentContentComponent item : this.content)
1900        if (!item.isEmpty())
1901          return true;
1902      return false;
1903    }
1904
1905    public ArtifactAssessmentContentComponent addContent() { //3
1906      ArtifactAssessmentContentComponent t = new ArtifactAssessmentContentComponent();
1907      if (this.content == null)
1908        this.content = new ArrayList<ArtifactAssessmentContentComponent>();
1909      this.content.add(t);
1910      return t;
1911    }
1912
1913    public ArtifactAssessment addContent(ArtifactAssessmentContentComponent t) { //3
1914      if (t == null)
1915        return this;
1916      if (this.content == null)
1917        this.content = new ArrayList<ArtifactAssessmentContentComponent>();
1918      this.content.add(t);
1919      return this;
1920    }
1921
1922    /**
1923     * @return The first repetition of repeating field {@link #content}, creating it if it does not already exist {3}
1924     */
1925    public ArtifactAssessmentContentComponent getContentFirstRep() { 
1926      if (getContent().isEmpty()) {
1927        addContent();
1928      }
1929      return getContent().get(0);
1930    }
1931
1932    /**
1933     * @return {@link #workflowStatus} (Indicates the workflow status of the comment or change request.). This is the underlying object with id, value and extensions. The accessor "getWorkflowStatus" gives direct access to the value
1934     */
1935    public Enumeration<ArtifactAssessmentWorkflowStatus> getWorkflowStatusElement() { 
1936      if (this.workflowStatus == null)
1937        if (Configuration.errorOnAutoCreate())
1938          throw new Error("Attempt to auto-create ArtifactAssessment.workflowStatus");
1939        else if (Configuration.doAutoCreate())
1940          this.workflowStatus = new Enumeration<ArtifactAssessmentWorkflowStatus>(new ArtifactAssessmentWorkflowStatusEnumFactory()); // bb
1941      return this.workflowStatus;
1942    }
1943
1944    public boolean hasWorkflowStatusElement() { 
1945      return this.workflowStatus != null && !this.workflowStatus.isEmpty();
1946    }
1947
1948    public boolean hasWorkflowStatus() { 
1949      return this.workflowStatus != null && !this.workflowStatus.isEmpty();
1950    }
1951
1952    /**
1953     * @param value {@link #workflowStatus} (Indicates the workflow status of the comment or change request.). This is the underlying object with id, value and extensions. The accessor "getWorkflowStatus" gives direct access to the value
1954     */
1955    public ArtifactAssessment setWorkflowStatusElement(Enumeration<ArtifactAssessmentWorkflowStatus> value) { 
1956      this.workflowStatus = value;
1957      return this;
1958    }
1959
1960    /**
1961     * @return Indicates the workflow status of the comment or change request.
1962     */
1963    public ArtifactAssessmentWorkflowStatus getWorkflowStatus() { 
1964      return this.workflowStatus == null ? null : this.workflowStatus.getValue();
1965    }
1966
1967    /**
1968     * @param value Indicates the workflow status of the comment or change request.
1969     */
1970    public ArtifactAssessment setWorkflowStatus(ArtifactAssessmentWorkflowStatus value) { 
1971      if (value == null)
1972        this.workflowStatus = null;
1973      else {
1974        if (this.workflowStatus == null)
1975          this.workflowStatus = new Enumeration<ArtifactAssessmentWorkflowStatus>(new ArtifactAssessmentWorkflowStatusEnumFactory());
1976        this.workflowStatus.setValue(value);
1977      }
1978      return this;
1979    }
1980
1981    /**
1982     * @return {@link #disposition} (Indicates the disposition of the responsible party to the comment or change request.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value
1983     */
1984    public Enumeration<ArtifactAssessmentDisposition> getDispositionElement() { 
1985      if (this.disposition == null)
1986        if (Configuration.errorOnAutoCreate())
1987          throw new Error("Attempt to auto-create ArtifactAssessment.disposition");
1988        else if (Configuration.doAutoCreate())
1989          this.disposition = new Enumeration<ArtifactAssessmentDisposition>(new ArtifactAssessmentDispositionEnumFactory()); // bb
1990      return this.disposition;
1991    }
1992
1993    public boolean hasDispositionElement() { 
1994      return this.disposition != null && !this.disposition.isEmpty();
1995    }
1996
1997    public boolean hasDisposition() { 
1998      return this.disposition != null && !this.disposition.isEmpty();
1999    }
2000
2001    /**
2002     * @param value {@link #disposition} (Indicates the disposition of the responsible party to the comment or change request.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value
2003     */
2004    public ArtifactAssessment setDispositionElement(Enumeration<ArtifactAssessmentDisposition> value) { 
2005      this.disposition = value;
2006      return this;
2007    }
2008
2009    /**
2010     * @return Indicates the disposition of the responsible party to the comment or change request.
2011     */
2012    public ArtifactAssessmentDisposition getDisposition() { 
2013      return this.disposition == null ? null : this.disposition.getValue();
2014    }
2015
2016    /**
2017     * @param value Indicates the disposition of the responsible party to the comment or change request.
2018     */
2019    public ArtifactAssessment setDisposition(ArtifactAssessmentDisposition value) { 
2020      if (value == null)
2021        this.disposition = null;
2022      else {
2023        if (this.disposition == null)
2024          this.disposition = new Enumeration<ArtifactAssessmentDisposition>(new ArtifactAssessmentDispositionEnumFactory());
2025        this.disposition.setValue(value);
2026      }
2027      return this;
2028    }
2029
2030      protected void listChildren(List<Property> children) {
2031        super.listChildren(children);
2032        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this artifact assessment when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
2033        children.add(new Property("title", "string", "A short title for the assessment for use in displaying and selecting.", 0, 1, title));
2034        children.add(new Property("citeAs[x]", "Reference(Citation)|markdown", "Display of or reference to the bibliographic citation of the comment, classifier, or rating.", 0, 1, citeAs));
2035        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes.", 0, 1, date));
2036        children.add(new Property("copyright", "markdown", "A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment.", 0, 1, copyright));
2037        children.add(new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate));
2038        children.add(new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate));
2039        children.add(new Property("artifact[x]", "Reference(Any)|canonical|uri", "A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.", 0, 1, artifact));
2040        children.add(new Property("content", "", "A component comment, classifier, or rating of the artifact.", 0, java.lang.Integer.MAX_VALUE, content));
2041        children.add(new Property("workflowStatus", "code", "Indicates the workflow status of the comment or change request.", 0, 1, workflowStatus));
2042        children.add(new Property("disposition", "code", "Indicates the disposition of the responsible party to the comment or change request.", 0, 1, disposition));
2043      }
2044
2045      @Override
2046      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2047        switch (_hash) {
2048        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this artifact assessment when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier);
2049        case 110371416: /*title*/  return new Property("title", "string", "A short title for the assessment for use in displaying and selecting.", 0, 1, title);
2050        case -1706539017: /*citeAs[x]*/  return new Property("citeAs[x]", "Reference(Citation)|markdown", "Display of or reference to the bibliographic citation of the comment, classifier, or rating.", 0, 1, citeAs);
2051        case -1360156695: /*citeAs*/  return new Property("citeAs[x]", "Reference(Citation)|markdown", "Display of or reference to the bibliographic citation of the comment, classifier, or rating.", 0, 1, citeAs);
2052        case 1269009762: /*citeAsReference*/  return new Property("citeAs[x]", "Reference(Citation)", "Display of or reference to the bibliographic citation of the comment, classifier, or rating.", 0, 1, citeAs);
2053        case 456265720: /*citeAsMarkdown*/  return new Property("citeAs[x]", "markdown", "Display of or reference to the bibliographic citation of the comment, classifier, or rating.", 0, 1, citeAs);
2054        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the artifact assessment was published. The date must change when the disposition changes and it must change if the workflow status code changes. In addition, it should change when the substantive content of the artifact assessment changes.", 0, 1, date);
2055        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "A copyright statement relating to the artifact assessment and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the artifact assessment.", 0, 1, copyright);
2056        case 223539345: /*approvalDate*/  return new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate);
2057        case -1687512484: /*lastReviewDate*/  return new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate);
2058        case -1130056338: /*artifact[x]*/  return new Property("artifact[x]", "Reference(Any)|canonical|uri", "A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.", 0, 1, artifact);
2059        case -1228798510: /*artifact*/  return new Property("artifact[x]", "Reference(Any)|canonical|uri", "A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.", 0, 1, artifact);
2060        case -683686503: /*artifactReference*/  return new Property("artifact[x]", "Reference(Any)", "A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.", 0, 1, artifact);
2061        case 1069820738: /*artifactCanonical*/  return new Property("artifact[x]", "canonical", "A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.", 0, 1, artifact);
2062        case -1130062278: /*artifactUri*/  return new Property("artifact[x]", "uri", "A reference to a resource, canonical resource, or non-FHIR resource which the comment or assessment is about.", 0, 1, artifact);
2063        case 951530617: /*content*/  return new Property("content", "", "A component comment, classifier, or rating of the artifact.", 0, java.lang.Integer.MAX_VALUE, content);
2064        case 697796753: /*workflowStatus*/  return new Property("workflowStatus", "code", "Indicates the workflow status of the comment or change request.", 0, 1, workflowStatus);
2065        case 583380919: /*disposition*/  return new Property("disposition", "code", "Indicates the disposition of the responsible party to the comment or change request.", 0, 1, disposition);
2066        default: return super.getNamedProperty(_hash, _name, _checkValid);
2067        }
2068
2069      }
2070
2071      @Override
2072      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2073        switch (hash) {
2074        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2075        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
2076        case -1360156695: /*citeAs*/ return this.citeAs == null ? new Base[0] : new Base[] {this.citeAs}; // DataType
2077        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
2078        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
2079        case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType
2080        case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType
2081        case -1228798510: /*artifact*/ return this.artifact == null ? new Base[0] : new Base[] {this.artifact}; // DataType
2082        case 951530617: /*content*/ return this.content == null ? new Base[0] : this.content.toArray(new Base[this.content.size()]); // ArtifactAssessmentContentComponent
2083        case 697796753: /*workflowStatus*/ return this.workflowStatus == null ? new Base[0] : new Base[] {this.workflowStatus}; // Enumeration<ArtifactAssessmentWorkflowStatus>
2084        case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // Enumeration<ArtifactAssessmentDisposition>
2085        default: return super.getProperty(hash, name, checkValid);
2086        }
2087
2088      }
2089
2090      @Override
2091      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2092        switch (hash) {
2093        case -1618432855: // identifier
2094          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
2095          return value;
2096        case 110371416: // title
2097          this.title = TypeConvertor.castToString(value); // StringType
2098          return value;
2099        case -1360156695: // citeAs
2100          this.citeAs = TypeConvertor.castToType(value); // DataType
2101          return value;
2102        case 3076014: // date
2103          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
2104          return value;
2105        case 1522889671: // copyright
2106          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
2107          return value;
2108        case 223539345: // approvalDate
2109          this.approvalDate = TypeConvertor.castToDate(value); // DateType
2110          return value;
2111        case -1687512484: // lastReviewDate
2112          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
2113          return value;
2114        case -1228798510: // artifact
2115          this.artifact = TypeConvertor.castToType(value); // DataType
2116          return value;
2117        case 951530617: // content
2118          this.getContent().add((ArtifactAssessmentContentComponent) value); // ArtifactAssessmentContentComponent
2119          return value;
2120        case 697796753: // workflowStatus
2121          value = new ArtifactAssessmentWorkflowStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2122          this.workflowStatus = (Enumeration) value; // Enumeration<ArtifactAssessmentWorkflowStatus>
2123          return value;
2124        case 583380919: // disposition
2125          value = new ArtifactAssessmentDispositionEnumFactory().fromType(TypeConvertor.castToCode(value));
2126          this.disposition = (Enumeration) value; // Enumeration<ArtifactAssessmentDisposition>
2127          return value;
2128        default: return super.setProperty(hash, name, value);
2129        }
2130
2131      }
2132
2133      @Override
2134      public Base setProperty(String name, Base value) throws FHIRException {
2135        if (name.equals("identifier")) {
2136          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2137        } else if (name.equals("title")) {
2138          this.title = TypeConvertor.castToString(value); // StringType
2139        } else if (name.equals("citeAs[x]")) {
2140          this.citeAs = TypeConvertor.castToType(value); // DataType
2141        } else if (name.equals("date")) {
2142          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
2143        } else if (name.equals("copyright")) {
2144          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
2145        } else if (name.equals("approvalDate")) {
2146          this.approvalDate = TypeConvertor.castToDate(value); // DateType
2147        } else if (name.equals("lastReviewDate")) {
2148          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
2149        } else if (name.equals("artifact[x]")) {
2150          this.artifact = TypeConvertor.castToType(value); // DataType
2151        } else if (name.equals("content")) {
2152          this.getContent().add((ArtifactAssessmentContentComponent) value);
2153        } else if (name.equals("workflowStatus")) {
2154          value = new ArtifactAssessmentWorkflowStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2155          this.workflowStatus = (Enumeration) value; // Enumeration<ArtifactAssessmentWorkflowStatus>
2156        } else if (name.equals("disposition")) {
2157          value = new ArtifactAssessmentDispositionEnumFactory().fromType(TypeConvertor.castToCode(value));
2158          this.disposition = (Enumeration) value; // Enumeration<ArtifactAssessmentDisposition>
2159        } else
2160          return super.setProperty(name, value);
2161        return value;
2162      }
2163
2164      @Override
2165      public Base makeProperty(int hash, String name) throws FHIRException {
2166        switch (hash) {
2167        case -1618432855:  return addIdentifier(); 
2168        case 110371416:  return getTitleElement();
2169        case -1706539017:  return getCiteAs();
2170        case -1360156695:  return getCiteAs();
2171        case 3076014:  return getDateElement();
2172        case 1522889671:  return getCopyrightElement();
2173        case 223539345:  return getApprovalDateElement();
2174        case -1687512484:  return getLastReviewDateElement();
2175        case -1130056338:  return getArtifact();
2176        case -1228798510:  return getArtifact();
2177        case 951530617:  return addContent(); 
2178        case 697796753:  return getWorkflowStatusElement();
2179        case 583380919:  return getDispositionElement();
2180        default: return super.makeProperty(hash, name);
2181        }
2182
2183      }
2184
2185      @Override
2186      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2187        switch (hash) {
2188        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2189        case 110371416: /*title*/ return new String[] {"string"};
2190        case -1360156695: /*citeAs*/ return new String[] {"Reference", "markdown"};
2191        case 3076014: /*date*/ return new String[] {"dateTime"};
2192        case 1522889671: /*copyright*/ return new String[] {"markdown"};
2193        case 223539345: /*approvalDate*/ return new String[] {"date"};
2194        case -1687512484: /*lastReviewDate*/ return new String[] {"date"};
2195        case -1228798510: /*artifact*/ return new String[] {"Reference", "canonical", "uri"};
2196        case 951530617: /*content*/ return new String[] {};
2197        case 697796753: /*workflowStatus*/ return new String[] {"code"};
2198        case 583380919: /*disposition*/ return new String[] {"code"};
2199        default: return super.getTypesForProperty(hash, name);
2200        }
2201
2202      }
2203
2204      @Override
2205      public Base addChild(String name) throws FHIRException {
2206        if (name.equals("identifier")) {
2207          return addIdentifier();
2208        }
2209        else if (name.equals("title")) {
2210          throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.title");
2211        }
2212        else if (name.equals("citeAsReference")) {
2213          this.citeAs = new Reference();
2214          return this.citeAs;
2215        }
2216        else if (name.equals("citeAsMarkdown")) {
2217          this.citeAs = new MarkdownType();
2218          return this.citeAs;
2219        }
2220        else if (name.equals("date")) {
2221          throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.date");
2222        }
2223        else if (name.equals("copyright")) {
2224          throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.copyright");
2225        }
2226        else if (name.equals("approvalDate")) {
2227          throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.approvalDate");
2228        }
2229        else if (name.equals("lastReviewDate")) {
2230          throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.lastReviewDate");
2231        }
2232        else if (name.equals("artifactReference")) {
2233          this.artifact = new Reference();
2234          return this.artifact;
2235        }
2236        else if (name.equals("artifactCanonical")) {
2237          this.artifact = new CanonicalType();
2238          return this.artifact;
2239        }
2240        else if (name.equals("artifactUri")) {
2241          this.artifact = new UriType();
2242          return this.artifact;
2243        }
2244        else if (name.equals("content")) {
2245          return addContent();
2246        }
2247        else if (name.equals("workflowStatus")) {
2248          throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.workflowStatus");
2249        }
2250        else if (name.equals("disposition")) {
2251          throw new FHIRException("Cannot call addChild on a singleton property ArtifactAssessment.disposition");
2252        }
2253        else
2254          return super.addChild(name);
2255      }
2256
2257  public String fhirType() {
2258    return "ArtifactAssessment";
2259
2260  }
2261
2262      public ArtifactAssessment copy() {
2263        ArtifactAssessment dst = new ArtifactAssessment();
2264        copyValues(dst);
2265        return dst;
2266      }
2267
2268      public void copyValues(ArtifactAssessment dst) {
2269        super.copyValues(dst);
2270        if (identifier != null) {
2271          dst.identifier = new ArrayList<Identifier>();
2272          for (Identifier i : identifier)
2273            dst.identifier.add(i.copy());
2274        };
2275        dst.title = title == null ? null : title.copy();
2276        dst.citeAs = citeAs == null ? null : citeAs.copy();
2277        dst.date = date == null ? null : date.copy();
2278        dst.copyright = copyright == null ? null : copyright.copy();
2279        dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
2280        dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
2281        dst.artifact = artifact == null ? null : artifact.copy();
2282        if (content != null) {
2283          dst.content = new ArrayList<ArtifactAssessmentContentComponent>();
2284          for (ArtifactAssessmentContentComponent i : content)
2285            dst.content.add(i.copy());
2286        };
2287        dst.workflowStatus = workflowStatus == null ? null : workflowStatus.copy();
2288        dst.disposition = disposition == null ? null : disposition.copy();
2289      }
2290
2291      protected ArtifactAssessment typedCopy() {
2292        return copy();
2293      }
2294
2295      @Override
2296      public boolean equalsDeep(Base other_) {
2297        if (!super.equalsDeep(other_))
2298          return false;
2299        if (!(other_ instanceof ArtifactAssessment))
2300          return false;
2301        ArtifactAssessment o = (ArtifactAssessment) other_;
2302        return compareDeep(identifier, o.identifier, true) && compareDeep(title, o.title, true) && compareDeep(citeAs, o.citeAs, true)
2303           && compareDeep(date, o.date, true) && compareDeep(copyright, o.copyright, true) && compareDeep(approvalDate, o.approvalDate, true)
2304           && compareDeep(lastReviewDate, o.lastReviewDate, true) && compareDeep(artifact, o.artifact, true)
2305           && compareDeep(content, o.content, true) && compareDeep(workflowStatus, o.workflowStatus, true)
2306           && compareDeep(disposition, o.disposition, true);
2307      }
2308
2309      @Override
2310      public boolean equalsShallow(Base other_) {
2311        if (!super.equalsShallow(other_))
2312          return false;
2313        if (!(other_ instanceof ArtifactAssessment))
2314          return false;
2315        ArtifactAssessment o = (ArtifactAssessment) other_;
2316        return compareValues(title, o.title, true) && compareValues(date, o.date, true) && compareValues(copyright, o.copyright, true)
2317           && compareValues(approvalDate, o.approvalDate, true) && compareValues(lastReviewDate, o.lastReviewDate, true)
2318           && compareValues(workflowStatus, o.workflowStatus, true) && compareValues(disposition, o.disposition, true)
2319          ;
2320      }
2321
2322      public boolean isEmpty() {
2323        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, title, citeAs
2324          , date, copyright, approvalDate, lastReviewDate, artifact, content, workflowStatus
2325          , disposition);
2326      }
2327
2328  @Override
2329  public ResourceType getResourceType() {
2330    return ResourceType.ArtifactAssessment;
2331   }
2332
2333 /**
2334   * Search parameter: <b>date</b>
2335   * <p>
2336   * Description: <b>The artifact assessment publication date</b><br>
2337   * Type: <b>date</b><br>
2338   * Path: <b>ArtifactAssessment.date</b><br>
2339   * </p>
2340   */
2341  @SearchParamDefinition(name="date", path="ArtifactAssessment.date", description="The artifact assessment publication date", type="date" )
2342  public static final String SP_DATE = "date";
2343 /**
2344   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2345   * <p>
2346   * Description: <b>The artifact assessment publication date</b><br>
2347   * Type: <b>date</b><br>
2348   * Path: <b>ArtifactAssessment.date</b><br>
2349   * </p>
2350   */
2351  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2352
2353 /**
2354   * Search parameter: <b>identifier</b>
2355   * <p>
2356   * Description: <b>The artifact assessment identifier</b><br>
2357   * Type: <b>token</b><br>
2358   * Path: <b>ArtifactAssessment.identifier</b><br>
2359   * </p>
2360   */
2361  @SearchParamDefinition(name="identifier", path="ArtifactAssessment.identifier", description="The artifact assessment identifier", type="token" )
2362  public static final String SP_IDENTIFIER = "identifier";
2363 /**
2364   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2365   * <p>
2366   * Description: <b>The artifact assessment identifier</b><br>
2367   * Type: <b>token</b><br>
2368   * Path: <b>ArtifactAssessment.identifier</b><br>
2369   * </p>
2370   */
2371  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2372
2373
2374}
2375