本文整理汇总了Java中ca.uhn.hl7v2.model.v24.segment.MSH类的典型用法代码示例。如果您正苦于以下问题:Java MSH类的具体用法?Java MSH怎么用?Java MSH使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MSH类属于ca.uhn.hl7v2.model.v24.segment包,在下文中一共展示了MSH类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processMessage
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
@Override
public Message processMessage(Message hapiMsg) {
System.out.println("#################################");
System.out.println("#################################");
System.out.println("#################################");
System.out.println("#################################");
System.out.println("I got a HAPI v2.4 message");
ADT_A01 adtMsg = (ADT_A01) hapiMsg;
MSH msh = adtMsg.getMSH();
XPN[] xpns = adtMsg.getPID().getPatientName();
for (XPN xpn : xpns) {
System.out.println(xpn.toString());
}
return null;
}
开发者ID:springframeworkguru,项目名称:hapi-spring-integration,代码行数:18,代码来源:HL7v24InboundMessageServiceImpl.java
示例2: createHL7AsMessage
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
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;
}
示例3: createHL7AsMessage
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
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;
}
示例4: createADR19Message
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
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");
// 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();
}
示例5: createADT01Message
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
private static Message createADT01Message(String msgId) throws Exception {
ADT_A01 adt = new ADT_A01();
// Populate the MSH Segment
MSH mshSegment = adt.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("ADT");
mshSegment.getMessageType().getTriggerEvent().setValue("A01");
// Populate the PID Segment
PID pid = adt.getPID();
pid.getPatientName(0).getFamilyName().getSurname().setValue("Doe");
pid.getPatientName(0).getGivenName().setValue("John");
pid.getPatientIdentifierList(0).getID().setValue(msgId);
return adt;
}
示例6: createADR19Message
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
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();
}
示例7: createADT01Message
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
private static Message createADT01Message(String msgId) throws Exception {
ADT_A01 adt = new ADT_A01();
// Populate the MSH Segment
MSH mshSegment = adt.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("ADT");
mshSegment.getMessageType().getTriggerEvent().setValue("A01");
mshSegment.getCharacterSet(0).setValue("UNICODE UTF-8");
// Populate the PID Segment
PID pid = adt.getPID();
pid.getPatientName(0).getFamilyName().getSurname().setValue("Döe");
pid.getPatientName(0).getGivenName().setValue("John");
pid.getPatientIdentifierList(0).getID().setValue(msgId);
return adt;
}
示例8: createHL7AsMessage
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
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;
}
示例9: createHL7AsMessage
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
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");
msa.getMsa3_TextMessage().setValue(NONE_ISO_8859_1);
QRD qrd = adr.getQRD();
qrd.getQueryDateTime().getTimeOfAnEvent().setValue("20080805120000");
return adr.getMessage();
}
示例10: transform
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
public void transform(MSH msh)
throws HL7Exception
{
msh.getMsh3_SendingApplication().getNamespaceID().setValue("SYMPHONY");
msh.getMessageType().getTriggerEvent().setValue("A01");
msh.getMsh13_SequenceNumber().clear();
msh.getMsh14_ContinuationPointer().clear();
msh.getMsh17_CountryCode().clear();
int i = 0;
while (i < msh.getMsh18_CharacterSetReps())
{
msh.getMsh18_CharacterSet(i).clear();
i++;
}
msh.getMsh19_PrincipalLanguageOfMessage().clear();
}
示例11: populateMSH
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
protected void populateMSH(ProviderSystemVo proVo, MSH msh, String messageControlID,
String messageType, String triggerEvent) throws DataTypeException, Exception {
LOG.debug("VoMapper populateMSH: entry");
renderDateTimeVoToTS(new DateTime(), msh.getDateTimeOfMessage());
String receivingFacility=null;
ConfigPropertyVo prop = proVo.getConfigurationProperty(ConfigItems.Hl7Facility);
if (prop != null)
{
receivingFacility = prop.getPropertyValue();
}
if (receivingFacility == null)
receivingFacility = cfg.getReceivingFacility();
String processingId=null;
ConfigPropertyVo hl7Prop = proVo.getConfigurationProperty(ConfigItems.ProcessingID);
if (hl7Prop != null)
{
processingId=hl7Prop.getPropertyValue();
}
if (processingId == null)
processingId = cfg.getProcessingId();
msh.getSendingApplication().getNamespaceID().setValue(cfg.getSendApplication());
msh.getSendingFacility().getNamespaceID().setValue(cfg.getSendFacility());
msh.getFieldSeparator().setValue("|");
msh.getEncodingCharacters().setValue("^~\\&");
msh.getReceivingFacility().getNamespaceID().setValue(receivingFacility);
msh.getReceivingApplication().getNamespaceID().setValue(proVo.getHl7Application());
msh.getVersionID().getVersionID().setValue("2.4");
msh.getMessageType().getMessageType().setValue(messageType);
msh.getMessageType().getTriggerEvent().setValue(triggerEvent);
msh.getProcessingID().getProcessingID().setValue(processingId); // Debug / Production / Training
msh.getMessageControlID().setValue(messageControlID);
// order.getMSH().getMessageControlID().setValue(new String() + new java.util.Date().getTime());
LOG.debug("VoMapper populateMSH: exit");
}
示例12: populateMSH
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
protected void populateMSH(ProviderSystemVo proVo, MSH msh, String messageControlID,
String messageType, String triggerEvent,DateTimeFormat format) throws DataTypeException, Exception
{
LOG.debug("VoMapper populateMSH: entry");
renderDateTimeVoToTS(new DateTime(), msh.getDateTimeOfMessage(),format);//WDEV-19913
String receivingFacility=null;
ConfigPropertyVo prop = proVo.getConfigurationProperty(ConfigItems.Hl7Facility);
if (prop != null)
{
receivingFacility = prop.getPropertyValue();
}
if (receivingFacility == null)
receivingFacility = cfg.getReceivingFacility();
String processingId=null;
ConfigPropertyVo hl7Prop = proVo.getConfigurationProperty(ConfigItems.ProcessingID);
if (hl7Prop != null)
{
processingId=hl7Prop.getPropertyValue();
}
if (processingId == null)
processingId = cfg.getProcessingId();
msh.getSendingApplication().getNamespaceID().setValue(cfg.getSendApplication());
msh.getSendingFacility().getNamespaceID().setValue(cfg.getSendFacility());
msh.getFieldSeparator().setValue("|");
msh.getEncodingCharacters().setValue("^~\\&");
msh.getReceivingFacility().getNamespaceID().setValue(receivingFacility);
msh.getReceivingApplication().getNamespaceID().setValue(proVo.getHl7Application());
msh.getVersionID().getVersionID().setValue("2.4");
msh.getMessageType().getMessageType().setValue(messageType);
msh.getMessageType().getTriggerEvent().setValue(triggerEvent);
msh.getProcessingID().getProcessingID().setValue(processingId); // Debug / Production / Training
msh.getMessageControlID().setValue(messageControlID);
// order.getMSH().getMessageControlID().setValue(new String() + new java.util.Date().getTime());
LOG.debug("VoMapper populateMSH: exit");
}
示例13: MessageMaker
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
private MessageMaker(AbstractMessage message)
throws HL7Exception
{
this.message = message;
this.msh = HapiUtil.getWithTerser(this.message, MSH.class);
this.msh.getFieldSeparator().setValue("|");
this.msh.getEncodingCharacters().setValue("^~\\&");
this.pv1 = HapiUtil.getWithTerser(message, PV1.class);
}
示例14: getClassName
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
private static String getClassName(AbstractMessage message)
throws HL7Exception
{
// return
MSH msh = (MSH) message.get("MSH");
return String.format("%s_%s", msh
.getMsh9_MessageType()
.getMsg1_MessageType()
.getValue(), msh
.getMsh9_MessageType()
.getMsg2_TriggerEvent()
.getValue());
}
示例15: createHL7AsMessage
import ca.uhn.hl7v2.model.v24.segment.MSH; //导入依赖的package包/类
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;
}