Jeff,

Try changing the bolded part of the PV1 to be (encounterTypeId)^(name) of an
existing encounter type in your db:
PV1||O|*1^Unknown*||||2^Ima Doc
(2-6)|||||||||||||||||||||||||||||||||||||20060807|||||||V

-Darius

On Thu, Aug 11, 2011 at 10:29 AM, Price, Jeff M. <[email protected]> wrote:

> Thanks Burke. That did not appear to work. Still see the SQL error in the
> log window saying ‘encounter_type’ cannot be null.****
>
> ** **
>
> I assume the correct field in the PV1 segment is  ‘Admission Type’  of
> field len 2 .  The encounter types in openMRS  are
> (ADULTINITIAL,ADULTRETURN,….uer-defined), and not sure how to map those into
> the Admission Type segment in the hl7 msg..or does it go in another field ?
> ****
>
> ** **
>
> In either case, what format is used    (how is the encounter type
> represented ? …….|ADULTINITIAL|      or  |x|  where x is one of the single
> letter choices for that field defined in the hl7 spec ****
>
> (e.g.  ‘A’ accident  ‘E’ emergency and so on) ? ****
>
> ** **
>
> Also will the hl7 msg create a new encounter, or do I have to specify an
> existing one ?  If an existing one when I go to the ‘Encounter Management’
> page and fill out all the fields to create an encounter the ‘save encounter’
> button is greyed out and I cannot create one.****
>
> ** **
>
> Thank for the help !****
>
> ** **
>
> *Jeff Price l (858) 412-8639*
>
> West Wireless Health Institute <http://www.westwirelesshealth.org/>  ****
>
> ** **
>
> *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Burke
> Mamlin
> *Sent:* Wednesday, August 10, 2011 6:38 PM
>
> *To:* [email protected]
> *Subject:* Re: [OPENMRS-DEV] UPDATE - Encounter-Type=NULL : RE: HL7
> messages stuck in Q****
>
> ** **
>
> 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
> ****
>
> ** **
> ------------------------------
>
> Click here to 
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
> OpenMRS Developers' mailing list
> ****
>

_________________________________________

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

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

Reply via email to