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 Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 033 034 035import org.hl7.fhir.exceptions.FHIRException; 036 037public enum ProcedureProgressStatusCodes { 038 039 /** 040 * A patient is in the Operating Room. 041 */ 042 INOPERATINGROOM, 043 /** 044 * The patient is prepared for a procedure. 045 */ 046 PREPARED, 047 /** 048 * The patient is under anesthesia. 049 */ 050 ANESTHESIAINDUCED, 051 /** 052 * The patient has open incision(s). 053 */ 054 OPENINCISION, 055 /** 056 * The patient has incision(s) closed. 057 */ 058 CLOSEDINCISION, 059 /** 060 * The patient is in the recovery room. 061 */ 062 INRECOVERYROOM, 063 /** 064 * added to help the parsers 065 */ 066 NULL; 067 public static ProcedureProgressStatusCodes fromCode(String codeString) throws FHIRException { 068 if (codeString == null || "".equals(codeString)) 069 return null; 070 if ("in-operating-room".equals(codeString)) 071 return INOPERATINGROOM; 072 if ("prepared".equals(codeString)) 073 return PREPARED; 074 if ("anesthesia-induced".equals(codeString)) 075 return ANESTHESIAINDUCED; 076 if ("open-incision".equals(codeString)) 077 return OPENINCISION; 078 if ("closed-incision".equals(codeString)) 079 return CLOSEDINCISION; 080 if ("in-recovery-room".equals(codeString)) 081 return INRECOVERYROOM; 082 throw new FHIRException("Unknown ProcedureProgressStatusCodes code '"+codeString+"'"); 083 } 084 public String toCode() { 085 switch (this) { 086 case INOPERATINGROOM: return "in-operating-room"; 087 case PREPARED: return "prepared"; 088 case ANESTHESIAINDUCED: return "anesthesia-induced"; 089 case OPENINCISION: return "open-incision"; 090 case CLOSEDINCISION: return "closed-incision"; 091 case INRECOVERYROOM: return "in-recovery-room"; 092 default: return "?"; 093 } 094 } 095 public String getSystem() { 096 return "http://hl7.org/fhir/procedure-progress-status-code"; 097 } 098 public String getDefinition() { 099 switch (this) { 100 case INOPERATINGROOM: return "A patient is in the Operating Room."; 101 case PREPARED: return "The patient is prepared for a procedure."; 102 case ANESTHESIAINDUCED: return "The patient is under anesthesia."; 103 case OPENINCISION: return "The patient has open incision(s)."; 104 case CLOSEDINCISION: return "The patient has incision(s) closed."; 105 case INRECOVERYROOM: return "The patient is in the recovery room."; 106 default: return "?"; 107 } 108 } 109 public String getDisplay() { 110 switch (this) { 111 case INOPERATINGROOM: return "In Operating Room"; 112 case PREPARED: return "Prepared"; 113 case ANESTHESIAINDUCED: return "Anesthesia Induced"; 114 case OPENINCISION: return "Open Incision"; 115 case CLOSEDINCISION: return "Closed Incision"; 116 case INRECOVERYROOM: return "In Recovery Room"; 117 default: return "?"; 118 } 119 } 120 121 122} 123