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 V3AddressPartType {
058
059        /**
060         * 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).
061         */
062        ADL, 
063        /**
064         * Description: An address line is for either an additional locator, a delivery address or a street address.
065         */
066        AL, 
067        /**
068         * 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.
069         */
070        DAL, 
071        /**
072         * 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.
073         */
074        SAL, 
075        /**
076         * The numeric portion of a building number
077         */
078        BNN, 
079        /**
080         * 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.
081         */
082        BNR, 
083        /**
084         * Any alphabetic character, fraction or other text that may appear after the numeric portion of a building number
085         */
086        BNS, 
087        /**
088         * 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
089         */
090        CAR, 
091        /**
092         * A geographic sub-unit delineated for demographic purposes.
093         */
094        CEN, 
095        /**
096         * Country
097         */
098        CNT, 
099        /**
100         * A sub-unit of a state or province. (49 of the United States of America use the term "county;" Louisiana uses the term "parish".)
101         */
102        CPA, 
103        /**
104         * The name of the city, town, village, or other community or delivery center
105         */
106        CTY, 
107        /**
108         * Delimiters are printed without framing white space.  If no value component is provided, the delimiter appears as a line break.
109         */
110        DEL, 
111        /**
112         * 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.
113         */
114        DINST, 
115        /**
116         * 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.
117         */
118        DINSTA, 
119        /**
120         * A number, letter or name identifying a delivery installation.  E.g., for Station A, the delivery installation qualifier would be 'A'.
121         */
122        DINSTQ, 
123        /**
124         * Direction (e.g., N, S, W, E)
125         */
126        DIR, 
127        /**
128         * Indicates the type of service offered, method of delivery.  For example: post office box, rural route, general delivery, etc.
129         */
130        DMOD, 
131        /**
132         * 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).
133         */
134        DMODID, 
135        /**
136         * A value that uniquely identifies the postal address.
137         */
138        DPID, 
139        /**
140         * Description:An intersection denotes that the actual address is located AT or CLOSE TO the intersection OF two or more streets.
141         */
142        INT, 
143        /**
144         * A numbered box located in a post station.
145         */
146        POB, 
147        /**
148         * A subsection of a municipality
149         */
150        PRE, 
151        /**
152         * A sub-unit of a country with limited sovereignty in a federally organized country.
153         */
154        STA, 
155        /**
156         * The base name of a roadway or artery recognized by a municipality (excluding street type and direction)
157         */
158        STB, 
159        /**
160         * street name
161         */
162        STR, 
163        /**
164         * The designation given to the street.  (e.g. Street, Avenue, Crescent, etc.)
165         */
166        STTYP, 
167        /**
168         * The number or name of a specific unit contained within a building or complex, as assigned by that building or complex.
169         */
170        UNID, 
171        /**
172         * Indicates the type of specific unit contained within a building or complex.  E.g. Appartment, Floor
173         */
174        UNIT, 
175        /**
176         * A postal code designating a region defined by the postal service.
177         */
178        ZIP, 
179        /**
180         * added to help the parsers
181         */
182        NULL;
183        public static V3AddressPartType fromCode(String codeString) throws FHIRException {
184            if (codeString == null || "".equals(codeString))
185                return null;
186        if ("ADL".equals(codeString))
187          return ADL;
188        if ("AL".equals(codeString))
189          return AL;
190        if ("DAL".equals(codeString))
191          return DAL;
192        if ("SAL".equals(codeString))
193          return SAL;
194        if ("BNN".equals(codeString))
195          return BNN;
196        if ("BNR".equals(codeString))
197          return BNR;
198        if ("BNS".equals(codeString))
199          return BNS;
200        if ("CAR".equals(codeString))
201          return CAR;
202        if ("CEN".equals(codeString))
203          return CEN;
204        if ("CNT".equals(codeString))
205          return CNT;
206        if ("CPA".equals(codeString))
207          return CPA;
208        if ("CTY".equals(codeString))
209          return CTY;
210        if ("DEL".equals(codeString))
211          return DEL;
212        if ("DINST".equals(codeString))
213          return DINST;
214        if ("DINSTA".equals(codeString))
215          return DINSTA;
216        if ("DINSTQ".equals(codeString))
217          return DINSTQ;
218        if ("DIR".equals(codeString))
219          return DIR;
220        if ("DMOD".equals(codeString))
221          return DMOD;
222        if ("DMODID".equals(codeString))
223          return DMODID;
224        if ("DPID".equals(codeString))
225          return DPID;
226        if ("INT".equals(codeString))
227          return INT;
228        if ("POB".equals(codeString))
229          return POB;
230        if ("PRE".equals(codeString))
231          return PRE;
232        if ("STA".equals(codeString))
233          return STA;
234        if ("STB".equals(codeString))
235          return STB;
236        if ("STR".equals(codeString))
237          return STR;
238        if ("STTYP".equals(codeString))
239          return STTYP;
240        if ("UNID".equals(codeString))
241          return UNID;
242        if ("UNIT".equals(codeString))
243          return UNIT;
244        if ("ZIP".equals(codeString))
245          return ZIP;
246        throw new FHIRException("Unknown V3AddressPartType code '"+codeString+"'");
247        }
248        public String toCode() {
249          switch (this) {
250            case ADL: return "ADL";
251            case AL: return "AL";
252            case DAL: return "DAL";
253            case SAL: return "SAL";
254            case BNN: return "BNN";
255            case BNR: return "BNR";
256            case BNS: return "BNS";
257            case CAR: return "CAR";
258            case CEN: return "CEN";
259            case CNT: return "CNT";
260            case CPA: return "CPA";
261            case CTY: return "CTY";
262            case DEL: return "DEL";
263            case DINST: return "DINST";
264            case DINSTA: return "DINSTA";
265            case DINSTQ: return "DINSTQ";
266            case DIR: return "DIR";
267            case DMOD: return "DMOD";
268            case DMODID: return "DMODID";
269            case DPID: return "DPID";
270            case INT: return "INT";
271            case POB: return "POB";
272            case PRE: return "PRE";
273            case STA: return "STA";
274            case STB: return "STB";
275            case STR: return "STR";
276            case STTYP: return "STTYP";
277            case UNID: return "UNID";
278            case UNIT: return "UNIT";
279            case ZIP: return "ZIP";
280            default: return "?";
281          }
282        }
283        public String getSystem() {
284          return "http://terminology.hl7.org/CodeSystem/v3-AddressPartType";
285        }
286        public String getDefinition() {
287          switch (this) {
288            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).";
289            case AL: return "Description: An address line is for either an additional locator, a delivery address or a street address.";
290            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.";
291            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.";
292            case BNN: return "The numeric portion of a building number";
293            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.";
294            case BNS: return "Any alphabetic character, fraction or other text that may appear after the numeric portion of a building number";
295            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";
296            case CEN: return "A geographic sub-unit delineated for demographic purposes.";
297            case CNT: return "Country";
298            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\".)";
299            case CTY: return "The name of the city, town, village, or other community or delivery center";
300            case DEL: return "Delimiters are printed without framing white space.  If no value component is provided, the delimiter appears as a line break.";
301            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.";
302            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.";
303            case DINSTQ: return "A number, letter or name identifying a delivery installation.  E.g., for Station A, the delivery installation qualifier would be 'A'.";
304            case DIR: return "Direction (e.g., N, S, W, E)";
305            case DMOD: return "Indicates the type of service offered, method of delivery.  For example: post office box, rural route, general delivery, etc.";
306            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).";
307            case DPID: return "A value that uniquely identifies the postal address.";
308            case INT: return "Description:An intersection denotes that the actual address is located AT or CLOSE TO the intersection OF two or more streets.";
309            case POB: return "A numbered box located in a post station.";
310            case PRE: return "A subsection of a municipality";
311            case STA: return "A sub-unit of a country with limited sovereignty in a federally organized country.";
312            case STB: return "The base name of a roadway or artery recognized by a municipality (excluding street type and direction)";
313            case STR: return "street name";
314            case STTYP: return "The designation given to the street.  (e.g. Street, Avenue, Crescent, etc.)";
315            case UNID: return "The number or name of a specific unit contained within a building or complex, as assigned by that building or complex.";
316            case UNIT: return "Indicates the type of specific unit contained within a building or complex.  E.g. Appartment, Floor";
317            case ZIP: return "A postal code designating a region defined by the postal service.";
318            default: return "?";
319          }
320        }
321        public String getDisplay() {
322          switch (this) {
323            case ADL: return "additional locator";
324            case AL: return "address line";
325            case DAL: return "delivery address line";
326            case SAL: return "street address line";
327            case BNN: return "building number numeric";
328            case BNR: return "building number";
329            case BNS: return "building number suffix";
330            case CAR: return "care of";
331            case CEN: return "census tract";
332            case CNT: return "country";
333            case CPA: return "county or parish";
334            case CTY: return "municipality";
335            case DEL: return "delimiter";
336            case DINST: return "delivery installation type";
337            case DINSTA: return "delivery installation area";
338            case DINSTQ: return "delivery installation qualifier";
339            case DIR: return "direction";
340            case DMOD: return "delivery mode";
341            case DMODID: return "delivery mode identifier";
342            case DPID: return "delivery point identifier";
343            case INT: return "intersection";
344            case POB: return "post box";
345            case PRE: return "precinct";
346            case STA: return "state or province";
347            case STB: return "street name base";
348            case STR: return "street name";
349            case STTYP: return "street type";
350            case UNID: return "unit identifier";
351            case UNIT: return "unit designator";
352            case ZIP: return "postal code";
353            default: return "?";
354          }
355    }
356
357
358}
359