001package org.hl7.fhir.r4.model.codesystems; 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 Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0 033 034 035import org.hl7.fhir.exceptions.FHIRException; 036 037public enum V3AddressUse { 038 039 /** 040 * Description: Address uses that can apply to both postal and telecommunication addresses. 041 */ 042 _GENERALADDRESSUSE, 043 /** 044 * Description: A flag indicating that the address is bad, in fact, useless. 045 */ 046 BAD, 047 /** 048 * 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. 049 */ 050 CONF, 051 /** 052 * 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. 053 */ 054 H, 055 /** 056 * Description: The primary home, to reach a person after business hours. 057 */ 058 HP, 059 /** 060 * Description: A vacation home, to reach a person while on vacation. 061 */ 062 HV, 063 /** 064 * This address is no longer in use. 065 066 067 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. 068 */ 069 OLD, 070 /** 071 * Description: A temporary address, may be good for visit or mailing. Note that an address history can provide more detailed information. 072 */ 073 TMP, 074 /** 075 * Description: An office address. First choice for business related contacts during business hours. 076 */ 077 WP, 078 /** 079 * 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'. 080 */ 081 DIR, 082 /** 083 * 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. 084 */ 085 PUB, 086 /** 087 * Description: Address uses that only apply to postal addresses, not telecommunication addresses. 088 */ 089 _POSTALADDRESSUSE, 090 /** 091 * Description: Used primarily to visit an address. 092 */ 093 PHYS, 094 /** 095 * Description: Used to send mail. 096 */ 097 PST, 098 /** 099 * Description: Address uses that only apply to telecommunication addresses, not postal addresses. 100 */ 101 _TELECOMMUNICATIONADDRESSUSE, 102 /** 103 * 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. 104 */ 105 AS, 106 /** 107 * Description: A contact specifically designated to be used for emergencies. This is the first choice in emergencies, independent of any other use codes. 108 */ 109 EC, 110 /** 111 * 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. 112 */ 113 MC, 114 /** 115 * Description: A paging device suitable to solicit a callback or to leave a very short message. 116 */ 117 PG, 118 /** 119 * added to help the parsers 120 */ 121 NULL; 122 public static V3AddressUse fromCode(String codeString) throws FHIRException { 123 if (codeString == null || "".equals(codeString)) 124 return null; 125 if ("_GeneralAddressUse".equals(codeString)) 126 return _GENERALADDRESSUSE; 127 if ("BAD".equals(codeString)) 128 return BAD; 129 if ("CONF".equals(codeString)) 130 return CONF; 131 if ("H".equals(codeString)) 132 return H; 133 if ("HP".equals(codeString)) 134 return HP; 135 if ("HV".equals(codeString)) 136 return HV; 137 if ("OLD".equals(codeString)) 138 return OLD; 139 if ("TMP".equals(codeString)) 140 return TMP; 141 if ("WP".equals(codeString)) 142 return WP; 143 if ("DIR".equals(codeString)) 144 return DIR; 145 if ("PUB".equals(codeString)) 146 return PUB; 147 if ("_PostalAddressUse".equals(codeString)) 148 return _POSTALADDRESSUSE; 149 if ("PHYS".equals(codeString)) 150 return PHYS; 151 if ("PST".equals(codeString)) 152 return PST; 153 if ("_TelecommunicationAddressUse".equals(codeString)) 154 return _TELECOMMUNICATIONADDRESSUSE; 155 if ("AS".equals(codeString)) 156 return AS; 157 if ("EC".equals(codeString)) 158 return EC; 159 if ("MC".equals(codeString)) 160 return MC; 161 if ("PG".equals(codeString)) 162 return PG; 163 throw new FHIRException("Unknown V3AddressUse code '"+codeString+"'"); 164 } 165 public String toCode() { 166 switch (this) { 167 case _GENERALADDRESSUSE: return "_GeneralAddressUse"; 168 case BAD: return "BAD"; 169 case CONF: return "CONF"; 170 case H: return "H"; 171 case HP: return "HP"; 172 case HV: return "HV"; 173 case OLD: return "OLD"; 174 case TMP: return "TMP"; 175 case WP: return "WP"; 176 case DIR: return "DIR"; 177 case PUB: return "PUB"; 178 case _POSTALADDRESSUSE: return "_PostalAddressUse"; 179 case PHYS: return "PHYS"; 180 case PST: return "PST"; 181 case _TELECOMMUNICATIONADDRESSUSE: return "_TelecommunicationAddressUse"; 182 case AS: return "AS"; 183 case EC: return "EC"; 184 case MC: return "MC"; 185 case PG: return "PG"; 186 default: return "?"; 187 } 188 } 189 public String getSystem() { 190 return "http://terminology.hl7.org/CodeSystem/v3-AddressUse"; 191 } 192 public String getDefinition() { 193 switch (this) { 194 case _GENERALADDRESSUSE: return "Description: Address uses that can apply to both postal and telecommunication addresses."; 195 case BAD: return "Description: A flag indicating that the address is bad, in fact, useless."; 196 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."; 197 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."; 198 case HP: return "Description: The primary home, to reach a person after business hours."; 199 case HV: return "Description: A vacation home, to reach a person while on vacation."; 200 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."; 201 case TMP: return "Description: A temporary address, may be good for visit or mailing. Note that an address history can provide more detailed information."; 202 case WP: return "Description: An office address. First choice for business related contacts during business hours."; 203 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'."; 204 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."; 205 case _POSTALADDRESSUSE: return "Description: Address uses that only apply to postal addresses, not telecommunication addresses."; 206 case PHYS: return "Description: Used primarily to visit an address."; 207 case PST: return "Description: Used to send mail."; 208 case _TELECOMMUNICATIONADDRESSUSE: return "Description: Address uses that only apply to telecommunication addresses, not postal addresses."; 209 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."; 210 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."; 211 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."; 212 case PG: return "Description: A paging device suitable to solicit a callback or to leave a very short message."; 213 default: return "?"; 214 } 215 } 216 public String getDisplay() { 217 switch (this) { 218 case _GENERALADDRESSUSE: return "_GeneralAddressUse"; 219 case BAD: return "bad address"; 220 case CONF: return "confidential address"; 221 case H: return "home address"; 222 case HP: return "primary home"; 223 case HV: return "vacation home"; 224 case OLD: return "no longer in use"; 225 case TMP: return "temporary address"; 226 case WP: return "work place"; 227 case DIR: return "direct"; 228 case PUB: return "public"; 229 case _POSTALADDRESSUSE: return "_PostalAddressUse"; 230 case PHYS: return "physical visit address"; 231 case PST: return "postal address"; 232 case _TELECOMMUNICATIONADDRESSUSE: return "_TelecommunicationAddressUse"; 233 case AS: return "answering service"; 234 case EC: return "emergency contact"; 235 case MC: return "mobile contact)"; 236 case PG: return "pager"; 237 default: return "?"; 238 } 239 } 240 241 242} 243