001package org.hl7.fhir.r4.model.codesystems;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
036
037
038import org.hl7.fhir.exceptions.FHIRException;
039
040public enum UsageContextType {
041
042        /**
043         * 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.
044         */
045        GENDER, 
046        /**
047         * 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.
048         */
049        AGE, 
050        /**
051         * 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.
052         */
053        FOCUS, 
054        /**
055         * 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.
056         */
057        USER, 
058        /**
059         * 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.
060         */
061        WORKFLOW, 
062        /**
063         * 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.
064         */
065        TASK, 
066        /**
067         * 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).
068         */
069        VENUE, 
070        /**
071         * The species to which an artifact applies. For example, SNOMED - 387961004 | Kingdom Animalia (organism).
072         */
073        SPECIES, 
074        /**
075         * A program/project of work for which this artifact is applicable.
076         */
077        PROGRAM, 
078        /**
079         * added to help the parsers
080         */
081        NULL;
082        public static UsageContextType fromCode(String codeString) throws FHIRException {
083            if (codeString == null || "".equals(codeString))
084                return null;
085        if ("gender".equals(codeString))
086          return GENDER;
087        if ("age".equals(codeString))
088          return AGE;
089        if ("focus".equals(codeString))
090          return FOCUS;
091        if ("user".equals(codeString))
092          return USER;
093        if ("workflow".equals(codeString))
094          return WORKFLOW;
095        if ("task".equals(codeString))
096          return TASK;
097        if ("venue".equals(codeString))
098          return VENUE;
099        if ("species".equals(codeString))
100          return SPECIES;
101        if ("program".equals(codeString))
102          return PROGRAM;
103        throw new FHIRException("Unknown UsageContextType code '"+codeString+"'");
104        }
105        public String toCode() {
106          switch (this) {
107            case GENDER: return "gender";
108            case AGE: return "age";
109            case FOCUS: return "focus";
110            case USER: return "user";
111            case WORKFLOW: return "workflow";
112            case TASK: return "task";
113            case VENUE: return "venue";
114            case SPECIES: return "species";
115            case PROGRAM: return "program";
116            case NULL: return null;
117            default: return "?";
118          }
119        }
120        public String getSystem() {
121          return "http://terminology.hl7.org/CodeSystem/usage-context-type";
122        }
123        public String getDefinition() {
124          switch (this) {
125            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.";
126            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.";
127            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.";
128            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.";
129            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.";
130            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.";
131            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).";
132            case SPECIES: return "The species to which an artifact applies. For example, SNOMED - 387961004 | Kingdom Animalia (organism).";
133            case PROGRAM: return "A program/project of work for which this artifact is applicable.";
134            case NULL: return null;
135            default: return "?";
136          }
137        }
138        public String getDisplay() {
139          switch (this) {
140            case GENDER: return "Gender";
141            case AGE: return "Age Range";
142            case FOCUS: return "Clinical Focus";
143            case USER: return "User Type";
144            case WORKFLOW: return "Workflow Setting";
145            case TASK: return "Workflow Task";
146            case VENUE: return "Clinical Venue";
147            case SPECIES: return "Species";
148            case PROGRAM: return "Program";
149            case NULL: return null;
150            default: return "?";
151          }
152    }
153
154
155}