001 002package ca.uhn.fhir.model.dstu2.valueset; 003 004import ca.uhn.fhir.model.api.*; 005import java.util.HashMap; 006import java.util.Map; 007 008public enum ObservationCategoryCodesEnum { 009 010 /** 011 * Display: <b>Social History</b><br> 012 * Code Value: <b>social-history</b> 013 * 014 * The Social History Observations define the patient's occupational, personal (e.g. lifestyle), social, and environmental history and health risk factors, as well as administrative data such as marital status, race, ethnicity and religious affiliation. 015 */ 016 SOCIAL_HISTORY("social-history", "http://hl7.org/fhir/observation-category"), 017 018 /** 019 * Display: <b>Vital Signs</b><br> 020 * Code Value: <b>vital-signs</b> 021 * 022 * Clinical observations measure the body's basic functions such as such as blood pressure, heart rate, respiratory rate, height, weight, body mass index, head circumference, pulse oximetry, temperature, and body surface area. 023 */ 024 VITAL_SIGNS("vital-signs", "http://hl7.org/fhir/observation-category"), 025 026 /** 027 * Display: <b>Imaging</b><br> 028 * Code Value: <b>imaging</b> 029 * 030 * Observations generated by imaging. The scope includes observations, plain x-ray, ultrasound, CT, MRI, angiography, echocardiography, nuclear medicine. 031 */ 032 IMAGING("imaging", "http://hl7.org/fhir/observation-category"), 033 034 /** 035 * Display: <b>Laboratory</b><br> 036 * Code Value: <b>laboratory</b> 037 * 038 * The results of observations generated by laboratories. Laboratory results are typically generated by laboratories providing analytic services in areas such as chemistry, hematology, serology, histology, cytology, anatomic pathology, microbiology, and/or virology. These observations are based on analysis of specimens obtained from the patient and submitted to the laboratory. 039 */ 040 LABORATORY("laboratory", "http://hl7.org/fhir/observation-category"), 041 042 /** 043 * Display: <b>Procedure</b><br> 044 * Code Value: <b>procedure</b> 045 * 046 * Observations generated by other procedures. This category includes observations resulting from interventional and non-interventional procedures excluding lab and imaging (e.g. cardiology catheterization, endoscopy, electrodiagnostics, etc.). Procedure results are typically generated by a clinician to provide more granular information about component observations made during a procedure, such as where a gastroenterologist reports the size of a polyp observed during a colonoscopy. 047 */ 048 PROCEDURE("procedure", "http://hl7.org/fhir/observation-category"), 049 050 /** 051 * Display: <b>Survey</b><br> 052 * Code Value: <b>survey</b> 053 * 054 * Assessment tool/survey instrument observations (e.g. Apgar Scores, Montreal Cognitive Assessment (MoCA)) 055 */ 056 SURVEY("survey", "http://hl7.org/fhir/observation-category"), 057 058 /** 059 * Display: <b>Exam</b><br> 060 * Code Value: <b>exam</b> 061 * 062 * Observations generated by physical exam findings including direct observations made by a clinician and use of simple instruments and the result of simple maneuvers performed directly on the patient's body. 063 */ 064 EXAM("exam", "http://hl7.org/fhir/observation-category"), 065 066 /** 067 * Display: <b>Therapy</b><br> 068 * Code Value: <b>therapy</b> 069 * 070 * Observations generated by non-interventional treatment protocols (e.g. occupational, physical, radiation, nutritional and medication therapy) 071 */ 072 THERAPY("therapy", "http://hl7.org/fhir/observation-category"), 073 074 ; 075 076 /** 077 * Identifier for this Value Set: 078 * 079 */ 080 public static final String VALUESET_IDENTIFIER = ""; 081 082 /** 083 * Name for this Value Set: 084 * Observation Category Codes 085 */ 086 public static final String VALUESET_NAME = "Observation Category Codes"; 087 088 private static Map<String, ObservationCategoryCodesEnum> CODE_TO_ENUM = new HashMap<String, ObservationCategoryCodesEnum>(); 089 private static Map<String, Map<String, ObservationCategoryCodesEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ObservationCategoryCodesEnum>>(); 090 091 private final String myCode; 092 private final String mySystem; 093 094 static { 095 for (ObservationCategoryCodesEnum next : ObservationCategoryCodesEnum.values()) { 096 CODE_TO_ENUM.put(next.getCode(), next); 097 098 if (!SYSTEM_TO_CODE_TO_ENUM.containsKey(next.getSystem())) { 099 SYSTEM_TO_CODE_TO_ENUM.put(next.getSystem(), new HashMap<String, ObservationCategoryCodesEnum>()); 100 } 101 SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next); 102 } 103 } 104 105 /** 106 * Returns the code associated with this enumerated value 107 */ 108 public String getCode() { 109 return myCode; 110 } 111 112 /** 113 * Returns the code system associated with this enumerated value 114 */ 115 public String getSystem() { 116 return mySystem; 117 } 118 119 /** 120 * Returns the enumerated value associated with this code 121 */ 122 public static ObservationCategoryCodesEnum forCode(String theCode) { 123 ObservationCategoryCodesEnum retVal = CODE_TO_ENUM.get(theCode); 124 return retVal; 125 } 126 127 /** 128 * Converts codes to their respective enumerated values 129 */ 130 public static final IValueSetEnumBinder<ObservationCategoryCodesEnum> VALUESET_BINDER = new IValueSetEnumBinder<ObservationCategoryCodesEnum>() { 131 @Override 132 public String toCodeString(ObservationCategoryCodesEnum theEnum) { 133 return theEnum.getCode(); 134 } 135 136 @Override 137 public String toSystemString(ObservationCategoryCodesEnum theEnum) { 138 return theEnum.getSystem(); 139 } 140 141 @Override 142 public ObservationCategoryCodesEnum fromCodeString(String theCodeString) { 143 return CODE_TO_ENUM.get(theCodeString); 144 } 145 146 @Override 147 public ObservationCategoryCodesEnum fromCodeString(String theCodeString, String theSystemString) { 148 Map<String, ObservationCategoryCodesEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString); 149 if (map == null) { 150 return null; 151 } 152 return map.get(theCodeString); 153 } 154 155 }; 156 157 /** 158 * Constructor 159 */ 160 ObservationCategoryCodesEnum(String theCode, String theSystem) { 161 myCode = theCode; 162 mySystem = theSystem; 163 } 164 165 166}