When querying MEDITECH MAGIC data with OpenGate, it is most efficient to connect to the segment(MAIGC IP) the data you are querying lives on. If you are not sure where the MEDITECH application databases reside the following query will map this out for you. In order to run this query in OpenGate make sure the MIS schema is loaded.
MIS.APPL.database AS [database],
MIS.APPL.database.segment AS [segment],
:M[/NODE[$MAC[MIS.APPL.database.segment]#".0"_"N"]]IP|1 AS [ip],
MIS.APPL.database.directory AS [directory]