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