Coverage Report - ca.uhn.hl7v2.test.nodt.conf.segment.DRG
 
Classes in this File Line Coverage Branch Coverage Complexity
DRG
0%
0/75
0%
0/12
1.92
 
 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.test.nodt.conf.segment;
 35  
 
 36  
 // import ca.uhn.hl7v2.test.nodt.conf.group.*;
 37  
 import ca.uhn.hl7v2.model.v25.datatype.*;
 38  
 import ca.uhn.hl7v2.HL7Exception;
 39  
 import ca.uhn.hl7v2.parser.ModelClassFactory;
 40  
 import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
 41  
 import ca.uhn.hl7v2.model.AbstractMessage;
 42  
 import ca.uhn.hl7v2.model.Group;
 43  
 import ca.uhn.hl7v2.model.Type;
 44  
 import ca.uhn.hl7v2.model.AbstractSegment;
 45  
 import ca.uhn.hl7v2.model.Varies;
 46  
 
 47  
 
 48  
 /**
 49  
  *<p>Represents an HL7 DRG message segment (Diagnosis Related Group). 
 50  
  * This segment has the following fields:</p>
 51  
  * <ul>
 52  
      * <li>DRG-1: Diagnostic Related Group (CE) <b>optional </b>
 53  
      * <li>DRG-2: DRG Assigned Date/Time (TS) <b>optional </b>
 54  
      * <li>DRG-3: DRG Approval Indicator (ID) <b>optional </b>
 55  
      * <li>DRG-4: DRG Grouper Review Code (IS) <b>optional </b>
 56  
      * <li>DRG-5: Outlier Type (CE) <b>optional </b>
 57  
      * <li>DRG-6: Outlier Days (NM) <b>optional </b>
 58  
      * <li>DRG-7: Outlier Cost (CP) <b>optional </b>
 59  
      * <li>DRG-8: DRG Payor (IS) <b>optional </b>
 60  
      * <li>DRG-9: Outlier Reimbursement (CP) <b>optional </b>
 61  
      * <li>DRG-10: Confidential Indicator (ID) <b>optional </b>
 62  
      * <li>DRG-11: DRG Transfer Type (IS) <b>optional </b>
 63  
  * </ul>
 64  
  */
 65  
 @SuppressWarnings("unused")
 66  
 public class DRG extends AbstractSegment {
 67  
 
 68  
     /** 
 69  
      * Creates a new DRG segment
 70  
      */
 71  
     public DRG(Group parent, ModelClassFactory factory) {
 72  0
        super(parent, factory);
 73  0
        init(factory);
 74  0
     }
 75  
 
 76  
     private void init(ModelClassFactory factory) {
 77  
        try {
 78  0
                                   this.add(CE.class, false, 1, 478, new Object[]{ getMessage() }, "Diagnostic Related Group");
 79  0
                                   this.add(TS.class, false, 1, 26, new Object[]{ getMessage() }, "DRG Assigned Date/Time");
 80  0
                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "DRG Approval Indicator");
 81  0
                                               this.add(IS.class, false, 1, 2, new Object[]{ getMessage(), new Integer(56) }, "DRG Grouper Review Code");
 82  0
                                   this.add(CE.class, false, 1, 478, new Object[]{ getMessage() }, "Outlier Type");
 83  0
                                   this.add(NM.class, false, 1, 3, new Object[]{ getMessage() }, "Outlier Days");
 84  0
                                   this.add(CP.class, false, 1, 538, new Object[]{ getMessage() }, "Outlier Cost");
 85  0
                                               this.add(IS.class, false, 1, 1, new Object[]{ getMessage(), new Integer(229) }, "DRG Payor");
 86  0
                                   this.add(CP.class, false, 1, 538, new Object[]{ getMessage() }, "Outlier Reimbursement");
 87  0
                                               this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Confidential Indicator");
 88  0
                                               this.add(IS.class, false, 1, 21, new Object[]{ getMessage(), new Integer(415) }, "DRG Transfer Type");
 89  0
        } catch(HL7Exception e) {
 90  0
           log.error("Unexpected error creating DRG - this is probably a bug in the source code generator.", e);
 91  0
        }
 92  0
     }
 93  
 
 94  
 
 95  
 
 96  
     /**
 97  
      * Returns
 98  
      * DRG-1: "Diagnostic Related Group" - creates it if necessary
 99  
      */
 100  
     public CE getDiagnosticRelatedGroup() { 
 101  0
                 CE retVal = this.getTypedField(1, 0);
 102  0
                 return retVal;
 103  
     }
 104  
     
 105  
     /**
 106  
      * Returns
 107  
      * DRG-1: "Diagnostic Related Group" - creates it if necessary
 108  
      */
 109  
     public CE getDrg1_DiagnosticRelatedGroup() { 
 110  0
                 CE retVal = this.getTypedField(1, 0);
 111  0
                 return retVal;
 112  
     }
 113  
 
 114  
 
 115  
 
 116  
     /**
 117  
      * Returns
 118  
      * DRG-2: "DRG Assigned Date/Time" - creates it if necessary
 119  
      */
 120  
     public TS getDRGAssignedDateTime() { 
 121  0
                 TS retVal = this.getTypedField(2, 0);
 122  0
                 return retVal;
 123  
     }
 124  
     
 125  
     /**
 126  
      * Returns
 127  
      * DRG-2: "DRG Assigned Date/Time" - creates it if necessary
 128  
      */
 129  
     public TS getDrg2_DRGAssignedDateTime() { 
 130  0
                 TS retVal = this.getTypedField(2, 0);
 131  0
                 return retVal;
 132  
     }
 133  
 
 134  
 
 135  
 
 136  
     /**
 137  
      * Returns
 138  
      * DRG-3: "DRG Approval Indicator" - creates it if necessary
 139  
      */
 140  
     public ID getDRGApprovalIndicator() { 
 141  0
                 ID retVal = this.getTypedField(3, 0);
 142  0
                 return retVal;
 143  
     }
 144  
     
 145  
     /**
 146  
      * Returns
 147  
      * DRG-3: "DRG Approval Indicator" - creates it if necessary
 148  
      */
 149  
     public ID getDrg3_DRGApprovalIndicator() { 
 150  0
                 ID retVal = this.getTypedField(3, 0);
 151  0
                 return retVal;
 152  
     }
 153  
 
 154  
 
 155  
 
 156  
     /**
 157  
      * Returns
 158  
      * DRG-4: "DRG Grouper Review Code" - creates it if necessary
 159  
      */
 160  
     public IS getDRGGrouperReviewCode() { 
 161  0
                 IS retVal = this.getTypedField(4, 0);
 162  0
                 return retVal;
 163  
     }
 164  
     
 165  
     /**
 166  
      * Returns
 167  
      * DRG-4: "DRG Grouper Review Code" - creates it if necessary
 168  
      */
 169  
     public IS getDrg4_DRGGrouperReviewCode() { 
 170  0
                 IS retVal = this.getTypedField(4, 0);
 171  0
                 return retVal;
 172  
     }
 173  
 
 174  
 
 175  
 
 176  
     /**
 177  
      * Returns
 178  
      * DRG-5: "Outlier Type" - creates it if necessary
 179  
      */
 180  
     public CE getOutlierType() { 
 181  0
                 CE retVal = this.getTypedField(5, 0);
 182  0
                 return retVal;
 183  
     }
 184  
     
 185  
     /**
 186  
      * Returns
 187  
      * DRG-5: "Outlier Type" - creates it if necessary
 188  
      */
 189  
     public CE getDrg5_OutlierType() { 
 190  0
                 CE retVal = this.getTypedField(5, 0);
 191  0
                 return retVal;
 192  
     }
 193  
 
 194  
 
 195  
 
 196  
     /**
 197  
      * Returns
 198  
      * DRG-6: "Outlier Days" - creates it if necessary
 199  
      */
 200  
     public NM getOutlierDays() { 
 201  0
                 NM retVal = this.getTypedField(6, 0);
 202  0
                 return retVal;
 203  
     }
 204  
     
 205  
     /**
 206  
      * Returns
 207  
      * DRG-6: "Outlier Days" - creates it if necessary
 208  
      */
 209  
     public NM getDrg6_OutlierDays() { 
 210  0
                 NM retVal = this.getTypedField(6, 0);
 211  0
                 return retVal;
 212  
     }
 213  
 
 214  
 
 215  
 
 216  
     /**
 217  
      * Returns
 218  
      * DRG-7: "Outlier Cost" - creates it if necessary
 219  
      */
 220  
     public CP getOutlierCost() { 
 221  0
                 CP retVal = this.getTypedField(7, 0);
 222  0
                 return retVal;
 223  
     }
 224  
     
 225  
     /**
 226  
      * Returns
 227  
      * DRG-7: "Outlier Cost" - creates it if necessary
 228  
      */
 229  
     public CP getDrg7_OutlierCost() { 
 230  0
                 CP retVal = this.getTypedField(7, 0);
 231  0
                 return retVal;
 232  
     }
 233  
 
 234  
 
 235  
 
 236  
     /**
 237  
      * Returns
 238  
      * DRG-8: "DRG Payor" - creates it if necessary
 239  
      */
 240  
     public IS getDRGPayor() { 
 241  0
                 IS retVal = this.getTypedField(8, 0);
 242  0
                 return retVal;
 243  
     }
 244  
     
 245  
     /**
 246  
      * Returns
 247  
      * DRG-8: "DRG Payor" - creates it if necessary
 248  
      */
 249  
     public IS getDrg8_DRGPayor() { 
 250  0
                 IS retVal = this.getTypedField(8, 0);
 251  0
                 return retVal;
 252  
     }
 253  
 
 254  
 
 255  
 
 256  
     /**
 257  
      * Returns
 258  
      * DRG-9: "Outlier Reimbursement" - creates it if necessary
 259  
      */
 260  
     public CP getOutlierReimbursement() { 
 261  0
                 CP retVal = this.getTypedField(9, 0);
 262  0
                 return retVal;
 263  
     }
 264  
     
 265  
     /**
 266  
      * Returns
 267  
      * DRG-9: "Outlier Reimbursement" - creates it if necessary
 268  
      */
 269  
     public CP getDrg9_OutlierReimbursement() { 
 270  0
                 CP retVal = this.getTypedField(9, 0);
 271  0
                 return retVal;
 272  
     }
 273  
 
 274  
 
 275  
 
 276  
     /**
 277  
      * Returns
 278  
      * DRG-10: "Confidential Indicator" - creates it if necessary
 279  
      */
 280  
     public ID getConfidentialIndicator() { 
 281  0
                 ID retVal = this.getTypedField(10, 0);
 282  0
                 return retVal;
 283  
     }
 284  
     
 285  
     /**
 286  
      * Returns
 287  
      * DRG-10: "Confidential Indicator" - creates it if necessary
 288  
      */
 289  
     public ID getDrg10_ConfidentialIndicator() { 
 290  0
                 ID retVal = this.getTypedField(10, 0);
 291  0
                 return retVal;
 292  
     }
 293  
 
 294  
 
 295  
 
 296  
     /**
 297  
      * Returns
 298  
      * DRG-11: "DRG Transfer Type" - creates it if necessary
 299  
      */
 300  
     public IS getDRGTransferType() { 
 301  0
                 IS retVal = this.getTypedField(11, 0);
 302  0
                 return retVal;
 303  
     }
 304  
     
 305  
     /**
 306  
      * Returns
 307  
      * DRG-11: "DRG Transfer Type" - creates it if necessary
 308  
      */
 309  
     public IS getDrg11_DRGTransferType() { 
 310  0
                 IS retVal = this.getTypedField(11, 0);
 311  0
                 return retVal;
 312  
     }
 313  
 
 314  
 
 315  
 
 316  
 
 317  
 
 318  
     /** {@inheritDoc} */   
 319  
     protected Type createNewTypeWithoutReflection(int field) {
 320  0
        switch (field) {
 321  0
           case 0: return new CE(getMessage());
 322  0
           case 1: return new TS(getMessage());
 323  0
           case 2: return new ID(getMessage(), new Integer( 136 ));
 324  0
           case 3: return new IS(getMessage(), new Integer( 56 ));
 325  0
           case 4: return new CE(getMessage());
 326  0
           case 5: return new NM(getMessage());
 327  0
           case 6: return new CP(getMessage());
 328  0
           case 7: return new IS(getMessage(), new Integer( 229 ));
 329  0
           case 8: return new CP(getMessage());
 330  0
           case 9: return new ID(getMessage(), new Integer( 136 ));
 331  0
           case 10: return new IS(getMessage(), new Integer( 415 ));
 332  0
           default: return null;
 333  
        }
 334  
    }
 335  
 
 336  
 
 337  
 }
 338