[英]Iterating through HL7 message using Segment Iterator Object of Chameleon Python API
我正在使用Interfaceware Iguana和Chameleon生成HL7消息。 这是我第一次使用Python,因此这个问题可能还不成熟。 我正在尝试使用Segment Iterator Object遍历消息。
current_segment = environment.input_segment_iterator()
current_segment.apply_transform()
output = current_segment.output()
if current_segment.move_next('OBX'):
log('OBX setId is ' + current_segment.field(1).value );
我已经在全局后期处理方程式窗口中编写了此脚本,但是它总是给我一个错误提示
RuntimeError: Invalid iterator must be reset before being used while calling apply_transform
while executing the outgoing post process equation for the project.
我已经看到了许多使用迭代器的示例,并且都遵循相同的模式。 如何重置此迭代器,为什么无效?
经过一些研究工作,我发现不能在post process
方程式窗口中使用input_segment_iterator
,而是在transformation
窗口中使用。 现在,我可以看到使用Chameleon的“ Test Mapping
功能对脚本所做的更改。 但是,如何配置此更改以在使用此vmd
生成的每条消息上实施?
我认为使用INTERFACEWARE Chameleon和Iguana产品的人员可以轻松帮助我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.