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 CoverageCopayType { 041 042 /** 043 * An office visit for a general practitioner of a discipline. 044 */ 045 GPVISIT, 046 /** 047 * An office visit for a specialist practitioner of a discipline 048 */ 049 SPVISIT, 050 /** 051 * An episode in an emergency department. 052 */ 053 EMERGENCY, 054 /** 055 * An episode of an Inpatient hospital stay. 056 */ 057 INPTHOSP, 058 /** 059 * A visit held where the patient is remote relative to the practitioner, e.g. by phone, computer or video conference. 060 */ 061 TELEVISIT, 062 /** 063 * A visit to an urgent care facility - typically a community care clinic. 064 */ 065 URGENTCARE, 066 /** 067 * A standard percentage applied to all classes or service or product not otherwise specified. 068 */ 069 COPAYPCT, 070 /** 071 * A standard fixed currency amount applied to all classes or service or product not otherwise specified. 072 */ 073 COPAY, 074 /** 075 * The accumulated amount of patient payment before the coverage begins to pay for services. 076 */ 077 DEDUCTIBLE, 078 /** 079 * The maximum amout of payment for services which a patient, or family, is expected to incur - typically annually. 080 */ 081 MAXOUTOFPOCKET, 082 /** 083 * added to help the parsers 084 */ 085 NULL; 086 public static CoverageCopayType fromCode(String codeString) throws FHIRException { 087 if (codeString == null || "".equals(codeString)) 088 return null; 089 if ("gpvisit".equals(codeString)) 090 return GPVISIT; 091 if ("spvisit".equals(codeString)) 092 return SPVISIT; 093 if ("emergency".equals(codeString)) 094 return EMERGENCY; 095 if ("inpthosp".equals(codeString)) 096 return INPTHOSP; 097 if ("televisit".equals(codeString)) 098 return TELEVISIT; 099 if ("urgentcare".equals(codeString)) 100 return URGENTCARE; 101 if ("copaypct".equals(codeString)) 102 return COPAYPCT; 103 if ("copay".equals(codeString)) 104 return COPAY; 105 if ("deductible".equals(codeString)) 106 return DEDUCTIBLE; 107 if ("maxoutofpocket".equals(codeString)) 108 return MAXOUTOFPOCKET; 109 throw new FHIRException("Unknown CoverageCopayType code '"+codeString+"'"); 110 } 111 public String toCode() { 112 switch (this) { 113 case GPVISIT: return "gpvisit"; 114 case SPVISIT: return "spvisit"; 115 case EMERGENCY: return "emergency"; 116 case INPTHOSP: return "inpthosp"; 117 case TELEVISIT: return "televisit"; 118 case URGENTCARE: return "urgentcare"; 119 case COPAYPCT: return "copaypct"; 120 case COPAY: return "copay"; 121 case DEDUCTIBLE: return "deductible"; 122 case MAXOUTOFPOCKET: return "maxoutofpocket"; 123 case NULL: return null; 124 default: return "?"; 125 } 126 } 127 public String getSystem() { 128 return "http://terminology.hl7.org/CodeSystem/coverage-copay-type"; 129 } 130 public String getDefinition() { 131 switch (this) { 132 case GPVISIT: return "An office visit for a general practitioner of a discipline."; 133 case SPVISIT: return "An office visit for a specialist practitioner of a discipline"; 134 case EMERGENCY: return "An episode in an emergency department."; 135 case INPTHOSP: return "An episode of an Inpatient hospital stay."; 136 case TELEVISIT: return "A visit held where the patient is remote relative to the practitioner, e.g. by phone, computer or video conference."; 137 case URGENTCARE: return "A visit to an urgent care facility - typically a community care clinic."; 138 case COPAYPCT: return "A standard percentage applied to all classes or service or product not otherwise specified."; 139 case COPAY: return "A standard fixed currency amount applied to all classes or service or product not otherwise specified."; 140 case DEDUCTIBLE: return "The accumulated amount of patient payment before the coverage begins to pay for services."; 141 case MAXOUTOFPOCKET: return "The maximum amout of payment for services which a patient, or family, is expected to incur - typically annually."; 142 case NULL: return null; 143 default: return "?"; 144 } 145 } 146 public String getDisplay() { 147 switch (this) { 148 case GPVISIT: return "GP Office Visit"; 149 case SPVISIT: return "Specialist Office Visit"; 150 case EMERGENCY: return "Emergency"; 151 case INPTHOSP: return "Inpatient Hospital"; 152 case TELEVISIT: return "Tele-visit"; 153 case URGENTCARE: return "Urgent Care"; 154 case COPAYPCT: return "Copay Percentage"; 155 case COPAY: return "Copay Amount"; 156 case DEDUCTIBLE: return "Deductible"; 157 case MAXOUTOFPOCKET: return "Maximum out of pocket"; 158 case NULL: return null; 159 default: return "?"; 160 } 161 } 162 163 164}