Application Name: Reference Application Version Number: 2.7.0
Question: I run the reference application 2.7.0 with the default database (the one to chose on startup). By posting to the endpoint /openmrs-standalone/remotecommunication/postHl7.form, I send an observation (ORU^R01) message:
MSH|^~&|FORMENTRY|AMRS|HL7LISTENER|AMRS|20050217152845||ORU^R01|AMRS20050217152845|P|2.5|1||||||||1^AMRS.ELD.FORMID
PID|1||106||Smith^John^^^|Patient^Momma^Thee^^MS|20040101000000^Y|M||B|555 Johnson Road^Apt.555^Indianapolis^IN^46202^USA|||||||||||Indianapolis, IN|||||||||||||||||TRIBE CODE
PV1|1|O|2^^^^^^^^^1^AMRS|2|||1^Mamlin^Joseph^^^^^^^^8^M10^^AMRS|||||||||||||||||||||||||||||||||||||20050217140000|||||||V
ORC|RE||||||||20050221130000|1^Enterer^Ima^^^^^AMRS
OBR|1|||1238^MEDICAL RECORD OBSERVATIONS^DCT
OBX|1|CE|1082^REVIEW OF SYSTEMS, CENTRAL NERVOUS SYSTEM^DCT||207^DEPRESSION^DCT||||||F|||20050217204000
OBX|3|NM|5089^WEIGHT (KG)^DCT||25|kg|20-300|L|||F|||20050217204000
OBX|4|TS|1191^HISTORICAL DRUG STOP DATE^DCT||20050101||||||F|||20050217204000
This is a modified version of the example observation message: https://wiki.openmrs.org/display/docs/HL7#HL7-ExampleObservation(ORU^R01)Message I modified the following due to several exceptions were thrown:
- patient id (PID-3) and name (PID-5) to match the actual database content
- set an id (more or less randomly) for the Point of Care (PV1-3-1)
- changed the Assigning Authority (MSH-21.2) to the value of org.openmrs.hl7.HL7Constants.HL7_FORM_ID
- removed the line “OBX|2|SN|5497^CD4 COUNT^DCT||<^10|cells/mm3|10-1500|L|||F|||20050217204000” because an exception said that the value type SN isn’t supported
Now the message finally ends up in the hl7_in_queue table. But during the automatically triggered import process, an exception is thrown:
The apparently generic parts were replaced with “[…]”. Full stacktrace on bottom of this text. The German term ‘Darf nicht leer oder ungültig sein’ term translates to ‘must not be empty or invalid’. To me the ids of the OBX segments seem to be valid. I also looked at the code, but to be honest, I have no clue what happens within the ObsServiceImpl.saveObs(…) method and for the ObsDAO I couldn’t find the implementation code. Beside that I don’t understand the mechanism of injecting and configuring the validation wrapper.
Does someone has an idea about this issue? Many thanks in advance.
Cheers Torsten
— Full stack trace — http://pasted.co/61ecfdc1