本文介绍了我想将HL7转换为XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好b $ b
我想将此HL7消息转换为xml。我正在使用Hapi。
但它确实如此如果HL7消息从FHS标题开始,则无效。
我也收到错误
失败值756666的验证规则:匹配正则表达式(\d {1,2})?(\(\\\ {3} \))?\d {3} -\d {4 }(X \d {1,5})?(B [/ d {1,5})?(C. *)?:段:PID字段#13
FHS | ^〜\& |医疗对象|测试消息摩羯座
BHS | ^〜\& |医疗对象|测试消息摩羯座
MSH | ^〜\& | EQUATORDXTRAY ^ EQUATORDXTRAY:2.20.2(Build 4111 )[win32-i386] {SVV = 62; DBV = 62} ^ L |测试消息摩羯座^ 22B601DF-1415-4ACB-BE13-D7E9C9CCAC41 ^ GUID | AUSHICPR.UP3123000QW ^ UP3123000QW.PAPERACT SOLUTIONS.UHG ^ L | PaperAct Solutions On代表统一健康组测试^ 1D618FDB-DB0A-44DC-8B03-8A4C981BD038 ^ GUID | 20121121142346 + 1000 |测试消息摩羯座(E quator)< MO882115。> | ORU ^ R01 | TMSCP7427894 | P | 2.3.1 ^ AUS&& ISO ^ AS4700.2&& L ||| AL || AUS
PID | 1 || 129833 ^^^医疗对象& 7C3E3682-91F6-11D2-8F2C-444553540000& GUID ^ SR ^测试消息摩羯座& 22B601DF-1415-4ACB-BE13-D7E9C9CCAC41& GUID~129833 ^^^医疗对象& 7C3E3682-91F6- 11D2-8F2C-444553540000& GUID ^ FI ^测试消息摩羯座& 22B601DF-1415-4ACB-BE13-D7E9C9CCAC41& GUID~408091 ^^^医疗对象& 7C3E3682-91F6-11D2-8F2C-444553540000& GUID ^ FI ^ Think Positive心理学服务& 53604C05-48FA-4CF0-B398-58790CF638FA& GUID~100338 ^^^医疗对象& 7C3E3682-91F6-11D2-8F2C-444553540000& GUID ^ FI ^多伦多私立医院& A6E05941-72EE-4D2C-9BAF-17D9D9C9207E& ; GUID || PATIENT ^测试^^^^^大号|| 20010101 | M ||||| 61(07)54506495 ^ PRN ^ PH ^^ 61 ^ 07 ^ 54506495 ||||||||||| |||||| N
PV1 | 1 | O |||||| UP3123000QW ^ PAPERACT SOLUTIONS ^ UHG ^^^ MR ^^^ Medical-Objects& 7C3E3682-91F6-11D2-8F2C-444553540000& GUID ^ L ^^^ UPIN | UP3123000QW ^ PAPERACT SOLUTIONS ^ UHG ^^^ MR ^^ ^医疗对象& 7C3E3682-91F6-11D2-8F2C-444553540000& GUID ^ L ^^^ UPIN ||||||| N
ORC | RE || F1705DC3-B14F-4B2D-A0BA-5707D0690CCB ^测试消息摩羯座^ 22B601DF-1415-4ACB-BE13-D7E9C9CCAC41 ^ GUID || CM ||||||| UP3123000QW ^ PAPERACT SOLUTIONS ^ UHG ^^^ MR ^^^医疗对象& 7C3E3682-91F6-11D2-8F2C-444553540000& ; GUID ^ L ^^^ UPIN
OBR | 1 || F1705DC3-B14F-4B2D-A0BA-5707D0690CCB ^测试消息摩羯座^ 22B601DF-1415-4ACB-BE13-D7E9C9CCAC41 ^ GUID | 11488-4 ^咨询说明( E BROWN(MOTEST))^ LN || 20121121 + 1000 | 20121121 + 1000 ||||||||| UP3123000QW ^ PAPERACT SOLUTIONS ^ UHG ^^^ MR ^^^ Medical-Objects& 7C3E3682-91F6-11D2-8F2C -444553540000& GUID ^ L ^^^ UPIN ||来自测试消息摩羯座XX11211408459-9711.oru21.11.2012 || LN = F1705DC3-B14F-4B2D-A0BA-5707D0690CCB || 20121121140814 + 1000 || PHY | F | | ^^^ 20121121 + 1000 | UP3123000QW ^ PAPERACT SOLUTIONS ^ UHG ^^^ MR ^^^医疗对象& 7C3E3682-91F6-11D2-8F2C-444553540000& GUID ^ L ^^^ UPIN |||| EB4558000PX& BROWN( MOTEST)及ELI&功放;&安培;&安培;先生和放大器;&放大器;与医疗对象
OBX | 1 | FT | 11488-4 ^^ LN ||您好,\.br \ \.br \这是来自医疗对象的测试消息,看看您的连接是否正常工作结果的传递。\。。。。。。。。。。。。。。。。。。。。.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \ Eli Brown\.br\Medical-Objects\.br\Ph(07)5456 6000 \.br \ |||||| F
BTS | 1
FTS | 1 |由www.medical-objects.com提供支持
[torsten]附加问题[/我希望获取PID段并显示患者的所有详细信息。
解决方案
Hi
I want to convert this HL7 message to xml.I am using Hapi.
But it does not work if HL7 message starts from "FHS header".
Also I am getting an error forFailed validation rule for value "756666": Matches the regular expression (\d{1,2} )?(\(\d{3}\))?\d{3}-\d{4}(X\d{1,5})?(B\d{1,5})?(C.*)?: Segment: PID Field #13
FHS|^~\&|Medical-Objects|Test Message capricorn BHS|^~\&|Medical-Objects|Test Message capricorn MSH|^~\&|EQUATORDXTRAY^EQUATORDXTRAY:2.20.2 (Build 4111) [win32-i386] {SVV=62;DBV=62}^L|Test Message capricorn^22B601DF-1415-4ACB-BE13-D7E9C9CCAC41^GUID|AUSHICPR.UP3123000QW^UP3123000QW.PAPERACT SOLUTIONS.UHG^L|PaperAct Solutions On Behalf of Unified Health Group Test^1D618FDB-DB0A-44DC-8B03-8A4C981BD038^GUID|20121121142346+1000|Test Message Capricorn (Equator) <MO882115.>|ORU^R01|TMSCP7427894|P|2.3.1^AUS&&ISO^AS4700.2&&L|||AL||AUS PID|1||129833^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^SR^Test Message capricorn&22B601DF-1415-4ACB-BE13-D7E9C9CCAC41&GUID~129833^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^FI^Test Message capricorn&22B601DF-1415-4ACB-BE13-D7E9C9CCAC41&GUID~408091^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^FI^Think Positive Psychology Services&53604C05-48FA-4CF0-B398-58790CF638FA&GUID~100338^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^FI^Toronto Private Hospital&A6E05941-72EE-4D2C-9BAF-17D9D9C9207E&GUID||PATIENT^Test^^^^^L||20010101|M|||||61(07)54506495^PRN^PH^^61^07^54506495|||||||||||||||||N PV1|1|O||||||UP3123000QW^PAPERACT SOLUTIONS^UHG^^^MR^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^L^^^UPIN|UP3123000QW^PAPERACT SOLUTIONS^UHG^^^MR^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^L^^^UPIN|||||||N ORC|RE||F1705DC3-B14F-4B2D-A0BA-5707D0690CCB^Test Message capricorn^22B601DF-1415-4ACB-BE13-D7E9C9CCAC41^GUID||CM|||||||UP3123000QW^PAPERACT SOLUTIONS^UHG^^^MR^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^L^^^UPIN OBR|1||F1705DC3-B14F-4B2D-A0BA-5707D0690CCB^Test Message capricorn^22B601DF-1415-4ACB-BE13-D7E9C9CCAC41^GUID|11488-4^Consultation Note (E BROWN (MOTEST))^LN||20121121+1000|20121121+1000|||||||||UP3123000QW^PAPERACT SOLUTIONS^UHG^^^MR^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^L^^^UPIN||From Test Message capricorn"XX11211408459-9711.oru" 21.11.2012||LN=F1705DC3-B14F-4B2D-A0BA-5707D0690CCB||20121121140814+1000||PHY|F||^^^20121121+1000|UP3123000QW^PAPERACT SOLUTIONS^UHG^^^MR^^^Medical-Objects&7C3E3682-91F6-11D2-8F2C-444553540000&GUID^L^^^UPIN||||EB4558000PX&BROWN (MOTEST)&ELI&&&Mr.&&&Medical-Objects OBX|1|FT|11488-4^^LN||Hi there,\.br\ \.br\This is a test message from Medical-Objects to see if your connection is working for delivery of results.\.br\\.br\You may delete this message after 2 days.\.br\\.br\Kind Regards,\.br\\.br\Eli Brown\.br\Medical-Objects\.br\Ph (07) 5456 6000\.br\||||||F BTS|1 FTS|1|Powered by www.medical-objects.com
[torsten]additional question[/torsten]
I want to fetch the PID segment and show all the details of patient .
解决方案
这篇关于我想将HL7转换为XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!