I want to query the cache database for messages where a specific HL7 segment equals a specific value. Does Cache have a pipe to XML or hl7 segment query function?
In Ensemble or HealthShare there is a class for the HL7 segments but it is not a persistent class so it is not exposed to SQL. The segments are stored in raw globals for speed and the virtual document paths are parsed at run time for efficiency.
You can use the message browser to look for messages where a particular segment/field value has a given value. But if you look at the generated SQL it doesn't seem to make sense. That is because the SQL query is used in a cursor and the access to segment values is done in COS inside the cursor iteration.
If you can be more specific about what you are trying to do i might be able to give you some pointers about how to get where you want to go.