Jeff,

The problem might possibly be the patient identifier type.     Your hl7 message 
has the assigning  authority string as "Old Identification".   Isn't there an 
openmrs patient identifier type of "'Old Identification Number'".   Try putting 
the string "'Old Identification Number" in the assigning authority location 
instead of "Old Identification".   Otherwise, unless you set up a way to create 
new identifier types whenever new assigning authority strings appear in PID-3, 
you might have errors trying to create an identifier with a an identifier type 
that does not exist.

Not sure if this is the problem, but possibly try 'Old Identification Number" 
or possibly "'OpenMRS Identification Number".  Or create a  new patient 
identifier type.

Meena


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]<mailto:[email protected]>
(858) 535-7000 / TEL
(858) 412-8639 / DIRECT
(858)-361-5751 / CELL



________________________________
Click here to 
unsubscribe<mailto:[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