MUMPS request from asp.net/C#

Does anyone know how to query from a MUMPS database using C # without using KBSQL -ODBC?

We have a request request from the MUMPS database (Mckesson STAR patient care), and when we use KBSQL, it is limited to 6 concurrent users. Therefore, we are trying to directly query MUMPS without using KBSQL.

I expect something like LINQ TO MUMPS.

+4
source share
5 answers

I think Mckesson uses Intersystems Cache as a provider of mumps (M). The cache has .Net support (see the documentation here ). Jesse Liberty has a pretty good article on using C #,. Net and Windows Forms as the front end of a Cache database.

I'm not sure about LINQ (I'm not an expert here), but this may give you an idea of โ€‹โ€‹where to start your project.

Michael

+4
source

Firstly, I also feel your pain. I had a bad development experience in MagicFS / Focus a couple of years ago, and we had the same query to support relational queries. Why do people always want what they cannot have?

In any case, if the version of MUMPS that you use is similar to MagicFS / Focus, and you have access to a file system that contains a โ€œdatabaseโ€ (flat files), then one of the possible ways:

  • Export flat files to XML files. To do this, you will have to manually release the XML from the flat files using MUMPS or your language of choice. No matter how painful it may sound, MUMPS can be a way, because you cannot manually determine the current recording.

  • Reading in XML with LINQ to XML

  • Running LINQ Queries.

Of course, the first step is easier said than done, and can be even more difficult if you are trying to create XML files on the fly. An option for this would be to control the generation of XML files, such as indexes, through a nightly server process or the like.

If you will only query in a specific way (i.e., I want to join the Foo and Bar tables in the ID, and all I want), I would instead consider pulling and caching this data to C # server collections and generally skip the query (or pull them through using WCF or how, and then execute your LINQ queries).

+3
source

You can avoid 6 user restrictions by sharing a database connection from application instances

Use ODBC KB / SQL through a middle tier (or DAL in your application) or a standalone service (Windows service).

This component can talk to the MUMPS database using no more than 6 separate threads (in accordance with the KB / SQL restriction).

The component can use ADO.NET for ODBC to communicate with the OBSBC KBSQL driver. You can then use the data from your application using LINQ for ADO.NET.

You may need to use a queuing system, such as MSMQ, to control the sequence of data requests. if 6 simultaneous connections are not enough for the volume of requests. Good design practice is to queue queries and use asynchronous LINQ calls to avoid blocking user interaction.

+3
source

All current MUMPS implementations have the ability to specify MUMPS programs that respond to a TCP / IP connection. The MUMPS proprietary database is structured as a hierarchy of ordered pairs with multiple keys and values, essentially a superset of the NoSQL paradigm.

KB / SQL is a group of programs that respond to SQL / ODBC queries, translate them into these global MUMPS data queries, extract and merge the results from MUMPS, and then send back the data in a form in which SQL / ODBC.

If you have permission / security for your implementation, which allows you to create and run MUMPS programs (called "routines"), you can respond to any protocol you want from these programs. MUMPS systems can create text or binary results on a TCP / IP port or host operating system file. Many providers clearly do not allow you to do this in their contracts to provide medical and financial solutions.

As far as I know, LINQ syntax is a proprietary product of Microsoft, although of course there are LINQ-like Open Source. I have not seen a formal definition of a linear protocol for LINQ, but if there is one, the MUMPS procedure can be written to communicate with this protocol. This should have done something similar to KB / SQL, however, since neither the LINQ syntax nor the SQL syntax is very close to the native MUMPS syntax.

The mechanism for structuring and storing MUMPS data can be mechanically translated into XML syntax. This can take a lot of effort, as it is unlikely that your system vendor will provide the DTD defined for this mechanically generated XML syntax, and you still have to deal with encoded values โ€‹โ€‹and references that are stored in the MUMPS-based system in their original form.

+2
source

Which provider and version of MUMPS are you using? The decision will undoubtedly depend on the api provider they exposed.

+1
source

All Articles