001package org.hl7.fhir.r5.model.codesystems; 002 003/* 004 * #%L 005 * org.hl7.fhir.r5 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023/* 024 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0 053 054 055import org.hl7.fhir.exceptions.FHIRException; 056 057public enum ResourceStatus { 058 059 /** 060 * 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) 061 */ 062 ERROR, 063 /** 064 * The resource describes an action or plan that is proposed, and not yet approved by the participants 065 */ 066 PROPOSED, 067 /** 068 * The resource describes a course of action that is planned and agreed/approved, but at the time of recording was still future 069 */ 070 PLANNED, 071 /** 072 * The information in the resource is still being prepared and edited 073 */ 074 DRAFT, 075 /** 076 * A fulfiller has been asked to perform this action, but it has not yet occurred 077 */ 078 REQUESTED, 079 /** 080 * The fulfiller has received the request, but not yet agreed to carry out the action 081 */ 082 RECEIVED, 083 /** 084 * The fulfiller chose not to perform the action 085 */ 086 DECLINED, 087 /** 088 * The fulfiller has decided to perform the action, and plans are in train to do this in the future 089 */ 090 ACCEPTED, 091 /** 092 * The pre-conditions for the action are all fulfilled, and it is imminent 093 */ 094 ARRIVED, 095 /** 096 * The resource describes information that is currently valid or a process that is presently occuring 097 */ 098 ACTIVE, 099 /** 100 * The process described/requested in this resource has been halted for some reason 101 */ 102 SUSPENDED, 103 /** 104 * The process described/requested in the resource could not be completed, and no further action is planned 105 */ 106 FAILED, 107 /** 108 * The information in this resource has been replaced by information in another resource 109 */ 110 REPLACED, 111 /** 112 * The process described/requested in the resource has been completed, and no further action is planned 113 */ 114 COMPLETE, 115 /** 116 * The resource describes information that is no longer valid or a process that is stopped occurring 117 */ 118 INACTIVE, 119 /** 120 * The process described/requested in the resource did not complete - usually due to some workflow error, and no further action is planned 121 */ 122 ABANDONED, 123 /** 124 * Authoring system does not know the status 125 */ 126 UNKNOWN, 127 /** 128 * The information in this resource is not yet approved 129 */ 130 UNCONFIRMED, 131 /** 132 * The information in this resource is approved 133 */ 134 CONFIRMED, 135 /** 136 * The issue identified by this resource is no longer of concern 137 */ 138 RESOLVED, 139 /** 140 * This information has been ruled out by testing and evaluation 141 */ 142 REFUTED, 143 /** 144 * Potentially true? 145 */ 146 DIFFERENTIAL, 147 /** 148 * This information is still being assembled 149 */ 150 PARTIAL, 151 /** 152 * not available at this time/location 153 */ 154 BUSYUNAVAILABLE, 155 /** 156 * Free for scheduling 157 */ 158 FREE, 159 /** 160 * Ready to act 161 */ 162 ONTARGET, 163 /** 164 * Ahead of the planned timelines 165 */ 166 AHEADOFTARGET, 167 /** 168 * 169 */ 170 BEHINDTARGET, 171 /** 172 * Behind the planned timelines 173 */ 174 NOTREADY, 175 /** 176 * The device transducer is disconnected 177 */ 178 TRANSDUCDISCON, 179 /** 180 * The hardware is disconnected 181 */ 182 HWDISCON, 183 /** 184 * added to help the parsers 185 */ 186 NULL; 187 public static ResourceStatus fromCode(String codeString) throws FHIRException { 188 if (codeString == null || "".equals(codeString)) 189 return null; 190 if ("error".equals(codeString)) 191 return ERROR; 192 if ("proposed".equals(codeString)) 193 return PROPOSED; 194 if ("planned".equals(codeString)) 195 return PLANNED; 196 if ("draft".equals(codeString)) 197 return DRAFT; 198 if ("requested".equals(codeString)) 199 return REQUESTED; 200 if ("received".equals(codeString)) 201 return RECEIVED; 202 if ("declined".equals(codeString)) 203 return DECLINED; 204 if ("accepted".equals(codeString)) 205 return ACCEPTED; 206 if ("arrived".equals(codeString)) 207 return ARRIVED; 208 if ("active".equals(codeString)) 209 return ACTIVE; 210 if ("suspended".equals(codeString)) 211 return SUSPENDED; 212 if ("failed".equals(codeString)) 213 return FAILED; 214 if ("replaced".equals(codeString)) 215 return REPLACED; 216 if ("complete".equals(codeString)) 217 return COMPLETE; 218 if ("inactive".equals(codeString)) 219 return INACTIVE; 220 if ("abandoned".equals(codeString)) 221 return ABANDONED; 222 if ("unknown".equals(codeString)) 223 return UNKNOWN; 224 if ("unconfirmed".equals(codeString)) 225 return UNCONFIRMED; 226 if ("confirmed".equals(codeString)) 227 return CONFIRMED; 228 if ("resolved".equals(codeString)) 229 return RESOLVED; 230 if ("refuted".equals(codeString)) 231 return REFUTED; 232 if ("differential".equals(codeString)) 233 return DIFFERENTIAL; 234 if ("partial".equals(codeString)) 235 return PARTIAL; 236 if ("busy-unavailable".equals(codeString)) 237 return BUSYUNAVAILABLE; 238 if ("free".equals(codeString)) 239 return FREE; 240 if ("on-target".equals(codeString)) 241 return ONTARGET; 242 if ("ahead-of-target".equals(codeString)) 243 return AHEADOFTARGET; 244 if ("behind-target".equals(codeString)) 245 return BEHINDTARGET; 246 if ("not-ready".equals(codeString)) 247 return NOTREADY; 248 if ("transduc-discon".equals(codeString)) 249 return TRANSDUCDISCON; 250 if ("hw-discon".equals(codeString)) 251 return HWDISCON; 252 throw new FHIRException("Unknown ResourceStatus code '"+codeString+"'"); 253 } 254 public String toCode() { 255 switch (this) { 256 case ERROR: return "error"; 257 case PROPOSED: return "proposed"; 258 case PLANNED: return "planned"; 259 case DRAFT: return "draft"; 260 case REQUESTED: return "requested"; 261 case RECEIVED: return "received"; 262 case DECLINED: return "declined"; 263 case ACCEPTED: return "accepted"; 264 case ARRIVED: return "arrived"; 265 case ACTIVE: return "active"; 266 case SUSPENDED: return "suspended"; 267 case FAILED: return "failed"; 268 case REPLACED: return "replaced"; 269 case COMPLETE: return "complete"; 270 case INACTIVE: return "inactive"; 271 case ABANDONED: return "abandoned"; 272 case UNKNOWN: return "unknown"; 273 case UNCONFIRMED: return "unconfirmed"; 274 case CONFIRMED: return "confirmed"; 275 case RESOLVED: return "resolved"; 276 case REFUTED: return "refuted"; 277 case DIFFERENTIAL: return "differential"; 278 case PARTIAL: return "partial"; 279 case BUSYUNAVAILABLE: return "busy-unavailable"; 280 case FREE: return "free"; 281 case ONTARGET: return "on-target"; 282 case AHEADOFTARGET: return "ahead-of-target"; 283 case BEHINDTARGET: return "behind-target"; 284 case NOTREADY: return "not-ready"; 285 case TRANSDUCDISCON: return "transduc-discon"; 286 case HWDISCON: return "hw-discon"; 287 default: return "?"; 288 } 289 } 290 public String getSystem() { 291 return "http://hl7.org/fhir/resource-status"; 292 } 293 public String getDefinition() { 294 switch (this) { 295 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)"; 296 case PROPOSED: return "The resource describes an action or plan that is proposed, and not yet approved by the participants"; 297 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"; 298 case DRAFT: return "The information in the resource is still being prepared and edited"; 299 case REQUESTED: return "A fulfiller has been asked to perform this action, but it has not yet occurred"; 300 case RECEIVED: return "The fulfiller has received the request, but not yet agreed to carry out the action"; 301 case DECLINED: return "The fulfiller chose not to perform the action"; 302 case ACCEPTED: return "The fulfiller has decided to perform the action, and plans are in train to do this in the future"; 303 case ARRIVED: return "The pre-conditions for the action are all fulfilled, and it is imminent"; 304 case ACTIVE: return "The resource describes information that is currently valid or a process that is presently occuring"; 305 case SUSPENDED: return "The process described/requested in this resource has been halted for some reason"; 306 case FAILED: return "The process described/requested in the resource could not be completed, and no further action is planned"; 307 case REPLACED: return "The information in this resource has been replaced by information in another resource"; 308 case COMPLETE: return "The process described/requested in the resource has been completed, and no further action is planned"; 309 case INACTIVE: return "The resource describes information that is no longer valid or a process that is stopped occurring"; 310 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"; 311 case UNKNOWN: return "Authoring system does not know the status"; 312 case UNCONFIRMED: return "The information in this resource is not yet approved"; 313 case CONFIRMED: return "The information in this resource is approved"; 314 case RESOLVED: return "The issue identified by this resource is no longer of concern"; 315 case REFUTED: return "This information has been ruled out by testing and evaluation"; 316 case DIFFERENTIAL: return "Potentially true?"; 317 case PARTIAL: return "This information is still being assembled"; 318 case BUSYUNAVAILABLE: return "not available at this time/location"; 319 case FREE: return "Free for scheduling"; 320 case ONTARGET: return "Ready to act"; 321 case AHEADOFTARGET: return "Ahead of the planned timelines"; 322 case BEHINDTARGET: return ""; 323 case NOTREADY: return "Behind the planned timelines"; 324 case TRANSDUCDISCON: return "The device transducer is disconnected"; 325 case HWDISCON: return "The hardware is disconnected"; 326 default: return "?"; 327 } 328 } 329 public String getDisplay() { 330 switch (this) { 331 case ERROR: return "error"; 332 case PROPOSED: return "proposed"; 333 case PLANNED: return "planned"; 334 case DRAFT: return "draft"; 335 case REQUESTED: return "requested"; 336 case RECEIVED: return "received"; 337 case DECLINED: return "declined"; 338 case ACCEPTED: return "accepted"; 339 case ARRIVED: return "arrived"; 340 case ACTIVE: return "active"; 341 case SUSPENDED: return "suspended"; 342 case FAILED: return "failed"; 343 case REPLACED: return "replaced"; 344 case COMPLETE: return "complete"; 345 case INACTIVE: return "inactive"; 346 case ABANDONED: return "abandoned"; 347 case UNKNOWN: return "unknown"; 348 case UNCONFIRMED: return "unconfirmed"; 349 case CONFIRMED: return "confirmed"; 350 case RESOLVED: return "resolved"; 351 case REFUTED: return "refuted"; 352 case DIFFERENTIAL: return "differential"; 353 case PARTIAL: return "partial"; 354 case BUSYUNAVAILABLE: return "busy-unavailable"; 355 case FREE: return "free"; 356 case ONTARGET: return "on-target"; 357 case AHEADOFTARGET: return "ahead-of-target"; 358 case BEHINDTARGET: return "behind-target"; 359 case NOTREADY: return "not-ready"; 360 case TRANSDUCDISCON: return "transduc-discon"; 361 case HWDISCON: return "hw-discon"; 362 default: return "?"; 363 } 364 } 365 366 367} 368