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