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 Thu, Dec 27, 2018 10:06-0500 for FHIR v4.0.0 033 034 035import org.hl7.fhir.exceptions.FHIRException; 036 037public enum UsageContextType { 038 039 /** 040 * The gender of the patient. For this context type, appropriate values can be found in the http://hl7.org/fhir/ValueSet/administrative-gender value set. 041 */ 042 GENDER, 043 /** 044 * The age of the patient. For this context type, the value could be a range that specifies the applicable ages or a code from an appropriate value set such as the MeSH value set http://terminology.hl7.org/ValueSet/v3-AgeGroupObservationValue. 045 */ 046 AGE, 047 /** 048 * The clinical concept(s) addressed by the artifact. For example, disease, diagnostic test interpretation, medication ordering as in http://hl7.org/fhir/ValueSet/condition-code. 049 */ 050 FOCUS, 051 /** 052 * The clinical specialty of the context in which the patient is being treated - For example, PCP, Patient, Cardiologist, Behavioral Professional, Oral Health Professional, Prescriber, etc... taken from a specialty value set such as the NUCC Health Care provider taxonomy value set http://hl7.org/fhir/ValueSet/provider-taxonomy. 053 */ 054 USER, 055 /** 056 * The settings in which the artifact is intended for use. For example, admission, pre-op, etc. For example, the ActEncounterCode value set http://terminology.hl7.org/ValueSet/v3-ActEncounterCode. 057 */ 058 WORKFLOW, 059 /** 060 * The context for the clinical task(s) represented by this artifact. For example, this could be any task context represented by the HL7 ActTaskCode value set http://terminology.hl7.org/ValueSet/v3-ActTaskCode. General categories include: order entry, patient documentation and patient information review. 061 */ 062 TASK, 063 /** 064 * The venue in which an artifact could be used. For example, Outpatient, Inpatient, Home, Nursing home. The code value may originate from the HL7 ServiceDeliveryLocationRoleType value set (http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType). 065 */ 066 VENUE, 067 /** 068 * The species to which an artifact applies. For example, SNOMED - 387961004 | Kingdom Animalia (organism). 069 */ 070 SPECIES, 071 /** 072 * A program/project of work for which this artifact is applicable. 073 */ 074 PROGRAM, 075 /** 076 * added to help the parsers 077 */ 078 NULL; 079 public static UsageContextType fromCode(String codeString) throws FHIRException { 080 if (codeString == null || "".equals(codeString)) 081 return null; 082 if ("gender".equals(codeString)) 083 return GENDER; 084 if ("age".equals(codeString)) 085 return AGE; 086 if ("focus".equals(codeString)) 087 return FOCUS; 088 if ("user".equals(codeString)) 089 return USER; 090 if ("workflow".equals(codeString)) 091 return WORKFLOW; 092 if ("task".equals(codeString)) 093 return TASK; 094 if ("venue".equals(codeString)) 095 return VENUE; 096 if ("species".equals(codeString)) 097 return SPECIES; 098 if ("program".equals(codeString)) 099 return PROGRAM; 100 throw new FHIRException("Unknown UsageContextType code '"+codeString+"'"); 101 } 102 public String toCode() { 103 switch (this) { 104 case GENDER: return "gender"; 105 case AGE: return "age"; 106 case FOCUS: return "focus"; 107 case USER: return "user"; 108 case WORKFLOW: return "workflow"; 109 case TASK: return "task"; 110 case VENUE: return "venue"; 111 case SPECIES: return "species"; 112 case PROGRAM: return "program"; 113 default: return "?"; 114 } 115 } 116 public String getSystem() { 117 return "http://terminology.hl7.org/CodeSystem/usage-context-type"; 118 } 119 public String getDefinition() { 120 switch (this) { 121 case GENDER: return "The gender of the patient. For this context type, appropriate values can be found in the http://hl7.org/fhir/ValueSet/administrative-gender value set."; 122 case AGE: return "The age of the patient. For this context type, the value could be a range that specifies the applicable ages or a code from an appropriate value set such as the MeSH value set http://terminology.hl7.org/ValueSet/v3-AgeGroupObservationValue."; 123 case FOCUS: return "The clinical concept(s) addressed by the artifact. For example, disease, diagnostic test interpretation, medication ordering as in http://hl7.org/fhir/ValueSet/condition-code."; 124 case USER: return "The clinical specialty of the context in which the patient is being treated - For example, PCP, Patient, Cardiologist, Behavioral Professional, Oral Health Professional, Prescriber, etc... taken from a specialty value set such as the NUCC Health Care provider taxonomy value set http://hl7.org/fhir/ValueSet/provider-taxonomy."; 125 case WORKFLOW: return "The settings in which the artifact is intended for use. For example, admission, pre-op, etc. For example, the ActEncounterCode value set http://terminology.hl7.org/ValueSet/v3-ActEncounterCode."; 126 case TASK: return "The context for the clinical task(s) represented by this artifact. For example, this could be any task context represented by the HL7 ActTaskCode value set http://terminology.hl7.org/ValueSet/v3-ActTaskCode. General categories include: order entry, patient documentation and patient information review."; 127 case VENUE: return "The venue in which an artifact could be used. For example, Outpatient, Inpatient, Home, Nursing home. The code value may originate from the HL7 ServiceDeliveryLocationRoleType value set (http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType)."; 128 case SPECIES: return "The species to which an artifact applies. For example, SNOMED - 387961004 | Kingdom Animalia (organism)."; 129 case PROGRAM: return "A program/project of work for which this artifact is applicable."; 130 default: return "?"; 131 } 132 } 133 public String getDisplay() { 134 switch (this) { 135 case GENDER: return "Gender"; 136 case AGE: return "Age Range"; 137 case FOCUS: return "Clinical Focus"; 138 case USER: return "User Type"; 139 case WORKFLOW: return "Workflow Setting"; 140 case TASK: return "Workflow Task"; 141 case VENUE: return "Clinical Venue"; 142 case SPECIES: return "Species"; 143 case PROGRAM: return "Program"; 144 default: return "?"; 145 } 146 } 147 148 149} 150