Search in sources :

Example 1 with ADR_A19

use of ca.uhn.hl7v2.model.v24.message.ADR_A19 in project camel by apache.

the class HL7MLLPCodecStandAndEndBytesTest method createHL7AsMessage.

private static Message 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");
    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)

Example 2 with ADR_A19

use of ca.uhn.hl7v2.model.v24.message.ADR_A19 in project camel by apache.

the class HL7ByteArrayRouteTest method createADR19Message.

private static Message createADR19Message() 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");
    mshSegment.getCharacterSet(0).setValue("UNICODE UTF-8");
    // Populate the PID Segment
    MSA msa = adr.getMSA();
    msa.getAcknowledgementCode().setValue("AA");
    msa.getMessageControlID().setValue("123");
    QRD qrd = adr.getQRD();
    qrd.getQueryDateTime().getTimeOfAnEvent().setValue("20080805120000");
    return adr.getMessage();
}
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)

Example 3 with ADR_A19

use of ca.uhn.hl7v2.model.v24.message.ADR_A19 in project camel by apache.

the class HL7DataFormatTest method createHL7WithCharsetAsMessage.

private static ADR_A19 createHL7WithCharsetAsMessage(HL7Charset charset) throws Exception {
    ADR_A19 adr = createHL7AsMessage();
    adr.getMSH().getCharacterSet(0).setValue(charset.getHL7CharsetName());
    return adr;
}
Also used : ADR_A19(ca.uhn.hl7v2.model.v24.message.ADR_A19)

Example 4 with ADR_A19

use of ca.uhn.hl7v2.model.v24.message.ADR_A19 in project camel by apache.

the class HL7MLLPCodecTest method createHL7AsMessage.

// START SNIPPET: e3
private static Message createHL7AsMessage() throws Exception {
    ADR_A19 adr = new ADR_A19();
    adr.initQuickstart("ADR", "A19", "P");
    // Populate the MSH Segment
    MSH mshSegment = adr.getMSH();
    mshSegment.getDateTimeOfMessage().getTimeOfAnEvent().setValue("200701011539");
    mshSegment.getSendingApplication().getNamespaceID().setValue("MYSENDER");
    mshSegment.getMessageControlID().setValue("456");
    // Populate the PID Segment
    MSA msa = adr.getMSA();
    msa.getAcknowledgementCode().setValue("AA");
    msa.getMessageControlID().setValue("123");
    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)

Example 5 with ADR_A19

use of ca.uhn.hl7v2.model.v24.message.ADR_A19 in project camel by apache.

the class HL7MLLPNettyCodecTest method createHL7AsMessage.

// START SNIPPET: e3
private static Message createHL7AsMessage() throws Exception {
    ADR_A19 adr = new ADR_A19();
    adr.initQuickstart("ADR", "A19", "P");
    // Populate the MSH Segment
    MSH mshSegment = adr.getMSH();
    mshSegment.getDateTimeOfMessage().getTimeOfAnEvent().setValue("200701011539");
    mshSegment.getSendingApplication().getNamespaceID().setValue("MYSENDER");
    mshSegment.getMessageControlID().setValue("456");
    // Populate the PID Segment
    MSA msa = adr.getMSA();
    msa.getAcknowledgementCode().setValue("AA");
    msa.getMessageControlID().setValue("123");
    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

ADR_A19 (ca.uhn.hl7v2.model.v24.message.ADR_A19)11 MSA (ca.uhn.hl7v2.model.v24.segment.MSA)10 MSH (ca.uhn.hl7v2.model.v24.segment.MSH)10 QRD (ca.uhn.hl7v2.model.v24.segment.QRD)10