001package org.hl7.fhir.r4.model.codesystems;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r4
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/*
025  Copyright (c) 2011+, HL7, Inc.
026  All rights reserved.
027  
028  Redistribution and use in source and binary forms, with or without modification, 
029  are permitted provided that the following conditions are met:
030  
031   * Redistributions of source code must retain the above copyright notice, this 
032     list of conditions and the following disclaimer.
033   * Redistributions in binary form must reproduce the above copyright notice, 
034     this list of conditions and the following disclaimer in the documentation 
035     and/or other materials provided with the distribution.
036   * Neither the name of HL7 nor the names of its contributors may be used to 
037     endorse or promote products derived from this software without specific 
038     prior written permission.
039  
040  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
041  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
042  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
043  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
044  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
045  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
046  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
047  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
048  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
049  POSSIBILITY OF SUCH DAMAGE.
050  
051*/
052
053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
054
055
056import org.hl7.fhir.exceptions.FHIRException;
057
058public enum V3AddressPartType {
059
060        /**
061         * 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).
062         */
063        ADL, 
064        /**
065         * Description: An address line is for either an additional locator, a delivery address or a street address.
066         */
067        AL, 
068        /**
069         * 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.
070         */
071        DAL, 
072        /**
073         * 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.
074         */
075        SAL, 
076        /**
077         * The numeric portion of a building number
078         */
079        BNN, 
080        /**
081         * 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.
082         */
083        BNR, 
084        /**
085         * Any alphabetic character, fraction or other text that may appear after the numeric portion of a building number
086         */
087        BNS, 
088        /**
089         * 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
090         */
091        CAR, 
092        /**
093         * A geographic sub-unit delineated for demographic purposes.
094         */
095        CEN, 
096        /**
097         * Country
098         */
099        CNT, 
100        /**
101         * A sub-unit of a state or province. (49 of the United States of America use the term "county;" Louisiana uses the term "parish".)
102         */
103        CPA, 
104        /**
105         * The name of the city, town, village, or other community or delivery center
106         */
107        CTY, 
108        /**
109         * Delimiters are printed without framing white space.  If no value component is provided, the delimiter appears as a line break.
110         */
111        DEL, 
112        /**
113         * 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.
114         */
115        DINST, 
116        /**
117         * 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.
118         */
119        DINSTA, 
120        /**
121         * A number, letter or name identifying a delivery installation.  E.g., for Station A, the delivery installation qualifier would be 'A'.
122         */
123        DINSTQ, 
124        /**
125         * Direction (e.g., N, S, W, E)
126         */
127        DIR, 
128        /**
129         * Indicates the type of service offered, method of delivery.  For example: post office box, rural route, general delivery, etc.
130         */
131        DMOD, 
132        /**
133         * 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).
134         */
135        DMODID, 
136        /**
137         * A value that uniquely identifies the postal address.
138         */
139        DPID, 
140        /**
141         * Description:An intersection denotes that the actual address is located AT or CLOSE TO the intersection OF two or more streets.
142         */
143        INT, 
144        /**
145         * A numbered box located in a post station.
146         */
147        POB, 
148        /**
149         * A subsection of a municipality
150         */
151        PRE, 
152        /**
153         * A sub-unit of a country with limited sovereignty in a federally organized country.
154         */
155        STA, 
156        /**
157         * The base name of a roadway or artery recognized by a municipality (excluding street type and direction)
158         */
159        STB, 
160        /**
161         * street name
162         */
163        STR, 
164        /**
165         * The designation given to the street.  (e.g. Street, Avenue, Crescent, etc.)
166         */
167        STTYP, 
168        /**
169         * The number or name of a specific unit contained within a building or complex, as assigned by that building or complex.
170         */
171        UNID, 
172        /**
173         * Indicates the type of specific unit contained within a building or complex.  E.g. Appartment, Floor
174         */
175        UNIT, 
176        /**
177         * A postal code designating a region defined by the postal service.
178         */
179        ZIP, 
180        /**
181         * added to help the parsers
182         */
183        NULL;
184        public static V3AddressPartType fromCode(String codeString) throws FHIRException {
185            if (codeString == null || "".equals(codeString))
186                return null;
187        if ("ADL".equals(codeString))
188          return ADL;
189        if ("AL".equals(codeString))
190          return AL;
191        if ("DAL".equals(codeString))
192          return DAL;
193        if ("SAL".equals(codeString))
194          return SAL;
195        if ("BNN".equals(codeString))
196          return BNN;
197        if ("BNR".equals(codeString))
198          return BNR;
199        if ("BNS".equals(codeString))
200          return BNS;
201        if ("CAR".equals(codeString))
202          return CAR;
203        if ("CEN".equals(codeString))
204          return CEN;
205        if ("CNT".equals(codeString))
206          return CNT;
207        if ("CPA".equals(codeString))
208          return CPA;
209        if ("CTY".equals(codeString))
210          return CTY;
211        if ("DEL".equals(codeString))
212          return DEL;
213        if ("DINST".equals(codeString))
214          return DINST;
215        if ("DINSTA".equals(codeString))
216          return DINSTA;
217        if ("DINSTQ".equals(codeString))
218          return DINSTQ;
219        if ("DIR".equals(codeString))
220          return DIR;
221        if ("DMOD".equals(codeString))
222          return DMOD;
223        if ("DMODID".equals(codeString))
224          return DMODID;
225        if ("DPID".equals(codeString))
226          return DPID;
227        if ("INT".equals(codeString))
228          return INT;
229        if ("POB".equals(codeString))
230          return POB;
231        if ("PRE".equals(codeString))
232          return PRE;
233        if ("STA".equals(codeString))
234          return STA;
235        if ("STB".equals(codeString))
236          return STB;
237        if ("STR".equals(codeString))
238          return STR;
239        if ("STTYP".equals(codeString))
240          return STTYP;
241        if ("UNID".equals(codeString))
242          return UNID;
243        if ("UNIT".equals(codeString))
244          return UNIT;
245        if ("ZIP".equals(codeString))
246          return ZIP;
247        throw new FHIRException("Unknown V3AddressPartType code '"+codeString+"'");
248        }
249        public String toCode() {
250          switch (this) {
251            case ADL: return "ADL";
252            case AL: return "AL";
253            case DAL: return "DAL";
254            case SAL: return "SAL";
255            case BNN: return "BNN";
256            case BNR: return "BNR";
257            case BNS: return "BNS";
258            case CAR: return "CAR";
259            case CEN: return "CEN";
260            case CNT: return "CNT";
261            case CPA: return "CPA";
262            case CTY: return "CTY";
263            case DEL: return "DEL";
264            case DINST: return "DINST";
265            case DINSTA: return "DINSTA";
266            case DINSTQ: return "DINSTQ";
267            case DIR: return "DIR";
268            case DMOD: return "DMOD";
269            case DMODID: return "DMODID";
270            case DPID: return "DPID";
271            case INT: return "INT";
272            case POB: return "POB";
273            case PRE: return "PRE";
274            case STA: return "STA";
275            case STB: return "STB";
276            case STR: return "STR";
277            case STTYP: return "STTYP";
278            case UNID: return "UNID";
279            case UNIT: return "UNIT";
280            case ZIP: return "ZIP";
281            default: return "?";
282          }
283        }
284        public String getSystem() {
285          return "http://terminology.hl7.org/CodeSystem/v3-AddressPartType";
286        }
287        public String getDefinition() {
288          switch (this) {
289            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).";
290            case AL: return "Description: An address line is for either an additional locator, a delivery address or a street address.";
291            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.";
292            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.";
293            case BNN: return "The numeric portion of a building number";
294            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.";
295            case BNS: return "Any alphabetic character, fraction or other text that may appear after the numeric portion of a building number";
296            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";
297            case CEN: return "A geographic sub-unit delineated for demographic purposes.";
298            case CNT: return "Country";
299            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\".)";
300            case CTY: return "The name of the city, town, village, or other community or delivery center";
301            case DEL: return "Delimiters are printed without framing white space.  If no value component is provided, the delimiter appears as a line break.";
302            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.";
303            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.";
304            case DINSTQ: return "A number, letter or name identifying a delivery installation.  E.g., for Station A, the delivery installation qualifier would be 'A'.";
305            case DIR: return "Direction (e.g., N, S, W, E)";
306            case DMOD: return "Indicates the type of service offered, method of delivery.  For example: post office box, rural route, general delivery, etc.";
307            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).";
308            case DPID: return "A value that uniquely identifies the postal address.";
309            case INT: return "Description:An intersection denotes that the actual address is located AT or CLOSE TO the intersection OF two or more streets.";
310            case POB: return "A numbered box located in a post station.";
311            case PRE: return "A subsection of a municipality";
312            case STA: return "A sub-unit of a country with limited sovereignty in a federally organized country.";
313            case STB: return "The base name of a roadway or artery recognized by a municipality (excluding street type and direction)";
314            case STR: return "street name";
315            case STTYP: return "The designation given to the street.  (e.g. Street, Avenue, Crescent, etc.)";
316            case UNID: return "The number or name of a specific unit contained within a building or complex, as assigned by that building or complex.";
317            case UNIT: return "Indicates the type of specific unit contained within a building or complex.  E.g. Appartment, Floor";
318            case ZIP: return "A postal code designating a region defined by the postal service.";
319            default: return "?";
320          }
321        }
322        public String getDisplay() {
323          switch (this) {
324            case ADL: return "additional locator";
325            case AL: return "address line";
326            case DAL: return "delivery address line";
327            case SAL: return "street address line";
328            case BNN: return "building number numeric";
329            case BNR: return "building number";
330            case BNS: return "building number suffix";
331            case CAR: return "care of";
332            case CEN: return "census tract";
333            case CNT: return "country";
334            case CPA: return "county or parish";
335            case CTY: return "municipality";
336            case DEL: return "delimiter";
337            case DINST: return "delivery installation type";
338            case DINSTA: return "delivery installation area";
339            case DINSTQ: return "delivery installation qualifier";
340            case DIR: return "direction";
341            case DMOD: return "delivery mode";
342            case DMODID: return "delivery mode identifier";
343            case DPID: return "delivery point identifier";
344            case INT: return "intersection";
345            case POB: return "post box";
346            case PRE: return "precinct";
347            case STA: return "state or province";
348            case STB: return "street name base";
349            case STR: return "street name";
350            case STTYP: return "street type";
351            case UNID: return "unit identifier";
352            case UNIT: return "unit designator";
353            case ZIP: return "postal code";
354            default: return "?";
355          }
356    }
357
358
359}
360