1 /* 2 * This class is an auto-generated source file for a HAPI 3 * HL7 v2.x standard structure class. 4 * 5 * For more information, visit: http://hl7api.sourceforge.net/ 6 * 7 * The contents of this file are subject to the Mozilla Public License Version 1.1 8 * (the "License"); you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 10 * Software distributed under the License is distributed on an "AS IS" basis, 11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 12 * specific language governing rights and limitations under the License. 13 * 14 * The Original Code is "[file_name]". Description: 15 * "[one_line_description]" 16 * 17 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 18 * 2012. All Rights Reserved. 19 * 20 * Contributor(s): ______________________________________. 21 * 22 * Alternatively, the contents of this file may be used under the terms of the 23 * GNU General Public License (the "GPL"), in which case the provisions of the GPL are 24 * applicable instead of those above. If you wish to allow use of your version of this 25 * file only under the terms of the GPL and not to allow others to use your version 26 * of this file under the MPL, indicate your decision by deleting the provisions above 27 * and replace them with the notice and other provisions required by the GPL License. 28 * If you do not delete the provisions above, a recipient may use your version of 29 * this file under either the MPL or the GPL. 30 * 31 */ 32 33 34 package ca.uhn.hl7v2.model.v27.group; 35 36 import ca.uhn.hl7v2.model.v27.segment.*; 37 38 import ca.uhn.hl7v2.HL7Exception; 39 import ca.uhn.hl7v2.parser.ModelClassFactory; 40 import ca.uhn.hl7v2.model.*; 41 42 /** 43 * <p>Represents a CCR_I16_CLINICAL_HISTORY_DETAIL group structure (a Group object). 44 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together. 45 * This Group contains the following elements: 46 * </p> 47 * <ul> 48 * <li>1: OBR (Observation Request) <b> choice</b></li> 49 * <li>2: ODS (Dietary Orders, Supplements, and Preferences) <b> choice</b></li> 50 * <li>3: PR1 (Procedures) <b> choice</b></li> 51 * <li>4: RF1 (Referral Information) <b> choice</b></li> 52 * <li>5: AL1 (Patient Allergy Information) <b> choice</b></li> 53 * <li>6: IAM (Patient Adverse Reaction Information) <b> choice</b></li> 54 * <li>7: ACC (Accident) <b> choice</b></li> 55 * <li>8: RMI (Risk Management Incident) <b> choice</b></li> 56 * <li>9: DB1 (Disability) <b> choice</b></li> 57 * <li>10: DG1 (Diagnosis) <b> choice</b></li> 58 * <li>11: DRG (Diagnosis Related Group) <b> choice</b></li> 59 * <li>12: OBX (Observation/Result) <b>optional repeating </b></li> 60 * </ul> 61 * <p> 62 * Note that this structure has "choice" elements. This means that one of the 63 * structures above marked as "choice" must be present, but no more than one. 64 * </p> 65 */ 66 //@SuppressWarnings("unused") 67 public class CCR_I16_CLINICAL_HISTORY_DETAIL extends AbstractGroup { 68 69 /** 70 * Creates a new CCR_I16_CLINICAL_HISTORY_DETAIL group 71 */ 72 public CCR_I16_CLINICAL_HISTORY_DETAIL(Group parent, ModelClassFactory factory) { 73 super(parent, factory); 74 init(factory); 75 } 76 77 private void init(ModelClassFactory factory) { 78 try { 79 this.add(OBR.class, true, false, true); 80 this.add(ODS.class, true, false, true); 81 this.add(PR1.class, true, false, true); 82 this.add(RF1.class, true, false, true); 83 this.add(AL1.class, true, false, true); 84 this.add(IAM.class, true, false, true); 85 this.add(ACC.class, true, false, true); 86 this.add(RMI.class, true, false, true); 87 this.add(DB1.class, true, false, true); 88 this.add(DG1.class, true, false, true); 89 this.add(DRG.class, true, false, true); 90 this.add(OBX.class, false, true, false); 91 } catch(HL7Exception e) { 92 log.error("Unexpected error creating CCR_I16_CLINICAL_HISTORY_DETAIL - this is probably a bug in the source code generator.", e); 93 } 94 } 95 96 /** 97 * Returns "2.7" 98 */ 99 public String getVersion() { 100 return "2.7"; 101 } 102 103 104 105 /** 106 * Returns 107 * OBR (Observation Request) - creates it if necessary 108 */ 109 public OBR getOBR() { 110 OBR retVal = getTyped("OBR", OBR.class); 111 return retVal; 112 } 113 114 115 116 117 /** 118 * Returns 119 * ODS (Dietary Orders, Supplements, and Preferences) - creates it if necessary 120 */ 121 public ODS getODS() { 122 ODS retVal = getTyped("ODS", ODS.class); 123 return retVal; 124 } 125 126 127 128 129 /** 130 * Returns 131 * PR1 (Procedures) - creates it if necessary 132 */ 133 public PR1 getPR1() { 134 PR1 retVal = getTyped("PR1", PR1.class); 135 return retVal; 136 } 137 138 139 140 141 /** 142 * Returns 143 * RF1 (Referral Information) - creates it if necessary 144 */ 145 public RF1 getRF1() { 146 RF1 retVal = getTyped("RF1", RF1.class); 147 return retVal; 148 } 149 150 151 152 153 /** 154 * Returns 155 * AL1 (Patient Allergy Information) - creates it if necessary 156 */ 157 public AL1 getAL1() { 158 AL1 retVal = getTyped("AL1", AL1.class); 159 return retVal; 160 } 161 162 163 164 165 /** 166 * Returns 167 * IAM (Patient Adverse Reaction Information) - creates it if necessary 168 */ 169 public IAM getIAM() { 170 IAM retVal = getTyped("IAM", IAM.class); 171 return retVal; 172 } 173 174 175 176 177 /** 178 * Returns 179 * ACC (Accident) - creates it if necessary 180 */ 181 public ACC getACC() { 182 ACC retVal = getTyped("ACC", ACC.class); 183 return retVal; 184 } 185 186 187 188 189 /** 190 * Returns 191 * RMI (Risk Management Incident) - creates it if necessary 192 */ 193 public RMI getRMI() { 194 RMI retVal = getTyped("RMI", RMI.class); 195 return retVal; 196 } 197 198 199 200 201 /** 202 * Returns 203 * DB1 (Disability) - creates it if necessary 204 */ 205 public DB1 getDB1() { 206 DB1 retVal = getTyped("DB1", DB1.class); 207 return retVal; 208 } 209 210 211 212 213 /** 214 * Returns 215 * DG1 (Diagnosis) - creates it if necessary 216 */ 217 public DG1 getDG1() { 218 DG1 retVal = getTyped("DG1", DG1.class); 219 return retVal; 220 } 221 222 223 224 225 /** 226 * Returns 227 * DRG (Diagnosis Related Group) - creates it if necessary 228 */ 229 public DRG getDRG() { 230 DRG retVal = getTyped("DRG", DRG.class); 231 return retVal; 232 } 233 234 235 236 237 /** 238 * Returns 239 * the first repetition of 240 * OBX (Observation/Result) - creates it if necessary 241 */ 242 public OBX getOBX() { 243 OBX retVal = getTyped("OBX", OBX.class); 244 return retVal; 245 } 246 247 248 /** 249 * Returns a specific repetition of 250 * OBX (Observation/Result) - creates it if necessary 251 * 252 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 253 * @throws HL7Exception if the repetition requested is more than one 254 * greater than the number of existing repetitions. 255 */ 256 public OBX getOBX(int rep) { 257 OBX retVal = getTyped("OBX", rep, OBX.class); 258 return retVal; 259 } 260 261 /** 262 * Returns the number of existing repetitions of OBX 263 */ 264 public int getOBXReps() { 265 return getReps("OBX"); 266 } 267 268 /** 269 * <p> 270 * Returns a non-modifiable List containing all current existing repetitions of OBX. 271 * <p> 272 * <p> 273 * Note that unlike {@link #getOBX()}, this method will not create any reps 274 * if none are already present, so an empty list may be returned. 275 * </p> 276 */ 277 public java.util.List<OBX> getOBXAll() throws HL7Exception { 278 return getAllAsList("OBX", OBX.class); 279 } 280 281 /** 282 * Inserts a specific repetition of OBX (Observation/Result) 283 * @see AbstractGroup#insertRepetition(Structure, int) 284 */ 285 public void insertOBX(OBX structure, int rep) throws HL7Exception { 286 super.insertRepetition("OBX", structure, rep); 287 } 288 289 290 /** 291 * Inserts a specific repetition of OBX (Observation/Result) 292 * @see AbstractGroup#insertRepetition(Structure, int) 293 */ 294 public OBX insertOBX(int rep) throws HL7Exception { 295 return (OBX)super.insertRepetition("OBX", rep); 296 } 297 298 299 /** 300 * Removes a specific repetition of OBX (Observation/Result) 301 * @see AbstractGroup#removeRepetition(String, int) 302 */ 303 public OBX removeOBX(int rep) throws HL7Exception { 304 return (OBX)super.removeRepetition("OBX", rep); 305 } 306 307 308 309 } 310