Export "Patient Image" to Ooutlook or Gmail contacts

For users or potential users.
Post Reply
rhaber123
Posts: 415
Joined: Fri Dec 11, 2009 12:09 pm

Export "Patient Image" to Ooutlook or Gmail contacts

Post by rhaber123 » Sun Sep 20, 2015 4:58 pm

In OD Images module - Patient Pictures
when a new patient comes in, we scan the patient Id, and import it to the Images module - Patient Pictures
and the receptionist crop it

Is it possible to create a file or to export the names, addresses , telephone numbers, and the patient image to a file
so we can use that file to import all the info including the pictures into outlook contacts , or Gmail contacts

I have been using this limited Query to export patients Names, Address, and telephone numbers

SELECT patient.LName AS 'Last Name', patient.FName AS 'First Name',
patient.HmPhone AS 'Home Phone', patient.WkPhone AS 'Business Phone',
patient.WirelessPhone AS 'Mobile Phone', patient.Email AS 'E-mail Address'
FROM patient WHERE PatStatus = '0'

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by Justin Shafer » Sun Sep 20, 2015 5:56 pm

Exporting PHI to Google Contacts would be a hipaa violation?

To your question...... hmmmmmmm

https://youtu.be/Nv9cKpXolzs I like this
Last edited by Justin Shafer on Sun Sep 20, 2015 6:07 pm, edited 1 time in total.

rhaber123
Posts: 415
Joined: Fri Dec 11, 2009 12:09 pm

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by rhaber123 » Sun Sep 20, 2015 6:06 pm

Thank you for your reply, but no images will be posted anywhere.

We use in our office a Caller ID software, when a patient call it shows the patient phone number.
The software can show the caller photo if it is in the "contacts".

WE synchronise the contacts in the caller Id software with the contacts / patients in open dental

The caller Id software can import files that are similar to outlook contact format or gmail contact format.
it is easy to import the names , addresses and phone numbers, but I do not know how to import the photos.

Thats what i need help for, if someone knows how to do it, that will be appreciated

No photos will be posted anywhere .
Last edited by rhaber123 on Sun Sep 20, 2015 6:10 pm, edited 1 time in total.

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by Justin Shafer » Sun Sep 20, 2015 6:09 pm

Let me think on that one.

I am still wondering how you would mass import the photos into outlook.

rhaber123
Posts: 415
Joined: Fri Dec 11, 2009 12:09 pm

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by rhaber123 » Sun Sep 20, 2015 6:12 pm

I do not know if a query can do it. But may be a plug in can do it

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by Justin Shafer » Sun Sep 20, 2015 6:17 pm

Getting the photos out of OD is not that difficult. I have not looked, but most likely the filename and path is stored in the OD Database Folder, unless you store images inside of MySQL then it would be a different export process.....

But.... importing them.... that is probably more difficult. Unless you wanted to do it one at a time....????

Probably be easier to interface with the CID and then use a program to display this information... then you could start a business. ;)

And... well.. some people are doing this. Dentrix can use Weave and Broadview... OD can use ConvergedComm and probably... Weave...

But to do it yourself... gonna take some work. If Outlook had a way to batch import, it would be easier.......

rhaber123
Posts: 415
Joined: Fri Dec 11, 2009 12:09 pm

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by rhaber123 » Sun Sep 20, 2015 6:31 pm

V Card format. maybe

V Cards can be imported easily in outlook

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by Justin Shafer » Sun Sep 20, 2015 6:41 pm

waste of space, deleted post.
Last edited by Justin Shafer on Mon Sep 21, 2015 5:30 pm, edited 1 time in total.

rhaber123
Posts: 415
Joined: Fri Dec 11, 2009 12:09 pm

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by rhaber123 » Sun Sep 20, 2015 7:03 pm

GREAT. You make it sound easy. and I know it is not.
THANK YOU

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by Justin Shafer » Sun Sep 20, 2015 7:29 pm

Image

Add Update.bat to a scheduled task.

Modify update.bat
patient-query.txt
photo-query.txt

for your needs and environment.

Install csvtovcard and use it one time

Look at your convert_vcf autohotkey script if you need to.

Import outlook macros from the macro folder

Create a new recurring task in Outlook called My Scheduled Reminder
Assign a reminder to the task and schedule a time and frequency.

All done!

http://www.onsitedentalsystems.com/od_to_outlook.zip

TON OF WORK! But I got it automated. :D Instead of converting to VCard, you could manually import the contacts, I just cannot find a way to automate that using an import csv file.

Now all I need is a TrixBox! :D
Last edited by Justin Shafer on Mon Sep 21, 2015 5:31 pm, edited 22 times in total.

apollonia
Posts: 40
Joined: Sat Nov 08, 2008 7:17 pm
Location: Bakersfield, CA

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by apollonia » Mon Sep 21, 2015 1:26 am

how does OD designate the 'default' image to use for each patient, assuming there are multiple images for each patient in the folder?

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by Justin Shafer » Mon Sep 21, 2015 3:06 am

apollonia wrote:how does OD designate the 'default' image to use for each patient, assuming there are multiple images for each patient in the folder?
Fixed!

What I came up with.... Website is the Birthday. We can't use the Birthday field for this because the filename has d-m-y and outlook uses d/m/y.. / characters are not allowed in a filename, so the macro used to import won't pick it up. I improvised, so the outlook contact's website WILL be a birthday.. but it works. This can be changed if you don't wont to automate, THEN you have more choice where the fake birthday should go in the contact field. I was using OtherHomeTelephone.


patient query needs more fields, but works.
SELECT 'First Name', 'Last Name', 'Birthday', 'Website' FROM patient LIMIT 1
UNION ALL
SELECT patient.FName, patient.LName, patient.Birthdate, CONCAT(SUBSTRING_INDEX(Birthdate, " ",1)) AS OtherTelephoneNumber FROM patient
INTO OUTFILE 'C:\\Project\\patients.csv'
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\r\n';

photo query!
DROP TABLE IF EXISTS tempused;
DROP TABLE IF EXISTS tempused2;
CREATE TABLE tempused
SELECT CONCAT('C:\\', 'OpenDentImages', '\\', SUBSTRING(ImageFolder, 1, 1), '\\', SUBSTRING_INDEX(ImageFolder, " ",1),'\\', SUBSTRING_INDEX(FileName, " ",1)) AS 'oldpath', CONCAT('C:\\', 'Photos', '\\', SUBSTRING_INDEX(LName, " ",1), ', ', SUBSTRING_INDEX(FName, " ",1), ', ', SUBSTRING_INDEX(Birthdate, " ",1), '.JPG') AS 'newpath', patient.PatNum, patient.FName, patient.LName, patient.Birthdate, document.FileName, patient.ImageFolder, document.DateTStamp AS DateTStamp, document.DateCreated AS DateCreated
FROM patient
LEFT JOIN document ON patient.PatNum = document.PatNum
AND patient.PatNum = document.PatNum
WHERE DocCategory = 190;
CREATE TABLE tempused2 AS
SELECT PatNum.* FROM (SELECT oldpath, newpath, PatNum, FName, LName, Birthdate, FileName, ImageFolder, MAX(DateTStamp) AS DateTStamp, MAX(DateCreated) AS DateCreated FROM opendental.tempused
GROUP BY PatNum) Birthdate INNER JOIN tempused PatNum USING (PatNum, Birthdate, DateCreated);
SELECT CONCAT('copy ', '"', oldpath, '"', ' ', '"', newpath, '" ', '/y' ) FROM opendental.tempused2;
DROP TABLE IF EXISTS tempused;
DROP TABLE IF EXISTS tempused2;


update.bat
@echo off
cd C:\Project
del patients.csv
"C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin\mysql" -u root opendental < C:\Project\patient-query.txt
"C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin\mysql" --raw -sN -u root opendental < C:\Project\photo-query.txt > c:\Project\copyphotos.bat
CALL C:\Project\copyphotos.bat
del c:\Project\patients /f /s /q
rmdir c:\Project\patients
convert_vcf.exe

then outlook macros run
1. Imports contacts.
2. Deletes duplicates
3. updates photos

Whole thing can be scheduled.... update.bat with task scheduler... and then in outlook add the macros and create the task, and then create a reminder for that task.

Only thing I can't fix: If you have a patient that changes their first or last name, they WILL be duplicates. At some point you may want to clear out your contacts and start over... maybe make a seperate contact folder just for Open Dental patients and tell your outlook\phone system application to use that contact folder.

It is better to manually import the patient.csv file into outlook, it will be much faster. Also, not sure how much space this could use in your pst file. AND then there is all that PHI. :D

COMPLICATED!
Last edited by Justin Shafer on Tue Sep 22, 2015 7:56 am, edited 1 time in total.

rhaber123
Posts: 415
Joined: Fri Dec 11, 2009 12:09 pm

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by rhaber123 » Mon Sep 21, 2015 7:10 pm

WOOWWWW!!!! Amazing - Done in one day - Now I have to go home and try it
Thank you

apollonia
Posts: 40
Joined: Sat Nov 08, 2008 7:17 pm
Location: Bakersfield, CA

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by apollonia » Mon Sep 21, 2015 8:43 pm

brilliant answer, obi wan !!

User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by Justin Shafer » Tue Sep 22, 2015 6:32 am

Thanks! I had been wondering about how to do this for a couple of years now anyways... Someone just had to ask.

rhaber123
Posts: 415
Joined: Fri Dec 11, 2009 12:09 pm

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by rhaber123 » Wed Nov 16, 2016 7:45 pm

Question 1:
When a patient comes in, and in the Images module, we scan their driver license as an image file, crop it in OD , and place it in the "Patient Pictures" folder.
OD will create a thumbnail and save it in the OpendentImages folder, A to Z folder, in the patient folder, in the thumbnails folder.
That thumbnail will show when we hover with the mouse over the patient appointment on the schedule, or when we open the family module.

Is it possible to export our patients contact information and the thumbnails to Outlook Contacts, using the above method.

Image
Last edited by rhaber123 on Wed Nov 16, 2016 8:09 pm, edited 2 times in total.

rhaber123
Posts: 415
Joined: Fri Dec 11, 2009 12:09 pm

Re: Export "Patient Image" to Ooutlook or Gmail contacts

Post by rhaber123 » Wed Nov 16, 2016 7:59 pm

Question 1 : above too

Question 2:

I followed the above instructions. Unzipped the above file and
C:\Project created and all files are placed in this folder.
C:\Photos created
downloaded and ran csv to v card
ran the Update Batch file
this worked very nice and "patients" vcard were created and the photos were created in the photos folder.

I imported the macros in Microsoft outlook, and when I ran them , the following errors happened:
I am not sure what I am doing wrong.
(probably because some of the patients were not active anymore and the files were not found
, and maybe also because there was an error in the spelling of the Fname and Lname in the final image file that was exported)

Any assistance will be appreciated if available.
THANK YOU

RAN THIS MACRO

Image

GOT THIS ERROR

Image


RAN THIS MACRO

Image


Got this error

Image



RAN THIS MACRO

Image



NOTHING HAPPENED

Post Reply