![]() |
![]() |
What is MDO?
MDO is an interface. On one side it communicates with various data sources
such as VistA, HL7, DICOM, XML and SQL. On the other side, it delivers to the
client a uniform, well-defined suite of objects from the medical domain, objects
such as patient, provider, progress note, lab result, etc. MDO delivers the
same object regardless of the data source. So, to the client software, a
progress note from VistA looks and behaves exactly the same as a progress note
from HL7 or SQL or XML.
Since software powered by MDO doesn't need to know the origin of its data, no changes are required if a data source changes. If the software is written correctly it doesn't even have to be recompiled. MDO gets its data sources from an XML file. Consider this snippet, that shows the sites in VISN 11:
<VhaVisn name="Veterans In Partnership" ID="11"> <VhaSite name="Saginaw, MI" ID="655" moniker="SAG"> <DataSource modality="HIS" protocol="VISTA" source="VISTA.SAGINAW.MED.VA.GOV" status="active"/> </VhaSite> <VhaSite name="Battle Creek, MI" ID="515" moniker="BAC"> <DataSource modality="HIS" protocol="VISTA" source="VISTA.BATTLE-CREEK.MED.VA.GOV" status="active"/> </VhaSite> <VhaSite name="Detroit, MI" ID="553" moniker="DET"> <DataSource modality="HIS" protocol="VISTA" source="VISTA.DETROIT.MED.VA.GOV" status="active"/> </VhaSite> <VhaSite name="Indianapolis, IN" ID="583" moniker="IND"> <DataSource modality="HIS" protocol="VISTA" source="VISTA.INDIANAPOLIS.MED.VA.GOV" status="active"/> </VhaSite> <VhaSite name="Ann Arbor, MI" ID="506" moniker="ANN"> <DataSource modality="HIS" protocol="VISTA" source="VISTA.ANN-ARBOR.MED.VA.GOV" status="active"/> </VhaSite> <VhaSite name="Danville, IL" ID="550" moniker="DAN"> <DataSource modality="HIS" protocol="VISTA" source="VISTA.DANVILLE.MED.VA.GOV" status="active"/> </VhaSite> <VhaSite name="Northern Indiana" ID="610" moniker="NIN"> <DataSource modality="HIS" protocol="VISTA" source="VISTA.NORTHERN-INDIANA.MED.VA.GOV" status="active"/> </VhaSite> </VhaVisn>The modality for all these data sources is HIS, meaning the primary data source for this site. Other modalities might be ECG, RADIOLOGY, etc. The protocols are all VISTA, meaning the conversation is carried on via CPRS RPCs with the VistA listener. Now suppose one of these sites, say Detroit, becomes an HDR site. Merely changing the protocol to HDR would be sufficient. MDO would now talk HDR to this HIS instead of VISTA. In reality of course Detroit would keep its old VistA as well as the new HDR, so the real change to this file would be to change the VISTA modality to HIS2, meaning secondary HIS, and to add a new DataSource element with modality HIS, protocol HDR, etc. The Detroit entry would now look something like this:
<VhaSite name="Detroit, MI" ID="553" moniker="DET"> <DataSource modality="HIS" protocol="HDR" source="HDR.DETROIT.MED.VA.GOV" status="active"/> <DataSource modality="HIS2" protocol="VISTA" source="VISTA.DETROIT.MED.VA.GOV" status="active"/> </VhaSite>
All the client software that previously interacted with Detroit's VistA would now interact, with no futher changes, with Detroit's HDR. Let's see how this works with some code:
Now let's use our new SiteTable to connect to the local site's HIS:
To summarize, MDO delivers objects that are identical regardless of their data source. A note is a note is a note.
How Does MDO Work?
MDO uses two design patterns: Abstract Factory and Data Access Object, as shown in the following diagram:
When the client software wants an object, it uses DaoFactory to instantiate the appropriate DAO. The protocol attribute from the XML file is passed as the parameter that decides what kind of DAO to create. The DAO then acquires the necessary data from its data source and creates the medical domain object. For example, to obtain a patient object from the Danville HIS, the Danville site object that was obtained from the above XML file is passed to DaoFactory. This will produce a VistaDao (since the Danville HIS has protocol VISTA) that will connect to VISTA.DANVILLE.MED.VA.GOV and speak "VISTA-ese". The VistA patient data will then be morphed into the MDO Patient object.
Vista DAOs
MDO is an ongoing project. The only DAOs currently implemented, or at least partially implemented, are the
XML and the VISTA ones. The only thing implemented in the XML DAO is the functionality to read the XML site
file and produce a SiteTable MDO. The VistaDAOs deserve a page of their own: Vista DAOs.