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