package org.hl7.fhir.dstu3.model.codesystems; /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1 import org.hl7.fhir.exceptions.FHIRException; public enum DeviceStatementStatus { /** * The device is still being used. */ ACTIVE, /** * The device is no longer being used. */ COMPLETED, /** * The statement was recorded incorrectly. */ ENTEREDINERROR, /** * The device may be used at some time in the future. */ INTENDED, /** * Actions implied by the statement have been permanently halted, before all of them occurred. */ STOPPED, /** * Actions implied by the statement have been temporarily halted, but are expected to continue later. May also be called "suspended". */ ONHOLD, /** * added to help the parsers */ NULL; public static DeviceStatementStatus fromCode(String codeString) throws FHIRException { if (codeString == null || "".equals(codeString)) return null; if ("active".equals(codeString)) return ACTIVE; if ("completed".equals(codeString)) return COMPLETED; if ("entered-in-error".equals(codeString)) return ENTEREDINERROR; if ("intended".equals(codeString)) return INTENDED; if ("stopped".equals(codeString)) return STOPPED; if ("on-hold".equals(codeString)) return ONHOLD; throw new FHIRException("Unknown DeviceStatementStatus code '"+codeString+"'"); } public String toCode() { switch (this) { case ACTIVE: return "active"; case COMPLETED: return "completed"; case ENTEREDINERROR: return "entered-in-error"; case INTENDED: return "intended"; case STOPPED: return "stopped"; case ONHOLD: return "on-hold"; default: return "?"; } } public String getSystem() { return "http://hl7.org/fhir/device-statement-status"; } public String getDefinition() { switch (this) { case ACTIVE: return "The device is still being used."; case COMPLETED: return "The device is no longer being used."; case ENTEREDINERROR: return "The statement was recorded incorrectly."; case INTENDED: return "The device may be used at some time in the future."; case STOPPED: return "Actions implied by the statement have been permanently halted, before all of them occurred."; case ONHOLD: return "Actions implied by the statement have been temporarily halted, but are expected to continue later. May also be called \"suspended\"."; default: return "?"; } } public String getDisplay() { switch (this) { case ACTIVE: return "Active"; case COMPLETED: return "Completed"; case ENTEREDINERROR: return "Entered in Error"; case INTENDED: return "Intended"; case STOPPED: return "Stopped"; case ONHOLD: return "On Hold"; default: return "?"; } } }