查找

記事
· 2021年12月9日 2m read

MULTIEXCEL

Millions of professionals use a wonderful tool, spreadsheets, for engineering calculations and financial analysis. It attracts a user-friendly interface and clear data organization. Cell formulas provide rich opportunities for automating calculations. No programming is required. (For example, Microsoft Excel)

But in order to expand the scope of the tool, it is necessary to increase the dimension of the tables and the speed of calculations. It is necessary to create a single, common database for a group of users. Cell formulas should be able to do everything. In this case, it is advisable not to change the source code of the application. It seems like an impossible mission.

However, M-technology has led to an unusual solution: the “spreadsheet m-amplifier”. An analogy is your car: the hydraulic booster helps even a fragile woman to turn the steering wheel easily. In the old days, only a strong macho could drive a car. Another example is a quantum computer. The calculations are carried out in parallel and consistently in all Universes of our Multiverse. The solution to any task is instant. So far, only in a project.

Our m-amplifier (“Shadow excel”) is implemented as parallel invisible spreadsheets inside Cache / IRIS InterSystems. There are also workbooks, worksheets, columns, rows, cells with formulas. Each main-excel sheet has a corresponding shadow-m-sheet. Each cell has a shadow cell. But formulas in the shadow cells are unusual - they are actually MUMPS commands. The m-worksheets are not two-dimensional, but multi-dimensional. The interface with users is not directly, but through “main excel”.

The possibilities of the shadow are orders of magnitude higher. Therefore, shadow does all the hard work and is much more efficient. M-globals spin faster than main sheets. All Cache / IRIS resources are available to M-formulas. You can build complex multidimensional data structures and quickly receive analytical reports with a large number of graphic elements. You can create a complex interactive game.

There is no need to keep a huge archive of workbooks with data from different periods of time. All data is stored in M-database.

"Shadow excel" is associated with several users at the same time over a network or Internet. Users see “main excel” on their screens, which is fantastically fast and performs incredibly difficult tasks.

We managed to correctly organize reliable synchronous work of shadow and main excel in real time. Everything that happens in the shadow is transferred to the main one and vice versa. They work as a single tool: MULTIEXCEL, on which it is now possible to build large complex systems of production and financial accounting and management. It is also used as UI for Cache / IRIS.

The operating experience of MULTIEXCEL has shown excellent results. This is another interesting area of application for M-technologies.

2 Comments
ディスカッション (2)0
続けるにはログインするか新規登録を行ってください
質問
· 2021年12月2日

Is this approach to renaming an output file bad practice, and if so, why?

Hi all, 

I'm trying to output a XML file, mapped from a ORU_R01 2.3 HL7 message, with a file name based of fields in the source HL7 message in the following format, 

source.{PIDgrpgrp(1).PIDgrp.PID:PatientIDInternalID(1).ID}_"-"_
source.{PIDgrpgrp(1).PIDgrp.PV1grp.PV1:VisitNumber.ID}_"-"_
source.{PIDgrpgrp(1).ORCgrp(1).OBR:ObservationDateTime.timeofanevent}

To give something like RXR0000000-000000123-20211125105415.xml as the output filename,

I initially tried to extend the EnsLib.XML.Object.Operation.FileOperation class and overwrite the OnMessage() method to allow me to specify the filename but I wasn't able to get that to work with my limited ObjectScript knowledge.

Class ELHTPRODPKG.Operations.XMLFIleOutput.CHC Extends EnsLib.XML.Object.Operation.FileOperation
{    
    Parameter ADAPTER = "EnsLib.File.OutboundAdapter";
    Parameter SETTINGS As %String = "-Filename:Basic";                    // Remove option from UI for this class
    Property Filename As %String(MAXLEN = 1000, MINLEN = 1) [ Required ]; // Removed Initial Expression 
    
    Method OnMessage(pRequest As %Persistent, Output pResponse As %Persistent) As %Status
    {
        // Create output filename using the class name of the persistent class as the base.
        Set tFilename= "InternalID"_"VisitID"_"EventTimeStamp"_".xml"  
    
        // Charset processing is done by %XML.Writer.  Disable Charset property of the Adapter.
        Set tCharset=..Adapter.Charset
        Set ..Adapter.Charset=""
    
        // Output XML document to stream
        Set tSC=..standardOnMessage(pRequest,.tStream)
        
        // Use the adapter to output the stream
        If $$$ISOK(tSC) 
        {
            Set tSC=..Adapter.PutStream(tFilename,tStream)
        }
        
        // Restore the adapter Charset
        Set ..Adapter.Charset=tCharset
    
        $$$sysTRACE("After "_$S(..Adapter.Overwrite:"storing",1:"appending")_" XML document "_pRequest_"/"_pRequest.%Id()_" to file "_tFilename)
        Quit tSC
    }
}

My plan for that was to add varFilename as %String to the OnMessage() parameters and modify the EnsLib.EDI.XML.Document class to pass the varFilename from the conversion DTL but I wasn't sure if that was the right approach or if that is possible. I wasn't able to get the filename to be overwritten with the test namein the code above either, "InternalIDVisitIDEventTimeStamp.xml"  , instead I was getting names like  "5@EnsLib.EDI.XML.Document.xml_2021-12-02_11.17.51" which I couldn't seem to change.

So instead I've used the OutputToFile() method of EnsLib.EDI.XML.Document in the DTL to do target.OutputToFile("F:\TestDirectories\TestMessageArchive\XML\Out\"_varFilename_".xml")
Which gives me the result I was looking for, then I "discard" the message since it's no longer needed by passing the message back into the rule like this:



To get to the point my question is, Is there anything wrong with this approach?

Specifically I was wondering what implications it might have for logging / error handling / performance, etc, as the message never goes out through an Operation and instead is just discarded despite having the desired file correctly rendered in the correct directory,

I'm quite new to HealthShare and ObjectScript so I'm looking to develop my understanding and implement integrations following best practice so any feedback is appreciated, 

Thanks, 
Ben

1 Comment
ディスカッション (1)1
続けるにはログインするか新規登録を行ってください
記事
· 2021年11月29日 2m read

イメージファイルをFTPサーバからアップロード/ダウンロードする方法

これは、InterSystems FAQサイトの記事です。
 

FTPサーバから、アップロード/ダウンロードする方法は以下の通りです。

1. FTPサーバにイメージファイルをアップロードする

 set tmpfile="c:\temp\test.jpg"
 set ftp=##class(%Net.FtpSession).%New() 
 // ftp サーバへ接続する
 do ftp.Connect("","<ユーザ名>","<パスワード>")
 // 転送モードをBINARYに設定
 do ftp.Binary()
 // アップロードするディレクトリに移動
 do ftp.SetDirectory("/temp/upload")
 // アップロードするファイルのストリームを用意   
 set file=##class(%File).%New(tmpfile)
 do file.Open("UK\BIN\")
 // ファイルをアップロード
 // 第1引数: アップロード先に作成するファイル名
 // 第2引数: アップロードするファイル・ストリーム
 do ftp.Store("test.jpg",file)
 // ftp サーバからログアウト
 do ftp.Logout()
 // ファイルを閉じる
 do file.Close()
 // (オプション) アップロードしたファイルを削除する
 //do ##class(%File).Delete(tmpfile)

2. FTPサーバからイメージファイルをダウンロードする

   set ftp=##class(%Net.FtpSession).%New()     // ftp サーバへ接続する
    do ftp.Connect("","<ユーザ名>","<パスワード>")     // 転送モードをBINARYに設定
    do ftp.Binary()     // ダウンロードして格納するファイル・ストリームを用意
    set stream=##class(%FileBinaryStream).%New()
    do stream.LinkToFile("c:\temp\testdownload.jpg")
   // ダウンロードするディレクトリに移動
    do ftp.SetDirectory("/temp/download")     // ファイルをダウンロードしてストリームを閉じる
    do ftp.Retrieve("test.jpg",stream)
    do stream.SaveStream()
    Set stream=""     // ftp サーバからログアウト
    do ftp.Logout()
ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
質問
· 2021年11月26日

Mobile app not running but Web app running after deploying and compiling to cordova

kindly assist with this error, mobile app keeps loading after converting it using Cordova compiler from workbench but the web app is running well.

error message shows this when I check api link on postman:

{

    "errors": [

        {

            "code": 5002,

            "domain": "%ObjectErrors",

            "error": "ERROR #5002: ObjectScript error: <INVALID OREF>zSetSessionLanguage+7^HSPortal.API.Public.1",

            "id": "ObjectScriptError",

            "params": [

                "<INVALID OREF>zSetSessionLanguage+7^HSPortal.API.Public.1"

            ]

        }

    ],

    "summary": "ERROR #5002: ObjectScript error: <INVALID OREF>zSetSessionLanguage+7^HSPortal.API.Public.1"

}

2 Comments
ディスカッション (2)1
続けるにはログインするか新規登録を行ってください
質問
· 2021年11月21日

Forms

Hello, are there any alternative choices for creating forms with a different tool and then integrating them with Intersystems? I want to use Angular to construct forms and integrate the code with Intersystems. Is there anyone out there who might have an idea?

3 Comments
ディスカッション (3)0
続けるにはログインするか新規登録を行ってください