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