Class Hl7V2TestDataHelper

java.lang.Object
ca.cdr.test.hl7v2.Hl7V2TestDataHelper

public class Hl7V2TestDataHelper extends Object
Creates HL7 V2 test data
  • Field Details

  • Constructor Details

  • Method Details

    • buildDefault

      public static Hl7V2TestDataHelper buildDefault(FhirContext theFhirContext)
    • addExtraComponent

      public void addExtraComponent(ca.uhn.hl7v2.model.AbstractType theTarget, int theComponentIndex, String theValue) throws ca.uhn.hl7v2.model.DataTypeException
      Throws:
      ca.uhn.hl7v2.model.DataTypeException
    • createAdtA01

      public ca.uhn.hl7v2.model.v25.message.ADT_A01 createAdtA01() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createAdtA01

      public ca.uhn.hl7v2.model.v25.message.ADT_A01 createAdtA01(boolean theValid) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createAdtA03

      public ca.uhn.hl7v2.model.v25.message.ADT_A03 createAdtA03() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createAdtA06

      public ca.uhn.hl7v2.model.v25.message.ADT_A06 createAdtA06() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createAdtA07

      public ca.uhn.hl7v2.model.v25.message.ADT_A06 createAdtA07() throws ca.uhn.hl7v2.HL7Exception
      The ADT^A07 trigger uses the same structure as ADT^A06 (i.e. ADT_A06)
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createAdtA10

      public ca.uhn.hl7v2.model.v25.message.ADT_A09 createAdtA10() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createAdtA11

      public ca.uhn.hl7v2.model.v25.message.ADT_A09 createAdtA11() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateMinimalPatient

      public void populateMinimalPatient(ca.uhn.hl7v2.model.v25.segment.PID thePid, ca.uhn.hl7v2.model.v25.segment.PD1 thePd1, MinimalHl7v2ToFhirTestData.PatientData thePatientData) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateMinimalEncounter

      public void populateMinimalEncounter(ca.uhn.hl7v2.model.v25.segment.PV1 thePv1, ca.uhn.hl7v2.model.v25.segment.PV2 thePv2, MinimalHl7v2ToFhirTestData.EncounterData theEncounter, MinimalHl7v2ToFhirTestData.HospitalData theHospital, MinimalHl7v2ToFhirTestData.PractitionerData thePractitioner) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateMinimalObservation

      public void populateMinimalObservation(ca.uhn.hl7v2.model.Message theMessage, ca.uhn.hl7v2.model.v25.segment.OBX theObx, MinimalHl7v2ToFhirTestData.ObservationData theObservationData) throws ca.uhn.hl7v2.model.DataTypeException
      Throws:
      ca.uhn.hl7v2.model.DataTypeException
    • createAdtA29

      public ca.uhn.hl7v2.model.v25.message.ADT_A21 createAdtA29() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createAdtA42

      public ca.uhn.hl7v2.model.v25.message.ADT_A39 createAdtA42() throws ca.uhn.hl7v2.HL7Exception
      The ADT^A42 trigger uses the same structure as ADT^A39 (i.e. ADT_A39)
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createAdtA45

      public ca.uhn.hl7v2.model.v25.message.ADT_A45 createAdtA45() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createAdtA54

      public ca.uhn.hl7v2.model.v25.message.ADT_A54 createAdtA54() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createAdtA60

      public ca.uhn.hl7v2.model.v25.message.ADT_A60 createAdtA60() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createAdtA60

      public ca.uhn.hl7v2.model.v25.message.ADT_A60 createAdtA60(boolean thePopulateEncounterFields) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createDftP03

      public ca.uhn.hl7v2.model.v25.message.DFT_P03 createDftP03() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createOrmO01

      public ca.uhn.hl7v2.model.v25.message.ORM_O01 createOrmO01() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createOruR01

      public ca.uhn.hl7v2.model.v25.message.ORU_R01 createOruR01() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createRdeO11

      public ca.uhn.hl7v2.model.v25.message.RDE_O11 createRdeO11() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createRdeO11

      public ca.uhn.hl7v2.model.v25.message.RDE_O11 createRdeO11(boolean hasMultipleComponents) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createRdeO11

      public ca.uhn.hl7v2.model.v25.message.RDE_O11 createRdeO11(boolean hasMultipleComponents, boolean bothComponentsAreCoded) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createSiuS12

      public ca.uhn.hl7v2.model.v25.message.SIU_S12 createSiuS12() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createVxuV04

      public ca.uhn.hl7v2.model.v25.message.VXU_V04 createVxuV04() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateAil

      public void populateAil(ca.uhn.hl7v2.model.v25.segment.AIL theAil) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateAip

      public void populateAip(ca.uhn.hl7v2.model.v25.segment.AIP theAip) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateDg1

      public void populateDg1(ca.uhn.hl7v2.model.v25.segment.DG1 theDg1) throws ca.uhn.hl7v2.model.DataTypeException
      Throws:
      ca.uhn.hl7v2.model.DataTypeException
    • populateDg1

      public ca.uhn.hl7v2.model.v25.segment.DG1 populateDg1(ca.uhn.hl7v2.model.v25.segment.DG1 theDg1, boolean includeDiagnosisTypeAndPriority) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateGt1

      public void populateGt1(ca.uhn.hl7v2.model.v25.segment.GT1 theGt1) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateIam

      public void populateIam(ca.uhn.hl7v2.model.v25.segment.IAM theIam) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateAl1

      public void populateAl1(ca.uhn.hl7v2.model.v25.segment.AL1 theIam) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateIn1

      public void populateIn1(ca.uhn.hl7v2.model.v25.segment.IN1 theIn1) throws ca.uhn.hl7v2.model.DataTypeException
      Throws:
      ca.uhn.hl7v2.model.DataTypeException
    • populateIn1Difference

      public void populateIn1Difference(ca.uhn.hl7v2.model.v25.segment.IN1 theIn1, String identifier) throws ca.uhn.hl7v2.model.DataTypeException
      Throws:
      ca.uhn.hl7v2.model.DataTypeException
    • populateIn2

      public void populateIn2(ca.uhn.hl7v2.model.v25.segment.IN2 theIn2) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateMsh

      public void populateMsh(ca.uhn.hl7v2.model.v25.segment.MSH theMsh, String messageType) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateNk1Employer

      public void populateNk1Employer(ca.uhn.hl7v2.model.v25.segment.NK1 theNk1) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateNk1NextOfKin

      public void populateNk1NextOfKin(ca.uhn.hl7v2.model.v25.segment.NK1 theNk1) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateObxAssessmentHeight

      public void populateObxAssessmentHeight(ca.uhn.hl7v2.model.Message theMessage, ca.uhn.hl7v2.model.v25.segment.OBX theObx) throws ca.uhn.hl7v2.model.DataTypeException
      Throws:
      ca.uhn.hl7v2.model.DataTypeException
    • populateObxAssessmentWeight

      public void populateObxAssessmentWeight(ca.uhn.hl7v2.model.Message a01, ca.uhn.hl7v2.model.v25.segment.OBX theObx) throws ca.uhn.hl7v2.model.DataTypeException
      Throws:
      ca.uhn.hl7v2.model.DataTypeException
    • populateOrcForMedication

      public void populateOrcForMedication(ca.uhn.hl7v2.model.v25.segment.ORC theOrc, String theOrderControl, boolean thePopulateOrc2, boolean thePopulateOrc3) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populatePid

      public void populatePid(ca.uhn.hl7v2.model.v25.segment.PID thePid) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populatePid

      public void populatePid(ca.uhn.hl7v2.model.v25.segment.PID thePid, boolean theValid) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populatePr1First

      public void populatePr1First(ca.uhn.hl7v2.model.v25.segment.PR1 thePr1) throws ca.uhn.hl7v2.model.DataTypeException
      Throws:
      ca.uhn.hl7v2.model.DataTypeException
    • populatePr1Second

      public void populatePr1Second(ca.uhn.hl7v2.model.v25.segment.PR1 thePr1) throws ca.uhn.hl7v2.model.DataTypeException
      Throws:
      ca.uhn.hl7v2.model.DataTypeException
    • populatePv1

      public void populatePv1(ca.uhn.hl7v2.model.v25.segment.PV1 thePv1) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populatePv2

      public void populatePv2(ca.uhn.hl7v2.model.v25.segment.PV2 thePv2) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateRolA

      public void populateRolA(ca.uhn.hl7v2.model.v25.segment.ROL theRol) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateRolB

      public void populateRolB(ca.uhn.hl7v2.model.v25.segment.ROL rol2) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateRolC

      public void populateRolC(ca.uhn.hl7v2.model.v25.segment.ROL rol3) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateRxe

      public void populateRxe(ca.uhn.hl7v2.model.v25.segment.RXE theRxe) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateRxr

      public void populateRxr(ca.uhn.hl7v2.model.v25.segment.RXR theRxr) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateSch

      public void populateSch(ca.uhn.hl7v2.model.v25.segment.SCH theSch) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateZxt

      public void populateZxt(ca.uhn.hl7v2.model.AbstractMessage theMsg) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createRasO17

      public ca.uhn.hl7v2.model.v25.message.RAS_O17 createRasO17() throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createRasO17

      public ca.uhn.hl7v2.model.v25.message.RAS_O17 createRasO17(boolean hasMultipleComponents) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createRasO17

      public ca.uhn.hl7v2.model.v25.message.RAS_O17 createRasO17(boolean hasMultipleComponents, boolean bothComponentsAreCoded) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • createRasO17

      public ca.uhn.hl7v2.model.v25.message.RAS_O17 createRasO17(boolean hasMultipleComponents, boolean bothComponentsAreCoded, boolean thePopulateOrc2, boolean thePopulateOrc3) throws ca.uhn.hl7v2.HL7Exception
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • populateXcn

      public void populateXcn(ca.uhn.hl7v2.model.v25.datatype.XCN theXCN) throws ca.uhn.hl7v2.model.DataTypeException
      Throws:
      ca.uhn.hl7v2.model.DataTypeException