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.
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).
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)
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 #)?
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.
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).
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.
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
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
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.