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 ResourceStatus {
038
039        /**
040         * The resource was created in error, and should not be treated as valid (note: in many cases, for various data integrity related reasons, the information cannot be removed from the record)
041         */
042        ERROR, 
043        /**
044         * The resource describes an action or plan that is proposed, and not yet approved by the participants
045         */
046        PROPOSED, 
047        /**
048         * The resource describes a course of action that is planned and agreed/approved, but at the time of recording was still future
049         */
050        PLANNED, 
051        /**
052         * The information in the resource is still being prepared and edited
053         */
054        DRAFT, 
055        /**
056         * A fulfiller has been asked to perform this action, but it has not yet occurred
057         */
058        REQUESTED, 
059        /**
060         * The fulfiller has received the request, but not yet agreed to carry out the action
061         */
062        RECEIVED, 
063        /**
064         * The fulfiller chose not to perform the action
065         */
066        DECLINED, 
067        /**
068         * The fulfiller has decided to perform the action, and plans are in train to do this in the future
069         */
070        ACCEPTED, 
071        /**
072         * The pre-conditions for the action are all fulfilled, and it is imminent
073         */
074        ARRIVED, 
075        /**
076         * The resource describes information that is currently valid or a process that is presently occuring
077         */
078        ACTIVE, 
079        /**
080         * The process described/requested in this resource has been halted for some reason
081         */
082        SUSPENDED, 
083        /**
084         * The process described/requested in the resource could not be completed, and no further action is planned
085         */
086        FAILED, 
087        /**
088         * The information in this resource has been replaced by information in another resource
089         */
090        REPLACED, 
091        /**
092         * The process described/requested in the resource has been completed, and no further action is planned
093         */
094        COMPLETE, 
095        /**
096         * The resource describes information that is no longer valid or a process that is stopped occurring
097         */
098        INACTIVE, 
099        /**
100         * The process described/requested in the resource did not complete - usually due to some workflow error, and no further action is planned
101         */
102        ABANDONED, 
103        /**
104         * Authoring system does not know the status
105         */
106        UNKNOWN, 
107        /**
108         * The information in this resource is not yet approved
109         */
110        UNCONFIRMED, 
111        /**
112         * The information in this resource is approved
113         */
114        CONFIRMED, 
115        /**
116         * The issue identified by this resource is no longer of concern
117         */
118        RESOLVED, 
119        /**
120         * This information has been ruled out by testing and evaluation
121         */
122        REFUTED, 
123        /**
124         * Potentially true?
125         */
126        DIFFERENTIAL, 
127        /**
128         * This information is still being assembled
129         */
130        PARTIAL, 
131        /**
132         * not available at this time/location
133         */
134        BUSYUNAVAILABLE, 
135        /**
136         * Free for scheduling
137         */
138        FREE, 
139        /**
140         * Ready to act
141         */
142        ONTARGET, 
143        /**
144         * Ahead of the planned timelines
145         */
146        AHEADOFTARGET, 
147        /**
148         * 
149         */
150        BEHINDTARGET, 
151        /**
152         * Behind the planned timelines
153         */
154        NOTREADY, 
155        /**
156         * The device transducer is disconnected
157         */
158        TRANSDUCDISCON, 
159        /**
160         * The hardware is disconnected
161         */
162        HWDISCON, 
163        /**
164         * added to help the parsers
165         */
166        NULL;
167        public static ResourceStatus fromCode(String codeString) throws FHIRException {
168            if (codeString == null || "".equals(codeString))
169                return null;
170        if ("error".equals(codeString))
171          return ERROR;
172        if ("proposed".equals(codeString))
173          return PROPOSED;
174        if ("planned".equals(codeString))
175          return PLANNED;
176        if ("draft".equals(codeString))
177          return DRAFT;
178        if ("requested".equals(codeString))
179          return REQUESTED;
180        if ("received".equals(codeString))
181          return RECEIVED;
182        if ("declined".equals(codeString))
183          return DECLINED;
184        if ("accepted".equals(codeString))
185          return ACCEPTED;
186        if ("arrived".equals(codeString))
187          return ARRIVED;
188        if ("active".equals(codeString))
189          return ACTIVE;
190        if ("suspended".equals(codeString))
191          return SUSPENDED;
192        if ("failed".equals(codeString))
193          return FAILED;
194        if ("replaced".equals(codeString))
195          return REPLACED;
196        if ("complete".equals(codeString))
197          return COMPLETE;
198        if ("inactive".equals(codeString))
199          return INACTIVE;
200        if ("abandoned".equals(codeString))
201          return ABANDONED;
202        if ("unknown".equals(codeString))
203          return UNKNOWN;
204        if ("unconfirmed".equals(codeString))
205          return UNCONFIRMED;
206        if ("confirmed".equals(codeString))
207          return CONFIRMED;
208        if ("resolved".equals(codeString))
209          return RESOLVED;
210        if ("refuted".equals(codeString))
211          return REFUTED;
212        if ("differential".equals(codeString))
213          return DIFFERENTIAL;
214        if ("partial".equals(codeString))
215          return PARTIAL;
216        if ("busy-unavailable".equals(codeString))
217          return BUSYUNAVAILABLE;
218        if ("free".equals(codeString))
219          return FREE;
220        if ("on-target".equals(codeString))
221          return ONTARGET;
222        if ("ahead-of-target".equals(codeString))
223          return AHEADOFTARGET;
224        if ("behind-target".equals(codeString))
225          return BEHINDTARGET;
226        if ("not-ready".equals(codeString))
227          return NOTREADY;
228        if ("transduc-discon".equals(codeString))
229          return TRANSDUCDISCON;
230        if ("hw-discon".equals(codeString))
231          return HWDISCON;
232        throw new FHIRException("Unknown ResourceStatus code '"+codeString+"'");
233        }
234        public String toCode() {
235          switch (this) {
236            case ERROR: return "error";
237            case PROPOSED: return "proposed";
238            case PLANNED: return "planned";
239            case DRAFT: return "draft";
240            case REQUESTED: return "requested";
241            case RECEIVED: return "received";
242            case DECLINED: return "declined";
243            case ACCEPTED: return "accepted";
244            case ARRIVED: return "arrived";
245            case ACTIVE: return "active";
246            case SUSPENDED: return "suspended";
247            case FAILED: return "failed";
248            case REPLACED: return "replaced";
249            case COMPLETE: return "complete";
250            case INACTIVE: return "inactive";
251            case ABANDONED: return "abandoned";
252            case UNKNOWN: return "unknown";
253            case UNCONFIRMED: return "unconfirmed";
254            case CONFIRMED: return "confirmed";
255            case RESOLVED: return "resolved";
256            case REFUTED: return "refuted";
257            case DIFFERENTIAL: return "differential";
258            case PARTIAL: return "partial";
259            case BUSYUNAVAILABLE: return "busy-unavailable";
260            case FREE: return "free";
261            case ONTARGET: return "on-target";
262            case AHEADOFTARGET: return "ahead-of-target";
263            case BEHINDTARGET: return "behind-target";
264            case NOTREADY: return "not-ready";
265            case TRANSDUCDISCON: return "transduc-discon";
266            case HWDISCON: return "hw-discon";
267            default: return "?";
268          }
269        }
270        public String getSystem() {
271          return "http://hl7.org/fhir/resource-status";
272        }
273        public String getDefinition() {
274          switch (this) {
275            case ERROR: return "The resource was created in error, and should not be treated as valid (note: in many cases, for various data integrity related reasons, the information cannot be removed from the record)";
276            case PROPOSED: return "The resource describes an action or plan that is proposed, and not yet approved by the participants";
277            case PLANNED: return "The resource describes a course of action that is planned and agreed/approved, but at the time of recording was still future";
278            case DRAFT: return "The information in the resource is still being prepared and edited";
279            case REQUESTED: return "A fulfiller has been asked to perform this action, but it has not yet occurred";
280            case RECEIVED: return "The fulfiller has received the request, but not yet agreed to carry out the action";
281            case DECLINED: return "The fulfiller chose not to perform the action";
282            case ACCEPTED: return "The fulfiller has decided to perform the action, and plans are in train to do this in the future";
283            case ARRIVED: return "The pre-conditions for the action are all fulfilled, and it is imminent";
284            case ACTIVE: return "The resource describes information that is currently valid or a process that is presently occuring";
285            case SUSPENDED: return "The process described/requested in this resource has been halted for some reason";
286            case FAILED: return "The process described/requested in the resource could not be completed, and no further action is planned";
287            case REPLACED: return "The information in this resource has been replaced by information in another resource";
288            case COMPLETE: return "The process described/requested in the resource has been completed, and no further action is planned";
289            case INACTIVE: return "The resource describes information that is no longer valid or a process that is stopped occurring";
290            case ABANDONED: return "The process described/requested in the resource did not complete - usually due to some workflow error, and no further action is planned";
291            case UNKNOWN: return "Authoring system does not know the status";
292            case UNCONFIRMED: return "The information in this resource is not yet approved";
293            case CONFIRMED: return "The information in this resource is approved";
294            case RESOLVED: return "The issue identified by this resource is no longer of concern";
295            case REFUTED: return "This information has been ruled out by testing and evaluation";
296            case DIFFERENTIAL: return "Potentially true?";
297            case PARTIAL: return "This information is still being assembled";
298            case BUSYUNAVAILABLE: return "not available at this time/location";
299            case FREE: return "Free for scheduling";
300            case ONTARGET: return "Ready to act";
301            case AHEADOFTARGET: return "Ahead of the planned timelines";
302            case BEHINDTARGET: return "";
303            case NOTREADY: return "Behind the planned timelines";
304            case TRANSDUCDISCON: return "The device transducer is disconnected";
305            case HWDISCON: return "The hardware is disconnected";
306            default: return "?";
307          }
308        }
309        public String getDisplay() {
310          switch (this) {
311            case ERROR: return "error";
312            case PROPOSED: return "proposed";
313            case PLANNED: return "planned";
314            case DRAFT: return "draft";
315            case REQUESTED: return "requested";
316            case RECEIVED: return "received";
317            case DECLINED: return "declined";
318            case ACCEPTED: return "accepted";
319            case ARRIVED: return "arrived";
320            case ACTIVE: return "active";
321            case SUSPENDED: return "suspended";
322            case FAILED: return "failed";
323            case REPLACED: return "replaced";
324            case COMPLETE: return "complete";
325            case INACTIVE: return "inactive";
326            case ABANDONED: return "abandoned";
327            case UNKNOWN: return "unknown";
328            case UNCONFIRMED: return "unconfirmed";
329            case CONFIRMED: return "confirmed";
330            case RESOLVED: return "resolved";
331            case REFUTED: return "refuted";
332            case DIFFERENTIAL: return "differential";
333            case PARTIAL: return "partial";
334            case BUSYUNAVAILABLE: return "busy-unavailable";
335            case FREE: return "free";
336            case ONTARGET: return "on-target";
337            case AHEADOFTARGET: return "ahead-of-target";
338            case BEHINDTARGET: return "behind-target";
339            case NOTREADY: return "not-ready";
340            case TRANSDUCDISCON: return "transduc-discon";
341            case HWDISCON: return "hw-discon";
342            default: return "?";
343          }
344    }
345
346
347}
348