Why doesn't HL7 via REST create a patient?

OpenMRS Version: I you have installed OpenMRS 2.2 Standalone version installed on my system.

I have tried to create a patient by sending a HL7 message using the following rest call:

POST /openmrs-standalone/remotecommunication/postHl7.form?source=LOCAL&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^cityname^statename||||||||||||||||20371|^^||N= HTTP/1.1 Host: localhost:8081 Authorization: Basic base64.encode(admin:Admin123) Content-Type: text/plain Cache-Control: no-cache

I am getting the following error:(in hl7 error queue)

ca.uhn.hl7v2.HL7Exception: HL7 encoding not supported at org.openmrs.hl7.impl.HL7ServiceImpl.parseHL7String(HL7ServiceImpl.java:929) at [ignored] … at com.sun.proxy.$Proxy210.parseHL7String(Unknown Source) at [ignored] … at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:121) at [ignored] … at com.sun.proxy.$Proxy211.parseHL7String(Unknown Source) at org.openmrs.hl7.impl.HL7ServiceImpl.processHL7InQueue(HL7ServiceImpl.java:851) at [ignored] … at com.sun.proxy.$Proxy210.processHL7InQueue(Unknown Source) at [ignored] … at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:121) at [ignored] … at com.sun.proxy.$Proxy211.processHL7InQueue(Unknown Source) at org.openmrs.hl7.HL7InQueueProcessor.processHL7InQueue(HL7InQueueProcessor.java:62) at org.openmrs.hl7.HL7InQueueProcessor.processNextHL7InQueue(HL7InQueueProcessor.java:92) at org.openmrs.hl7.HL7InQueueProcessor.processHL7InQueue(HL7InQueueProcessor.java:111) at org.openmrs.scheduler.tasks.ProcessHL7InQueueTask.execute(ProcessHL7InQueueTask.java:53) at org.openmrs.scheduler.tasks.TaskThreadedInitializationWrapper.execute(TaskThreadedInitializationWrapper.java:68) at org.openmrs.scheduler.timer.TimerSchedulerTask.execute(TimerSchedulerTask.java:94) at org.openmrs.api.context.Daemon$2.run(Daemon.java:130) Caused by: ca.uhn.hl7v2.parser.EncodingNotSupportedException: Can’t parse message beginning MSH|^~
at ca.uhn.hl7v2.parser.Parser.parse(Parser.java:183) at org.openmrs.hl7.impl.HL7ServiceImpl.parseHL7String(HL7ServiceImpl.java:926) … 64 more

So, my HL7 message is not correct !? Could some please help me correct this?

Thanks, Sowmya.

Duplicate of:

This topic is now closed. New replies are no longer allowed.