001package org.hl7.fhir.dstu2016may.model.codesystems;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0
036
037
038import org.hl7.fhir.exceptions.FHIRException;
039
040public enum QicoreCommunicationMedium {
041
042        /**
043         * The communication medium has not been specified
044         */
045        UNSPECIFIED, 
046        /**
047         * The message was communicated via telephone
048         */
049        TELEPHONE, 
050        /**
051         * The message was sent via a fax transmission
052         */
053        FAX, 
054        /**
055         * The message was communicated via a medical device
056         */
057        DEVICE, 
058        /**
059         * The message was communicated via a video call
060         */
061        VIDEO, 
062        /**
063         * The message was left on the recipient's voicemail system
064         */
065        VOICEMAIL, 
066        /**
067         * The message was sent via text message (SMS)
068         */
069        TEXT, 
070        /**
071         * The message was communicated via a social media platform
072         */
073        SOCIALMEDIA, 
074        /**
075         * The message was communicated in person
076         */
077        INPERSON, 
078        /**
079         * The message was posted via conventional mail
080         */
081        MAIL, 
082        /**
083         * The message was sent as an email
084         */
085        EMAIL, 
086        /**
087         * The message was communicated via a patient portal
088         */
089        PORTAL, 
090        /**
091         * added to help the parsers
092         */
093        NULL;
094        public static QicoreCommunicationMedium fromCode(String codeString) throws FHIRException {
095            if (codeString == null || "".equals(codeString))
096                return null;
097        if ("unspecified".equals(codeString))
098          return UNSPECIFIED;
099        if ("telephone".equals(codeString))
100          return TELEPHONE;
101        if ("fax".equals(codeString))
102          return FAX;
103        if ("device".equals(codeString))
104          return DEVICE;
105        if ("video".equals(codeString))
106          return VIDEO;
107        if ("voicemail".equals(codeString))
108          return VOICEMAIL;
109        if ("text".equals(codeString))
110          return TEXT;
111        if ("social-media".equals(codeString))
112          return SOCIALMEDIA;
113        if ("in-person".equals(codeString))
114          return INPERSON;
115        if ("mail".equals(codeString))
116          return MAIL;
117        if ("email".equals(codeString))
118          return EMAIL;
119        if ("portal".equals(codeString))
120          return PORTAL;
121        throw new FHIRException("Unknown QicoreCommunicationMedium code '"+codeString+"'");
122        }
123        public String toCode() {
124          switch (this) {
125            case UNSPECIFIED: return "unspecified";
126            case TELEPHONE: return "telephone";
127            case FAX: return "fax";
128            case DEVICE: return "device";
129            case VIDEO: return "video";
130            case VOICEMAIL: return "voicemail";
131            case TEXT: return "text";
132            case SOCIALMEDIA: return "social-media";
133            case INPERSON: return "in-person";
134            case MAIL: return "mail";
135            case EMAIL: return "email";
136            case PORTAL: return "portal";
137            case NULL: return null;
138            default: return "?";
139          }
140        }
141        public String getSystem() {
142          return "http://hl7.org/fhir/qicore-communication-medium";
143        }
144        public String getDefinition() {
145          switch (this) {
146            case UNSPECIFIED: return "The communication medium has not been specified";
147            case TELEPHONE: return "The message was communicated via telephone";
148            case FAX: return "The message was sent via a fax transmission";
149            case DEVICE: return "The message was communicated via a medical device";
150            case VIDEO: return "The message was communicated via a video call";
151            case VOICEMAIL: return "The message was left on the recipient's voicemail system";
152            case TEXT: return "The message was sent via text message (SMS)";
153            case SOCIALMEDIA: return "The message was communicated via a social media platform";
154            case INPERSON: return "The message was communicated in person";
155            case MAIL: return "The message was posted via conventional mail";
156            case EMAIL: return "The message was sent as an email";
157            case PORTAL: return "The message was communicated via a patient portal";
158            case NULL: return null;
159            default: return "?";
160          }
161        }
162        public String getDisplay() {
163          switch (this) {
164            case UNSPECIFIED: return "Not Specified";
165            case TELEPHONE: return "Telephone";
166            case FAX: return "Facsimile (fax)";
167            case DEVICE: return "Via medical device";
168            case VIDEO: return "Video call";
169            case VOICEMAIL: return "Voice message (voicemail)";
170            case TEXT: return "Text message (SMS)";
171            case SOCIALMEDIA: return "Social media";
172            case INPERSON: return "In person";
173            case MAIL: return "Mail (conventional)";
174            case EMAIL: return "Electronic mail (email)";
175            case PORTAL: return "Patient portal";
176            case NULL: return null;
177            default: return "?";
178          }
179    }
180
181
182}