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