
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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 033 034import org.hl7.fhir.exceptions.FHIRException; 035 036public enum ObjectRole { 037 038 /** 039 * This object is the patient that is the subject of care related to this event. 040 * It is identifiable by patient ID or equivalent. The patient may be either 041 * human or animal. 042 */ 043 _1, 044 /** 045 * This is a location identified as related to the event. This is usually the 046 * location where the event took place. Note that for shipping, the usual events 047 * are arrival at a location or departure from a location. 048 */ 049 _2, 050 /** 051 * This object is any kind of persistent document created as a result of the 052 * event. This could be a paper report, film, electronic report, DICOM Study, 053 * etc. Issues related to medical records life cycle management are conveyed 054 * elsewhere. 055 */ 056 _3, 057 /** 058 * A logical object related to a health record event. This is any healthcare 059 * specific resource (object) not restricted to FHIR defined Resources. 060 */ 061 _4, 062 /** 063 * This is any configurable file used to control creation of documents. Examples 064 * include the objects maintained by the HL7 Master File transactions, Value 065 * Sets, etc. 066 */ 067 _5, 068 /** 069 * A human participant not otherwise identified by some other category. 070 */ 071 _6, 072 /** 073 * (deprecated). 074 */ 075 _7, 076 /** 077 * Typically, a licensed person who is providing or performing care related to 078 * the event, generally a physician. The key distinction between doctor and 079 * practitioner is with regards to their role, not the licensing. The doctor is 080 * the human who actually performed the work. The practitioner is the human or 081 * organization that is responsible for the work. 082 */ 083 _8, 084 /** 085 * A person or system that is being notified as part of the event. This is 086 * relevant in situations where automated systems provide notifications to other 087 * parties when an event took place. 088 */ 089 _9, 090 /** 091 * Insurance company, or any other organization who accepts responsibility for 092 * paying for the healthcare event. 093 */ 094 _10, 095 /** 096 * A person or active system object involved in the event with a security role. 097 */ 098 _11, 099 /** 100 * A person or system object involved in the event with the authority to modify 101 * security roles of other objects. 102 */ 103 _12, 104 /** 105 * A passive object, such as a role table, that is relevant to the event. 106 */ 107 _13, 108 /** 109 * (deprecated) Relevant to certain RBAC security methodologies. 110 */ 111 _14, 112 /** 113 * Any person or organization responsible for providing care. This encompasses 114 * all forms of care, licensed or otherwise, and all sorts of teams and care 115 * groups. Note the distinction between practitioner and the doctor that 116 * 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 121 * other role. 122 */ 123 _16, 124 /** 125 * A source or destination for data transfer that acts as an archive, database, 126 * or similar role. 127 */ 128 _17, 129 /** 130 * An object that holds schedule information. This could be an appointment book, 131 * availability information, etc. 132 */ 133 _18, 134 /** 135 * An organization or person that is the recipient of services. This could be an 136 * organization that is buying services for a patient, or a person that is 137 * buying services for an animal. 138 */ 139 _19, 140 /** 141 * An order, task, work item, procedure step, or other description of work to be 142 * performed; e.g. a particular instance of an MPPS. 143 */ 144 _20, 145 /** 146 * A list of jobs or a system that provides lists of jobs; e.g. an MWL SCP. 147 */ 148 _21, 149 /** 150 * (Deprecated). 151 */ 152 _22, 153 /** 154 * An object that specifies or controls the routing or delivery of items. For 155 * example, a distribution list is the routing criteria for mail. The items 156 * delivered may be documents, jobs, or other objects. 157 */ 158 _23, 159 /** 160 * The contents of a query. This is used to capture the contents of any kind of 161 * query. For security surveillance purposes knowing the queries being made is 162 * very important. 163 */ 164 _24, 165 /** 166 * The source or origin of data, when there is no other matching role available. 167 */ 168 _25, 169 /** 170 * A data processing element that creates, analyzes, modifies, or manipulates 171 * data as part of this event. 172 */ 173 _26, 174 /** 175 * added to help the parsers 176 */ 177 NULL; 178 179 public static ObjectRole fromCode(String codeString) throws FHIRException { 180 if (codeString == null || "".equals(codeString)) 181 return null; 182 if ("1".equals(codeString)) 183 return _1; 184 if ("2".equals(codeString)) 185 return _2; 186 if ("3".equals(codeString)) 187 return _3; 188 if ("4".equals(codeString)) 189 return _4; 190 if ("5".equals(codeString)) 191 return _5; 192 if ("6".equals(codeString)) 193 return _6; 194 if ("7".equals(codeString)) 195 return _7; 196 if ("8".equals(codeString)) 197 return _8; 198 if ("9".equals(codeString)) 199 return _9; 200 if ("10".equals(codeString)) 201 return _10; 202 if ("11".equals(codeString)) 203 return _11; 204 if ("12".equals(codeString)) 205 return _12; 206 if ("13".equals(codeString)) 207 return _13; 208 if ("14".equals(codeString)) 209 return _14; 210 if ("15".equals(codeString)) 211 return _15; 212 if ("16".equals(codeString)) 213 return _16; 214 if ("17".equals(codeString)) 215 return _17; 216 if ("18".equals(codeString)) 217 return _18; 218 if ("19".equals(codeString)) 219 return _19; 220 if ("20".equals(codeString)) 221 return _20; 222 if ("21".equals(codeString)) 223 return _21; 224 if ("22".equals(codeString)) 225 return _22; 226 if ("23".equals(codeString)) 227 return _23; 228 if ("24".equals(codeString)) 229 return _24; 230 if ("25".equals(codeString)) 231 return _25; 232 if ("26".equals(codeString)) 233 return _26; 234 throw new FHIRException("Unknown ObjectRole code '" + codeString + "'"); 235 } 236 237 public String toCode() { 238 switch (this) { 239 case _1: 240 return "1"; 241 case _2: 242 return "2"; 243 case _3: 244 return "3"; 245 case _4: 246 return "4"; 247 case _5: 248 return "5"; 249 case _6: 250 return "6"; 251 case _7: 252 return "7"; 253 case _8: 254 return "8"; 255 case _9: 256 return "9"; 257 case _10: 258 return "10"; 259 case _11: 260 return "11"; 261 case _12: 262 return "12"; 263 case _13: 264 return "13"; 265 case _14: 266 return "14"; 267 case _15: 268 return "15"; 269 case _16: 270 return "16"; 271 case _17: 272 return "17"; 273 case _18: 274 return "18"; 275 case _19: 276 return "19"; 277 case _20: 278 return "20"; 279 case _21: 280 return "21"; 281 case _22: 282 return "22"; 283 case _23: 284 return "23"; 285 case _24: 286 return "24"; 287 case _25: 288 return "25"; 289 case _26: 290 return "26"; 291 case NULL: 292 return null; 293 default: 294 return "?"; 295 } 296 } 297 298 public String getSystem() { 299 return "http://terminology.hl7.org/CodeSystem/object-role"; 300 } 301 302 public String getDefinition() { 303 switch (this) { 304 case _1: 305 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."; 306 case _2: 307 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."; 308 case _3: 309 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."; 310 case _4: 311 return "A logical object related to a health record event. This is any healthcare specific resource (object) not restricted to FHIR defined Resources."; 312 case _5: 313 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."; 314 case _6: 315 return "A human participant not otherwise identified by some other category."; 316 case _7: 317 return "(deprecated)."; 318 case _8: 319 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."; 320 case _9: 321 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."; 322 case _10: 323 return "Insurance company, or any other organization who accepts responsibility for paying for the healthcare event."; 324 case _11: 325 return "A person or active system object involved in the event with a security role."; 326 case _12: 327 return "A person or system object involved in the event with the authority to modify security roles of other objects."; 328 case _13: 329 return "A passive object, such as a role table, that is relevant to the event."; 330 case _14: 331 return "(deprecated) Relevant to certain RBAC security methodologies."; 332 case _15: 333 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."; 334 case _16: 335 return "The source or destination for data transfer, when it does not match some other role."; 336 case _17: 337 return "A source or destination for data transfer that acts as an archive, database, or similar role."; 338 case _18: 339 return "An object that holds schedule information. This could be an appointment book, availability information, etc."; 340 case _19: 341 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."; 342 case _20: 343 return "An order, task, work item, procedure step, or other description of work to be performed; e.g. a particular instance of an MPPS."; 344 case _21: 345 return "A list of jobs or a system that provides lists of jobs; e.g. an MWL SCP."; 346 case _22: 347 return "(Deprecated)."; 348 case _23: 349 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."; 350 case _24: 351 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."; 352 case _25: 353 return "The source or origin of data, when there is no other matching role available."; 354 case _26: 355 return "A data processing element that creates, analyzes, modifies, or manipulates data as part of this event."; 356 case NULL: 357 return null; 358 default: 359 return "?"; 360 } 361 } 362 363 public String getDisplay() { 364 switch (this) { 365 case _1: 366 return "Patient"; 367 case _2: 368 return "Location"; 369 case _3: 370 return "Report"; 371 case _4: 372 return "Domain Resource"; 373 case _5: 374 return "Master file"; 375 case _6: 376 return "User"; 377 case _7: 378 return "List"; 379 case _8: 380 return "Doctor"; 381 case _9: 382 return "Subscriber"; 383 case _10: 384 return "Guarantor"; 385 case _11: 386 return "Security User Entity"; 387 case _12: 388 return "Security User Group"; 389 case _13: 390 return "Security Resource"; 391 case _14: 392 return "Security Granularity Definition"; 393 case _15: 394 return "Practitioner"; 395 case _16: 396 return "Data Destination"; 397 case _17: 398 return "Data Repository"; 399 case _18: 400 return "Schedule"; 401 case _19: 402 return "Customer"; 403 case _20: 404 return "Job"; 405 case _21: 406 return "Job Stream"; 407 case _22: 408 return "Table"; 409 case _23: 410 return "Routing Criteria"; 411 case _24: 412 return "Query"; 413 case _25: 414 return "Data Source"; 415 case _26: 416 return "Processing Element"; 417 case NULL: 418 return null; 419 default: 420 return "?"; 421 } 422 } 423 424}