001package org.hl7.fhir.instance.model.valuesets;
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, Nov 11, 2015 10:54-0500 for FHIR v1.0.2
033
034
035public enum V3ContextControl {
036
037        /**
038         * 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.
039         */
040        _CONTEXTCONTROLADDITIVE, 
041        /**
042         * 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.
043         */
044        AN, 
045        /**
046         * 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.
047         */
048        AP, 
049        /**
050         * 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).
051         */
052        _CONTEXTCONTROLNONPROPAGATING, 
053        /**
054         * 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.
055         */
056        ON, 
057        /**
058         * 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.
059         */
060        _CONTEXTCONTROLOVERRIDING, 
061        /**
062         * 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.
063         */
064        OP, 
065        /**
066         * The association propagates to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd).
067         */
068        _CONTEXTCONTROLPROPAGATING, 
069        /**
070         * added to help the parsers
071         */
072        NULL;
073        public static V3ContextControl fromCode(String codeString) throws Exception {
074            if (codeString == null || "".equals(codeString))
075                return null;
076        if ("_ContextControlAdditive".equals(codeString))
077          return _CONTEXTCONTROLADDITIVE;
078        if ("AN".equals(codeString))
079          return AN;
080        if ("AP".equals(codeString))
081          return AP;
082        if ("_ContextControlNonPropagating".equals(codeString))
083          return _CONTEXTCONTROLNONPROPAGATING;
084        if ("ON".equals(codeString))
085          return ON;
086        if ("_ContextControlOverriding".equals(codeString))
087          return _CONTEXTCONTROLOVERRIDING;
088        if ("OP".equals(codeString))
089          return OP;
090        if ("_ContextControlPropagating".equals(codeString))
091          return _CONTEXTCONTROLPROPAGATING;
092        throw new Exception("Unknown V3ContextControl code '"+codeString+"'");
093        }
094        public String toCode() {
095          switch (this) {
096            case _CONTEXTCONTROLADDITIVE: return "_ContextControlAdditive";
097            case AN: return "AN";
098            case AP: return "AP";
099            case _CONTEXTCONTROLNONPROPAGATING: return "_ContextControlNonPropagating";
100            case ON: return "ON";
101            case _CONTEXTCONTROLOVERRIDING: return "_ContextControlOverriding";
102            case OP: return "OP";
103            case _CONTEXTCONTROLPROPAGATING: return "_ContextControlPropagating";
104            default: return "?";
105          }
106        }
107        public String getSystem() {
108          return "http://hl7.org/fhir/v3/ContextControl";
109        }
110        public String getDefinition() {
111          switch (this) {
112            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.";
113            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.";
114            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.";
115            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).";
116            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.";
117            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.";
118            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.";
119            case _CONTEXTCONTROLPROPAGATING: return "The association propagates to any child Acts that are related via a conducting ActRelationship (refer to contextConductionInd).";
120            default: return "?";
121          }
122        }
123        public String getDisplay() {
124          switch (this) {
125            case _CONTEXTCONTROLADDITIVE: return "ContextControlAdditive";
126            case AN: return "additive, non-propagating";
127            case AP: return "additive, propagating";
128            case _CONTEXTCONTROLNONPROPAGATING: return "ContextControlNonPropagating";
129            case ON: return "overriding, non-propagating";
130            case _CONTEXTCONTROLOVERRIDING: return "ContextControlOverriding";
131            case OP: return "overriding, propagating";
132            case _CONTEXTCONTROLPROPAGATING: return "ContextControlPropagating";
133            default: return "?";
134          }
135    }
136
137
138}
139