当前位置: 首页>>代码示例>>Java>>正文


Java MSH类代码示例

本文整理汇总了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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:21,代码来源:HL7MLLPNettyRouteToTest.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:24,代码来源:HL7MLLPCodecStandAndEndBytesTest.java

示例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();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:24,代码来源:HL7RouteTest.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:22,代码来源:HL7RouteTest.java

示例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();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:25,代码来源:HL7MLLPNettyCodecByteArrayRouteTest.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:23,代码来源:HL7MLLPNettyCodecByteArrayRouteTest.java

示例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;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:25,代码来源:HL7DataFormatTest.java

示例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();
}
 
开发者ID:KingsCollegeHospital,项目名称:rassyeyanie,代码行数:25,代码来源:HL7DataFormatTest.java

示例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();
    
}
 
开发者ID:KingsCollegeHospital,项目名称:rassyeyanie,代码行数:19,代码来源:SymA03PimsA01.java

示例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");

}
 
开发者ID:oopcell,项目名称:AvoinApotti,代码行数:39,代码来源:VoMapper.java

示例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");

}
 
开发者ID:IMS-MAXIMS,项目名称:openMAXIMS,代码行数:40,代码来源:VoMapper.java

示例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);
}
 
开发者ID:KingsCollegeHospital,项目名称:rassyeyanie,代码行数:10,代码来源:MessageMaker.java

示例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());
}
 
开发者ID:KingsCollegeHospital,项目名称:rassyeyanie,代码行数:14,代码来源:HapiUtil.java

示例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;
}
 
开发者ID:KingsCollegeHospital,项目名称:rassyeyanie,代码行数:32,代码来源:HL7MLLPCodecStandAndEndBytesTest.java


注:本文中的ca.uhn.hl7v2.model.v24.segment.MSH类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。