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, Sep 13, 2018 09:04-0400 for FHIR v3.5.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum V3ContextControl {
038
039        /**
040         * The association adds to the existing context associated with the Act.  Both this association and any associations propagated from ancestor Acts are interpreted as being related to this Act.
041         */
042        _CONTEXTCONTROLADDITIVE, 
043        /**
044         * The association adds to the existing context associated with the Act, but will not propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as "Additive, Non-Propagating" it means that the author will be added to the set of author participations that have propagated from ancestor Acts for the purpose of this Act. However only the previously propagated authors will propagate to any child Acts that allow context to be propagated.
045         */
046        AN, 
047        /**
048         * The association adds to the existing context associated with the Act, and will propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as "Additive, Propagating" it means that the author will be added to the set of author participations that have propagated from ancestor Acts, and will itself propagate with the other authors to any child Acts that allow context to be propagated.
049         */
050        AP, 
051        /**
052         * The association applies only to the current Act and will not propagate to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd).
053         */
054        _CONTEXTCONTROLNONPROPAGATING, 
055        /**
056         * The association is added to the existing context associated with the Act, but overrides an association with the same typeCode. However, this overriding association will not propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as "Overriding, Non-Propagating" it means that the author will replace the set of author participations that have propagated from ancestor Acts. Furthermore, no author participations whatsoever will propagate to any child Acts that allow context to be propagated.
057         */
058        ON, 
059        /**
060         * The association adds to the existing context associated with the Act, but replaces associations propagated from ancestor Acts whose typeCodes are the same or more specific.
061         */
062        _CONTEXTCONTROLOVERRIDING, 
063        /**
064         * The association is added to the existing context associated with the Act, but overrides an association with the same typeCode. This overriding association will propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as "Overriding, Propagating" it means that the author will replace the set of author participations that have propagated from ancestor Acts, and will itself be the only author to propagate to any child Acts that allow context to be propagated.
065         */
066        OP, 
067        /**
068         * The association propagates to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd).
069         */
070        _CONTEXTCONTROLPROPAGATING, 
071        /**
072         * added to help the parsers
073         */
074        NULL;
075        public static V3ContextControl fromCode(String codeString) throws FHIRException {
076            if (codeString == null || "".equals(codeString))
077                return null;
078        if ("_ContextControlAdditive".equals(codeString))
079          return _CONTEXTCONTROLADDITIVE;
080        if ("AN".equals(codeString))
081          return AN;
082        if ("AP".equals(codeString))
083          return AP;
084        if ("_ContextControlNonPropagating".equals(codeString))
085          return _CONTEXTCONTROLNONPROPAGATING;
086        if ("ON".equals(codeString))
087          return ON;
088        if ("_ContextControlOverriding".equals(codeString))
089          return _CONTEXTCONTROLOVERRIDING;
090        if ("OP".equals(codeString))
091          return OP;
092        if ("_ContextControlPropagating".equals(codeString))
093          return _CONTEXTCONTROLPROPAGATING;
094        throw new FHIRException("Unknown V3ContextControl code '"+codeString+"'");
095        }
096        public String toCode() {
097          switch (this) {
098            case _CONTEXTCONTROLADDITIVE: return "_ContextControlAdditive";
099            case AN: return "AN";
100            case AP: return "AP";
101            case _CONTEXTCONTROLNONPROPAGATING: return "_ContextControlNonPropagating";
102            case ON: return "ON";
103            case _CONTEXTCONTROLOVERRIDING: return "_ContextControlOverriding";
104            case OP: return "OP";
105            case _CONTEXTCONTROLPROPAGATING: return "_ContextControlPropagating";
106            default: return "?";
107          }
108        }
109        public String getSystem() {
110          return "http://terminology.hl7.org/CodeSystem/v3-ContextControl";
111        }
112        public String getDefinition() {
113          switch (this) {
114            case _CONTEXTCONTROLADDITIVE: return "The association adds to the existing context associated with the Act.  Both this association and any associations propagated from ancestor Acts are interpreted as being related to this Act.";
115            case AN: return "The association adds to the existing context associated with the Act, but will not propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as \"Additive, Non-Propagating\" it means that the author will be added to the set of author participations that have propagated from ancestor Acts for the purpose of this Act. However only the previously propagated authors will propagate to any child Acts that allow context to be propagated.";
116            case AP: return "The association adds to the existing context associated with the Act, and will propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as \"Additive, Propagating\" it means that the author will be added to the set of author participations that have propagated from ancestor Acts, and will itself propagate with the other authors to any child Acts that allow context to be propagated.";
117            case _CONTEXTCONTROLNONPROPAGATING: return "The association applies only to the current Act and will not propagate to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd).";
118            case ON: return "The association is added to the existing context associated with the Act, but overrides an association with the same typeCode. However, this overriding association will not propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as \"Overriding, Non-Propagating\" it means that the author will replace the set of author participations that have propagated from ancestor Acts. Furthermore, no author participations whatsoever will propagate to any child Acts that allow context to be propagated.";
119            case _CONTEXTCONTROLOVERRIDING: return "The association adds to the existing context associated with the Act, but replaces associations propagated from ancestor Acts whose typeCodes are the same or more specific.";
120            case OP: return "The association is added to the existing context associated with the Act, but overrides an association with the same typeCode. This overriding association will propagate to any descendant Acts reached by conducting ActRelationships (see contextControlCode). Examples: If an 'Author' Participation were marked as \"Overriding, Propagating\" it means that the author will replace the set of author participations that have propagated from ancestor Acts, and will itself be the only author to propagate to any child Acts that allow context to be propagated.";
121            case _CONTEXTCONTROLPROPAGATING: return "The association propagates to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd).";
122            default: return "?";
123          }
124        }
125        public String getDisplay() {
126          switch (this) {
127            case _CONTEXTCONTROLADDITIVE: return "ContextControlAdditive";
128            case AN: return "additive, non-propagating";
129            case AP: return "additive, propagating";
130            case _CONTEXTCONTROLNONPROPAGATING: return "ContextControlNonPropagating";
131            case ON: return "overriding, non-propagating";
132            case _CONTEXTCONTROLOVERRIDING: return "ContextControlOverriding";
133            case OP: return "overriding, propagating";
134            case _CONTEXTCONTROLPROPAGATING: return "ContextControlPropagating";
135            default: return "?";
136          }
137    }
138
139
140}
141