I have OpenMRS 2.2 standalone version installed on my system
Question: Hi! Has anyone been able to create a patient in OpenMRS using HL7 messages (rest calls). Could you please post an example? I have been trying to do this for more than a week now…but I keep getting HL7 encoding errors!
POST /openmrs-standalone/remotecommunication/postHl7.form?source=LOCAL&sourceKey=test&hl7Message=MSH|^~\&|FORMENTRY|AMRS|HL7LISTENER|AMRS|20150723110101||ADT^A28|AMRS20150723110101|P|2.5|1|||||||| EVN|A28|20150723110101|||1 PID|||1003D1^^^OpenMRS ID||ANKITHA^SAKHAIRE||19650529|F|||70-1C-8^02^Kakinada^Andhra||||||||||||||||20371|^^||N&username=admin&password=Admin123 HTTP/1.1
Host: 192.168.1.25:8081
Authorization: Basic base64.encode(admin:Admin123)
Content-Type: application/json
Cache-Control: no-cache
My HL7 Message:
MSH|^~\&|FORMENTRY|AMRS|HL7LISTENER|AMRS|20150723110101||ADT^A28|AMRS20150723110101|P|2.5|1|||||||| EVN|A28|20150723110101|||1 PID|||1003D1^^^OpenMRS ID||ANKITHA^SAKHAIRE||19650529|F|||70-1C-8^02^Kakinada^Andhra||||||||||||||||20371|^^||N&username=admin&password=Admin123 HTTP/1.1
Doubts: Do I need to encode the separation betweeen the segments as \r or \r\n? Also, there is a space in OpenMRS ID…do I need to encode it or can I leave it like that? Is the format of my HL7 message correct (to create a patient in OpneMRS)
This link contains the the error logs:
Thanks in advance!