Encounter type is determined by the visit segment: PV1 (patient visit 1, a
PV2 segment came later).  It's probably the "1^Unknown" in your PV1 segment.
 Try the ID and name of a valid encounter type.

-Burke

On Wed, Aug 10, 2011 at 9:02 PM, Price, Jeff M. <[email protected]> wrote:

> I just noticed in the log window that pops up when I start openMRS that
> whenever processHL7InQueue is called there is a SQL error saying
> ‘encounter_type’ cannot be NULL.  Does anyone know how /where I specify the
> encounter type  when I submit an hl7 message via a POST of a json object ?
> ****
>
> ** **
>
> Is there a line for it like there is for “source”  “sourceKey” and “data” ?
> ****
>
> ** **
>
> ** **
>
> 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\r****
>
>
> PID|||123^^^^||jeff^marc^price||20011114|M|||20371^02^2400^724||||||724^Y||||||02|||11|20371|724^ESPA?A^N||N\r
> ****
>
> PV1||O|1^Unknown||||2^Ima Doc
> (2-6)|||||||||||||||||||||||||||||||||||||20060807|||||||V\r****
>
> ORC|RE||||||||20060807161605|1^Super User\r****
>
> OBR|1|||1238^MEDICAL RECORD OBSERVATIONS^99DCT\r****
>
> OBX|1|NM|5089^WEIGHT (KG)^99DCT||70|||||||||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****
>
> ** **
>
> ** **
>
> *Jeff Price l (858) 412-8639*
>
> West Wireless Health Institute <http://www.westwirelesshealth.org/>  ****
>
> ** **
>
> *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Price,
> Jeff M.
> *Sent:* Wednesday, August 10, 2011 4:27 PM
> *To:* [email protected]
> *Subject:* [OPENMRS-DEV] HL7 messages stuck in Q****
>
> ** **
>
> Hi,****
>
> ** **
>
> I am running 1.8.1-stable-with-WS-alpha   (standalone)****
>
> ** **
>
> I finally got HL7 messages successfully posted (with lots of help from
> Darius…thank You !!)   ****
>
>  and see them in the ‘Manage Queued Messages’  screen.  ****
>
> ** **
>
> But, now  they appear to be stuck there.****
>
> ** **
>
> The REST module is running and the ‘Process HL7 Task’  task is set to run
> every 30 seconds. I also tried to manually stop and start it.****
>
> ** **
>
> There is no stacktrace in the ‘Manage HL7 Errors’ page, and no entries for
> the messages there either.****
>
> ** **
>
> ** **
>
> Does anyone have any ideas as to why this might happen, and what I can do
> to solve this ?****
>
> ** **
>
> Thanks for the great support I am getting from you guys !****
>
> ** **
>
> ** **
>
> ** **
>
> *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

_________________________________________

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