001package org.hl7.fhir.dstu2016may.model.codesystems; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 036 037 038import org.hl7.fhir.exceptions.FHIRException; 039 040public enum MessageEvents { 041 042 /** 043 * The definition of a code system is used to create a simple collection of codes suitable for use for data entry or validation. An expanded code system will be returned, or an error message. 044 */ 045 CODESYSTEMEXPAND, 046 /** 047 * Change the status of a Medication Administration to show that it is complete. 048 */ 049 MEDICATIONADMINISTRATIONCOMPLETE, 050 /** 051 * Someone wishes to record that the record of administration of a medication is in error and should be ignored. 052 */ 053 MEDICATIONADMINISTRATIONNULLIFICATION, 054 /** 055 * Indicates that a medication has been recorded against the patient's record. 056 */ 057 MEDICATIONADMINISTRATIONRECORDING, 058 /** 059 * Update a Medication Administration record. 060 */ 061 MEDICATIONADMINISTRATIONUPDATE, 062 /** 063 * Notification of a change to an administrative resource (either create or update). Note that there is no delete, though some administrative resources have status or period elements for this use. 064 */ 065 ADMINNOTIFY, 066 /** 067 * Provide a diagnostic report, or update a previously provided diagnostic report. 068 */ 069 DIAGNOSTICREPORTPROVIDE, 070 /** 071 * Provide a simple observation or update a previously provided simple observation. 072 */ 073 OBSERVATIONPROVIDE, 074 /** 075 * Notification that two patient records actually identify the same patient. 076 */ 077 PATIENTLINK, 078 /** 079 * Notification that previous advice that two patient records concern the same patient is now considered incorrect. 080 */ 081 PATIENTUNLINK, 082 /** 083 * The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. An expanded value set will be returned, or an error message. 084 */ 085 VALUESETEXPAND, 086 /** 087 * added to help the parsers 088 */ 089 NULL; 090 public static MessageEvents fromCode(String codeString) throws FHIRException { 091 if (codeString == null || "".equals(codeString)) 092 return null; 093 if ("CodeSystem-expand".equals(codeString)) 094 return CODESYSTEMEXPAND; 095 if ("MedicationAdministration-Complete".equals(codeString)) 096 return MEDICATIONADMINISTRATIONCOMPLETE; 097 if ("MedicationAdministration-Nullification".equals(codeString)) 098 return MEDICATIONADMINISTRATIONNULLIFICATION; 099 if ("MedicationAdministration-Recording".equals(codeString)) 100 return MEDICATIONADMINISTRATIONRECORDING; 101 if ("MedicationAdministration-Update".equals(codeString)) 102 return MEDICATIONADMINISTRATIONUPDATE; 103 if ("admin-notify".equals(codeString)) 104 return ADMINNOTIFY; 105 if ("diagnosticreport-provide".equals(codeString)) 106 return DIAGNOSTICREPORTPROVIDE; 107 if ("observation-provide".equals(codeString)) 108 return OBSERVATIONPROVIDE; 109 if ("patient-link".equals(codeString)) 110 return PATIENTLINK; 111 if ("patient-unlink".equals(codeString)) 112 return PATIENTUNLINK; 113 if ("valueset-expand".equals(codeString)) 114 return VALUESETEXPAND; 115 throw new FHIRException("Unknown MessageEvents code '"+codeString+"'"); 116 } 117 public String toCode() { 118 switch (this) { 119 case CODESYSTEMEXPAND: return "CodeSystem-expand"; 120 case MEDICATIONADMINISTRATIONCOMPLETE: return "MedicationAdministration-Complete"; 121 case MEDICATIONADMINISTRATIONNULLIFICATION: return "MedicationAdministration-Nullification"; 122 case MEDICATIONADMINISTRATIONRECORDING: return "MedicationAdministration-Recording"; 123 case MEDICATIONADMINISTRATIONUPDATE: return "MedicationAdministration-Update"; 124 case ADMINNOTIFY: return "admin-notify"; 125 case DIAGNOSTICREPORTPROVIDE: return "diagnosticreport-provide"; 126 case OBSERVATIONPROVIDE: return "observation-provide"; 127 case PATIENTLINK: return "patient-link"; 128 case PATIENTUNLINK: return "patient-unlink"; 129 case VALUESETEXPAND: return "valueset-expand"; 130 case NULL: return null; 131 default: return "?"; 132 } 133 } 134 public String getSystem() { 135 return "http://hl7.org/fhir/message-events"; 136 } 137 public String getDefinition() { 138 switch (this) { 139 case CODESYSTEMEXPAND: return "The definition of a code system is used to create a simple collection of codes suitable for use for data entry or validation. An expanded code system will be returned, or an error message."; 140 case MEDICATIONADMINISTRATIONCOMPLETE: return "Change the status of a Medication Administration to show that it is complete."; 141 case MEDICATIONADMINISTRATIONNULLIFICATION: return "Someone wishes to record that the record of administration of a medication is in error and should be ignored."; 142 case MEDICATIONADMINISTRATIONRECORDING: return "Indicates that a medication has been recorded against the patient's record."; 143 case MEDICATIONADMINISTRATIONUPDATE: return "Update a Medication Administration record."; 144 case ADMINNOTIFY: return "Notification of a change to an administrative resource (either create or update). Note that there is no delete, though some administrative resources have status or period elements for this use."; 145 case DIAGNOSTICREPORTPROVIDE: return "Provide a diagnostic report, or update a previously provided diagnostic report."; 146 case OBSERVATIONPROVIDE: return "Provide a simple observation or update a previously provided simple observation."; 147 case PATIENTLINK: return "Notification that two patient records actually identify the same patient."; 148 case PATIENTUNLINK: return "Notification that previous advice that two patient records concern the same patient is now considered incorrect."; 149 case VALUESETEXPAND: return "The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. An expanded value set will be returned, or an error message."; 150 case NULL: return null; 151 default: return "?"; 152 } 153 } 154 public String getDisplay() { 155 switch (this) { 156 case CODESYSTEMEXPAND: return "CodeSystem-expand"; 157 case MEDICATIONADMINISTRATIONCOMPLETE: return "MedicationAdministration-Complete"; 158 case MEDICATIONADMINISTRATIONNULLIFICATION: return "MedicationAdministration-Nullification"; 159 case MEDICATIONADMINISTRATIONRECORDING: return "MedicationAdministration-Recording"; 160 case MEDICATIONADMINISTRATIONUPDATE: return "MedicationAdministration-Update"; 161 case ADMINNOTIFY: return "admin-notify"; 162 case DIAGNOSTICREPORTPROVIDE: return "diagnosticreport-provide"; 163 case OBSERVATIONPROVIDE: return "observation-provide"; 164 case PATIENTLINK: return "patient-link"; 165 case PATIENTUNLINK: return "patient-unlink"; 166 case VALUESETEXPAND: return "valueset-expand"; 167 case NULL: return null; 168 default: return "?"; 169 } 170 } 171 172 173}