
001package org.hl7.fhir.dstu3.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 Sat, Mar 25, 2017 21:03-0400 for FHIR v3.0.0 036 037 038import org.hl7.fhir.exceptions.FHIRException; 039 040public enum TriggerType { 041 042 /** 043 * The trigger occurs in response to a specific named event 044 */ 045 NAMEDEVENT, 046 /** 047 * The trigger occurs at a specific time or periodically as described by a timing or schedule 048 */ 049 PERIODIC, 050 /** 051 * The trigger occurs whenever data of a particular type is added 052 */ 053 DATAADDED, 054 /** 055 * The trigger occurs whenever data of a particular type is modified 056 */ 057 DATAMODIFIED, 058 /** 059 * The trigger occurs whenever data of a particular type is removed 060 */ 061 DATAREMOVED, 062 /** 063 * The trigger occurs whenever data of a particular type is accessed 064 */ 065 DATAACCESSED, 066 /** 067 * The trigger occurs whenever access to data of a particular type is completed 068 */ 069 DATAACCESSENDED, 070 /** 071 * added to help the parsers 072 */ 073 NULL; 074 public static TriggerType fromCode(String codeString) throws FHIRException { 075 if (codeString == null || "".equals(codeString)) 076 return null; 077 if ("named-event".equals(codeString)) 078 return NAMEDEVENT; 079 if ("periodic".equals(codeString)) 080 return PERIODIC; 081 if ("data-added".equals(codeString)) 082 return DATAADDED; 083 if ("data-modified".equals(codeString)) 084 return DATAMODIFIED; 085 if ("data-removed".equals(codeString)) 086 return DATAREMOVED; 087 if ("data-accessed".equals(codeString)) 088 return DATAACCESSED; 089 if ("data-access-ended".equals(codeString)) 090 return DATAACCESSENDED; 091 throw new FHIRException("Unknown TriggerType code '"+codeString+"'"); 092 } 093 public String toCode() { 094 switch (this) { 095 case NAMEDEVENT: return "named-event"; 096 case PERIODIC: return "periodic"; 097 case DATAADDED: return "data-added"; 098 case DATAMODIFIED: return "data-modified"; 099 case DATAREMOVED: return "data-removed"; 100 case DATAACCESSED: return "data-accessed"; 101 case DATAACCESSENDED: return "data-access-ended"; 102 case NULL: return null; 103 default: return "?"; 104 } 105 } 106 public String getSystem() { 107 return "http://hl7.org/fhir/trigger-type"; 108 } 109 public String getDefinition() { 110 switch (this) { 111 case NAMEDEVENT: return "The trigger occurs in response to a specific named event"; 112 case PERIODIC: return "The trigger occurs at a specific time or periodically as described by a timing or schedule"; 113 case DATAADDED: return "The trigger occurs whenever data of a particular type is added"; 114 case DATAMODIFIED: return "The trigger occurs whenever data of a particular type is modified"; 115 case DATAREMOVED: return "The trigger occurs whenever data of a particular type is removed"; 116 case DATAACCESSED: return "The trigger occurs whenever data of a particular type is accessed"; 117 case DATAACCESSENDED: return "The trigger occurs whenever access to data of a particular type is completed"; 118 case NULL: return null; 119 default: return "?"; 120 } 121 } 122 public String getDisplay() { 123 switch (this) { 124 case NAMEDEVENT: return "Named Event"; 125 case PERIODIC: return "Periodic"; 126 case DATAADDED: return "Data Added"; 127 case DATAMODIFIED: return "Data Modified"; 128 case DATAREMOVED: return "Data Removed"; 129 case DATAACCESSED: return "Data Accessed"; 130 case DATAACCESSENDED: return "Data Access Ended"; 131 case NULL: return null; 132 default: return "?"; 133 } 134 } 135 136 137}