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 ObjectRole {
058
059        /**
060         * This object is the patient that is the subject of care related to this event.  It is identifiable by patient ID or equivalent.  The patient may be either human or animal.
061         */
062        _1, 
063        /**
064         * This is a location identified as related to the event.  This is usually the location where the event took place.  Note that for shipping, the usual events are arrival at a location or departure from a location.
065         */
066        _2, 
067        /**
068         * This object is any kind of persistent document created as a result of the event.  This could be a paper report, film, electronic report, DICOM Study, etc.  Issues related to medical records life cycle management are conveyed elsewhere.
069         */
070        _3, 
071        /**
072         * A logical object related to a health record event.  This is any healthcare  specific resource (object) not restricted to FHIR defined Resources.
073         */
074        _4, 
075        /**
076         * This is any configurable file used to control creation of documents.  Examples include the objects maintained by the HL7 Master File transactions, Value Sets, etc.
077         */
078        _5, 
079        /**
080         * A human participant not otherwise identified by some other category.
081         */
082        _6, 
083        /**
084         * (deprecated).
085         */
086        _7, 
087        /**
088         * Typically, a licensed person who is providing or performing care related to the event, generally a physician.   The key distinction between doctor and practitioner is with regards to their role, not the licensing.  The doctor is the human who actually performed the work.  The practitioner is the human or organization that is responsible for the work.
089         */
090        _8, 
091        /**
092         * A person or system that is being notified as part of the event.  This is relevant in situations where automated systems provide notifications to other parties when an event took place.
093         */
094        _9, 
095        /**
096         * Insurance company, or any other organization who accepts responsibility for paying for the healthcare event.
097         */
098        _10, 
099        /**
100         * A person or active system object involved in the event with a security role.
101         */
102        _11, 
103        /**
104         * A person or system object involved in the event with the authority to modify security roles of other objects.
105         */
106        _12, 
107        /**
108         * A passive object, such as a role table, that is relevant to the event.
109         */
110        _13, 
111        /**
112         * (deprecated)  Relevant to certain RBAC security methodologies.
113         */
114        _14, 
115        /**
116         * Any person or organization responsible for providing care.  This encompasses all forms of care, licensed or otherwise, and all sorts of teams and care groups. Note the distinction between practitioner and the doctor that actually provided the care to the patient.
117         */
118        _15, 
119        /**
120         * The source or destination for data transfer, when it does not match some other role.
121         */
122        _16, 
123        /**
124         * A source or destination for data transfer that acts as an archive, database, or similar role.
125         */
126        _17, 
127        /**
128         * An object that holds schedule information.  This could be an appointment book, availability information, etc.
129         */
130        _18, 
131        /**
132         * An organization or person that is the recipient of services.  This could be an organization that is buying services for a patient, or a person that is buying services for an animal.
133         */
134        _19, 
135        /**
136         * An order, task, work item, procedure step, or other description of work to be performed; e.g. a particular instance of an MPPS.
137         */
138        _20, 
139        /**
140         * A list of jobs or a system that provides lists of jobs; e.g. an MWL SCP.
141         */
142        _21, 
143        /**
144         * (Deprecated).
145         */
146        _22, 
147        /**
148         * An object that specifies or controls the routing or delivery of items.  For example, a distribution list is the routing criteria for mail.  The items delivered may be documents, jobs, or other objects.
149         */
150        _23, 
151        /**
152         * The contents of a query.  This is used to capture the contents of any kind of query.  For security surveillance purposes knowing the queries being made is very important.
153         */
154        _24, 
155        /**
156         * added to help the parsers
157         */
158        NULL;
159        public static ObjectRole fromCode(String codeString) throws FHIRException {
160            if (codeString == null || "".equals(codeString))
161                return null;
162        if ("1".equals(codeString))
163          return _1;
164        if ("2".equals(codeString))
165          return _2;
166        if ("3".equals(codeString))
167          return _3;
168        if ("4".equals(codeString))
169          return _4;
170        if ("5".equals(codeString))
171          return _5;
172        if ("6".equals(codeString))
173          return _6;
174        if ("7".equals(codeString))
175          return _7;
176        if ("8".equals(codeString))
177          return _8;
178        if ("9".equals(codeString))
179          return _9;
180        if ("10".equals(codeString))
181          return _10;
182        if ("11".equals(codeString))
183          return _11;
184        if ("12".equals(codeString))
185          return _12;
186        if ("13".equals(codeString))
187          return _13;
188        if ("14".equals(codeString))
189          return _14;
190        if ("15".equals(codeString))
191          return _15;
192        if ("16".equals(codeString))
193          return _16;
194        if ("17".equals(codeString))
195          return _17;
196        if ("18".equals(codeString))
197          return _18;
198        if ("19".equals(codeString))
199          return _19;
200        if ("20".equals(codeString))
201          return _20;
202        if ("21".equals(codeString))
203          return _21;
204        if ("22".equals(codeString))
205          return _22;
206        if ("23".equals(codeString))
207          return _23;
208        if ("24".equals(codeString))
209          return _24;
210        throw new FHIRException("Unknown ObjectRole code '"+codeString+"'");
211        }
212        public String toCode() {
213          switch (this) {
214            case _1: return "1";
215            case _2: return "2";
216            case _3: return "3";
217            case _4: return "4";
218            case _5: return "5";
219            case _6: return "6";
220            case _7: return "7";
221            case _8: return "8";
222            case _9: return "9";
223            case _10: return "10";
224            case _11: return "11";
225            case _12: return "12";
226            case _13: return "13";
227            case _14: return "14";
228            case _15: return "15";
229            case _16: return "16";
230            case _17: return "17";
231            case _18: return "18";
232            case _19: return "19";
233            case _20: return "20";
234            case _21: return "21";
235            case _22: return "22";
236            case _23: return "23";
237            case _24: return "24";
238            default: return "?";
239          }
240        }
241        public String getSystem() {
242          return "http://terminology.hl7.org/CodeSystem/object-role";
243        }
244        public String getDefinition() {
245          switch (this) {
246            case _1: return "This object is the patient that is the subject of care related to this event.  It is identifiable by patient ID or equivalent.  The patient may be either human or animal.";
247            case _2: return "This is a location identified as related to the event.  This is usually the location where the event took place.  Note that for shipping, the usual events are arrival at a location or departure from a location.";
248            case _3: return "This object is any kind of persistent document created as a result of the event.  This could be a paper report, film, electronic report, DICOM Study, etc.  Issues related to medical records life cycle management are conveyed elsewhere.";
249            case _4: return "A logical object related to a health record event.  This is any healthcare  specific resource (object) not restricted to FHIR defined Resources.";
250            case _5: return "This is any configurable file used to control creation of documents.  Examples include the objects maintained by the HL7 Master File transactions, Value Sets, etc.";
251            case _6: return "A human participant not otherwise identified by some other category.";
252            case _7: return "(deprecated).";
253            case _8: return "Typically, a licensed person who is providing or performing care related to the event, generally a physician.   The key distinction between doctor and practitioner is with regards to their role, not the licensing.  The doctor is the human who actually performed the work.  The practitioner is the human or organization that is responsible for the work.";
254            case _9: return "A person or system that is being notified as part of the event.  This is relevant in situations where automated systems provide notifications to other parties when an event took place.";
255            case _10: return "Insurance company, or any other organization who accepts responsibility for paying for the healthcare event.";
256            case _11: return "A person or active system object involved in the event with a security role.";
257            case _12: return "A person or system object involved in the event with the authority to modify security roles of other objects.";
258            case _13: return "A passive object, such as a role table, that is relevant to the event.";
259            case _14: return "(deprecated)  Relevant to certain RBAC security methodologies.";
260            case _15: return "Any person or organization responsible for providing care.  This encompasses all forms of care, licensed or otherwise, and all sorts of teams and care groups. Note the distinction between practitioner and the doctor that actually provided the care to the patient.";
261            case _16: return "The source or destination for data transfer, when it does not match some other role.";
262            case _17: return "A source or destination for data transfer that acts as an archive, database, or similar role.";
263            case _18: return "An object that holds schedule information.  This could be an appointment book, availability information, etc.";
264            case _19: return "An organization or person that is the recipient of services.  This could be an organization that is buying services for a patient, or a person that is buying services for an animal.";
265            case _20: return "An order, task, work item, procedure step, or other description of work to be performed; e.g. a particular instance of an MPPS.";
266            case _21: return "A list of jobs or a system that provides lists of jobs; e.g. an MWL SCP.";
267            case _22: return "(Deprecated).";
268            case _23: return "An object that specifies or controls the routing or delivery of items.  For example, a distribution list is the routing criteria for mail.  The items delivered may be documents, jobs, or other objects.";
269            case _24: return "The contents of a query.  This is used to capture the contents of any kind of query.  For security surveillance purposes knowing the queries being made is very important.";
270            default: return "?";
271          }
272        }
273        public String getDisplay() {
274          switch (this) {
275            case _1: return "Patient";
276            case _2: return "Location";
277            case _3: return "Report";
278            case _4: return "Domain Resource";
279            case _5: return "Master file";
280            case _6: return "User";
281            case _7: return "List";
282            case _8: return "Doctor";
283            case _9: return "Subscriber";
284            case _10: return "Guarantor";
285            case _11: return "Security User Entity";
286            case _12: return "Security User Group";
287            case _13: return "Security Resource";
288            case _14: return "Security Granularity Definition";
289            case _15: return "Practitioner";
290            case _16: return "Data Destination";
291            case _17: return "Data Repository";
292            case _18: return "Schedule";
293            case _19: return "Customer";
294            case _20: return "Job";
295            case _21: return "Job Stream";
296            case _22: return "Table";
297            case _23: return "Routing Criteria";
298            case _24: return "Query";
299            default: return "?";
300          }
301    }
302
303
304}
305