001package org.hl7.fhir.r4.model.codesystems; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r4 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 054 055 056import org.hl7.fhir.exceptions.FHIRException; 057 058public enum V3AddressUse { 059 060 /** 061 * Description: Address uses that can apply to both postal and telecommunication addresses. 062 */ 063 _GENERALADDRESSUSE, 064 /** 065 * Description: A flag indicating that the address is bad, in fact, useless. 066 */ 067 BAD, 068 /** 069 * 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. 070 */ 071 CONF, 072 /** 073 * 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. 074 */ 075 H, 076 /** 077 * Description: The primary home, to reach a person after business hours. 078 */ 079 HP, 080 /** 081 * Description: A vacation home, to reach a person while on vacation. 082 */ 083 HV, 084 /** 085 * This address is no longer in use. 086 087 088 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. 089 */ 090 OLD, 091 /** 092 * Description: A temporary address, may be good for visit or mailing. Note that an address history can provide more detailed information. 093 */ 094 TMP, 095 /** 096 * Description: An office address. First choice for business related contacts during business hours. 097 */ 098 WP, 099 /** 100 * 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'. 101 */ 102 DIR, 103 /** 104 * 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. 105 */ 106 PUB, 107 /** 108 * Description: Address uses that only apply to postal addresses, not telecommunication addresses. 109 */ 110 _POSTALADDRESSUSE, 111 /** 112 * Description: Used primarily to visit an address. 113 */ 114 PHYS, 115 /** 116 * Description: Used to send mail. 117 */ 118 PST, 119 /** 120 * Description: Address uses that only apply to telecommunication addresses, not postal addresses. 121 */ 122 _TELECOMMUNICATIONADDRESSUSE, 123 /** 124 * 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. 125 */ 126 AS, 127 /** 128 * Description: A contact specifically designated to be used for emergencies. This is the first choice in emergencies, independent of any other use codes. 129 */ 130 EC, 131 /** 132 * 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. 133 */ 134 MC, 135 /** 136 * Description: A paging device suitable to solicit a callback or to leave a very short message. 137 */ 138 PG, 139 /** 140 * added to help the parsers 141 */ 142 NULL; 143 public static V3AddressUse fromCode(String codeString) throws FHIRException { 144 if (codeString == null || "".equals(codeString)) 145 return null; 146 if ("_GeneralAddressUse".equals(codeString)) 147 return _GENERALADDRESSUSE; 148 if ("BAD".equals(codeString)) 149 return BAD; 150 if ("CONF".equals(codeString)) 151 return CONF; 152 if ("H".equals(codeString)) 153 return H; 154 if ("HP".equals(codeString)) 155 return HP; 156 if ("HV".equals(codeString)) 157 return HV; 158 if ("OLD".equals(codeString)) 159 return OLD; 160 if ("TMP".equals(codeString)) 161 return TMP; 162 if ("WP".equals(codeString)) 163 return WP; 164 if ("DIR".equals(codeString)) 165 return DIR; 166 if ("PUB".equals(codeString)) 167 return PUB; 168 if ("_PostalAddressUse".equals(codeString)) 169 return _POSTALADDRESSUSE; 170 if ("PHYS".equals(codeString)) 171 return PHYS; 172 if ("PST".equals(codeString)) 173 return PST; 174 if ("_TelecommunicationAddressUse".equals(codeString)) 175 return _TELECOMMUNICATIONADDRESSUSE; 176 if ("AS".equals(codeString)) 177 return AS; 178 if ("EC".equals(codeString)) 179 return EC; 180 if ("MC".equals(codeString)) 181 return MC; 182 if ("PG".equals(codeString)) 183 return PG; 184 throw new FHIRException("Unknown V3AddressUse code '"+codeString+"'"); 185 } 186 public String toCode() { 187 switch (this) { 188 case _GENERALADDRESSUSE: return "_GeneralAddressUse"; 189 case BAD: return "BAD"; 190 case CONF: return "CONF"; 191 case H: return "H"; 192 case HP: return "HP"; 193 case HV: return "HV"; 194 case OLD: return "OLD"; 195 case TMP: return "TMP"; 196 case WP: return "WP"; 197 case DIR: return "DIR"; 198 case PUB: return "PUB"; 199 case _POSTALADDRESSUSE: return "_PostalAddressUse"; 200 case PHYS: return "PHYS"; 201 case PST: return "PST"; 202 case _TELECOMMUNICATIONADDRESSUSE: return "_TelecommunicationAddressUse"; 203 case AS: return "AS"; 204 case EC: return "EC"; 205 case MC: return "MC"; 206 case PG: return "PG"; 207 default: return "?"; 208 } 209 } 210 public String getSystem() { 211 return "http://terminology.hl7.org/CodeSystem/v3-AddressUse"; 212 } 213 public String getDefinition() { 214 switch (this) { 215 case _GENERALADDRESSUSE: return "Description: Address uses that can apply to both postal and telecommunication addresses."; 216 case BAD: return "Description: A flag indicating that the address is bad, in fact, useless."; 217 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."; 218 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."; 219 case HP: return "Description: The primary home, to reach a person after business hours."; 220 case HV: return "Description: A vacation home, to reach a person while on vacation."; 221 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."; 222 case TMP: return "Description: A temporary address, may be good for visit or mailing. Note that an address history can provide more detailed information."; 223 case WP: return "Description: An office address. First choice for business related contacts during business hours."; 224 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'."; 225 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."; 226 case _POSTALADDRESSUSE: return "Description: Address uses that only apply to postal addresses, not telecommunication addresses."; 227 case PHYS: return "Description: Used primarily to visit an address."; 228 case PST: return "Description: Used to send mail."; 229 case _TELECOMMUNICATIONADDRESSUSE: return "Description: Address uses that only apply to telecommunication addresses, not postal addresses."; 230 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."; 231 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."; 232 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."; 233 case PG: return "Description: A paging device suitable to solicit a callback or to leave a very short message."; 234 default: return "?"; 235 } 236 } 237 public String getDisplay() { 238 switch (this) { 239 case _GENERALADDRESSUSE: return "_GeneralAddressUse"; 240 case BAD: return "bad address"; 241 case CONF: return "confidential address"; 242 case H: return "home address"; 243 case HP: return "primary home"; 244 case HV: return "vacation home"; 245 case OLD: return "no longer in use"; 246 case TMP: return "temporary address"; 247 case WP: return "work place"; 248 case DIR: return "direct"; 249 case PUB: return "public"; 250 case _POSTALADDRESSUSE: return "_PostalAddressUse"; 251 case PHYS: return "physical visit address"; 252 case PST: return "postal address"; 253 case _TELECOMMUNICATIONADDRESSUSE: return "_TelecommunicationAddressUse"; 254 case AS: return "answering service"; 255 case EC: return "emergency contact"; 256 case MC: return "mobile contact)"; 257 case PG: return "pager"; 258 default: return "?"; 259 } 260 } 261 262 263} 264