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 FinancialTaskcode {
037
038  /**
039   * Cancel or reverse a resource, such as a claim or preauthorization, which is
040   * in-process or complete.
041   */
042  CANCEL,
043  /**
044   * Retrieve selected or all queued resources or messages.
045   */
046  POLL,
047  /**
048   * Release any reserved funds or material obligations associated with a
049   * resource. For example, any unused but reserved funds or treatment allowance
050   * associated with a preauthorization once treatment is complete.
051   */
052  RELEASE,
053  /**
054   * Indication that the processing of a resource, such as a claim, for some or
055   * all of the required work is now being requested.
056   */
057  REPROCESS,
058  /**
059   * Check on the processing status of a resource such as the adjudication of a
060   * claim.
061   */
062  STATUS,
063  /**
064   * added to help the parsers
065   */
066  NULL;
067
068  public static FinancialTaskcode fromCode(String codeString) throws FHIRException {
069    if (codeString == null || "".equals(codeString))
070      return null;
071    if ("cancel".equals(codeString))
072      return CANCEL;
073    if ("poll".equals(codeString))
074      return POLL;
075    if ("release".equals(codeString))
076      return RELEASE;
077    if ("reprocess".equals(codeString))
078      return REPROCESS;
079    if ("status".equals(codeString))
080      return STATUS;
081    throw new FHIRException("Unknown FinancialTaskcode code '" + codeString + "'");
082  }
083
084  public String toCode() {
085    switch (this) {
086    case CANCEL:
087      return "cancel";
088    case POLL:
089      return "poll";
090    case RELEASE:
091      return "release";
092    case REPROCESS:
093      return "reprocess";
094    case STATUS:
095      return "status";
096    case NULL:
097      return null;
098    default:
099      return "?";
100    }
101  }
102
103  public String getSystem() {
104    return "http://terminology.hl7.org/CodeSystem/financialtaskcode";
105  }
106
107  public String getDefinition() {
108    switch (this) {
109    case CANCEL:
110      return "Cancel or reverse a resource, such as a claim or preauthorization, which is in-process or complete.";
111    case POLL:
112      return "Retrieve selected or all queued resources or messages.";
113    case RELEASE:
114      return "Release any reserved funds or material obligations associated with a resource. For example, any unused but reserved funds or treatment allowance associated with a preauthorization once treatment is complete.";
115    case REPROCESS:
116      return "Indication that the processing of a resource, such as a claim, for some or all of the required work is now being requested.";
117    case STATUS:
118      return "Check on the processing status of a resource such as the adjudication of a claim.";
119    case NULL:
120      return null;
121    default:
122      return "?";
123    }
124  }
125
126  public String getDisplay() {
127    switch (this) {
128    case CANCEL:
129      return "Cancel";
130    case POLL:
131      return "Poll";
132    case RELEASE:
133      return "Release";
134    case REPROCESS:
135      return "Reprocess";
136    case STATUS:
137      return "Status check";
138    case NULL:
139      return null;
140    default:
141      return "?";
142    }
143  }
144
145}