Note that HL7 defines the segment terminator as a carriage return (ASCII
13), *not* a line feed (ASCII 10) or the sequence CR-LF.  Properly formatted
HL7 messages should have a single carriage return character between each
segment.

-Burke

On Wed, Aug 10, 2011 at 5:58 PM, Darius Jazayeri <[email protected]>wrote:

> FYI, I was able to post this message using the Groovy module after I added
> \r\n between all the segments.
>
> So, Jeremy, cancel my request to test this on a known-working message.
>
> Jeff, as I mentioned on IRC, you'll need to figure out how to put the CR-LF
> in the message you're sending via curl.
>
> -Darius
>
>
> On Wed, Aug 10, 2011 at 2:41 PM, Price, Jeff M. <[email protected]> wrote:
>
>> Thanks Meena.  If the assigning authority is supposed to be the OpenMRS
>> Identifier type, I think it is supposed to be  ‘Old Identification Number’,
>> but when I tried that it still failed with missing patient identifier in PID
>> segment (I also tried just the MSH and PID like you did).  ****
>>
>> ** **
>>
>> Did you do it using WebServices ?****
>>
>> ** **
>>
>> What version are you using ,  maybe I should try to get that one up.
>> ****
>>
>> ** **
>>
>> Darius has spent a lot of time with me on this (been trying to do this for
>> a week) which I greatly appreciate but still not having success. I think he
>> said he will try it on the version I am using.****
>>
>> ** **
>>
>> ** **
>>
>> *Jeff Price l (858) 412-8639*
>>
>> West Wireless Health Institute <http://www.westwirelesshealth.org/>  ****
>>
>> ** **
>>
>> *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Sheley,
>> Meena Ellen
>> *Sent:* Wednesday, August 10, 2011 2:05 PM
>>
>> *To:* [email protected]
>> *Subject:* Re: [OPENMRS-DEV] missing patient identifier in PID
>> segment-ORU Message****
>>
>> ** **
>>
>> I quickly ran your hl7 text (MSH, PID only) through my application, and a
>> patient was created.  However, we are using an older version of OpenMRS. I
>> would still check into your assigning authority string.  ****
>>
>> ** **
>>
>> -Meena****
>>
>> ** **
>>
>> ** **
>>
>> ** **
>>
>> ** **
>>
>> *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Kohli,
>> Marc David
>> *Sent:* Wednesday, August 10, 2011 11:16 AM
>> *To:* [email protected]
>> *Subject:* Re: [OPENMRS-DEV] missing patient identifier in PID
>> segment-ORU Message****
>>
>> ** **
>>
>> I had a similar problem, that was hard to track down.  I was using the old
>> restmodule and found that my line breaks had to be carriage returns before
>> the messages would post correctly.****
>>
>> ** **
>>
>> --Marc****
>>
>> ** **
>>
>> *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Price,
>> Jeff M.
>> *Sent:* Tuesday, August 09, 2011 9:35 PM
>> *To:* [email protected]
>> *Subject:* [OPENMRS-DEV] missing patient identifier in PID segment-ORU
>> Message****
>>
>> ** **
>>
>> I am running   1.8.1-stable-with-WS-alpha   (standalone).****
>>
>> ** **
>>
>> I am trying to put an ORU HL7 message into openMRS and see the information
>> in the correct patient record.  When I do the  http post , I see the message
>> in the hl7 error q with complaints about missing patient identifier in PID
>> segment. I am very new to hl7 and cannot figure out what to put in the PID
>> segment****
>>
>> ** **
>>
>> On the top line of my patient screen it says in the upper right hand
>> corner “Old Identification Number : 123”****
>>
>> (123 was what I created when I created the patient)****
>>
>> ** **
>>
>> ** **
>>
>> I saw on the forum that someone suggested using assigning authority (“Old
>> Identification”) for an ADT message and I tried that (see below).****
>>
>> ** **
>>
>> Also tried the internal patientId number that I got from the url on the
>> patient page.****
>>
>> ** **
>>
>> Nothing seemed to work. ****
>>
>> ** **
>>
>> Does anyone know what I could try to get the data into the patient’s
>> record ?****
>>
>> ** **
>>
>> Thanks so much for any help you may be able to provide !****
>>
>> ** **
>>
>> MY COMMAND:****
>>
>> echo '{****
>>
>>        "source":"LOCAL", ****
>>
>>                    "sourceKey":"test", ****
>>
>>
>>    
>> "data":"MSH|^~\\&|FORMENTRY|AMRS|HL7LISTENER|AMRS|20060809121931||ORU^R01|formentry-20060809121931|P|2.5|1||||||||2^AMRS-ELDORET^
>> http://schema.openmrs.org/2006/FormEntry/formId^URI****
>>
>> PID|||123^^^Old
>> Identification||FARMACIA^UNO^PACIENTE||20011114|M|||20371^02^2400^724||||||724^Y||||||02|||11|20371|724^ESPA?A^N||N
>> ****
>>
>> PV1||O|1^Unknown||||2^Ima Doc
>> (2-6)|||||||||||||||||||||||||||||||||||||20060807|||||||V****
>>
>> ORC|RE||||||||20060807161605|1^Super User****
>>
>> OBR|1|||1238^MEDICAL RECORD OBSERVATIONS^99DCT****
>>
>> OBX|1|NM|5089^WEIGHT (KG)^99DCT||70|||||||||20060807****
>>
>> OBR|2|||1019^COMPLETE BLOOD COUNT^99DCT****
>>
>> OBX|1|NM|1015^HEMATOCRIT^99DCT||1000|||||||||20060807****
>>
>> OBX|2|NM|21^HEMOGLOBIN^99DCT||1000|||||||||20060807****
>>
>> OBX|3|NM|678^WHITE BLOOD CELLS^99DCT||100000|||||||||20060807****
>>
>> OBX|4|NM|729^PLATELETS^99DCT||10|||||||||20060807****
>>
>> OBR|3|||1284^PROBLEM LIST^99DCT****
>>
>> OBX|1|CWE|6042^PROBLEM ADDED^99DCT||2^ANEMIA,
>> HEMOLYSIS^99DCT|||||||||20060807****
>>
>> "}' | curl -i -X POST -H"Content-Type: application/json" -u
>> admin:Admin123 -d@-
>> http://127.0.0.1:8081/openmrs-standalone/ws/rest/v1/hl7****
>>
>> ** **
>>
>> ** **
>>
>> ** **
>>
>> ERRORs reported in HL7 Error Que section:****
>>
>> ** **
>>
>> ca.uhn.hl7v2.HL7Exception: Error while processing HL7 message: ORU_R01***
>> *
>>
>>         at
>> org.openmrs.hl7.impl.HL7ServiceImpl.processHL7Message(HL7ServiceImpl.java:917)
>> ****
>>
>>         at [ignored] ...****
>>
>>         at $Proxy552.processHL7Message(Unknown Source)****
>>
>>         at [ignored] ...****
>>
>>         at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:114)**
>> **
>>
>>         at [ignored] ...****
>>
>>         at $Proxy553.processHL7Message(Unknown Source)****
>>
>>         at [ignored] ...****
>>
>>         at $Proxy553.processHL7Message(Unknown Source)****
>>
>>         at
>> org.openmrs.hl7.impl.HL7ServiceImpl.processHL7InQueue(HL7ServiceImpl.java:812)
>> ****
>>
>>         at [ignored] ...****
>>
>>         at $Proxy552.processHL7InQueue(Unknown Source)****
>>
>>         at [ignored] ...****
>>
>>         at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:114)**
>> **
>>
>>         at [ignored] ...****
>>
>>         at $Proxy553.processHL7InQueue(Unknown Source)****
>>
>>         at [ignored] ...****
>>
>>         at $Proxy553.processHL7InQueue(Unknown Source)****
>>
>>         at
>> org.openmrs.hl7.HL7InQueueProcessor.processHL7InQueue(HL7InQueueProcessor.java:61)
>> ****
>>
>>         at
>> org.openmrs.hl7.HL7InQueueProcessor.processNextHL7InQueue(HL7InQueueProcessor.java:91)
>> ****
>>
>>         at
>> org.openmrs.hl7.HL7InQueueProcessor.processHL7InQueue(HL7InQueueProcessor.java:110)
>> ****
>>
>>         at
>> org.openmrs.scheduler.tasks.ProcessHL7InQueueTask.execute(ProcessHL7InQueueTask.java:57)
>> ****
>>
>>         at
>> org.openmrs.scheduler.tasks.TaskThreadedInitializationWrapper.execute(TaskThreadedInitializationWrapper.java:72)
>> ****
>>
>>         at org.openmrs.api.context.Daemon$2.run(Daemon.java:115)****
>>
>> Caused by: ca.uhn.hl7v2.app.ApplicationException:
>> ca.uhn.hl7v2.HL7Exception: Missing patient identifier in PID segment****
>>
>>         at
>> org.openmrs.hl7.handler.ORUR01Handler.processMessage(ORUR01Handler.java:149)
>> ****
>>
>>         at
>> ca.uhn.hl7v2.app.MessageTypeRouter.processMessage(MessageTypeRouter.java:52)
>> ****
>>
>>         at
>> org.openmrs.hl7.impl.HL7ServiceImpl.processHL7Message(HL7ServiceImpl.java:914)
>> ****
>>
>>         ... 82 more****
>>
>> Caused by: ca.uhn.hl7v2.HL7Exception: Missing patient identifier in PID
>> segment****
>>
>>         at
>> org.openmrs.hl7.impl.HL7ServiceImpl.resolvePersonFromIdentifiers(HL7ServiceImpl.java:670)
>> ****
>>
>>         at
>> org.openmrs.hl7.impl.HL7ServiceImpl.resolvePatientId(HL7ServiceImpl.java:650)
>> ****
>>
>>         at [ignored] ...****
>>
>>         at $Proxy552.resolvePatientId(Unknown Source)****
>>
>>         at [ignored] ...****
>>
>>         at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:114)**
>> **
>>
>>         at [ignored] ...****
>>
>>         at $Proxy553.resolvePatientId(Unknown Source)****
>>
>>         at [ignored] ...****
>>
>>         at $Proxy553.resolvePatientId(Unknown Source)****
>>
>>         at
>> org.openmrs.hl7.handler.ORUR01Handler.getPatient(ORUR01Handler.java:979)*
>> ***
>>
>>         at
>> org.openmrs.hl7.handler.ORUR01Handler.processORU_R01(ORUR01Handler.java:192)
>> ****
>>
>>         at
>> org.openmrs.hl7.handler.ORUR01Handler.processMessage(ORUR01Handler.java:141)
>> ****
>>
>> ** **
>>
>> ** **
>>
>> *Jeff Price *
>>
>> West Wireless Health Institute <http://www.westwirelesshealth.org/> ****
>>
>> Principal Systems Enginner****
>>
>> [email protected] ****
>>
>> (858) 535-7000 / TEL ****
>>
>> (858) 412-8639 / DIRECT****
>>
>> (858)-361-5751 / CELL****
>>
>> ** **
>>
>> ** **
>>
>> ** **
>> ------------------------------
>>
>> Click here to 
>> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
>> OpenMRS Developers' mailing list
>> ****
>> ------------------------------
>>
>> Click here to 
>> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
>> OpenMRS Developers' mailing list
>> ****
>> ------------------------------
>>
>> Click here to 
>> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
>> OpenMRS Developers' mailing list
>> ****
>> ------------------------------
>> Click here to 
>> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
>> OpenMRS Developers' mailing list
>>
>
> ------------------------------
> Click here to 
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
> OpenMRS Developers' mailing list
>

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to