What’s inside HL72fDasm Component

// if set passthrough to true, then this disassembler is a passthrough component
object obj2 = inMsg.Context.Read(“PassThru”, “http://HL7Schemas.HeaderPropertySchema”);
if ((obj2 != null) && ((bool) obj2))
                {
                    this.mCalledFirstTime = false;
                    this.mMessageList[0] = inMsg;
                }
               

Technorati Tags: ,

// either individual or batch
// determined by HL7DataReader
this.mType=Individual

// source party
MSH3_1, MSH_3_2,MSH_3_3

// ProcessIndividualMessage
1) process message header
HL7MessageProcessor wrap documenspec i.e. http://microsoft.com/HealthCare/HL7/2X#MSH_25_GLO_DEF
pass HL7XmlReader to XmlTranslatorStream
read through XmlTranslatorStream to header stream
Reprocess MSH 3,5,1,2
2) process meta data
get source party
get source party by read MSH3_1,MSH3_2,MSH3_3 if partial sending application is allowed
get sending party configuration, e.g. ack configuration, schema validation, bre validation, trailing character allowness
if no ack is defined, then set AckForAckType to NE
if no MSH2 defined, set default delimeter
get receiving party by read MSH5_1,MSH5_2,MSH5_3
determine if batching is required based on receiving party configuration
3) process message body
get documentSpecByType by body schema type
if validate body schema is required for party configuration, initialize HL7XmlReader and wrap in XmlTranslatorStream
read through XmlTranslatorStream to body stream // maybe this is why you need to enable body validation, since only if it is true will the component read through the stream
4) process Z segment
if present, read it to Z stream as raw stream
5) process ACK
if this.mCheckForAckOnly then set ACK value based on MSA1 from context
else
read MSH15 and MSH16, together with ACK party configuration,
    if ACK type is Enhanced or Static, generate enahenced ACK
        [Detail to be filled]
    otherwise generate original defered ACK
        if ACK requires original or defered
            read MSH 10 and MSH 12, generate ACK from template
            dependent on header and body parsing, generate AR if header error, AE if body error, AA if both fine
if header or body parsing error, generate suspend message
else generate message
    create new message, add header, body and Z segment part // check GenerateNormalMessage() for reference
    Promote context
        ToBeBatched
        MessageClass
        MessageType
        ParseError
    Write context
        SchemaStrongName
        DocSpecType
        LastSegmentDelimiterMissing (if applicable)
        SegmentDelimiter2Char (if applicable)
    add message to container // ?why add, seems 5 message can be contained
return message from getnext and return