MU2 - CCR Import

zhhealthcare wrote on Thursday, February 14, 2013:

Hi,

Here is a more detailed example showing one address book entry and one lab result entry.
After parsing a CCR XML exported from openEMR, the following are the values that are available from it.

If we import them back to OpenEMR then we can map it as follows.

But in the case of lab result this information is not enough to create a lab order and result.

The first group shows an entry referring to the lab which is specified in the CCR XML and we need to import it (either into OpenERM address book or some other table) so that we can refer to the lab which performed a specific test for the imported patient.

The format used is : tablename => fieldname => value

users => lname => Test
users => fname => Lab
users => street =>
users => city => Test City
users => state => Test State
users => zip => 00000
users => phone => 000-000-0000

The second group shows a single lab result specified in the CCR XML.

procedure_type => name => Fasting Blood Glucose
procedure_result => abnormal => high
procedure_result => result => 178 MG/DL
procedure_result => date => 2013-01-22T19:40:40Z

In the case of lab if there are 10 lab results for a patient which were performed in a single lab, only a single entry will be there.

But this CCR XML will also contain the facility address as a separate entry, another entry for the EMR which is used to generate this information. So from a single CCR XML we’ll have about three address book entries.

Please let us know if anybody have any doubts.

Thanks and regards

kodusote wrote on Friday, February 15, 2013:

Hi zhhealthcare,

Is the script for exporting CCR available in the community version of OpenEMR or limited to your version only?  I am aware that Tony of mi-square has provided a script for importing it (contrib/util/import_mi2xml.php).

Kayode

bradymiller wrote on Friday, February 15, 2013:

Hi ZH Healthcare,

Do you have a general scheme (or plan) for the uploading/tracking of the CCR/CCD/CCDA documents? We need to know this for EMR Direct to integrate in their Direct import feature discussed above?
(since this upload piece is becoming a bottleneck, I think it makes sense to prioritize this over the labs/addresses for now)

thanks,
-brady
OpenEMR

bradymiller wrote on Friday, February 15, 2013:

Hi Luis,

For your import document implementation (essentially setting the patient id to 0), I just had two quick question since can’t readily test it:
1. What directory are the documents ending up in (I am assuming sites/default/documents/0/ )?
2. Is there a screen where these documents (set to patient 0) can already be seen in OpenEMR (to allow manual use of the move to #)?

For those interested, here is the commit with above discussed implementation:
http://github.com/lcmaas/openemr/commit/010b8aceb15389755274a18850236a041812a152

thanks,
-brady
OpenEMR

lcmaas3 wrote on Saturday, February 16, 2013:

Hi Brady,

The documents are going into sites/default/documents/direct/.  We are using the Documents upload function which I assume would use the correct sites subdirectory if necessary.

We accessed patient “Zero” with /controller.php?document&list&patient_id=0, but I added a menu item in miscellaneous in my last update to open this link directly from the left_nav menu.

Luis

bradymiller wrote on Sunday, February 17, 2013:

Hi ZH Healthcare,

The mechanism that Luis has developed for documents that are not yet mapped to patients is very nice and is likely going to be committed into the official codebase soon. See this thread for more details:
http://sourceforge.net/projects/openemr/forums/forum/202506/topic/6706156

So back to the parsing, labs and address book info.

For labs, check out Rods posts above (number 11 and 12) for a direction to go. I’m not sure if placing all these new lab info in procedure_providers makes sense (again, would hate to junk up this table), but I suppose if the entries had some sort of universal identification number(ie. the NPI number), then it may be ok. If no NPI, then tough to ensure not placing a bunch of redundant entries in there… if this is the case, then perhaps the skeleton order for these things should point to the miscellaneous address book table (if we go that route).

-brady
OpenEMR

bradymiller wrote on Sunday, February 17, 2013:

Hi Kayode,
The CCR can be downloaded within OpenEMR in patient summary->reports or in the patient portal report section.
-brady
OpenEMR

zhhealthcare wrote on Monday, February 18, 2013:

Hi Brady,

From the the CCR upload screen, we are uploading the CCR XML file to the ‘sites/default/temp/’ folder then file is read and parsed into audit tables.

We are currently working on the review and approval screen for the imported CCR data. The next step is importing the data to OpenEMR tables. We’ll try out the suggested tables for the import and let you know.

In EMR Direct does it upload the file to couchdb if couchdb is enabled or is it saving the file to the given path.

Thanks and regards

bradymiller wrote on Monday, February 18, 2013:

Hi ZH Healthcare,

Luis’s (EMR Direct) method should play very nicely with couchdb (I have not explicitly tested it yet, but plan to do so soon), because he leveraged the already existent document class to allow uploading of documents not yet assigned to patients (gives them a foreign_id of 0). Their code saves it at documents/direct directory, but this is arbitrary. Note that if you manually import documents not yet assigned to a patient in the new Miscellaneous->‘New Documents’ gui, it will go to documents/00 directory. Try out the code here to see what I mean(it is very nice, because then can also use the built in mechanism in the documents to move documents to patients when they are known; for example, the CCR document after you figure out the patient can simply be moved to the CCR category for the mapped patient to allow display of the CCR within the PAtient Summary->Documents screen):
http://github.com/bradymiller/openemr/commit/0621077296e58ad7cca2371f4e1d5b5688a30415

-brady
OpenEMR

tmccormi wrote on Monday, February 18, 2013:

It is important to make sure that ALL file upload locations are configureable.  Don’t hard code temp/tmp or or even document category directory names.  Multi Hosted sites need more flexibility that single installations.  Thanks
-Tony

bradymiller wrote on Tuesday, February 19, 2013:

Hi ZH Healthcare,

While testing the current CCR/CCD viewing in Patient Summary -> Documents. I noticed that they do not support documents stored in the CouchDB; this is very obvious if you take a look at the script that displays these things:
http://github.com/openemr/openemr/blob/master/ccr/display.php

I suggest incorporating your CouchDB option into this code at some point.

-brady
OpenEMR

zhhealthcare wrote on Tuesday, February 19, 2013:

Hi Brady,

We will commit the required changes soon.

Thanks and regards