001package org.hl7.fhir.r4.model.codesystems; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r4 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/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 054 055 056import org.hl7.fhir.exceptions.FHIRException; 057 058public enum ListItemFlag { 059 060 /** 061 * No change has been made to the status of this medicine item. 062 */ 063 _01, 064 /** 065 * The medicine item has changed. The change may be described in an extension (not defined yet) 066 */ 067 _02, 068 /** 069 * The prescription for this medicine item was cancelled by an authorized health care provider. The patient may be advised to complete the course of the prescribed medicine. This advice is a clinical decision made based on assessment of the patient's clinical condition. 070 */ 071 _03, 072 /** 073 * A new medicine item has been prescribed 074 */ 075 _04, 076 /** 077 * Administration of this medication item that the patient is currently taking is stopped or recommended to be stopped (i.e. instructed to be ceased by a health care provider). This cessation is anticipated to be permanent. The Change Description should describe the reason for cessation. Example uses: the medication in question is considered ineffective or has caused serious adverse effects. This value applies both to the cessation of a medication that is prescribed by another healthcare provider or patient self-administration of OTC medicines. 078 */ 079 _05, 080 /** 081 * Administration of this medication item that the patient is currently taking is on hold, or instructed or recommended by a health care provider to be temporarily stopped, or subject to clinical review (i.e. the stop may be temporary or permanent depending on the outcome of clinical review), or temporarily suspended as a pre-requisite to certain surgical or diagnostic procedures. 082 */ 083 _06, 084 /** 085 * added to help the parsers 086 */ 087 NULL; 088 public static ListItemFlag fromCode(String codeString) throws FHIRException { 089 if (codeString == null || "".equals(codeString)) 090 return null; 091 if ("01".equals(codeString)) 092 return _01; 093 if ("02".equals(codeString)) 094 return _02; 095 if ("03".equals(codeString)) 096 return _03; 097 if ("04".equals(codeString)) 098 return _04; 099 if ("05".equals(codeString)) 100 return _05; 101 if ("06".equals(codeString)) 102 return _06; 103 throw new FHIRException("Unknown ListItemFlag code '"+codeString+"'"); 104 } 105 public String toCode() { 106 switch (this) { 107 case _01: return "01"; 108 case _02: return "02"; 109 case _03: return "03"; 110 case _04: return "04"; 111 case _05: return "05"; 112 case _06: return "06"; 113 default: return "?"; 114 } 115 } 116 public String getSystem() { 117 return "urn:oid:1.2.36.1.2001.1001.101.104.16592"; 118 } 119 public String getDefinition() { 120 switch (this) { 121 case _01: return "No change has been made to the status of this medicine item."; 122 case _02: return "The medicine item has changed. The change may be described in an extension (not defined yet)"; 123 case _03: return "The prescription for this medicine item was cancelled by an authorized health care provider. The patient may be advised to complete the course of the prescribed medicine. This advice is a clinical decision made based on assessment of the patient's clinical condition."; 124 case _04: return "A new medicine item has been prescribed"; 125 case _05: return "Administration of this medication item that the patient is currently taking is stopped or recommended to be stopped (i.e. instructed to be ceased by a health care provider). This cessation is anticipated to be permanent. The Change Description should describe the reason for cessation. Example uses: the medication in question is considered ineffective or has caused serious adverse effects. This value applies both to the cessation of a medication that is prescribed by another healthcare provider or patient self-administration of OTC medicines."; 126 case _06: return "Administration of this medication item that the patient is currently taking is on hold, or instructed or recommended by a health care provider to be temporarily stopped, or subject to clinical review (i.e. the stop may be temporary or permanent depending on the outcome of clinical review), or temporarily suspended as a pre-requisite to certain surgical or diagnostic procedures."; 127 default: return "?"; 128 } 129 } 130 public String getDisplay() { 131 switch (this) { 132 case _01: return "Unchanged"; 133 case _02: return "Changed"; 134 case _03: return "Cancelled"; 135 case _04: return "Prescribed"; 136 case _05: return "Ceased"; 137 case _06: return "Suspended"; 138 default: return "?"; 139 } 140 } 141 142 143} 144