Sidebar

LinkLogic export task missing information in PV1 segment

0 votes
448 views
asked Mar 24, 2015 by mike-r-7535 (13,830 points)

For example: PV1|1|O|^^^SOUTH||||hwinston

This message is missing the location in PV1-3 and the provider name in PV1-7.2 (.3 and .4)

1 Answer

0 votes
MSH-6 will have the abbrev name of the home location of care for the patient. If you want the document location you need to do a DB query to get that information. The same goes for the provider name as only the login is put in the pv1-7.1 segment.

 

Here is some sample queries for the Document location of care

EMR 9.5 – 9.8 or oracle databases

 

      result = qie.doQuery(channelCache.getValue('dbName'),

                           "SELECT abbrevname\n" +

                           "   FROM (((document d LEFT JOIN obs r     ON d.sdid      = r.sdid)\n" +

                           "                      LEFT JOIN obshead o ON r.hdid      = o.hdid)\n" +

                           "                      LEFT JOIN locreg l  ON d.locofcare = l.locid)\n" +

                           "                      LEFT JOIN person p  ON r.PID       = p.pid\n" +

                           "   WHERE p.patientid = '{PID-3}'\n" +

                           "      and o.mlcode = '{OBX[1]-3.1}'\n" +

                           "      and r.obsdate = to_date('{OBX[1]-14}', 'yyyymmddHH24MISS')");

 

 

CPS 10, 11, 12 or Microsoft SQL Server databases

 

      result = qie.doQuery(channelCache.getValue('dbName'),

                           "SELECT abbrevname\n" +

                           "   FROM (((document d LEFT JOIN obs r             ON d.sdid      = r.sdid)\n" +

                           "                      LEFT JOIN obshead o         ON r.hdid      = o.hdid)\n" +

                           "                      LEFT JOIN locreg l          ON d.locofcare = l.locid)\n" +

                           "                      LEFT JOIN PatientProfile p  ON r.PID       = p.pid\n" +

                           "   WHERE p.patientid = '{PID-3}'\n" +

                           "      and o.mlcode = '{OBX[1]-3.1}'\n" +

                           "      and r.obsdate = '" + obsDate + "'");

 

SQL for the provider:

 

var mdNameResult = qie.doQuery(dbName,

         "select LoginName, LastName, FirstName from USR\n" +

         " where   loginname =  '{PV1-7.1}'");              

 

You can then use the .getNode('field') to retrieve the values.

 

Example:

Var firstName = mdNameResult.getNode('FirstName');
answered Mar 24, 2015 by mike-r-7535 (13,830 points)
commented Jun 17, 2015 by jon-t-6024 (560 points)
"MSH-6 will have the abbrev name of the home location of care for the patient. If you want the document location you need to do a DB query to get that information. "

That actually depends on the type of export.  For example, the ORM (orders) export contains the document location of care in MSH-6.  Refer to the Centricity Managing Interfaces document for more.
...