001package org.hl7.fhir.dstu2.model;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2
036import java.util.ArrayList;
037import java.util.List;
038
039import ca.uhn.fhir.model.api.annotation.Block;
040import ca.uhn.fhir.model.api.annotation.Child;
041import ca.uhn.fhir.model.api.annotation.Description;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
044import org.hl7.fhir.instance.model.api.IBaseOperationOutcome;
045import org.hl7.fhir.exceptions.FHIRException;
046import org.hl7.fhir.utilities.Utilities;
047/**
048 * A collection of error, warning or information messages that result from a system action.
049 */
050@ResourceDef(name="OperationOutcome", profile="http://hl7.org/fhir/Profile/OperationOutcome")
051public class OperationOutcome extends DomainResource implements IBaseOperationOutcome {
052
053    public enum IssueSeverity {
054        /**
055         * The issue caused the action to fail, and no further checking could be performed.
056         */
057        FATAL, 
058        /**
059         * The issue is sufficiently important to cause the action to fail.
060         */
061        ERROR, 
062        /**
063         * The issue is not important enough to cause the action to fail, but may cause it to be performed suboptimally or in a way that is not as desired.
064         */
065        WARNING, 
066        /**
067         * The issue has no relation to the degree of success of the action.
068         */
069        INFORMATION, 
070        /**
071         * added to help the parsers
072         */
073        NULL;
074        public static IssueSeverity fromCode(String codeString) throws FHIRException {
075            if (codeString == null || "".equals(codeString))
076                return null;
077        if ("fatal".equals(codeString))
078          return FATAL;
079        if ("error".equals(codeString))
080          return ERROR;
081        if ("warning".equals(codeString))
082          return WARNING;
083        if ("information".equals(codeString))
084          return INFORMATION;
085        throw new FHIRException("Unknown IssueSeverity code '"+codeString+"'");
086        }
087        public String toCode() {
088          switch (this) {
089            case FATAL: return "fatal";
090            case ERROR: return "error";
091            case WARNING: return "warning";
092            case INFORMATION: return "information";
093            case NULL: return null;
094            default: return "?";
095          }
096        }
097        public String getSystem() {
098          switch (this) {
099            case FATAL: return "http://hl7.org/fhir/issue-severity";
100            case ERROR: return "http://hl7.org/fhir/issue-severity";
101            case WARNING: return "http://hl7.org/fhir/issue-severity";
102            case INFORMATION: return "http://hl7.org/fhir/issue-severity";
103            case NULL: return null;
104            default: return "?";
105          }
106        }
107        public String getDefinition() {
108          switch (this) {
109            case FATAL: return "The issue caused the action to fail, and no further checking could be performed.";
110            case ERROR: return "The issue is sufficiently important to cause the action to fail.";
111            case WARNING: return "The issue is not important enough to cause the action to fail, but may cause it to be performed suboptimally or in a way that is not as desired.";
112            case INFORMATION: return "The issue has no relation to the degree of success of the action.";
113            case NULL: return null;
114            default: return "?";
115          }
116        }
117        public String getDisplay() {
118          switch (this) {
119            case FATAL: return "Fatal";
120            case ERROR: return "Error";
121            case WARNING: return "Warning";
122            case INFORMATION: return "Information";
123            case NULL: return null;
124            default: return "?";
125          }
126        }
127    }
128
129  public static class IssueSeverityEnumFactory implements EnumFactory<IssueSeverity> {
130    public IssueSeverity fromCode(String codeString) throws IllegalArgumentException {
131      if (codeString == null || "".equals(codeString))
132            if (codeString == null || "".equals(codeString))
133                return null;
134        if ("fatal".equals(codeString))
135          return IssueSeverity.FATAL;
136        if ("error".equals(codeString))
137          return IssueSeverity.ERROR;
138        if ("warning".equals(codeString))
139          return IssueSeverity.WARNING;
140        if ("information".equals(codeString))
141          return IssueSeverity.INFORMATION;
142        throw new IllegalArgumentException("Unknown IssueSeverity code '"+codeString+"'");
143        }
144        public Enumeration<IssueSeverity> fromType(Base code) throws FHIRException {
145          if (code == null || code.isEmpty())
146            return null;
147          String codeString = ((PrimitiveType) code).asStringValue();
148          if (codeString == null || "".equals(codeString))
149            return null;
150        if ("fatal".equals(codeString))
151          return new Enumeration<IssueSeverity>(this, IssueSeverity.FATAL);
152        if ("error".equals(codeString))
153          return new Enumeration<IssueSeverity>(this, IssueSeverity.ERROR);
154        if ("warning".equals(codeString))
155          return new Enumeration<IssueSeverity>(this, IssueSeverity.WARNING);
156        if ("information".equals(codeString))
157          return new Enumeration<IssueSeverity>(this, IssueSeverity.INFORMATION);
158        throw new FHIRException("Unknown IssueSeverity code '"+codeString+"'");
159        }
160    public String toCode(IssueSeverity code) {
161      if (code == IssueSeverity.FATAL)
162        return "fatal";
163      if (code == IssueSeverity.ERROR)
164        return "error";
165      if (code == IssueSeverity.WARNING)
166        return "warning";
167      if (code == IssueSeverity.INFORMATION)
168        return "information";
169      return "?";
170      }
171    }
172
173    public enum IssueType {
174        /**
175         * Content invalid against the specification or a profile.
176         */
177        INVALID, 
178        /**
179         * A structural issue in the content such as wrong namespace, or unable to parse the content completely, or invalid json syntax.
180         */
181        STRUCTURE, 
182        /**
183         * A required element is missing.
184         */
185        REQUIRED, 
186        /**
187         * An element value is invalid.
188         */
189        VALUE, 
190        /**
191         * A content validation rule failed - e.g. a schematron rule.
192         */
193        INVARIANT, 
194        /**
195         * An authentication/authorization/permissions issue of some kind.
196         */
197        SECURITY, 
198        /**
199         * The client needs to initiate an authentication process.
200         */
201        LOGIN, 
202        /**
203         * The user or system was not able to be authenticated (either there is no process, or the proferred token is unacceptable).
204         */
205        UNKNOWN, 
206        /**
207         * User session expired; a login may be required.
208         */
209        EXPIRED, 
210        /**
211         * The user does not have the rights to perform this action.
212         */
213        FORBIDDEN, 
214        /**
215         * Some information was not or may not have been returned due to business rules, consent or privacy rules, or access permission constraints.  This information may be accessible through alternate processes.
216         */
217        SUPPRESSED, 
218        /**
219         * Processing issues. These are expected to be final e.g. there is no point resubmitting the same content unchanged.
220         */
221        PROCESSING, 
222        /**
223         * The resource or profile is not supported.
224         */
225        NOTSUPPORTED, 
226        /**
227         * An attempt was made to create a duplicate record.
228         */
229        DUPLICATE, 
230        /**
231         * The reference provided was not found. In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the content is not found further into the application architecture.
232         */
233        NOTFOUND, 
234        /**
235         * Provided content is too long (typically, this is a denial of service protection type of error).
236         */
237        TOOLONG, 
238        /**
239         * The code or system could not be understood, or it was not valid in the context of a particular ValueSet.code.
240         */
241        CODEINVALID, 
242        /**
243         * An extension was found that was not acceptable, could not be resolved, or a modifierExtension was not recognized.
244         */
245        EXTENSION, 
246        /**
247         * The operation was stopped to protect server resources; e.g. a request for a value set expansion on all of SNOMED CT.
248         */
249        TOOCOSTLY, 
250        /**
251         * The content/operation failed to pass some business rule, and so could not proceed.
252         */
253        BUSINESSRULE, 
254        /**
255         * Content could not be accepted because of an edit conflict (i.e. version aware updates) (In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the conflict is discovered further into the application architecture.)
256         */
257        CONFLICT, 
258        /**
259         * Not all data sources typically accessed could be reached, or responded in time, so the returned information may not be complete.
260         */
261        INCOMPLETE, 
262        /**
263         * Transient processing issues. The system receiving the error may be able to resubmit the same content once an underlying issue is resolved.
264         */
265        TRANSIENT, 
266        /**
267         * A resource/record locking failure (usually in an underlying database).
268         */
269        LOCKERROR, 
270        /**
271         * The persistent store is unavailable; e.g. the database is down for maintenance or similar action.
272         */
273        NOSTORE, 
274        /**
275         * An unexpected internal error has occurred.
276         */
277        EXCEPTION, 
278        /**
279         * An internal timeout has occurred.
280         */
281        TIMEOUT, 
282        /**
283         * The system is not prepared to handle this request due to load management.
284         */
285        THROTTLED, 
286        /**
287         * A message unrelated to the processing success of the completed operation (examples of the latter include things like reminders of password expiry, system maintenance times, etc.).
288         */
289        INFORMATIONAL, 
290        /**
291         * added to help the parsers
292         */
293        NULL;
294        public static IssueType fromCode(String codeString) throws FHIRException {
295            if (codeString == null || "".equals(codeString))
296                return null;
297        if ("invalid".equals(codeString))
298          return INVALID;
299        if ("structure".equals(codeString))
300          return STRUCTURE;
301        if ("required".equals(codeString))
302          return REQUIRED;
303        if ("value".equals(codeString))
304          return VALUE;
305        if ("invariant".equals(codeString))
306          return INVARIANT;
307        if ("security".equals(codeString))
308          return SECURITY;
309        if ("login".equals(codeString))
310          return LOGIN;
311        if ("unknown".equals(codeString))
312          return UNKNOWN;
313        if ("expired".equals(codeString))
314          return EXPIRED;
315        if ("forbidden".equals(codeString))
316          return FORBIDDEN;
317        if ("suppressed".equals(codeString))
318          return SUPPRESSED;
319        if ("processing".equals(codeString))
320          return PROCESSING;
321        if ("not-supported".equals(codeString))
322          return NOTSUPPORTED;
323        if ("duplicate".equals(codeString))
324          return DUPLICATE;
325        if ("not-found".equals(codeString))
326          return NOTFOUND;
327        if ("too-long".equals(codeString))
328          return TOOLONG;
329        if ("code-invalid".equals(codeString))
330          return CODEINVALID;
331        if ("extension".equals(codeString))
332          return EXTENSION;
333        if ("too-costly".equals(codeString))
334          return TOOCOSTLY;
335        if ("business-rule".equals(codeString))
336          return BUSINESSRULE;
337        if ("conflict".equals(codeString))
338          return CONFLICT;
339        if ("incomplete".equals(codeString))
340          return INCOMPLETE;
341        if ("transient".equals(codeString))
342          return TRANSIENT;
343        if ("lock-error".equals(codeString))
344          return LOCKERROR;
345        if ("no-store".equals(codeString))
346          return NOSTORE;
347        if ("exception".equals(codeString))
348          return EXCEPTION;
349        if ("timeout".equals(codeString))
350          return TIMEOUT;
351        if ("throttled".equals(codeString))
352          return THROTTLED;
353        if ("informational".equals(codeString))
354          return INFORMATIONAL;
355        throw new FHIRException("Unknown IssueType code '"+codeString+"'");
356        }
357        public String toCode() {
358          switch (this) {
359            case INVALID: return "invalid";
360            case STRUCTURE: return "structure";
361            case REQUIRED: return "required";
362            case VALUE: return "value";
363            case INVARIANT: return "invariant";
364            case SECURITY: return "security";
365            case LOGIN: return "login";
366            case UNKNOWN: return "unknown";
367            case EXPIRED: return "expired";
368            case FORBIDDEN: return "forbidden";
369            case SUPPRESSED: return "suppressed";
370            case PROCESSING: return "processing";
371            case NOTSUPPORTED: return "not-supported";
372            case DUPLICATE: return "duplicate";
373            case NOTFOUND: return "not-found";
374            case TOOLONG: return "too-long";
375            case CODEINVALID: return "code-invalid";
376            case EXTENSION: return "extension";
377            case TOOCOSTLY: return "too-costly";
378            case BUSINESSRULE: return "business-rule";
379            case CONFLICT: return "conflict";
380            case INCOMPLETE: return "incomplete";
381            case TRANSIENT: return "transient";
382            case LOCKERROR: return "lock-error";
383            case NOSTORE: return "no-store";
384            case EXCEPTION: return "exception";
385            case TIMEOUT: return "timeout";
386            case THROTTLED: return "throttled";
387            case INFORMATIONAL: return "informational";
388            case NULL: return null;
389            default: return "?";
390          }
391        }
392        public String getSystem() {
393          switch (this) {
394            case INVALID: return "http://hl7.org/fhir/issue-type";
395            case STRUCTURE: return "http://hl7.org/fhir/issue-type";
396            case REQUIRED: return "http://hl7.org/fhir/issue-type";
397            case VALUE: return "http://hl7.org/fhir/issue-type";
398            case INVARIANT: return "http://hl7.org/fhir/issue-type";
399            case SECURITY: return "http://hl7.org/fhir/issue-type";
400            case LOGIN: return "http://hl7.org/fhir/issue-type";
401            case UNKNOWN: return "http://hl7.org/fhir/issue-type";
402            case EXPIRED: return "http://hl7.org/fhir/issue-type";
403            case FORBIDDEN: return "http://hl7.org/fhir/issue-type";
404            case SUPPRESSED: return "http://hl7.org/fhir/issue-type";
405            case PROCESSING: return "http://hl7.org/fhir/issue-type";
406            case NOTSUPPORTED: return "http://hl7.org/fhir/issue-type";
407            case DUPLICATE: return "http://hl7.org/fhir/issue-type";
408            case NOTFOUND: return "http://hl7.org/fhir/issue-type";
409            case TOOLONG: return "http://hl7.org/fhir/issue-type";
410            case CODEINVALID: return "http://hl7.org/fhir/issue-type";
411            case EXTENSION: return "http://hl7.org/fhir/issue-type";
412            case TOOCOSTLY: return "http://hl7.org/fhir/issue-type";
413            case BUSINESSRULE: return "http://hl7.org/fhir/issue-type";
414            case CONFLICT: return "http://hl7.org/fhir/issue-type";
415            case INCOMPLETE: return "http://hl7.org/fhir/issue-type";
416            case TRANSIENT: return "http://hl7.org/fhir/issue-type";
417            case LOCKERROR: return "http://hl7.org/fhir/issue-type";
418            case NOSTORE: return "http://hl7.org/fhir/issue-type";
419            case EXCEPTION: return "http://hl7.org/fhir/issue-type";
420            case TIMEOUT: return "http://hl7.org/fhir/issue-type";
421            case THROTTLED: return "http://hl7.org/fhir/issue-type";
422            case INFORMATIONAL: return "http://hl7.org/fhir/issue-type";
423            case NULL: return null;
424            default: return "?";
425          }
426        }
427        public String getDefinition() {
428          switch (this) {
429            case INVALID: return "Content invalid against the specification or a profile.";
430            case STRUCTURE: return "A structural issue in the content such as wrong namespace, or unable to parse the content completely, or invalid json syntax.";
431            case REQUIRED: return "A required element is missing.";
432            case VALUE: return "An element value is invalid.";
433            case INVARIANT: return "A content validation rule failed - e.g. a schematron rule.";
434            case SECURITY: return "An authentication/authorization/permissions issue of some kind.";
435            case LOGIN: return "The client needs to initiate an authentication process.";
436            case UNKNOWN: return "The user or system was not able to be authenticated (either there is no process, or the proferred token is unacceptable).";
437            case EXPIRED: return "User session expired; a login may be required.";
438            case FORBIDDEN: return "The user does not have the rights to perform this action.";
439            case SUPPRESSED: return "Some information was not or may not have been returned due to business rules, consent or privacy rules, or access permission constraints.  This information may be accessible through alternate processes.";
440            case PROCESSING: return "Processing issues. These are expected to be final e.g. there is no point resubmitting the same content unchanged.";
441            case NOTSUPPORTED: return "The resource or profile is not supported.";
442            case DUPLICATE: return "An attempt was made to create a duplicate record.";
443            case NOTFOUND: return "The reference provided was not found. In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the content is not found further into the application architecture.";
444            case TOOLONG: return "Provided content is too long (typically, this is a denial of service protection type of error).";
445            case CODEINVALID: return "The code or system could not be understood, or it was not valid in the context of a particular ValueSet.code.";
446            case EXTENSION: return "An extension was found that was not acceptable, could not be resolved, or a modifierExtension was not recognized.";
447            case TOOCOSTLY: return "The operation was stopped to protect server resources; e.g. a request for a value set expansion on all of SNOMED CT.";
448            case BUSINESSRULE: return "The content/operation failed to pass some business rule, and so could not proceed.";
449            case CONFLICT: return "Content could not be accepted because of an edit conflict (i.e. version aware updates) (In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the conflict is discovered further into the application architecture.)";
450            case INCOMPLETE: return "Not all data sources typically accessed could be reached, or responded in time, so the returned information may not be complete.";
451            case TRANSIENT: return "Transient processing issues. The system receiving the error may be able to resubmit the same content once an underlying issue is resolved.";
452            case LOCKERROR: return "A resource/record locking failure (usually in an underlying database).";
453            case NOSTORE: return "The persistent store is unavailable; e.g. the database is down for maintenance or similar action.";
454            case EXCEPTION: return "An unexpected internal error has occurred.";
455            case TIMEOUT: return "An internal timeout has occurred.";
456            case THROTTLED: return "The system is not prepared to handle this request due to load management.";
457            case INFORMATIONAL: return "A message unrelated to the processing success of the completed operation (examples of the latter include things like reminders of password expiry, system maintenance times, etc.).";
458            case NULL: return null;
459            default: return "?";
460          }
461        }
462        public String getDisplay() {
463          switch (this) {
464            case INVALID: return "Invalid Content";
465            case STRUCTURE: return "Structural Issue";
466            case REQUIRED: return "Required element missing";
467            case VALUE: return "Element value invalid";
468            case INVARIANT: return "Validation rule failed";
469            case SECURITY: return "Security Problem";
470            case LOGIN: return "Login Required";
471            case UNKNOWN: return "Unknown User";
472            case EXPIRED: return "Session Expired";
473            case FORBIDDEN: return "Forbidden";
474            case SUPPRESSED: return "Information  Suppressed";
475            case PROCESSING: return "Processing Failure";
476            case NOTSUPPORTED: return "Content not supported";
477            case DUPLICATE: return "Duplicate";
478            case NOTFOUND: return "Not Found";
479            case TOOLONG: return "Content Too Long";
480            case CODEINVALID: return "Invalid Code";
481            case EXTENSION: return "Unacceptable Extension";
482            case TOOCOSTLY: return "Operation Too Costly";
483            case BUSINESSRULE: return "Business Rule Violation";
484            case CONFLICT: return "Edit Version Conflict";
485            case INCOMPLETE: return "Incomplete Results";
486            case TRANSIENT: return "Transient Issue";
487            case LOCKERROR: return "Lock Error";
488            case NOSTORE: return "No Store Available";
489            case EXCEPTION: return "Exception";
490            case TIMEOUT: return "Timeout";
491            case THROTTLED: return "Throttled";
492            case INFORMATIONAL: return "Informational Note";
493            case NULL: return null;
494            default: return "?";
495          }
496        }
497    }
498
499  public static class IssueTypeEnumFactory implements EnumFactory<IssueType> {
500    public IssueType fromCode(String codeString) throws IllegalArgumentException {
501      if (codeString == null || "".equals(codeString))
502            if (codeString == null || "".equals(codeString))
503                return null;
504        if ("invalid".equals(codeString))
505          return IssueType.INVALID;
506        if ("structure".equals(codeString))
507          return IssueType.STRUCTURE;
508        if ("required".equals(codeString))
509          return IssueType.REQUIRED;
510        if ("value".equals(codeString))
511          return IssueType.VALUE;
512        if ("invariant".equals(codeString))
513          return IssueType.INVARIANT;
514        if ("security".equals(codeString))
515          return IssueType.SECURITY;
516        if ("login".equals(codeString))
517          return IssueType.LOGIN;
518        if ("unknown".equals(codeString))
519          return IssueType.UNKNOWN;
520        if ("expired".equals(codeString))
521          return IssueType.EXPIRED;
522        if ("forbidden".equals(codeString))
523          return IssueType.FORBIDDEN;
524        if ("suppressed".equals(codeString))
525          return IssueType.SUPPRESSED;
526        if ("processing".equals(codeString))
527          return IssueType.PROCESSING;
528        if ("not-supported".equals(codeString))
529          return IssueType.NOTSUPPORTED;
530        if ("duplicate".equals(codeString))
531          return IssueType.DUPLICATE;
532        if ("not-found".equals(codeString))
533          return IssueType.NOTFOUND;
534        if ("too-long".equals(codeString))
535          return IssueType.TOOLONG;
536        if ("code-invalid".equals(codeString))
537          return IssueType.CODEINVALID;
538        if ("extension".equals(codeString))
539          return IssueType.EXTENSION;
540        if ("too-costly".equals(codeString))
541          return IssueType.TOOCOSTLY;
542        if ("business-rule".equals(codeString))
543          return IssueType.BUSINESSRULE;
544        if ("conflict".equals(codeString))
545          return IssueType.CONFLICT;
546        if ("incomplete".equals(codeString))
547          return IssueType.INCOMPLETE;
548        if ("transient".equals(codeString))
549          return IssueType.TRANSIENT;
550        if ("lock-error".equals(codeString))
551          return IssueType.LOCKERROR;
552        if ("no-store".equals(codeString))
553          return IssueType.NOSTORE;
554        if ("exception".equals(codeString))
555          return IssueType.EXCEPTION;
556        if ("timeout".equals(codeString))
557          return IssueType.TIMEOUT;
558        if ("throttled".equals(codeString))
559          return IssueType.THROTTLED;
560        if ("informational".equals(codeString))
561          return IssueType.INFORMATIONAL;
562        throw new IllegalArgumentException("Unknown IssueType code '"+codeString+"'");
563        }
564        public Enumeration<IssueType> fromType(Base code) throws FHIRException {
565          if (code == null || code.isEmpty())
566            return null;
567          String codeString = ((PrimitiveType) code).asStringValue();
568          if (codeString == null || "".equals(codeString))
569            return null;
570        if ("invalid".equals(codeString))
571          return new Enumeration<IssueType>(this, IssueType.INVALID);
572        if ("structure".equals(codeString))
573          return new Enumeration<IssueType>(this, IssueType.STRUCTURE);
574        if ("required".equals(codeString))
575          return new Enumeration<IssueType>(this, IssueType.REQUIRED);
576        if ("value".equals(codeString))
577          return new Enumeration<IssueType>(this, IssueType.VALUE);
578        if ("invariant".equals(codeString))
579          return new Enumeration<IssueType>(this, IssueType.INVARIANT);
580        if ("security".equals(codeString))
581          return new Enumeration<IssueType>(this, IssueType.SECURITY);
582        if ("login".equals(codeString))
583          return new Enumeration<IssueType>(this, IssueType.LOGIN);
584        if ("unknown".equals(codeString))
585          return new Enumeration<IssueType>(this, IssueType.UNKNOWN);
586        if ("expired".equals(codeString))
587          return new Enumeration<IssueType>(this, IssueType.EXPIRED);
588        if ("forbidden".equals(codeString))
589          return new Enumeration<IssueType>(this, IssueType.FORBIDDEN);
590        if ("suppressed".equals(codeString))
591          return new Enumeration<IssueType>(this, IssueType.SUPPRESSED);
592        if ("processing".equals(codeString))
593          return new Enumeration<IssueType>(this, IssueType.PROCESSING);
594        if ("not-supported".equals(codeString))
595          return new Enumeration<IssueType>(this, IssueType.NOTSUPPORTED);
596        if ("duplicate".equals(codeString))
597          return new Enumeration<IssueType>(this, IssueType.DUPLICATE);
598        if ("not-found".equals(codeString))
599          return new Enumeration<IssueType>(this, IssueType.NOTFOUND);
600        if ("too-long".equals(codeString))
601          return new Enumeration<IssueType>(this, IssueType.TOOLONG);
602        if ("code-invalid".equals(codeString))
603          return new Enumeration<IssueType>(this, IssueType.CODEINVALID);
604        if ("extension".equals(codeString))
605          return new Enumeration<IssueType>(this, IssueType.EXTENSION);
606        if ("too-costly".equals(codeString))
607          return new Enumeration<IssueType>(this, IssueType.TOOCOSTLY);
608        if ("business-rule".equals(codeString))
609          return new Enumeration<IssueType>(this, IssueType.BUSINESSRULE);
610        if ("conflict".equals(codeString))
611          return new Enumeration<IssueType>(this, IssueType.CONFLICT);
612        if ("incomplete".equals(codeString))
613          return new Enumeration<IssueType>(this, IssueType.INCOMPLETE);
614        if ("transient".equals(codeString))
615          return new Enumeration<IssueType>(this, IssueType.TRANSIENT);
616        if ("lock-error".equals(codeString))
617          return new Enumeration<IssueType>(this, IssueType.LOCKERROR);
618        if ("no-store".equals(codeString))
619          return new Enumeration<IssueType>(this, IssueType.NOSTORE);
620        if ("exception".equals(codeString))
621          return new Enumeration<IssueType>(this, IssueType.EXCEPTION);
622        if ("timeout".equals(codeString))
623          return new Enumeration<IssueType>(this, IssueType.TIMEOUT);
624        if ("throttled".equals(codeString))
625          return new Enumeration<IssueType>(this, IssueType.THROTTLED);
626        if ("informational".equals(codeString))
627          return new Enumeration<IssueType>(this, IssueType.INFORMATIONAL);
628        throw new FHIRException("Unknown IssueType code '"+codeString+"'");
629        }
630    public String toCode(IssueType code) {
631      if (code == IssueType.INVALID)
632        return "invalid";
633      if (code == IssueType.STRUCTURE)
634        return "structure";
635      if (code == IssueType.REQUIRED)
636        return "required";
637      if (code == IssueType.VALUE)
638        return "value";
639      if (code == IssueType.INVARIANT)
640        return "invariant";
641      if (code == IssueType.SECURITY)
642        return "security";
643      if (code == IssueType.LOGIN)
644        return "login";
645      if (code == IssueType.UNKNOWN)
646        return "unknown";
647      if (code == IssueType.EXPIRED)
648        return "expired";
649      if (code == IssueType.FORBIDDEN)
650        return "forbidden";
651      if (code == IssueType.SUPPRESSED)
652        return "suppressed";
653      if (code == IssueType.PROCESSING)
654        return "processing";
655      if (code == IssueType.NOTSUPPORTED)
656        return "not-supported";
657      if (code == IssueType.DUPLICATE)
658        return "duplicate";
659      if (code == IssueType.NOTFOUND)
660        return "not-found";
661      if (code == IssueType.TOOLONG)
662        return "too-long";
663      if (code == IssueType.CODEINVALID)
664        return "code-invalid";
665      if (code == IssueType.EXTENSION)
666        return "extension";
667      if (code == IssueType.TOOCOSTLY)
668        return "too-costly";
669      if (code == IssueType.BUSINESSRULE)
670        return "business-rule";
671      if (code == IssueType.CONFLICT)
672        return "conflict";
673      if (code == IssueType.INCOMPLETE)
674        return "incomplete";
675      if (code == IssueType.TRANSIENT)
676        return "transient";
677      if (code == IssueType.LOCKERROR)
678        return "lock-error";
679      if (code == IssueType.NOSTORE)
680        return "no-store";
681      if (code == IssueType.EXCEPTION)
682        return "exception";
683      if (code == IssueType.TIMEOUT)
684        return "timeout";
685      if (code == IssueType.THROTTLED)
686        return "throttled";
687      if (code == IssueType.INFORMATIONAL)
688        return "informational";
689      return "?";
690      }
691    }
692
693    @Block()
694    public static class OperationOutcomeIssueComponent extends BackboneElement implements IBaseBackboneElement {
695        /**
696         * Indicates whether the issue indicates a variation from successful processing.
697         */
698        @Child(name = "severity", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
699        @Description(shortDefinition="fatal | error | warning | information", formalDefinition="Indicates whether the issue indicates a variation from successful processing." )
700        protected Enumeration<IssueSeverity> severity;
701
702        /**
703         * Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.
704         */
705        @Child(name = "code", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true)
706        @Description(shortDefinition="Error or warning code", formalDefinition="Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element." )
707        protected Enumeration<IssueType> code;
708
709        /**
710         * Additional details about the error. This may be a text description of the error, or a system code that identifies the error.
711         */
712        @Child(name = "details", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true)
713        @Description(shortDefinition="Additional details about the error", formalDefinition="Additional details about the error. This may be a text description of the error, or a system code that identifies the error." )
714        protected CodeableConcept details;
715
716        /**
717         * Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.
718         */
719        @Child(name = "diagnostics", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
720        @Description(shortDefinition="Additional diagnostic information about the issue", formalDefinition="Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue." )
721        protected StringType diagnostics;
722
723        /**
724         * A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.
725         */
726        @Child(name = "location", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
727        @Description(shortDefinition="XPath of element(s) related to issue", formalDefinition="A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised." )
728        protected List<StringType> location;
729
730        private static final long serialVersionUID = 930165515L;
731
732    /*
733     * Constructor
734     */
735      public OperationOutcomeIssueComponent() {
736        super();
737      }
738
739    /*
740     * Constructor
741     */
742      public OperationOutcomeIssueComponent(Enumeration<IssueSeverity> severity, Enumeration<IssueType> code) {
743        super();
744        this.severity = severity;
745        this.code = code;
746      }
747
748        /**
749         * @return {@link #severity} (Indicates whether the issue indicates a variation from successful processing.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value
750         */
751        public Enumeration<IssueSeverity> getSeverityElement() { 
752          if (this.severity == null)
753            if (Configuration.errorOnAutoCreate())
754              throw new Error("Attempt to auto-create OperationOutcomeIssueComponent.severity");
755            else if (Configuration.doAutoCreate())
756              this.severity = new Enumeration<IssueSeverity>(new IssueSeverityEnumFactory()); // bb
757          return this.severity;
758        }
759
760        public boolean hasSeverityElement() { 
761          return this.severity != null && !this.severity.isEmpty();
762        }
763
764        public boolean hasSeverity() { 
765          return this.severity != null && !this.severity.isEmpty();
766        }
767
768        /**
769         * @param value {@link #severity} (Indicates whether the issue indicates a variation from successful processing.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value
770         */
771        public OperationOutcomeIssueComponent setSeverityElement(Enumeration<IssueSeverity> value) { 
772          this.severity = value;
773          return this;
774        }
775
776        /**
777         * @return Indicates whether the issue indicates a variation from successful processing.
778         */
779        public IssueSeverity getSeverity() { 
780          return this.severity == null ? null : this.severity.getValue();
781        }
782
783        /**
784         * @param value Indicates whether the issue indicates a variation from successful processing.
785         */
786        public OperationOutcomeIssueComponent setSeverity(IssueSeverity value) { 
787            if (this.severity == null)
788              this.severity = new Enumeration<IssueSeverity>(new IssueSeverityEnumFactory());
789            this.severity.setValue(value);
790          return this;
791        }
792
793        /**
794         * @return {@link #code} (Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
795         */
796        public Enumeration<IssueType> getCodeElement() { 
797          if (this.code == null)
798            if (Configuration.errorOnAutoCreate())
799              throw new Error("Attempt to auto-create OperationOutcomeIssueComponent.code");
800            else if (Configuration.doAutoCreate())
801              this.code = new Enumeration<IssueType>(new IssueTypeEnumFactory()); // bb
802          return this.code;
803        }
804
805        public boolean hasCodeElement() { 
806          return this.code != null && !this.code.isEmpty();
807        }
808
809        public boolean hasCode() { 
810          return this.code != null && !this.code.isEmpty();
811        }
812
813        /**
814         * @param value {@link #code} (Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
815         */
816        public OperationOutcomeIssueComponent setCodeElement(Enumeration<IssueType> value) { 
817          this.code = value;
818          return this;
819        }
820
821        /**
822         * @return Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.
823         */
824        public IssueType getCode() { 
825          return this.code == null ? null : this.code.getValue();
826        }
827
828        /**
829         * @param value Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.
830         */
831        public OperationOutcomeIssueComponent setCode(IssueType value) { 
832            if (this.code == null)
833              this.code = new Enumeration<IssueType>(new IssueTypeEnumFactory());
834            this.code.setValue(value);
835          return this;
836        }
837
838        /**
839         * @return {@link #details} (Additional details about the error. This may be a text description of the error, or a system code that identifies the error.)
840         */
841        public CodeableConcept getDetails() { 
842          if (this.details == null)
843            if (Configuration.errorOnAutoCreate())
844              throw new Error("Attempt to auto-create OperationOutcomeIssueComponent.details");
845            else if (Configuration.doAutoCreate())
846              this.details = new CodeableConcept(); // cc
847          return this.details;
848        }
849
850        public boolean hasDetails() { 
851          return this.details != null && !this.details.isEmpty();
852        }
853
854        /**
855         * @param value {@link #details} (Additional details about the error. This may be a text description of the error, or a system code that identifies the error.)
856         */
857        public OperationOutcomeIssueComponent setDetails(CodeableConcept value) { 
858          this.details = value;
859          return this;
860        }
861
862        /**
863         * @return {@link #diagnostics} (Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.). This is the underlying object with id, value and extensions. The accessor "getDiagnostics" gives direct access to the value
864         */
865        public StringType getDiagnosticsElement() { 
866          if (this.diagnostics == null)
867            if (Configuration.errorOnAutoCreate())
868              throw new Error("Attempt to auto-create OperationOutcomeIssueComponent.diagnostics");
869            else if (Configuration.doAutoCreate())
870              this.diagnostics = new StringType(); // bb
871          return this.diagnostics;
872        }
873
874        public boolean hasDiagnosticsElement() { 
875          return this.diagnostics != null && !this.diagnostics.isEmpty();
876        }
877
878        public boolean hasDiagnostics() { 
879          return this.diagnostics != null && !this.diagnostics.isEmpty();
880        }
881
882        /**
883         * @param value {@link #diagnostics} (Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.). This is the underlying object with id, value and extensions. The accessor "getDiagnostics" gives direct access to the value
884         */
885        public OperationOutcomeIssueComponent setDiagnosticsElement(StringType value) { 
886          this.diagnostics = value;
887          return this;
888        }
889
890        /**
891         * @return Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.
892         */
893        public String getDiagnostics() { 
894          return this.diagnostics == null ? null : this.diagnostics.getValue();
895        }
896
897        /**
898         * @param value Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.
899         */
900        public OperationOutcomeIssueComponent setDiagnostics(String value) { 
901          if (Utilities.noString(value))
902            this.diagnostics = null;
903          else {
904            if (this.diagnostics == null)
905              this.diagnostics = new StringType();
906            this.diagnostics.setValue(value);
907          }
908          return this;
909        }
910
911        /**
912         * @return {@link #location} (A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.)
913         */
914        public List<StringType> getLocation() { 
915          if (this.location == null)
916            this.location = new ArrayList<StringType>();
917          return this.location;
918        }
919
920        public boolean hasLocation() { 
921          if (this.location == null)
922            return false;
923          for (StringType item : this.location)
924            if (!item.isEmpty())
925              return true;
926          return false;
927        }
928
929        /**
930         * @return {@link #location} (A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.)
931         */
932    // syntactic sugar
933        public StringType addLocationElement() {//2 
934          StringType t = new StringType();
935          if (this.location == null)
936            this.location = new ArrayList<StringType>();
937          this.location.add(t);
938          return t;
939        }
940
941        /**
942         * @param value {@link #location} (A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.)
943         */
944        public OperationOutcomeIssueComponent addLocation(String value) { //1
945          StringType t = new StringType();
946          t.setValue(value);
947          if (this.location == null)
948            this.location = new ArrayList<StringType>();
949          this.location.add(t);
950          return this;
951        }
952
953        /**
954         * @param value {@link #location} (A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.)
955         */
956        public boolean hasLocation(String value) { 
957          if (this.location == null)
958            return false;
959          for (StringType v : this.location)
960            if (v.equals(value)) // string
961              return true;
962          return false;
963        }
964
965        protected void listChildren(List<Property> childrenList) {
966          super.listChildren(childrenList);
967          childrenList.add(new Property("severity", "code", "Indicates whether the issue indicates a variation from successful processing.", 0, java.lang.Integer.MAX_VALUE, severity));
968          childrenList.add(new Property("code", "code", "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.", 0, java.lang.Integer.MAX_VALUE, code));
969          childrenList.add(new Property("details", "CodeableConcept", "Additional details about the error. This may be a text description of the error, or a system code that identifies the error.", 0, java.lang.Integer.MAX_VALUE, details));
970          childrenList.add(new Property("diagnostics", "string", "Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.", 0, java.lang.Integer.MAX_VALUE, diagnostics));
971          childrenList.add(new Property("location", "string", "A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.", 0, java.lang.Integer.MAX_VALUE, location));
972        }
973
974      @Override
975      public void setProperty(String name, Base value) throws FHIRException {
976        if (name.equals("severity"))
977          this.severity = new IssueSeverityEnumFactory().fromType(value); // Enumeration<IssueSeverity>
978        else if (name.equals("code"))
979          this.code = new IssueTypeEnumFactory().fromType(value); // Enumeration<IssueType>
980        else if (name.equals("details"))
981          this.details = castToCodeableConcept(value); // CodeableConcept
982        else if (name.equals("diagnostics"))
983          this.diagnostics = castToString(value); // StringType
984        else if (name.equals("location"))
985          this.getLocation().add(castToString(value));
986        else
987          super.setProperty(name, value);
988      }
989
990      @Override
991      public Base addChild(String name) throws FHIRException {
992        if (name.equals("severity")) {
993          throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.severity");
994        }
995        else if (name.equals("code")) {
996          throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.code");
997        }
998        else if (name.equals("details")) {
999          this.details = new CodeableConcept();
1000          return this.details;
1001        }
1002        else if (name.equals("diagnostics")) {
1003          throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.diagnostics");
1004        }
1005        else if (name.equals("location")) {
1006          throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.location");
1007        }
1008        else
1009          return super.addChild(name);
1010      }
1011
1012      public OperationOutcomeIssueComponent copy() {
1013        OperationOutcomeIssueComponent dst = new OperationOutcomeIssueComponent();
1014        copyValues(dst);
1015        dst.severity = severity == null ? null : severity.copy();
1016        dst.code = code == null ? null : code.copy();
1017        dst.details = details == null ? null : details.copy();
1018        dst.diagnostics = diagnostics == null ? null : diagnostics.copy();
1019        if (location != null) {
1020          dst.location = new ArrayList<StringType>();
1021          for (StringType i : location)
1022            dst.location.add(i.copy());
1023        };
1024        return dst;
1025      }
1026
1027      @Override
1028      public boolean equalsDeep(Base other) {
1029        if (!super.equalsDeep(other))
1030          return false;
1031        if (!(other instanceof OperationOutcomeIssueComponent))
1032          return false;
1033        OperationOutcomeIssueComponent o = (OperationOutcomeIssueComponent) other;
1034        return compareDeep(severity, o.severity, true) && compareDeep(code, o.code, true) && compareDeep(details, o.details, true)
1035           && compareDeep(diagnostics, o.diagnostics, true) && compareDeep(location, o.location, true);
1036      }
1037
1038      @Override
1039      public boolean equalsShallow(Base other) {
1040        if (!super.equalsShallow(other))
1041          return false;
1042        if (!(other instanceof OperationOutcomeIssueComponent))
1043          return false;
1044        OperationOutcomeIssueComponent o = (OperationOutcomeIssueComponent) other;
1045        return compareValues(severity, o.severity, true) && compareValues(code, o.code, true) && compareValues(diagnostics, o.diagnostics, true)
1046           && compareValues(location, o.location, true);
1047      }
1048
1049      public boolean isEmpty() {
1050        return super.isEmpty() && (severity == null || severity.isEmpty()) && (code == null || code.isEmpty())
1051           && (details == null || details.isEmpty()) && (diagnostics == null || diagnostics.isEmpty())
1052           && (location == null || location.isEmpty());
1053      }
1054
1055  public String fhirType() {
1056    return "OperationOutcome.issue";
1057
1058  }
1059
1060  }
1061
1062    /**
1063     * An error, warning or information message that results from a system action.
1064     */
1065    @Child(name = "issue", type = {}, order=0, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1066    @Description(shortDefinition="A single issue associated with the action", formalDefinition="An error, warning or information message that results from a system action." )
1067    protected List<OperationOutcomeIssueComponent> issue;
1068
1069    private static final long serialVersionUID = -152150052L;
1070
1071  /*
1072   * Constructor
1073   */
1074    public OperationOutcome() {
1075      super();
1076    }
1077
1078    /**
1079     * @return {@link #issue} (An error, warning or information message that results from a system action.)
1080     */
1081    public List<OperationOutcomeIssueComponent> getIssue() { 
1082      if (this.issue == null)
1083        this.issue = new ArrayList<OperationOutcomeIssueComponent>();
1084      return this.issue;
1085    }
1086
1087    public boolean hasIssue() { 
1088      if (this.issue == null)
1089        return false;
1090      for (OperationOutcomeIssueComponent item : this.issue)
1091        if (!item.isEmpty())
1092          return true;
1093      return false;
1094    }
1095
1096    /**
1097     * @return {@link #issue} (An error, warning or information message that results from a system action.)
1098     */
1099    // syntactic sugar
1100    public OperationOutcomeIssueComponent addIssue() { //3
1101      OperationOutcomeIssueComponent t = new OperationOutcomeIssueComponent();
1102      if (this.issue == null)
1103        this.issue = new ArrayList<OperationOutcomeIssueComponent>();
1104      this.issue.add(t);
1105      return t;
1106    }
1107
1108    // syntactic sugar
1109    public OperationOutcome addIssue(OperationOutcomeIssueComponent t) { //3
1110      if (t == null)
1111        return this;
1112      if (this.issue == null)
1113        this.issue = new ArrayList<OperationOutcomeIssueComponent>();
1114      this.issue.add(t);
1115      return this;
1116    }
1117
1118      protected void listChildren(List<Property> childrenList) {
1119        super.listChildren(childrenList);
1120        childrenList.add(new Property("issue", "", "An error, warning or information message that results from a system action.", 0, java.lang.Integer.MAX_VALUE, issue));
1121      }
1122
1123      @Override
1124      public void setProperty(String name, Base value) throws FHIRException {
1125        if (name.equals("issue"))
1126          this.getIssue().add((OperationOutcomeIssueComponent) value);
1127        else
1128          super.setProperty(name, value);
1129      }
1130
1131      @Override
1132      public Base addChild(String name) throws FHIRException {
1133        if (name.equals("issue")) {
1134          return addIssue();
1135        }
1136        else
1137          return super.addChild(name);
1138      }
1139
1140  public String fhirType() {
1141    return "OperationOutcome";
1142
1143  }
1144
1145      public OperationOutcome copy() {
1146        OperationOutcome dst = new OperationOutcome();
1147        copyValues(dst);
1148        if (issue != null) {
1149          dst.issue = new ArrayList<OperationOutcomeIssueComponent>();
1150          for (OperationOutcomeIssueComponent i : issue)
1151            dst.issue.add(i.copy());
1152        };
1153        return dst;
1154      }
1155
1156      protected OperationOutcome typedCopy() {
1157        return copy();
1158      }
1159
1160      @Override
1161      public boolean equalsDeep(Base other) {
1162        if (!super.equalsDeep(other))
1163          return false;
1164        if (!(other instanceof OperationOutcome))
1165          return false;
1166        OperationOutcome o = (OperationOutcome) other;
1167        return compareDeep(issue, o.issue, true);
1168      }
1169
1170      @Override
1171      public boolean equalsShallow(Base other) {
1172        if (!super.equalsShallow(other))
1173          return false;
1174        if (!(other instanceof OperationOutcome))
1175          return false;
1176        OperationOutcome o = (OperationOutcome) other;
1177        return true;
1178      }
1179
1180      public boolean isEmpty() {
1181        return super.isEmpty() && (issue == null || issue.isEmpty());
1182      }
1183
1184  @Override
1185  public ResourceType getResourceType() {
1186    return ResourceType.OperationOutcome;
1187   }
1188
1189
1190}