Hi Suranga,

The HL7 source must exist. In your case it is AMRS.ELD (always at the
4th position of an HL7 message which is a sending facility). You
should add it to the hl7_source table. I thought it's possible via the
web interface, but I can't find such an option. Maybe we should
revisit it and add a source automatically if it doesn't exist.

-Rafał

On 12 April 2012 11:53, Suranga Kasthurirathne <[email protected]> wrote:
>
> Hi everyone,
>
> I'm engaged in an effort to send HL7 messages to the REST module via a POST
> request, and It seems to me that I'm not leveraging  the benefits of
>  RESTWS-184 as I should.
> Based on the comments on that ticket, I tried the following -
>
> 1. tried sending the HL7 message as a plain text content of the POST (with
> and without double quotes around it)
> 2. tried sending it as a simple JSON object without the source and
> sourceKey.  [etc. { "hl7" : "the hl7 message" }]
>
> In both cases, I came up with errors.
> I next tried the old fashioned approach, by including both the source and
> the source key,
>
> I tried,
> {"source":"FAKE","sourceKey":"FAKE","data":"MSH|^~\\&|FORMENTRY|AMRS.ELD|HL7LISTENER|AMRS.ELD|20110805104142||ORU^R01|REl7wt78q9Pzlqe9ecJB|P|2.5|1||||||||3^AMRS.ELD.FORMID\rPID|||3^^^^||Patient^John^D||\rPV1||O|1||||1|||||||||||||||||||||||||||||||||||||20110805|||||||V\rORC|RE||||||||20110805104141|1^Super
> User\rOBR|1|||1238^MEDICAL RECORD OBSERVATIONS^99DCT\rOBX|1|NM|5089^WEIGHT
> (KG)^99DCT||67.2|||||||||20110805"}
>
> This message got posted into the HL7 queue table. However, (understandably)
> I get an error because it uses my fake data for the 'source' and
> 'sourcekey'.
>
> Mmm... any idea what the format of my POST request should be ? I assume that
> this problem will be solved if I can enter correct source and sourcekey
> values. I'd be most grateful for any advice :-)
>
>
> --
> Thanks and Best Regards,
> Suranga
>
> ________________________________
> Click here to unsubscribe 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