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 GoalStatus {
038
039        /**
040         * A goal is proposed for this patient.
041         */
042        PROPOSED, 
043        /**
044         * A proposed goal was accepted or acknowledged.
045         */
046        ACCEPTED, 
047        /**
048         * A goal is planned for this patient.
049         */
050        PLANNED, 
051        /**
052         * The goal is being sought but has not yet been reached.  (Also applies if goal was reached in the past but there has been regression and goal is being sought again).
053         */
054        INPROGRESS, 
055        /**
056         * The goal is on schedule for the planned timelines.
057         */
058        ONTARGET, 
059        /**
060         * The goal is ahead of the planned timelines.
061         */
062        AHEADOFTARGET, 
063        /**
064         * The goal is behind the planned timelines.
065         */
066        BEHINDTARGET, 
067        /**
068         * The goal has been met, but ongoing activity is needed to sustain the goal objective.
069         */
070        SUSTAINING, 
071        /**
072         * The goal has been met and no further action is needed.
073         */
074        ACHIEVED, 
075        /**
076         * The goal remains a long term objective but is no longer being actively pursued for a temporary period of time.
077         */
078        ONHOLD, 
079        /**
080         * The previously accepted goal is no longer being sought.
081         */
082        CANCELLED, 
083        /**
084         * The goal was entered in error and voided.
085         */
086        ENTEREDINERROR, 
087        /**
088         * A proposed goal was rejected.
089         */
090        REJECTED, 
091        /**
092         * added to help the parsers
093         */
094        NULL;
095        public static GoalStatus fromCode(String codeString) throws FHIRException {
096            if (codeString == null || "".equals(codeString))
097                return null;
098        if ("proposed".equals(codeString))
099          return PROPOSED;
100        if ("accepted".equals(codeString))
101          return ACCEPTED;
102        if ("planned".equals(codeString))
103          return PLANNED;
104        if ("in-progress".equals(codeString))
105          return INPROGRESS;
106        if ("on-target".equals(codeString))
107          return ONTARGET;
108        if ("ahead-of-target".equals(codeString))
109          return AHEADOFTARGET;
110        if ("behind-target".equals(codeString))
111          return BEHINDTARGET;
112        if ("sustaining".equals(codeString))
113          return SUSTAINING;
114        if ("achieved".equals(codeString))
115          return ACHIEVED;
116        if ("on-hold".equals(codeString))
117          return ONHOLD;
118        if ("cancelled".equals(codeString))
119          return CANCELLED;
120        if ("entered-in-error".equals(codeString))
121          return ENTEREDINERROR;
122        if ("rejected".equals(codeString))
123          return REJECTED;
124        throw new FHIRException("Unknown GoalStatus code '"+codeString+"'");
125        }
126        public String toCode() {
127          switch (this) {
128            case PROPOSED: return "proposed";
129            case ACCEPTED: return "accepted";
130            case PLANNED: return "planned";
131            case INPROGRESS: return "in-progress";
132            case ONTARGET: return "on-target";
133            case AHEADOFTARGET: return "ahead-of-target";
134            case BEHINDTARGET: return "behind-target";
135            case SUSTAINING: return "sustaining";
136            case ACHIEVED: return "achieved";
137            case ONHOLD: return "on-hold";
138            case CANCELLED: return "cancelled";
139            case ENTEREDINERROR: return "entered-in-error";
140            case REJECTED: return "rejected";
141            default: return "?";
142          }
143        }
144        public String getSystem() {
145          return "http://hl7.org/fhir/goal-status";
146        }
147        public String getDefinition() {
148          switch (this) {
149            case PROPOSED: return "A goal is proposed for this patient.";
150            case ACCEPTED: return "A proposed goal was accepted or acknowledged.";
151            case PLANNED: return "A goal is planned for this patient.";
152            case INPROGRESS: return "The goal is being sought but has not yet been reached.  (Also applies if goal was reached in the past but there has been regression and goal is being sought again).";
153            case ONTARGET: return "The goal is on schedule for the planned timelines.";
154            case AHEADOFTARGET: return "The goal is ahead of the planned timelines.";
155            case BEHINDTARGET: return "The goal is behind the planned timelines.";
156            case SUSTAINING: return "The goal has been met, but ongoing activity is needed to sustain the goal objective.";
157            case ACHIEVED: return "The goal has been met and no further action is needed.";
158            case ONHOLD: return "The goal remains a long term objective but is no longer being actively pursued for a temporary period of time.";
159            case CANCELLED: return "The previously accepted goal is no longer being sought.";
160            case ENTEREDINERROR: return "The goal was entered in error and voided.";
161            case REJECTED: return "A proposed goal was rejected.";
162            default: return "?";
163          }
164        }
165        public String getDisplay() {
166          switch (this) {
167            case PROPOSED: return "Proposed";
168            case ACCEPTED: return "Accepted";
169            case PLANNED: return "Planned";
170            case INPROGRESS: return "In Progress";
171            case ONTARGET: return "On Target";
172            case AHEADOFTARGET: return "Ahead of Target";
173            case BEHINDTARGET: return "Behind Target";
174            case SUSTAINING: return "Sustaining";
175            case ACHIEVED: return "Achieved";
176            case ONHOLD: return "On Hold";
177            case CANCELLED: return "Cancelled";
178            case ENTEREDINERROR: return "Entered In Error";
179            case REJECTED: return "Rejected";
180            default: return "?";
181          }
182    }
183
184
185}
186