Search in sources :

Example 21 with PID

use of ca.uhn.hl7v2.model.v26.segment.PID in project camel by apache.

the class HL7DataFormatTest method createHL7AsMessage.

private static ADR_A19 createHL7AsMessage() throws Exception {
    ADR_A19 adr = new ADR_A19();
    // Populate the MSH Segment
    MSH mshSegment = adr.getMSH();
    mshSegment.getFieldSeparator().setValue("|");
    mshSegment.getEncodingCharacters().setValue("^~\\&");
    mshSegment.getDateTimeOfMessage().getTimeOfAnEvent().setValue("200701011539");
    mshSegment.getSendingApplication().getNamespaceID().setValue("MYSENDER");
    mshSegment.getSequenceNumber().setValue("123");
    mshSegment.getMessageType().getMessageType().setValue("ADR");
    mshSegment.getMessageType().getTriggerEvent().setValue("A19");
    // Populate the PID Segment
    MSA msa = adr.getMSA();
    msa.getAcknowledgementCode().setValue("AA");
    msa.getMessageControlID().setValue("123");
    msa.getMsa3_TextMessage().setValue(NONE_ISO_8859_1);
    QRD qrd = adr.getQRD();
    qrd.getQueryDateTime().getTimeOfAnEvent().setValue("20080805120000");
    return adr;
}
Also used : QRD(ca.uhn.hl7v2.model.v24.segment.QRD) MSH(ca.uhn.hl7v2.model.v24.segment.MSH) ADR_A19(ca.uhn.hl7v2.model.v24.message.ADR_A19) MSA(ca.uhn.hl7v2.model.v24.segment.MSA)

Aggregations

MSH (ca.uhn.hl7v2.model.v24.segment.MSH)14 ADR_A19 (ca.uhn.hl7v2.model.v24.message.ADR_A19)10 MSA (ca.uhn.hl7v2.model.v24.segment.MSA)10 QRD (ca.uhn.hl7v2.model.v24.segment.QRD)10 ADT_A01 (ca.uhn.hl7v2.model.v24.message.ADT_A01)8 PID (ca.uhn.hl7v2.model.v24.segment.PID)8 DefaultHapiContext (ca.uhn.hl7v2.DefaultHapiContext)2 ValidationRuleBuilder (ca.uhn.hl7v2.validation.builder.ValidationRuleBuilder)2 HL7Exception (ca.uhn.hl7v2.HL7Exception)1 HapiContext (ca.uhn.hl7v2.HapiContext)1 CX (ca.uhn.hl7v2.model.v26.datatype.CX)1 XCN (ca.uhn.hl7v2.model.v26.datatype.XCN)1 XPN (ca.uhn.hl7v2.model.v26.datatype.XPN)1 ADT_AXX (ca.uhn.hl7v2.model.v26.message.ADT_AXX)1 EVN (ca.uhn.hl7v2.model.v26.segment.EVN)1 MSH (ca.uhn.hl7v2.model.v26.segment.MSH)1 PID (ca.uhn.hl7v2.model.v26.segment.PID)1 PV1 (ca.uhn.hl7v2.model.v26.segment.PV1)1 GenericParser (ca.uhn.hl7v2.parser.GenericParser)1 Parser (ca.uhn.hl7v2.parser.Parser)1