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 ConsentCategory { 037 038 /** 039 * Any instructions, written or given verbally by a patient to a health care 040 * provider in anticipation of potential need for medical treatment. [2005 Honor 041 * My Wishes] 042 */ 043 ACD, 044 /** 045 * A legal document, signed by both the patient and their provider, stating a 046 * desire not to have CPR initiated in case of a cardiac event. Note: This form 047 * was replaced in 2003 with the Physician Orders for Life-Sustaining Treatment 048 * [POLST]. 049 */ 050 DNR, 051 /** 052 * Opt-in to disclosure of health information for emergency only consent 053 * directive. Comment: This general consent directive specifically limits 054 * disclosure of health information for purpose of emergency treatment. 055 * Additional parameters may further limit the disclosure to specific users, 056 * roles, duration, types of information, and impose uses obligations. 057 * [ActConsentDirective (2.16.840.1.113883.1.11.20425)] 058 */ 059 EMRGONLY, 060 /** 061 * Patient's document telling patient's health care provider what the patient 062 * wants or does not want if the patient is diagnosed as being terminally ill 063 * and in a persistent vegetative state or in a permanently unconscious 064 * condition.[2005 Honor My Wishes] 065 */ 066 HCD, 067 /** 068 * Acknowledgement of custodian notice of privacy practices. Usage Notes: This 069 * type of consent directive acknowledges a custodian's notice of privacy 070 * practices including its permitted collection, access, use and disclosure of 071 * health information to users and for purposes of use specified. 072 * [ActConsentDirective (2.16.840.1.113883.1.11.20425)] 073 */ 074 NPP, 075 /** 076 * The Physician Order for Life-Sustaining Treatment form records a person's 077 * health care wishes for end of life emergency treatment and translates them 078 * into an order by the physician. It must be reviewed and signed by both the 079 * patient and the physician, Advanced Registered Nurse Practitioner or 080 * Physician Assistant. [2005 Honor My Wishes] Comment: Opt-in Consent Directive 081 * with restrictions. 082 */ 083 POLST, 084 /** 085 * Consent to have healthcare information in an electronic health record 086 * accessed for research purposes. [VALUE SET: ActConsentType 087 * (2.16.840.1.113883.1.11.19897)] 088 */ 089 RESEARCH, 090 /** 091 * Consent to have de-identified healthcare information in an electronic health 092 * record that is accessed for research purposes, but without consent to 093 * re-identify the information under any circumstance. [VALUE SET: 094 * ActConsentType (2.16.840.1.113883.1.11.19897) 095 */ 096 RSDID, 097 /** 098 * Consent to have de-identified healthcare information in an electronic health 099 * record that is accessed for research purposes re-identified under specific 100 * circumstances outlined in the consent. [VALUE SET: ActConsentType 101 * (2.16.840.1.113883.1.11.19897)] 102 */ 103 RSREID, 104 /** 105 * added to help the parsers 106 */ 107 NULL; 108 109 public static ConsentCategory fromCode(String codeString) throws FHIRException { 110 if (codeString == null || "".equals(codeString)) 111 return null; 112 if ("acd".equals(codeString)) 113 return ACD; 114 if ("dnr".equals(codeString)) 115 return DNR; 116 if ("emrgonly".equals(codeString)) 117 return EMRGONLY; 118 if ("hcd".equals(codeString)) 119 return HCD; 120 if ("npp".equals(codeString)) 121 return NPP; 122 if ("polst".equals(codeString)) 123 return POLST; 124 if ("research".equals(codeString)) 125 return RESEARCH; 126 if ("rsdid".equals(codeString)) 127 return RSDID; 128 if ("rsreid".equals(codeString)) 129 return RSREID; 130 throw new FHIRException("Unknown ConsentCategory code '" + codeString + "'"); 131 } 132 133 public String toCode() { 134 switch (this) { 135 case ACD: 136 return "acd"; 137 case DNR: 138 return "dnr"; 139 case EMRGONLY: 140 return "emrgonly"; 141 case HCD: 142 return "hcd"; 143 case NPP: 144 return "npp"; 145 case POLST: 146 return "polst"; 147 case RESEARCH: 148 return "research"; 149 case RSDID: 150 return "rsdid"; 151 case RSREID: 152 return "rsreid"; 153 case NULL: 154 return null; 155 default: 156 return "?"; 157 } 158 } 159 160 public String getSystem() { 161 return "http://terminology.hl7.org/CodeSystem/consentcategorycodes"; 162 } 163 164 public String getDefinition() { 165 switch (this) { 166 case ACD: 167 return "Any instructions, written or given verbally by a patient to a health care provider in anticipation of potential need for medical treatment. [2005 Honor My Wishes]"; 168 case DNR: 169 return "A legal document, signed by both the patient and their provider, stating a desire not to have CPR initiated in case of a cardiac event. Note: This form was replaced in 2003 with the Physician Orders for Life-Sustaining Treatment [POLST]."; 170 case EMRGONLY: 171 return "Opt-in to disclosure of health information for emergency only consent directive. Comment: This general consent directive specifically limits disclosure of health information for purpose of emergency treatment. Additional parameters may further limit the disclosure to specific users, roles, duration, types of information, and impose uses obligations. [ActConsentDirective (2.16.840.1.113883.1.11.20425)]"; 172 case HCD: 173 return "Patient's document telling patient's health care provider what the patient wants or does not want if the patient is diagnosed as being terminally ill and in a persistent vegetative state or in a permanently unconscious condition.[2005 Honor My Wishes]"; 174 case NPP: 175 return "Acknowledgement of custodian notice of privacy practices. Usage Notes: This type of consent directive acknowledges a custodian's notice of privacy practices including its permitted collection, access, use and disclosure of health information to users and for purposes of use specified. [ActConsentDirective (2.16.840.1.113883.1.11.20425)]"; 176 case POLST: 177 return "The Physician Order for Life-Sustaining Treatment form records a person's health care wishes for end of life emergency treatment and translates them into an order by the physician. It must be reviewed and signed by both the patient and the physician, Advanced Registered Nurse Practitioner or Physician Assistant. [2005 Honor My Wishes] Comment: Opt-in Consent Directive with restrictions."; 178 case RESEARCH: 179 return "Consent to have healthcare information in an electronic health record accessed for research purposes. [VALUE SET: ActConsentType (2.16.840.1.113883.1.11.19897)]"; 180 case RSDID: 181 return "Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes, but without consent to re-identify the information under any circumstance. [VALUE SET: ActConsentType (2.16.840.1.113883.1.11.19897)"; 182 case RSREID: 183 return "Consent to have de-identified healthcare information in an electronic health record that is accessed for research purposes re-identified under specific circumstances outlined in the consent. [VALUE SET: ActConsentType (2.16.840.1.113883.1.11.19897)]"; 184 case NULL: 185 return null; 186 default: 187 return "?"; 188 } 189 } 190 191 public String getDisplay() { 192 switch (this) { 193 case ACD: 194 return "Advance Directive"; 195 case DNR: 196 return "Do Not Resuscitate"; 197 case EMRGONLY: 198 return "Emergency Only"; 199 case HCD: 200 return "Health Care Directive"; 201 case NPP: 202 return "Notice of Privacy Practices"; 203 case POLST: 204 return "POLST"; 205 case RESEARCH: 206 return "Research Information Access"; 207 case RSDID: 208 return "De-identified Information Access"; 209 case RSREID: 210 return "Re-identifiable Information Access"; 211 case NULL: 212 return null; 213 default: 214 return "?"; 215 } 216 } 217 218}