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 NarrativeStatus { 037 038 /** 039 * The contents of the narrative are entirely generated from the core elements 040 * in the content. 041 */ 042 GENERATED, 043 /** 044 * The contents of the narrative are entirely generated from the core elements 045 * in the content and some of the content is generated from extensions. The 046 * narrative SHALL reflect the impact of all modifier extensions. 047 */ 048 EXTENSIONS, 049 /** 050 * The contents of the narrative may contain additional information not found in 051 * the structured data. Note that there is no computable way to determine what 052 * the extra information is, other than by human inspection. 053 */ 054 ADDITIONAL, 055 /** 056 * The contents of the narrative are some equivalent of "No human-readable text 057 * provided in this case". 058 */ 059 EMPTY, 060 /** 061 * added to help the parsers 062 */ 063 NULL; 064 065 public static NarrativeStatus fromCode(String codeString) throws FHIRException { 066 if (codeString == null || "".equals(codeString)) 067 return null; 068 if ("generated".equals(codeString)) 069 return GENERATED; 070 if ("extensions".equals(codeString)) 071 return EXTENSIONS; 072 if ("additional".equals(codeString)) 073 return ADDITIONAL; 074 if ("empty".equals(codeString)) 075 return EMPTY; 076 throw new FHIRException("Unknown NarrativeStatus code '" + codeString + "'"); 077 } 078 079 public String toCode() { 080 switch (this) { 081 case GENERATED: 082 return "generated"; 083 case EXTENSIONS: 084 return "extensions"; 085 case ADDITIONAL: 086 return "additional"; 087 case EMPTY: 088 return "empty"; 089 case NULL: 090 return null; 091 default: 092 return "?"; 093 } 094 } 095 096 public String getSystem() { 097 return "http://hl7.org/fhir/narrative-status"; 098 } 099 100 public String getDefinition() { 101 switch (this) { 102 case GENERATED: 103 return "The contents of the narrative are entirely generated from the core elements in the content."; 104 case EXTENSIONS: 105 return "The contents of the narrative are entirely generated from the core elements in the content and some of the content is generated from extensions. The narrative SHALL reflect the impact of all modifier extensions."; 106 case ADDITIONAL: 107 return "The contents of the narrative may contain additional information not found in the structured data. Note that there is no computable way to determine what the extra information is, other than by human inspection."; 108 case EMPTY: 109 return "The contents of the narrative are some equivalent of \"No human-readable text provided in this case\"."; 110 case NULL: 111 return null; 112 default: 113 return "?"; 114 } 115 } 116 117 public String getDisplay() { 118 switch (this) { 119 case GENERATED: 120 return "Generated"; 121 case EXTENSIONS: 122 return "Extensions"; 123 case ADDITIONAL: 124 return "Additional"; 125 case EMPTY: 126 return "Empty"; 127 case NULL: 128 return null; 129 default: 130 return "?"; 131 } 132 } 133 134}