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 V3AddressPartType { 036 037 /** 038 * This can be a unit designator, such as apartment number, suite number, or floor. There may be several unit designators in an address (e.g. "3rd floor, Appt. 342"). This can also be a designator pointing away from the location, rather than specifying a smaller location within some larger one (e.g. Dutch "t.o." means "opposite to" for house boats located across the street facing houses). 039 */ 040 ADL, 041 /** 042 * Description: An address line is for either an additional locator, a delivery address or a street address. 043 */ 044 AL, 045 /** 046 * A delivery address line is frequently used instead of breaking out delivery mode, delivery installation, etc. An address generally has only a delivery address line or a street address line, but not both. 047 */ 048 DAL, 049 /** 050 * Description: A street address line is frequently used instead of breaking out build number, street name, street type, etc. An address generally has only a delivery address line or a street address line, but not both. 051 */ 052 SAL, 053 /** 054 * The numeric portion of a building number 055 */ 056 BNN, 057 /** 058 * The number of a building, house or lot alongside the street. Also known as "primary street number". This does not number the street but rather the building. 059 */ 060 BNR, 061 /** 062 * Any alphabetic character, fraction or other text that may appear after the numeric portion of a building number 063 */ 064 BNS, 065 /** 066 * The name of the party who will take receipt at the specified address, and will take on responsibility for ensuring delivery to the target recipient 067 */ 068 CAR, 069 /** 070 * A geographic sub-unit delineated for demographic purposes. 071 */ 072 CEN, 073 /** 074 * Country 075 */ 076 CNT, 077 /** 078 * A sub-unit of a state or province. (49 of the United States of America use the term "county;" Louisiana uses the term "parish".) 079 */ 080 CPA, 081 /** 082 * The name of the city, town, village, or other community or delivery center 083 */ 084 CTY, 085 /** 086 * Delimiters are printed without framing white space. If no value component is provided, the delimiter appears as a line break. 087 */ 088 DEL, 089 /** 090 * Indicates the type of delivery installation (the facility to which the mail will be delivered prior to final shipping via the delivery mode.) Example: post office, letter carrier depot, community mail center, station, etc. 091 */ 092 DINST, 093 /** 094 * The location of the delivery installation, usually a town or city, and is only required if the area is different from the municipality. Area to which mail delivery service is provided from any postal facility or service such as an individual letter carrier, rural route, or postal route. 095 */ 096 DINSTA, 097 /** 098 * A number, letter or name identifying a delivery installation; e.g. for Station A, the delivery installation qualifier would be 'A'. 099 */ 100 DINSTQ, 101 /** 102 * Direction (e.g. N, S, W, E) 103 */ 104 DIR, 105 /** 106 * Indicates the type of service offered, method of delivery. For example: post office box, rural route, general delivery, etc. 107 */ 108 DMOD, 109 /** 110 * Represents the routing information such as a letter carrier route number. It is the identifying number of the designator (the box number or rural route number). 111 */ 112 DMODID, 113 /** 114 * A value that uniquely identifies the postal address. 115 */ 116 DPID, 117 /** 118 * Description:An intersection denotes that the actual address is located AT or CLOSE TO the intersection OF two or more streets. 119 */ 120 INT, 121 /** 122 * A numbered box located in a post station. 123 */ 124 POB, 125 /** 126 * A subsection of a municipality 127 */ 128 PRE, 129 /** 130 * A sub-unit of a country with limited sovereignty in a federally organized country. 131 */ 132 STA, 133 /** 134 * The base name of a roadway or artery recognized by a municipality (excluding street type and direction) 135 */ 136 STB, 137 /** 138 * street name 139 */ 140 STR, 141 /** 142 * The designation given to the street. (e.g. Street, Avenue, Crescent, etc.) 143 */ 144 STTYP, 145 /** 146 * The number or name of a specific unit contained within a building or complex, as assigned by that building or complex. 147 */ 148 UNID, 149 /** 150 * Indicates the type of specific unit contained within a building or complex; e.g. Appartment, Floor 151 */ 152 UNIT, 153 /** 154 * A postal code designating a region defined by the postal service. 155 */ 156 ZIP, 157 /** 158 * added to help the parsers 159 */ 160 NULL; 161 public static V3AddressPartType fromCode(String codeString) throws Exception { 162 if (codeString == null || "".equals(codeString)) 163 return null; 164 if ("ADL".equals(codeString)) 165 return ADL; 166 if ("AL".equals(codeString)) 167 return AL; 168 if ("DAL".equals(codeString)) 169 return DAL; 170 if ("SAL".equals(codeString)) 171 return SAL; 172 if ("BNN".equals(codeString)) 173 return BNN; 174 if ("BNR".equals(codeString)) 175 return BNR; 176 if ("BNS".equals(codeString)) 177 return BNS; 178 if ("CAR".equals(codeString)) 179 return CAR; 180 if ("CEN".equals(codeString)) 181 return CEN; 182 if ("CNT".equals(codeString)) 183 return CNT; 184 if ("CPA".equals(codeString)) 185 return CPA; 186 if ("CTY".equals(codeString)) 187 return CTY; 188 if ("DEL".equals(codeString)) 189 return DEL; 190 if ("DINST".equals(codeString)) 191 return DINST; 192 if ("DINSTA".equals(codeString)) 193 return DINSTA; 194 if ("DINSTQ".equals(codeString)) 195 return DINSTQ; 196 if ("DIR".equals(codeString)) 197 return DIR; 198 if ("DMOD".equals(codeString)) 199 return DMOD; 200 if ("DMODID".equals(codeString)) 201 return DMODID; 202 if ("DPID".equals(codeString)) 203 return DPID; 204 if ("INT".equals(codeString)) 205 return INT; 206 if ("POB".equals(codeString)) 207 return POB; 208 if ("PRE".equals(codeString)) 209 return PRE; 210 if ("STA".equals(codeString)) 211 return STA; 212 if ("STB".equals(codeString)) 213 return STB; 214 if ("STR".equals(codeString)) 215 return STR; 216 if ("STTYP".equals(codeString)) 217 return STTYP; 218 if ("UNID".equals(codeString)) 219 return UNID; 220 if ("UNIT".equals(codeString)) 221 return UNIT; 222 if ("ZIP".equals(codeString)) 223 return ZIP; 224 throw new Exception("Unknown V3AddressPartType code '"+codeString+"'"); 225 } 226 public String toCode() { 227 switch (this) { 228 case ADL: return "ADL"; 229 case AL: return "AL"; 230 case DAL: return "DAL"; 231 case SAL: return "SAL"; 232 case BNN: return "BNN"; 233 case BNR: return "BNR"; 234 case BNS: return "BNS"; 235 case CAR: return "CAR"; 236 case CEN: return "CEN"; 237 case CNT: return "CNT"; 238 case CPA: return "CPA"; 239 case CTY: return "CTY"; 240 case DEL: return "DEL"; 241 case DINST: return "DINST"; 242 case DINSTA: return "DINSTA"; 243 case DINSTQ: return "DINSTQ"; 244 case DIR: return "DIR"; 245 case DMOD: return "DMOD"; 246 case DMODID: return "DMODID"; 247 case DPID: return "DPID"; 248 case INT: return "INT"; 249 case POB: return "POB"; 250 case PRE: return "PRE"; 251 case STA: return "STA"; 252 case STB: return "STB"; 253 case STR: return "STR"; 254 case STTYP: return "STTYP"; 255 case UNID: return "UNID"; 256 case UNIT: return "UNIT"; 257 case ZIP: return "ZIP"; 258 default: return "?"; 259 } 260 } 261 public String getSystem() { 262 return "http://hl7.org/fhir/v3/AddressPartType"; 263 } 264 public String getDefinition() { 265 switch (this) { 266 case ADL: return "This can be a unit designator, such as apartment number, suite number, or floor. There may be several unit designators in an address (e.g. \"3rd floor, Appt. 342\"). This can also be a designator pointing away from the location, rather than specifying a smaller location within some larger one (e.g. Dutch \"t.o.\" means \"opposite to\" for house boats located across the street facing houses)."; 267 case AL: return "Description: An address line is for either an additional locator, a delivery address or a street address."; 268 case DAL: return "A delivery address line is frequently used instead of breaking out delivery mode, delivery installation, etc. An address generally has only a delivery address line or a street address line, but not both."; 269 case SAL: return "Description: A street address line is frequently used instead of breaking out build number, street name, street type, etc. An address generally has only a delivery address line or a street address line, but not both."; 270 case BNN: return "The numeric portion of a building number"; 271 case BNR: return "The number of a building, house or lot alongside the street. Also known as \"primary street number\". This does not number the street but rather the building."; 272 case BNS: return "Any alphabetic character, fraction or other text that may appear after the numeric portion of a building number"; 273 case CAR: return "The name of the party who will take receipt at the specified address, and will take on responsibility for ensuring delivery to the target recipient"; 274 case CEN: return "A geographic sub-unit delineated for demographic purposes."; 275 case CNT: return "Country"; 276 case CPA: return "A sub-unit of a state or province. (49 of the United States of America use the term \"county;\" Louisiana uses the term \"parish\".)"; 277 case CTY: return "The name of the city, town, village, or other community or delivery center"; 278 case DEL: return "Delimiters are printed without framing white space. If no value component is provided, the delimiter appears as a line break."; 279 case DINST: return "Indicates the type of delivery installation (the facility to which the mail will be delivered prior to final shipping via the delivery mode.) Example: post office, letter carrier depot, community mail center, station, etc."; 280 case DINSTA: return "The location of the delivery installation, usually a town or city, and is only required if the area is different from the municipality. Area to which mail delivery service is provided from any postal facility or service such as an individual letter carrier, rural route, or postal route."; 281 case DINSTQ: return "A number, letter or name identifying a delivery installation; e.g. for Station A, the delivery installation qualifier would be 'A'."; 282 case DIR: return "Direction (e.g. N, S, W, E)"; 283 case DMOD: return "Indicates the type of service offered, method of delivery. For example: post office box, rural route, general delivery, etc."; 284 case DMODID: return "Represents the routing information such as a letter carrier route number. It is the identifying number of the designator (the box number or rural route number)."; 285 case DPID: return "A value that uniquely identifies the postal address."; 286 case INT: return "Description:An intersection denotes that the actual address is located AT or CLOSE TO the intersection OF two or more streets."; 287 case POB: return "A numbered box located in a post station."; 288 case PRE: return "A subsection of a municipality"; 289 case STA: return "A sub-unit of a country with limited sovereignty in a federally organized country."; 290 case STB: return "The base name of a roadway or artery recognized by a municipality (excluding street type and direction)"; 291 case STR: return "street name"; 292 case STTYP: return "The designation given to the street. (e.g. Street, Avenue, Crescent, etc.)"; 293 case UNID: return "The number or name of a specific unit contained within a building or complex, as assigned by that building or complex."; 294 case UNIT: return "Indicates the type of specific unit contained within a building or complex; e.g. Appartment, Floor"; 295 case ZIP: return "A postal code designating a region defined by the postal service."; 296 default: return "?"; 297 } 298 } 299 public String getDisplay() { 300 switch (this) { 301 case ADL: return "additional locator"; 302 case AL: return "address line"; 303 case DAL: return "delivery address line"; 304 case SAL: return "street address line"; 305 case BNN: return "building number numeric"; 306 case BNR: return "building number"; 307 case BNS: return "building number suffix"; 308 case CAR: return "care of"; 309 case CEN: return "census tract"; 310 case CNT: return "country"; 311 case CPA: return "county or parish"; 312 case CTY: return "municipality"; 313 case DEL: return "delimiter"; 314 case DINST: return "delivery installation type"; 315 case DINSTA: return "delivery installation area"; 316 case DINSTQ: return "delivery installation qualifier"; 317 case DIR: return "direction"; 318 case DMOD: return "delivery mode"; 319 case DMODID: return "delivery mode identifier"; 320 case DPID: return "delivery point identifier"; 321 case INT: return "intersection"; 322 case POB: return "post box"; 323 case PRE: return "precinct"; 324 case STA: return "state or province"; 325 case STB: return "street name base"; 326 case STR: return "street name"; 327 case STTYP: return "street type"; 328 case UNID: return "unit identifier"; 329 case UNIT: return "unit designator"; 330 case ZIP: return "postal code"; 331 default: return "?"; 332 } 333 } 334 335 336} 337