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 MedicationrequestIntent {
041
042        /**
043         * The request is a suggestion made by someone/something that doesn't 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 request/demand and authorization for action
052         */
053        ORDER, 
054        /**
055         * The request represents the original authorization for the medication request.
056         */
057        ORIGINALORDER, 
058        /**
059         * 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..
060         */
061        REFLEXORDER, 
062        /**
063         * 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.
064         */
065        FILLERORDER, 
066        /**
067         * The request represents an instance for the particular order, for example a medication administration record.
068         */
069        INSTANCEORDER, 
070        /**
071         * The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or  other constraints among a set of requests.
072         */
073        OPTION, 
074        /**
075         * added to help the parsers
076         */
077        NULL;
078        public static MedicationrequestIntent fromCode(String codeString) throws FHIRException {
079            if (codeString == null || "".equals(codeString))
080                return null;
081        if ("proposal".equals(codeString))
082          return PROPOSAL;
083        if ("plan".equals(codeString))
084          return PLAN;
085        if ("order".equals(codeString))
086          return ORDER;
087        if ("original-order".equals(codeString))
088          return ORIGINALORDER;
089        if ("reflex-order".equals(codeString))
090          return REFLEXORDER;
091        if ("filler-order".equals(codeString))
092          return FILLERORDER;
093        if ("instance-order".equals(codeString))
094          return INSTANCEORDER;
095        if ("option".equals(codeString))
096          return OPTION;
097        throw new FHIRException("Unknown MedicationrequestIntent code '"+codeString+"'");
098        }
099        public String toCode() {
100          switch (this) {
101            case PROPOSAL: return "proposal";
102            case PLAN: return "plan";
103            case ORDER: return "order";
104            case ORIGINALORDER: return "original-order";
105            case REFLEXORDER: return "reflex-order";
106            case FILLERORDER: return "filler-order";
107            case INSTANCEORDER: return "instance-order";
108            case OPTION: return "option";
109            default: return "?";
110          }
111        }
112        public String getSystem() {
113          return "http://hl7.org/fhir/CodeSystem/medicationrequest-intent";
114        }
115        public String getDefinition() {
116          switch (this) {
117            case PROPOSAL: return "The request is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act";
118            case PLAN: return "The request represents an intention to ensure something occurs without providing an authorization for others to act.";
119            case ORDER: return "The request represents a request/demand and authorization for action";
120            case ORIGINALORDER: return "The request represents the original authorization for the medication request.";
121            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..";
122            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.";
123            case INSTANCEORDER: return "The request represents an instance for the particular order, for example a medication administration record.";
124            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.";
125            default: return "?";
126          }
127        }
128        public String getDisplay() {
129          switch (this) {
130            case PROPOSAL: return "Proposal";
131            case PLAN: return "Plan";
132            case ORDER: return "Order";
133            case ORIGINALORDER: return "Original Order";
134            case REFLEXORDER: return "Reflex Order";
135            case FILLERORDER: return "Filler Order";
136            case INSTANCEORDER: return "Instance Order";
137            case OPTION: return "Option";
138            default: return "?";
139          }
140    }
141
142
143}