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;
}
Aggregations