001package org.hl7.fhir.instance.model.valuesets; 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, Nov 11, 2015 10:54-0500 for FHIR v1.0.2 033 034 035public enum V3AddressUse { 036 037 /** 038 * Description: Address uses that can apply to both postal and telecommunication addresses. 039 */ 040 _GENERALADDRESSUSE, 041 /** 042 * Description: A flag indicating that the address is bad, in fact, useless. 043 */ 044 BAD, 045 /** 046 * Description: Indicates that the address is considered sensitive and should only be shared or published in accordance with organizational controls governing patient demographic information with increased sensitivity. Uses of Addresses. Lloyd to supply more complete description. 047 */ 048 CONF, 049 /** 050 * Description: A communication address at a home, attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available. 051 */ 052 H, 053 /** 054 * Description: The primary home, to reach a person after business hours. 055 */ 056 HP, 057 /** 058 * Description: A vacation home, to reach a person while on vacation. 059 */ 060 HV, 061 /** 062 * This address is no longer in use. 063 064 065 Usage Note: Address may also carry valid time ranges. This code is used to cover the situations where it is known that the address is no longer valid, but no particular time range for its use is known. 066 */ 067 OLD, 068 /** 069 * Description: A temporary address, may be good for visit or mailing. Note that an address history can provide more detailed information. 070 */ 071 TMP, 072 /** 073 * Description: An office address. First choice for business related contacts during business hours. 074 */ 075 WP, 076 /** 077 * Description: Indicates a work place address or telecommunication address that reaches the individual or organization directly without intermediaries. For phones, often referred to as a 'private line'. 078 */ 079 DIR, 080 /** 081 * Description: Indicates a work place address or telecommunication address that is a 'standard' address which may reach a reception service, mail-room, or other intermediary prior to the target entity. 082 */ 083 PUB, 084 /** 085 * Description: Address uses that only apply to postal addresses, not telecommunication addresses. 086 */ 087 _POSTALADDRESSUSE, 088 /** 089 * Description: Used primarily to visit an address. 090 */ 091 PHYS, 092 /** 093 * Description: Used to send mail. 094 */ 095 PST, 096 /** 097 * Description: Address uses that only apply to telecommunication addresses, not postal addresses. 098 */ 099 _TELECOMMUNICATIONADDRESSUSE, 100 /** 101 * Description: An automated answering machine used for less urgent cases and if the main purpose of contact is to leave a message or access an automated announcement. 102 */ 103 AS, 104 /** 105 * Description: A contact specifically designated to be used for emergencies. This is the first choice in emergencies, independent of any other use codes. 106 */ 107 EC, 108 /** 109 * Description: A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business. 110 */ 111 MC, 112 /** 113 * Description: A paging device suitable to solicit a callback or to leave a very short message. 114 */ 115 PG, 116 /** 117 * added to help the parsers 118 */ 119 NULL; 120 public static V3AddressUse fromCode(String codeString) throws Exception { 121 if (codeString == null || "".equals(codeString)) 122 return null; 123 if ("_GeneralAddressUse".equals(codeString)) 124 return _GENERALADDRESSUSE; 125 if ("BAD".equals(codeString)) 126 return BAD; 127 if ("CONF".equals(codeString)) 128 return CONF; 129 if ("H".equals(codeString)) 130 return H; 131 if ("HP".equals(codeString)) 132 return HP; 133 if ("HV".equals(codeString)) 134 return HV; 135 if ("OLD".equals(codeString)) 136 return OLD; 137 if ("TMP".equals(codeString)) 138 return TMP; 139 if ("WP".equals(codeString)) 140 return WP; 141 if ("DIR".equals(codeString)) 142 return DIR; 143 if ("PUB".equals(codeString)) 144 return PUB; 145 if ("_PostalAddressUse".equals(codeString)) 146 return _POSTALADDRESSUSE; 147 if ("PHYS".equals(codeString)) 148 return PHYS; 149 if ("PST".equals(codeString)) 150 return PST; 151 if ("_TelecommunicationAddressUse".equals(codeString)) 152 return _TELECOMMUNICATIONADDRESSUSE; 153 if ("AS".equals(codeString)) 154 return AS; 155 if ("EC".equals(codeString)) 156 return EC; 157 if ("MC".equals(codeString)) 158 return MC; 159 if ("PG".equals(codeString)) 160 return PG; 161 throw new Exception("Unknown V3AddressUse code '"+codeString+"'"); 162 } 163 public String toCode() { 164 switch (this) { 165 case _GENERALADDRESSUSE: return "_GeneralAddressUse"; 166 case BAD: return "BAD"; 167 case CONF: return "CONF"; 168 case H: return "H"; 169 case HP: return "HP"; 170 case HV: return "HV"; 171 case OLD: return "OLD"; 172 case TMP: return "TMP"; 173 case WP: return "WP"; 174 case DIR: return "DIR"; 175 case PUB: return "PUB"; 176 case _POSTALADDRESSUSE: return "_PostalAddressUse"; 177 case PHYS: return "PHYS"; 178 case PST: return "PST"; 179 case _TELECOMMUNICATIONADDRESSUSE: return "_TelecommunicationAddressUse"; 180 case AS: return "AS"; 181 case EC: return "EC"; 182 case MC: return "MC"; 183 case PG: return "PG"; 184 default: return "?"; 185 } 186 } 187 public String getSystem() { 188 return "http://hl7.org/fhir/v3/AddressUse"; 189 } 190 public String getDefinition() { 191 switch (this) { 192 case _GENERALADDRESSUSE: return "Description: Address uses that can apply to both postal and telecommunication addresses."; 193 case BAD: return "Description: A flag indicating that the address is bad, in fact, useless."; 194 case CONF: return "Description: Indicates that the address is considered sensitive and should only be shared or published in accordance with organizational controls governing patient demographic information with increased sensitivity. Uses of Addresses. Lloyd to supply more complete description."; 195 case H: return "Description: A communication address at a home, attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available."; 196 case HP: return "Description: The primary home, to reach a person after business hours."; 197 case HV: return "Description: A vacation home, to reach a person while on vacation."; 198 case OLD: return "This address is no longer in use.\r\n\n \n Usage Note: Address may also carry valid time ranges. This code is used to cover the situations where it is known that the address is no longer valid, but no particular time range for its use is known."; 199 case TMP: return "Description: A temporary address, may be good for visit or mailing. Note that an address history can provide more detailed information."; 200 case WP: return "Description: An office address. First choice for business related contacts during business hours."; 201 case DIR: return "Description: Indicates a work place address or telecommunication address that reaches the individual or organization directly without intermediaries. For phones, often referred to as a 'private line'."; 202 case PUB: return "Description: Indicates a work place address or telecommunication address that is a 'standard' address which may reach a reception service, mail-room, or other intermediary prior to the target entity."; 203 case _POSTALADDRESSUSE: return "Description: Address uses that only apply to postal addresses, not telecommunication addresses."; 204 case PHYS: return "Description: Used primarily to visit an address."; 205 case PST: return "Description: Used to send mail."; 206 case _TELECOMMUNICATIONADDRESSUSE: return "Description: Address uses that only apply to telecommunication addresses, not postal addresses."; 207 case AS: return "Description: An automated answering machine used for less urgent cases and if the main purpose of contact is to leave a message or access an automated announcement."; 208 case EC: return "Description: A contact specifically designated to be used for emergencies. This is the first choice in emergencies, independent of any other use codes."; 209 case MC: return "Description: A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business."; 210 case PG: return "Description: A paging device suitable to solicit a callback or to leave a very short message."; 211 default: return "?"; 212 } 213 } 214 public String getDisplay() { 215 switch (this) { 216 case _GENERALADDRESSUSE: return "_GeneralAddressUse"; 217 case BAD: return "bad address"; 218 case CONF: return "confidential address"; 219 case H: return "home address"; 220 case HP: return "primary home"; 221 case HV: return "vacation home"; 222 case OLD: return "no longer in use"; 223 case TMP: return "temporary address"; 224 case WP: return "work place"; 225 case DIR: return "direct"; 226 case PUB: return "public"; 227 case _POSTALADDRESSUSE: return "_PostalAddressUse"; 228 case PHYS: return "physical visit address"; 229 case PST: return "postal address"; 230 case _TELECOMMUNICATIONADDRESSUSE: return "_TelecommunicationAddressUse"; 231 case AS: return "answering service"; 232 case EC: return "emergency contact"; 233 case MC: return "mobile contact)"; 234 case PG: return "pager"; 235 default: return "?"; 236 } 237 } 238 239 240} 241