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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 033 034import org.hl7.fhir.exceptions.FHIRException; 035 036public enum ConsentPerformer { 037 038 /** 039 * An entity or an entity's delegatee who is the grantee in an agreement such as 040 * a consent for services, advanced directive, or a privacy consent directive in 041 * accordance with jurisdictional, organizational, or patient policy. 042 */ 043 CONSENTER, 044 /** 045 * An entity which accepts certain rights or authority from a grantor. 046 */ 047 GRANTEE, 048 /** 049 * An entity which agrees to confer certain rights or authority to a grantee. 050 */ 051 GRANTOR, 052 /** 053 * A party to whom some right or authority is granted by a delegator. 054 */ 055 DELEGATEE, 056 /** 057 * A party that grants all or some portion its right or authority to another 058 * party. 059 */ 060 DELEGATOR, 061 /** 062 * added to help the parsers 063 */ 064 NULL; 065 066 public static ConsentPerformer fromCode(String codeString) throws FHIRException { 067 if (codeString == null || "".equals(codeString)) 068 return null; 069 if ("consenter".equals(codeString)) 070 return CONSENTER; 071 if ("grantee".equals(codeString)) 072 return GRANTEE; 073 if ("grantor".equals(codeString)) 074 return GRANTOR; 075 if ("delegatee".equals(codeString)) 076 return DELEGATEE; 077 if ("delegator".equals(codeString)) 078 return DELEGATOR; 079 throw new FHIRException("Unknown ConsentPerformer code '" + codeString + "'"); 080 } 081 082 public String toCode() { 083 switch (this) { 084 case CONSENTER: 085 return "consenter"; 086 case GRANTEE: 087 return "grantee"; 088 case GRANTOR: 089 return "grantor"; 090 case DELEGATEE: 091 return "delegatee"; 092 case DELEGATOR: 093 return "delegator"; 094 case NULL: 095 return null; 096 default: 097 return "?"; 098 } 099 } 100 101 public String getSystem() { 102 return "http://hl7.org/fhir/consentperformer"; 103 } 104 105 public String getDefinition() { 106 switch (this) { 107 case CONSENTER: 108 return "An entity or an entity's delegatee who is the grantee in an agreement such as a consent for services, advanced directive, or a privacy consent directive in accordance with jurisdictional, organizational, or patient policy."; 109 case GRANTEE: 110 return "An entity which accepts certain rights or authority from a grantor."; 111 case GRANTOR: 112 return "An entity which agrees to confer certain rights or authority to a grantee."; 113 case DELEGATEE: 114 return "A party to whom some right or authority is granted by a delegator."; 115 case DELEGATOR: 116 return "A party that grants all or some portion its right or authority to another party."; 117 case NULL: 118 return null; 119 default: 120 return "?"; 121 } 122 } 123 124 public String getDisplay() { 125 switch (this) { 126 case CONSENTER: 127 return "Consenter"; 128 case GRANTEE: 129 return "Grantee"; 130 case GRANTOR: 131 return "Grantor"; 132 case DELEGATEE: 133 return "Delegatee"; 134 case DELEGATOR: 135 return "Delegator"; 136 case NULL: 137 return null; 138 default: 139 return "?"; 140 } 141 } 142 143}