VIXWIN and OD

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
sunnyreddy
Posts: 3
Joined: Fri Jan 04, 2008 11:48 am

VIXWIN and OD

Post by sunnyreddy » Fri Jan 02, 2009 7:20 am

I am using OD with Vixwin in bridge mode. we are having issues with images. I contacted Gendex to find out how the xrays are named when they stored. they told me, when i use in BRIDGE MODE, Opend Dental is the one which names these images. in short I am trying to link some of these images to patients. I have no clue how to bind. any help is greatly appreciated.

thanks

User avatar
jordansparks
Site Admin
Posts: 5744
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: VIXWIN and OD

Post by jordansparks » Sat Jan 03, 2009 7:57 pm

A new page has been added to the manual that specifically discusses VixWin:
http://www.open-dent.com/manual/bridgeVixwin.html

Hopefully, that will help. Please feel free to call us if that is not enough. I suspect it's going to get complicated. Did you have a conversion done by us?
Jordan Sparks, DMD
http://www.opendental.com

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

Re: VIXWIN and OD

Post by apollonia » Thu Aug 13, 2009 12:23 am

VixWin's somewhat confused explanation is actually (somewhat) true, but not in the way they said.

VixWin has two modes (options --> preferences --> 'bridge mode' | 'stand alone mode') and some lamebrain decided they should store and retrieve data from two separate directories, VXDATA and VXIMAGES, respectively. So when in 'bridge mode' the program can't find images generated in 'stand alone mode' and vice-versa. This makes conversions a bit of a challenge.

In a round-about way, OpenDental IS RESPONSIBLE for naming the VixWin files, but OpenDental doesn't do this on purpose. The VixWin program (when running in 'bridge mode') simply ASSUMES that whatever variable is passed is intended as the file name......... so OpenDental passes a PatNum and VixWin names the resulting file with that number.

Specifically, VixWin names the file 'xxPatNum00.TIF (or .....01.TIF, 02.TIF, etc. according to image number for that patient). the initial xx in the file name here denotes left padding to make the file name 8 digits long, the last two digits representing the image number for that patient.

for example, the first image for PatNum 12345 will be 01234500.TIF and the second image for PatNum 123 would be 00012302.TIF

There are two other corresponding files named xxPatNum00.TVW and xxPatNumFM.dat that are created at the same time and hold metadata that isn't critical to the program's function.

This means that in order to "attach" an existing image to an OD patient number, the associated files (.dat, .TIF, and .TVW) all have to be renamed AND moved in order to be recognized by the 'bridge mode'
program, using the PatNum provided via the OD bridge.

VixWin also generates a DBF file that indexes all the images by patient name, etc. This proved useful in moving and renaming files.

What I did was generate a script that finds all VixWin files where the patient name is identical to the way it is in OpenDental, and then move and rename the corresponding files. Because some VixWin images had names misspelled and others used nicknames, etc., this script only caught about 80%, still it helped to link the majority of 'stand alone' images to the 'bridge mode' program that recognizes OD's handoff.

This is an example script (written in Python with apologies to the teeth-gnashing among you), but a similar script will work with your favorite language. Oh, I first loated the .DBF data into MySQL to simplify the process.

Code: Select all

#!/usr/bin/python

import MySQLdb
import shutil

db = MySQLdb.connect("server","username","password","OpenDental" )
cursor = db.cursor()
cursor.execute("
	SELECT
	CONCAT(vix.PTSN,'00.TIF') AS old_name,
	LPAD(CONCAT(UCASE(pat.PatNum),'00.TIF'),12,0) AS new_name
	FROM patient pat, VixWin vix
	WHERE ((UCASE(pat.LName) = UCASE(vix.SNAM)) and (UCASE(pat.FName) = UCASE(vix.NAME)))
	")
database_rows = cursor.fetchall()
db.close()

old_dir = "X:/VXDATA/"
new_dir = "X:/VXIMAGES/"
for old_name, new_name in database_rows:
    try:
        shutil.move(old_dir + old_name, new_dir + new_name)
    except Exception as e:
        print "Exception moving %r to %r: %s" % (old_name, new_name, e)
Hope this helps somebody.

Neil

User avatar
jordansparks
Site Admin
Posts: 5744
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: VIXWIN and OD

Post by jordansparks » Fri Aug 14, 2009 7:05 pm

Thanks. I have posted that information on the VixWin page in our manual. One of our services is image conversions, and this would fall under that heading. So for users who are not programmers, you can leave this to us.
Jordan Sparks, DMD
http://www.opendental.com

Post Reply