001package org.hl7.fhir.r4.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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.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, and no other information about the trigger is specified. Named events are completely pre-coordinated, and the formal semantics of the trigger are not provided. 044 */ 045 NAMEDEVENT, 046 /** 047 * The trigger occurs at a specific time or periodically as described by a timing or schedule. A periodic event cannot have any data elements, but may have a name assigned as a shorthand for the event. 048 */ 049 PERIODIC, 050 /** 051 * The trigger occurs whenever data of a particular type is changed in any way, either added, modified, or removed. 052 */ 053 DATACHANGED, 054 /** 055 * The trigger occurs whenever data of a particular type is added. 056 */ 057 DATAADDED, 058 /** 059 * The trigger occurs whenever data of a particular type is modified. 060 */ 061 DATAMODIFIED, 062 /** 063 * The trigger occurs whenever data of a particular type is removed. 064 */ 065 DATAREMOVED, 066 /** 067 * The trigger occurs whenever data of a particular type is accessed. 068 */ 069 DATAACCESSED, 070 /** 071 * The trigger occurs whenever access to data of a particular type is completed. 072 */ 073 DATAACCESSENDED, 074 /** 075 * added to help the parsers 076 */ 077 NULL; 078 public static TriggerType fromCode(String codeString) throws FHIRException { 079 if (codeString == null || "".equals(codeString)) 080 return null; 081 if ("named-event".equals(codeString)) 082 return NAMEDEVENT; 083 if ("periodic".equals(codeString)) 084 return PERIODIC; 085 if ("data-changed".equals(codeString)) 086 return DATACHANGED; 087 if ("data-added".equals(codeString)) 088 return DATAADDED; 089 if ("data-modified".equals(codeString)) 090 return DATAMODIFIED; 091 if ("data-removed".equals(codeString)) 092 return DATAREMOVED; 093 if ("data-accessed".equals(codeString)) 094 return DATAACCESSED; 095 if ("data-access-ended".equals(codeString)) 096 return DATAACCESSENDED; 097 throw new FHIRException("Unknown TriggerType code '"+codeString+"'"); 098 } 099 public String toCode() { 100 switch (this) { 101 case NAMEDEVENT: return "named-event"; 102 case PERIODIC: return "periodic"; 103 case DATACHANGED: return "data-changed"; 104 case DATAADDED: return "data-added"; 105 case DATAMODIFIED: return "data-modified"; 106 case DATAREMOVED: return "data-removed"; 107 case DATAACCESSED: return "data-accessed"; 108 case DATAACCESSENDED: return "data-access-ended"; 109 default: return "?"; 110 } 111 } 112 public String getSystem() { 113 return "http://hl7.org/fhir/trigger-type"; 114 } 115 public String getDefinition() { 116 switch (this) { 117 case NAMEDEVENT: return "The trigger occurs in response to a specific named event, and no other information about the trigger is specified. Named events are completely pre-coordinated, and the formal semantics of the trigger are not provided."; 118 case PERIODIC: return "The trigger occurs at a specific time or periodically as described by a timing or schedule. A periodic event cannot have any data elements, but may have a name assigned as a shorthand for the event."; 119 case DATACHANGED: return "The trigger occurs whenever data of a particular type is changed in any way, either added, modified, or removed."; 120 case DATAADDED: return "The trigger occurs whenever data of a particular type is added."; 121 case DATAMODIFIED: return "The trigger occurs whenever data of a particular type is modified."; 122 case DATAREMOVED: return "The trigger occurs whenever data of a particular type is removed."; 123 case DATAACCESSED: return "The trigger occurs whenever data of a particular type is accessed."; 124 case DATAACCESSENDED: return "The trigger occurs whenever access to data of a particular type is completed."; 125 default: return "?"; 126 } 127 } 128 public String getDisplay() { 129 switch (this) { 130 case NAMEDEVENT: return "Named Event"; 131 case PERIODIC: return "Periodic"; 132 case DATACHANGED: return "Data Changed"; 133 case DATAADDED: return "Data Added"; 134 case DATAMODIFIED: return "Data Updated"; 135 case DATAREMOVED: return "Data Removed"; 136 case DATAACCESSED: return "Data Accessed"; 137 case DATAACCESSENDED: return "Data Access Ended"; 138 default: return "?"; 139 } 140 } 141 142 143}