Segment unknown:
Posted: Mon Sep 08, 2014 9:34 am
Hi all,
any idea how I can read messages like the following:
MSH|^~\&|100|100|199|199|20140821104157||RSP^K22^RSP_K21|41|P|2.5|||||GBR||EN
MSA|AA|hosp number
QAK|QRY001|OK
QPD|IHE PDQ Query|QRY001|@PID.3.1^TMP120406~@PID.3.4^140~@PID.3.5^PI|
PID|001||9761533^^^100^PE~TMP120404^^^126^PI~TMP120406^^^140^PI~TMP120502^^^108^PI~TMP120403^^^140^PI~TMP120404^^^129^PI~TMP120404^^^151^PI~TMP1212^^^131^PI~VTEST01^^^131^PI~VTEST01^^^182^PI~OBFTEST1^^^126^PI~OBFTEST1^^^140^PI~OBFTEST3^^^140^PI~OBFTEST4^^^140^PI~OBFTEST4^^^126^PI~OBFTEST5^^^126^PI~OBFTEST6^^^131^PI~OBFTEST6^^^140^PI~OBFTEST7^^^140^PI~OBFTEST8^^^140^PI~OBFTEST9^^^140^PI~OBFTEST10^^^140^PI~TMP120409^^^140^PI~TMP120411^^^140^PI~TMP120412^^^140^PI~1204201201^^^NHS^NH||Cavendish^Clarissa^^^Mrs^^U||19810510000000|M|^^^^^^A||Crouch/ End House^Stambridge^Rochford^Essex^CH26 5WX^^H||792290^PRN^^E-maily~Home mobilex^PRS|test5^WPN|CYM|9|Z|||||Z||||||9|20120201|||01
PD1|||^^W93015|G9504637
because standard RSP_K21 has no PID segment ... and if I try to fake the MSH to any ADT ... I get the same error in both cases "Segment unknown:"
I also tried to create a own type RSP_K21_withPID (using you example in uCustom.pas ... procedure Init; override "Error: not found in base class" ... and Definitions.add() "Error: unknown identifier")
So: I'm not able to process messages like the above example with DelphiHL7 components!
Thanks in advance, Hans
any idea how I can read messages like the following:
MSH|^~\&|100|100|199|199|20140821104157||RSP^K22^RSP_K21|41|P|2.5|||||GBR||EN
MSA|AA|hosp number
QAK|QRY001|OK
QPD|IHE PDQ Query|QRY001|@PID.3.1^TMP120406~@PID.3.4^140~@PID.3.5^PI|
PID|001||9761533^^^100^PE~TMP120404^^^126^PI~TMP120406^^^140^PI~TMP120502^^^108^PI~TMP120403^^^140^PI~TMP120404^^^129^PI~TMP120404^^^151^PI~TMP1212^^^131^PI~VTEST01^^^131^PI~VTEST01^^^182^PI~OBFTEST1^^^126^PI~OBFTEST1^^^140^PI~OBFTEST3^^^140^PI~OBFTEST4^^^140^PI~OBFTEST4^^^126^PI~OBFTEST5^^^126^PI~OBFTEST6^^^131^PI~OBFTEST6^^^140^PI~OBFTEST7^^^140^PI~OBFTEST8^^^140^PI~OBFTEST9^^^140^PI~OBFTEST10^^^140^PI~TMP120409^^^140^PI~TMP120411^^^140^PI~TMP120412^^^140^PI~1204201201^^^NHS^NH||Cavendish^Clarissa^^^Mrs^^U||19810510000000|M|^^^^^^A||Crouch/ End House^Stambridge^Rochford^Essex^CH26 5WX^^H||792290^PRN^^E-maily~Home mobilex^PRS|test5^WPN|CYM|9|Z|||||Z||||||9|20120201|||01
PD1|||^^W93015|G9504637
because standard RSP_K21 has no PID segment ... and if I try to fake the MSH to any ADT ... I get the same error in both cases "Segment unknown:"
I also tried to create a own type RSP_K21_withPID (using you example in uCustom.pas ... procedure Init; override "Error: not found in base class" ... and Definitions.add() "Error: unknown identifier")
So: I'm not able to process messages like the above example with DelphiHL7 components!
Thanks in advance, Hans