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