Hi João,
The structure NMD_N02 is available in HAPI(since 
2.3.1)http://hl7api.sourceforge.net/v231/apidocs/ca/uhn/hl7v2/model/v231/message/NMD_N02.html
It is not good practice to create new messages, let alone without event type or 
version.
As a rule of thumb you should inspect the standard before creating a new 
message. If you don't find what you need you could use the Z strategy but you 
shall not create new messages.RegardsDaniel Nebot
--- On Sat, 5/12/12, João Agostinho Batista Lacerda Pavão <jpa...@utad.pt> 
wrote:

From: João Agostinho Batista Lacerda Pavão <jpa...@utad.pt>
Subject: [HAPI-devel] NCK
To: "hl7api-devel@lists.sourceforge.net" <hl7api-devel@lists.sourceforge.net>
Date: Saturday, May 12, 2012, 8:59 PM


Hi everyone.Could you please help me out on this?I needed a new message, called 
NMD. So I created one based on the HAPI, using HAPI's segments .The NMD has the 
following segments:MSHNCK (System time)[NTE] (Note/comment)
After that I created one message, based on the "CreateAMessage" example,  but 
this time using the just created NMD.class, I filled MSH, but I do  not know 
how to set NCK. It appears to have only a get() and not a set() - And that 
makes some sense. However when I print the message, in the ER7 form it simply 
doesn't appear. In the XML it appears an empty single tag (<NCK/>). Shouldn't 
be something like <NCK yyyyMMddHHmmss)/> ?
Printing ER7 Encoded Message:
MSH|^~\&|jpavao-NMD-CreatedNewMessageType||||201205121945||NMD||||123

Printing XML Encoded Message:
<?xml version="1.0"?>
<NMD xmlns="urn:hl7-org:v2xml">
    <MSH>
        <MSH.1>|</MSH.1>
        <MSH.2>^~\&amp;</MSH.2>
        <MSH.3>
            <HD.1>jpavao-NMD-CreatedNewMessageType</HD.1>
        </MSH.3>
        <MSH.7>
            <TS.1>201205121945</TS.1>
        </MSH.7>
        <MSH.9>
            <CM_MSG.1>NMD</CM_MSG.1>
        </MSH.9>
        <MSH.13>123</MSH.13>
    </MSH>
    <NCK/>
</NMD>


-----Inline Attachment Follows-----

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-----Inline Attachment Follows-----

_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to