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 Wed, Oct 18, 2017 11:45-0400 for FHIR v3.1.0 033 034 035import org.hl7.fhir.exceptions.FHIRException; 036 037public enum MedicationPackageForm { 038 039 /** 040 * A sealed glass capsule containing a liquid 041 */ 042 AMPOULE, 043 /** 044 * A container, typically made of glass or plastic and with a narrow neck, used for storing liquids. 045 */ 046 BOTTLE, 047 /** 048 * A container with a flat base and sides, typically square or rectangular and having a lid. 049 */ 050 BOX, 051 /** 052 * A device of various configuration and composition used with a syringe for the application of anesthetic or other materials to a patient. 053 */ 054 CARTRIDGE, 055 /** 056 * A package intended to store pharmaceuticals. 057 */ 058 CONTAINER, 059 /** 060 * A long, hollow cylinder of metal, plastic, glass, etc., for holding medications, typically creams or ointments 061 */ 062 TUBE, 063 /** 064 * A dose of medicine prepared in an individual package for convenience, safety or monitoring. 065 */ 066 UNITDOSE, 067 /** 068 * A small container, typically cylindrical and made of glass, used especially for holding liquid medications. 069 */ 070 VIAL, 071 /** 072 * added to help the parsers 073 */ 074 NULL; 075 public static MedicationPackageForm fromCode(String codeString) throws FHIRException { 076 if (codeString == null || "".equals(codeString)) 077 return null; 078 if ("ampoule".equals(codeString)) 079 return AMPOULE; 080 if ("bottle".equals(codeString)) 081 return BOTTLE; 082 if ("box".equals(codeString)) 083 return BOX; 084 if ("cartridge".equals(codeString)) 085 return CARTRIDGE; 086 if ("container".equals(codeString)) 087 return CONTAINER; 088 if ("tube".equals(codeString)) 089 return TUBE; 090 if ("unitdose".equals(codeString)) 091 return UNITDOSE; 092 if ("vial".equals(codeString)) 093 return VIAL; 094 throw new FHIRException("Unknown MedicationPackageForm code '"+codeString+"'"); 095 } 096 public String toCode() { 097 switch (this) { 098 case AMPOULE: return "ampoule"; 099 case BOTTLE: return "bottle"; 100 case BOX: return "box"; 101 case CARTRIDGE: return "cartridge"; 102 case CONTAINER: return "container"; 103 case TUBE: return "tube"; 104 case UNITDOSE: return "unitdose"; 105 case VIAL: return "vial"; 106 default: return "?"; 107 } 108 } 109 public String getSystem() { 110 return "http://hl7.org/fhir/medication-package-form"; 111 } 112 public String getDefinition() { 113 switch (this) { 114 case AMPOULE: return "A sealed glass capsule containing a liquid"; 115 case BOTTLE: return "A container, typically made of glass or plastic and with a narrow neck, used for storing liquids."; 116 case BOX: return "A container with a flat base and sides, typically square or rectangular and having a lid."; 117 case CARTRIDGE: return "A device of various configuration and composition used with a syringe for the application of anesthetic or other materials to a patient."; 118 case CONTAINER: return "A package intended to store pharmaceuticals."; 119 case TUBE: return "A long, hollow cylinder of metal, plastic, glass, etc., for holding medications, typically creams or ointments"; 120 case UNITDOSE: return "A dose of medicine prepared in an individual package for convenience, safety or monitoring."; 121 case VIAL: return "A small container, typically cylindrical and made of glass, used especially for holding liquid medications."; 122 default: return "?"; 123 } 124 } 125 public String getDisplay() { 126 switch (this) { 127 case AMPOULE: return "Ampoule"; 128 case BOTTLE: return "Bottle"; 129 case BOX: return "Box"; 130 case CARTRIDGE: return "Cartridge"; 131 case CONTAINER: return "Container"; 132 case TUBE: return "Tube"; 133 case UNITDOSE: return "Unit Dose Blister"; 134 case VIAL: return "Vial"; 135 default: return "?"; 136 } 137 } 138 139 140} 141