OBX5 in an ORU message is supposed to be the data type specified in OBX2. In our implementation there are 13 possible data types. The accelerator segment schema,for OBX5, specifies a "varies" complex data type that is really an ST data type. Any OBX5 message containing a compound datatype fails validation - probably because it has unescaped reserved characters.
Has anyone found a way to use the accelerator to properly validate the OBX5 construct,for multiple possible datatypes?
I tried to implement multiple OBX5 datatypes by modifying the segments xsd as follows
<xs:element minOccurs="0" maxOccurs="1" name="OBX_5_ObservationValue">
<xs:complexType>
<xs:choice>
<xs:element name="CWE_Type" type="ns0:CWE"/>
<xs:element name="NM_Type" type="ns0:NM"/>
<xs:element name="SN_Type" type="ns0:SN"/>
<xs:element name="DT_Type" type="ns0:DT"/>
<xs:element name="ST_Type" type="ns0:ST"/>
</xs:choice>
</xs:complexType>
</xs:element>
Visual Studio "thinks" this is valid. It also generates an instance with a OBX5 CWE data type.
The BizTalk HL7 Accelerator fails the message for the following
XmlSchemaSequence not found under element OBX_5_ObservationValue
Complex node with path OBX_ObservationResult\OBX_5_ObservationValue has an invalid child count of 0
Bob