001/* 002 * This class is an auto-generated source file for a HAPI 003 * HL7 v2.x standard structure class. 004 * 005 * For more information, visit: http://hl7api.sourceforge.net/ 006 * 007 * The contents of this file are subject to the Mozilla Public License Version 1.1 008 * (the "License"); you may not use this file except in compliance with the License. 009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 010 * Software distributed under the License is distributed on an "AS IS" basis, 011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 012 * specific language governing rights and limitations under the License. 013 * 014 * The Original Code is "[file_name]". Description: 015 * "[one_line_description]" 016 * 017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 018 * 2012. All Rights Reserved. 019 * 020 * Contributor(s): ______________________________________. 021 * 022 * Alternatively, the contents of this file may be used under the terms of the 023 * GNU General Public License (the "GPL"), in which case the provisions of the GPL are 024 * applicable instead of those above. If you wish to allow use of your version of this 025 * file only under the terms of the GPL and not to allow others to use your version 026 * of this file under the MPL, indicate your decision by deleting the provisions above 027 * and replace them with the notice and other provisions required by the GPL License. 028 * If you do not delete the provisions above, a recipient may use your version of 029 * this file under either the MPL or the GPL. 030 * 031 */ 032 033 034package ca.uhn.hl7v2.model.v27.group; 035 036import ca.uhn.hl7v2.model.v27.segment.*; 037 038import ca.uhn.hl7v2.HL7Exception; 039import ca.uhn.hl7v2.parser.ModelClassFactory; 040import ca.uhn.hl7v2.model.*; 041 042/** 043 * <p>Represents a CCU_I20_CLINICAL_HISTORY_DETAIL group structure (a Group object). 044 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together. 045 * This Group contains the following elements: 046 * </p> 047 * <ul> 048 * <li>1: OBR (Observation Request) <b> choice</b></li> 049 * <li>2: ODS (Dietary Orders, Supplements, and Preferences) <b> choice</b></li> 050 * <li>3: PR1 (Procedures) <b> choice</b></li> 051 * <li>4: RF1 (Referral Information) <b> choice</b></li> 052 * <li>5: AL1 (Patient Allergy Information) <b> choice</b></li> 053 * <li>6: IAM (Patient Adverse Reaction Information) <b> choice</b></li> 054 * <li>7: ACC (Accident) <b> choice</b></li> 055 * <li>8: RMI (Risk Management Incident) <b> choice</b></li> 056 * <li>9: DB1 (Disability) <b> choice</b></li> 057 * <li>10: DG1 (Diagnosis) <b> choice</b></li> 058 * <li>11: DRG (Diagnosis Related Group) <b> choice</b></li> 059 * <li>12: PDA (Patient Death and Autopsy) <b> choice</b></li> 060 * <li>13: OBX (Observation/Result) <b>optional repeating </b></li> 061 * </ul> 062 * <p> 063 * Note that this structure has "choice" elements. This means that one of the 064 * structures above marked as "choice" must be present, but no more than one. 065 * </p> 066 */ 067//@SuppressWarnings("unused") 068public class CCU_I20_CLINICAL_HISTORY_DETAIL extends AbstractGroup { 069 070 /** 071 * Creates a new CCU_I20_CLINICAL_HISTORY_DETAIL group 072 */ 073 public CCU_I20_CLINICAL_HISTORY_DETAIL(Group parent, ModelClassFactory factory) { 074 super(parent, factory); 075 init(factory); 076 } 077 078 private void init(ModelClassFactory factory) { 079 try { 080 this.add(OBR.class, true, false, true); 081 this.add(ODS.class, true, false, true); 082 this.add(PR1.class, true, false, true); 083 this.add(RF1.class, true, false, true); 084 this.add(AL1.class, true, false, true); 085 this.add(IAM.class, true, false, true); 086 this.add(ACC.class, true, false, true); 087 this.add(RMI.class, true, false, true); 088 this.add(DB1.class, true, false, true); 089 this.add(DG1.class, true, false, true); 090 this.add(DRG.class, true, false, true); 091 this.add(PDA.class, true, false, true); 092 this.add(OBX.class, false, true, false); 093 } catch(HL7Exception e) { 094 log.error("Unexpected error creating CCU_I20_CLINICAL_HISTORY_DETAIL - this is probably a bug in the source code generator.", e); 095 } 096 } 097 098 /** 099 * Returns "2.7" 100 */ 101 public String getVersion() { 102 return "2.7"; 103 } 104 105 106 107 /** 108 * Returns 109 * OBR (Observation Request) - creates it if necessary 110 */ 111 public OBR getOBR() { 112 OBR retVal = getTyped("OBR", OBR.class); 113 return retVal; 114 } 115 116 117 118 119 /** 120 * Returns 121 * ODS (Dietary Orders, Supplements, and Preferences) - creates it if necessary 122 */ 123 public ODS getODS() { 124 ODS retVal = getTyped("ODS", ODS.class); 125 return retVal; 126 } 127 128 129 130 131 /** 132 * Returns 133 * PR1 (Procedures) - creates it if necessary 134 */ 135 public PR1 getPR1() { 136 PR1 retVal = getTyped("PR1", PR1.class); 137 return retVal; 138 } 139 140 141 142 143 /** 144 * Returns 145 * RF1 (Referral Information) - creates it if necessary 146 */ 147 public RF1 getRF1() { 148 RF1 retVal = getTyped("RF1", RF1.class); 149 return retVal; 150 } 151 152 153 154 155 /** 156 * Returns 157 * AL1 (Patient Allergy Information) - creates it if necessary 158 */ 159 public AL1 getAL1() { 160 AL1 retVal = getTyped("AL1", AL1.class); 161 return retVal; 162 } 163 164 165 166 167 /** 168 * Returns 169 * IAM (Patient Adverse Reaction Information) - creates it if necessary 170 */ 171 public IAM getIAM() { 172 IAM retVal = getTyped("IAM", IAM.class); 173 return retVal; 174 } 175 176 177 178 179 /** 180 * Returns 181 * ACC (Accident) - creates it if necessary 182 */ 183 public ACC getACC() { 184 ACC retVal = getTyped("ACC", ACC.class); 185 return retVal; 186 } 187 188 189 190 191 /** 192 * Returns 193 * RMI (Risk Management Incident) - creates it if necessary 194 */ 195 public RMI getRMI() { 196 RMI retVal = getTyped("RMI", RMI.class); 197 return retVal; 198 } 199 200 201 202 203 /** 204 * Returns 205 * DB1 (Disability) - creates it if necessary 206 */ 207 public DB1 getDB1() { 208 DB1 retVal = getTyped("DB1", DB1.class); 209 return retVal; 210 } 211 212 213 214 215 /** 216 * Returns 217 * DG1 (Diagnosis) - creates it if necessary 218 */ 219 public DG1 getDG1() { 220 DG1 retVal = getTyped("DG1", DG1.class); 221 return retVal; 222 } 223 224 225 226 227 /** 228 * Returns 229 * DRG (Diagnosis Related Group) - creates it if necessary 230 */ 231 public DRG getDRG() { 232 DRG retVal = getTyped("DRG", DRG.class); 233 return retVal; 234 } 235 236 237 238 239 /** 240 * Returns 241 * PDA (Patient Death and Autopsy) - creates it if necessary 242 */ 243 public PDA getPDA() { 244 PDA retVal = getTyped("PDA", PDA.class); 245 return retVal; 246 } 247 248 249 250 251 /** 252 * Returns 253 * the first repetition of 254 * OBX (Observation/Result) - creates it if necessary 255 */ 256 public OBX getOBX() { 257 OBX retVal = getTyped("OBX", OBX.class); 258 return retVal; 259 } 260 261 262 /** 263 * Returns a specific repetition of 264 * OBX (Observation/Result) - creates it if necessary 265 * 266 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 267 * @throws HL7Exception if the repetition requested is more than one 268 * greater than the number of existing repetitions. 269 */ 270 public OBX getOBX(int rep) { 271 OBX retVal = getTyped("OBX", rep, OBX.class); 272 return retVal; 273 } 274 275 /** 276 * Returns the number of existing repetitions of OBX 277 */ 278 public int getOBXReps() { 279 return getReps("OBX"); 280 } 281 282 /** 283 * <p> 284 * Returns a non-modifiable List containing all current existing repetitions of OBX. 285 * <p> 286 * <p> 287 * Note that unlike {@link #getOBX()}, this method will not create any reps 288 * if none are already present, so an empty list may be returned. 289 * </p> 290 */ 291 public java.util.List<OBX> getOBXAll() throws HL7Exception { 292 return getAllAsList("OBX", OBX.class); 293 } 294 295 /** 296 * Inserts a specific repetition of OBX (Observation/Result) 297 * @see AbstractGroup#insertRepetition(Structure, int) 298 */ 299 public void insertOBX(OBX structure, int rep) throws HL7Exception { 300 super.insertRepetition("OBX", structure, rep); 301 } 302 303 304 /** 305 * Inserts a specific repetition of OBX (Observation/Result) 306 * @see AbstractGroup#insertRepetition(Structure, int) 307 */ 308 public OBX insertOBX(int rep) throws HL7Exception { 309 return (OBX)super.insertRepetition("OBX", rep); 310 } 311 312 313 /** 314 * Removes a specific repetition of OBX (Observation/Result) 315 * @see AbstractGroup#removeRepetition(String, int) 316 */ 317 public OBX removeOBX(int rep) throws HL7Exception { 318 return (OBX)super.removeRepetition("OBX", rep); 319 } 320 321 322 323} 324