001package org.hl7.fhir.r4.model.codesystems; 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, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 036 037 038import org.hl7.fhir.exceptions.FHIRException; 039 040public enum RequestIntent { 041 042 /** 043 * The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act. 044 */ 045 PROPOSAL, 046 /** 047 * The request represents an intention to ensure something occurs without providing an authorization for others to act. 048 */ 049 PLAN, 050 /** 051 * The request represents a legally binding instruction authored by a Patient or RelatedPerson. 052 */ 053 DIRECTIVE, 054 /** 055 * The request represents a request/demand and authorization for action by a Practitioner. 056 */ 057 ORDER, 058 /** 059 * The request represents an original authorization for action. 060 */ 061 ORIGINALORDER, 062 /** 063 * The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization. 064 */ 065 REFLEXORDER, 066 /** 067 * The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order. 068 */ 069 FILLERORDER, 070 /** 071 * An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence. E.g. The administration of a single dose of a drug. 072 */ 073 INSTANCEORDER, 074 /** 075 * The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests. Refer to [[[RequestGroup]]] for additional information on how this status is used. 076 */ 077 OPTION, 078 /** 079 * added to help the parsers 080 */ 081 NULL; 082 public static RequestIntent fromCode(String codeString) throws FHIRException { 083 if (codeString == null || "".equals(codeString)) 084 return null; 085 if ("proposal".equals(codeString)) 086 return PROPOSAL; 087 if ("plan".equals(codeString)) 088 return PLAN; 089 if ("directive".equals(codeString)) 090 return DIRECTIVE; 091 if ("order".equals(codeString)) 092 return ORDER; 093 if ("original-order".equals(codeString)) 094 return ORIGINALORDER; 095 if ("reflex-order".equals(codeString)) 096 return REFLEXORDER; 097 if ("filler-order".equals(codeString)) 098 return FILLERORDER; 099 if ("instance-order".equals(codeString)) 100 return INSTANCEORDER; 101 if ("option".equals(codeString)) 102 return OPTION; 103 throw new FHIRException("Unknown RequestIntent code '"+codeString+"'"); 104 } 105 public String toCode() { 106 switch (this) { 107 case PROPOSAL: return "proposal"; 108 case PLAN: return "plan"; 109 case DIRECTIVE: return "directive"; 110 case ORDER: return "order"; 111 case ORIGINALORDER: return "original-order"; 112 case REFLEXORDER: return "reflex-order"; 113 case FILLERORDER: return "filler-order"; 114 case INSTANCEORDER: return "instance-order"; 115 case OPTION: return "option"; 116 case NULL: return null; 117 default: return "?"; 118 } 119 } 120 public String getSystem() { 121 return "http://hl7.org/fhir/request-intent"; 122 } 123 public String getDefinition() { 124 switch (this) { 125 case PROPOSAL: return "The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act."; 126 case PLAN: return "The request represents an intention to ensure something occurs without providing an authorization for others to act."; 127 case DIRECTIVE: return "The request represents a legally binding instruction authored by a Patient or RelatedPerson."; 128 case ORDER: return "The request represents a request/demand and authorization for action by a Practitioner."; 129 case ORIGINALORDER: return "The request represents an original authorization for action."; 130 case REFLEXORDER: return "The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization."; 131 case FILLERORDER: return "The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order."; 132 case INSTANCEORDER: return "An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence. E.g. The administration of a single dose of a drug."; 133 case OPTION: return "The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests. Refer to [[[RequestGroup]]] for additional information on how this status is used."; 134 case NULL: return null; 135 default: return "?"; 136 } 137 } 138 public String getDisplay() { 139 switch (this) { 140 case PROPOSAL: return "Proposal"; 141 case PLAN: return "Plan"; 142 case DIRECTIVE: return "Directive"; 143 case ORDER: return "Order"; 144 case ORIGINALORDER: return "Original Order"; 145 case REFLEXORDER: return "Reflex Order"; 146 case FILLERORDER: return "Filler Order"; 147 case INSTANCEORDER: return "Instance Order"; 148 case OPTION: return "Option"; 149 case NULL: return null; 150 default: return "?"; 151 } 152 } 153 154 155}