This topic contains 3 replies, has 3 voices, and was last updated by  Eliot Muir 7 years, 1 month ago.

Creating DBS schema from physical DB table

  • The below example could be easily completed using ‘Import Tables From Database’ Wizard in Chameleon. But some people don’t want to use Chameleon Wizard for any reason, and some may not be using a vmd file at all. So here is simple example ‘how-to’ without Chameleon’s Wizard.

    The example is using SQL to query SQL Server database for specific physical table structure, and creates a ‘definition’ to be passed as parameter to function dbs.tableLayoutFromString{}.

    From there it becomes familiar mappings of HL7 message fields to table columns. Entire example is built on top of “New DBS File Format Example”

    Module ‘dbsUtil’ can be easily expanded to work with other types of Database Engine by adding respective SQL queries.

    You must be logged in to view attached files.


    This is fantastic, and I think it will dramatically increase the adoption of the .dbs database template feature. Nice work, Lev!

    Jeff Drumm ◊ VP and COO ◊ HICG, LLC. ◊

    I needed this for MySQL so I took Lev’s channel as a starting point and wrote this tool:

    It handles MySQL, Maria DB, Microsoft SQL Server, Oracle and SQLite.

    Support for other databases could be implemented using the same pattern as shown for these.

    Thanks for Lev for the idea and Scott and Brett for some help today in giving me access to an Oracle and Microsoft SQL Server database to try this out on.


You must be logged in to reply to this topic.