001package org.hl7.fhir.r4.model.codesystems;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum ProvenanceAgentRole {
038
039        /**
040         * A person entering the data into the originating system
041         */
042        ENTERER, 
043        /**
044         * A person, animal, organization or device that who actually and principally carries out the activity
045         */
046        PERFORMER, 
047        /**
048         * A party that originates the resource and therefore has responsibility for the information given in the resource and ownership of this resource
049         */
050        AUTHOR, 
051        /**
052         * A person who verifies the correctness and appropriateness of activity
053         */
054        VERIFIER, 
055        /**
056         * The person authenticated the content and accepted legal responsibility for its content
057         */
058        LEGAL, 
059        /**
060         * A verifier who attests to the accuracy of the resource
061         */
062        ATTESTER, 
063        /**
064         * A person who reported information that contributed to the resource
065         */
066        INFORMANT, 
067        /**
068         * The entity that is accountable for maintaining a true an accurate copy of the original record
069         */
070        CUSTODIAN, 
071        /**
072         * A device that operates independently of an author on custodian's algorithms for data extraction of existing information for purpose of generating a new artifact.
073         */
074        ASSEMBLER, 
075        /**
076         * A device used by an author to record new information, which may also be used by the author to select existing information for aggregation with newly recorded information for the purpose of generating a new artifact.
077         */
078        COMPOSER, 
079        /**
080         * added to help the parsers
081         */
082        NULL;
083        public static ProvenanceAgentRole fromCode(String codeString) throws FHIRException {
084            if (codeString == null || "".equals(codeString))
085                return null;
086        if ("enterer".equals(codeString))
087          return ENTERER;
088        if ("performer".equals(codeString))
089          return PERFORMER;
090        if ("author".equals(codeString))
091          return AUTHOR;
092        if ("verifier".equals(codeString))
093          return VERIFIER;
094        if ("legal".equals(codeString))
095          return LEGAL;
096        if ("attester".equals(codeString))
097          return ATTESTER;
098        if ("informant".equals(codeString))
099          return INFORMANT;
100        if ("custodian".equals(codeString))
101          return CUSTODIAN;
102        if ("assembler".equals(codeString))
103          return ASSEMBLER;
104        if ("composer".equals(codeString))
105          return COMPOSER;
106        throw new FHIRException("Unknown ProvenanceAgentRole code '"+codeString+"'");
107        }
108        public String toCode() {
109          switch (this) {
110            case ENTERER: return "enterer";
111            case PERFORMER: return "performer";
112            case AUTHOR: return "author";
113            case VERIFIER: return "verifier";
114            case LEGAL: return "legal";
115            case ATTESTER: return "attester";
116            case INFORMANT: return "informant";
117            case CUSTODIAN: return "custodian";
118            case ASSEMBLER: return "assembler";
119            case COMPOSER: return "composer";
120            default: return "?";
121          }
122        }
123        public String getSystem() {
124          return "http://hl7.org/fhir/provenance-participant-role";
125        }
126        public String getDefinition() {
127          switch (this) {
128            case ENTERER: return "A person entering the data into the originating system";
129            case PERFORMER: return "A person, animal, organization or device that who actually and principally carries out the activity";
130            case AUTHOR: return "A party that originates the resource and therefore has responsibility for the information given in the resource and ownership of this resource";
131            case VERIFIER: return "A person who verifies the correctness and appropriateness of activity";
132            case LEGAL: return "The person authenticated the content and accepted legal responsibility for its content";
133            case ATTESTER: return "A verifier who attests to the accuracy of the resource";
134            case INFORMANT: return "A person who reported information that contributed to the resource";
135            case CUSTODIAN: return "The entity that is accountable for maintaining a true an accurate copy of the original record";
136            case ASSEMBLER: return "A device that operates independently of an author on custodian's algorithms for data extraction of existing information for purpose of generating a new artifact.";
137            case COMPOSER: return "A device used by an author to record new information, which may also be used by the author to select existing information for aggregation with newly recorded information for the purpose of generating a new artifact.";
138            default: return "?";
139          }
140        }
141        public String getDisplay() {
142          switch (this) {
143            case ENTERER: return "Enterer";
144            case PERFORMER: return "Performer";
145            case AUTHOR: return "Author";
146            case VERIFIER: return "Verifier";
147            case LEGAL: return "Legal Authenticator";
148            case ATTESTER: return "Attester";
149            case INFORMANT: return "Informant";
150            case CUSTODIAN: return "Custodian";
151            case ASSEMBLER: return "Assembler";
152            case COMPOSER: return "Composer";
153            default: return "?";
154          }
155    }
156
157
158}
159