Article Dmitry Maslennikov · Oct 11, 2016 5m read

This text is a continuation of my article where I explained the structure a Caché database. In this article, I described the types of blocks, connections between them and their relation to globals. The article was purely theoretical. I made a project that helps visualize the block tree - and this article will explain how it works in great detail.

3
1 2253
Question david clifte · Sep 27, 2016

Hello,

I need to create a query that return the amount of heath related information from a patient. 

I created one using the Analitics but, once our Analitcs database is update once a day this information is not reliable during the current query day.

Part of my Analitcs query is shown below. Where can I find the equivalent tables in Health Share? Any help is appreciate.

Tanks In Advance.

--Analitcs Query

6
0 516
Question Thomas Chericka · Oct 7, 2016

Hi,

Thanks a million for taking the time to read this.

I'm calling the functions $ZF(-`1, <path to EXE>) and $ZF(-2, <path to EXE>) from Cache code. The exact code I'm using in Cache Studio is given below.

/// Test the functionality of ZF(-1) and $ZF(-2), 
Class %SourceControl.UnitTest Extends %Persistent
{
Parameter PATH As %String = "E:\VCS\CommandExecutor\bin\Debug\WindowsApplication.exe";
ClassMethod Test()
{
Do $ZF(-2, ##Class(%SourceControl.UnitTest).#PATH)
}

Now when I run the command in the Cache Terminal, as given below,

>do $ZF(-2, "E:\VCS\CommandExecutor\bin\Debug\WindowsApplication.exe")

6
0 936
Question Martin Fukátko · Oct 10, 2016

I've received near empty emails form community.

It seems like bug. Or I'm missing something 46 years ago?

Email header:

[InterSystems Developer Community] Subscriptions Digest for Martin Fukatko

Email body:

by 46 years 9 months ago

0 Comments

Martin

1
0 226
Question Paul Hula · Oct 10, 2016

Hello All,

   Does anyone have a specification for Telepath PMEP file formats?

They look like this

01|XXX|005|MIC|XXX Microbiology & Mycology|123456|25.08.16 15:06|
02|$$$|XX01|||L|
03|F|SURNAME|FORNAME|111222333|MRN1|01.01.1950|52 Some Lane|Somewhere|||AA11 1AB|MRN1|01.01.1950

etc etc with "05's all the way up to 10's" they are for results.  The supplier isn't being helpful, google for PMEP isn't given anything useful, hence I'm asking the friendly developers here if they've come across it and even better have any sort of file format or spec at all?

1
0 477
Question Ray Hitchins · Oct 10, 2016

We have a very old green screen application which is currently producing PCL "documents". I want to update this to produce PDFs - are there any shortcuts / tips? I'm aware Zen Reports can allegedly do it, but I want to avoid that route if I can.

1
0 428
Question Sébastien Demoustiez · Oct 10, 2016

Hello,

First sorry for my english :)

I'm looking for a solution to reset the cursor of a query in a csp page.

In my code I do:

<csp:query name="users" classname="UserId" queryname="Find">
 <csp:while condition="users.Next()">
         ...
 </csp:while>

And 100 lines after I have to do exactly the same ...

Is it a way to do the while without do the query again ?

Something like users.Reset() ??

Thanks a lot for your help

Sébastien

2
0 732
Question Scott Beeson · Oct 6, 2016

I experience this constantly with Cache SQL.  Especially when querying the ATNA log.

SELECT TOP 400000 * FROM HS_IHE_ATNA_Repository.Aggregation ORDER BY ID DESC

That took 12 seconds.  I then upped the number to 500,000 and it took 185 seconds.

Shouldn't the execution time scale proportionately?

If I run the 500,00 query again it takes 2.4 seconds.

4
0 521
Article John Hotalen · Oct 4, 2016 1m read

How to parse a URL in Caché:

Let's pretend you are working on a project where you may be retrieving a URL for some purpose and you have the need to be easily able to parse apart that URL to get the various components that make up the URL.

Here's how to do that:

Note:  This example assumes you have a variable named sURL that contains some url (i.e. http://www.intersys.com/main.csp?QUERY=abc#anchor) and you will be creating an array of the URL component pieces, where the array will be named aComponents.

In your class/routine, add the following code:

Do ##class(%Net.URLParser).Parse(sURL,.aComponents)

8
0 2004
Question david clifte · Oct 5, 2016

I have to connect to an external database and I'd like to use the JDBC SQL Gateway.

I followed this tutorial [1] to create a JDBC SQL Gateway and after configured it works as expected, but I don't know

how use this connection into source code. Maybe these other tutorial is related [2] and [3].

[1] http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…

[2] https://community.intersystems.com/product-documentation/intersystems-p…

5
0 1106
Question Chris Stewart · Oct 7, 2016

Hi


I have been working on changing a web application from using %FileBinaryStream to storing and serving the file content from a %Stream.GlobalBinary property, stored in a new database.  I have managed to migrate the data across, and have also been able to redirect the stream so that it is being served through the web link.  However, the previous method set attributes on the File stream to have the stream be rendered as the original file type through MIME, using this code

do stream.SetAttribute("ContentDisposition","inline; filename="_filecvt)

2
0 1128
Question 吉光 芳史 · Sep 21, 2016

Hi, There

How to use open text file. I have a one file. the file is original file from excels file. After later convert to CSV file.

some cells has include cr+lf  control code. If i open and use from cache. reding time,Cache was wrong line feed point.

how do i edit my source code?

==============================================

s infile="c:\csvfile.csv"

o infile:"r"

1 u infile r line i $zeof<0 c infile q

   f i=1:1:10 s wd(i)=$p(line,",",i)

g 1

==============================================

4
0 1088
Question Scott Roth · Oct 6, 2016

maybe I am not looking in the correct spots, but how should one handle an Exception from a SOAP web service within the Business  Process Language? For example I am sending a request to a Web Service to try to get information, but the response I am getting is an Exception like "Patient Not Found".

Is there a function I can call to check the response similar to what I do to check a SQL Snapshot to see if it is valued?

Thanks

Scott Roth

Sr. Applications Development Analyst
Information Technology Integration - Interfaces

The Ohio State University Wexner Medical Center

2
0 796
Question Mathew Burt · Oct 6, 2016

I have an operation which calls an external web service, returning a long XML string.

Passing the string into Excel creates a table like this:

Each row above relates to a document on a server. In Ensemble, I need to parse the XML similarly to Excel, where I can loop over each document and take various actions depending on the different values.

I created a BPL to call the operation and return the XML string, which I've converted it to an %XML.TextReader object, and I'm using a While loop to loop through each element.

1
0 985
Article Ben Spead · Aug 25, 2016 4m read

Background

Caché 2016.1 introduced some very powerful JSON features.  Unfortunately, the syntax used in the 2016.1 release is going to be changed in the 2016.2 release to bring it closer to Caché ObjectScript syntax.  This will mean that code that works in 2016.1 may not be forwards compatible.   See this announcement and this article for more details about the changes.

11
0 2143
Article Istvan Hahn · Oct 6, 2016 4m read

A beginner’s guide to Exception Handling in RESTful web services. The article gives an example how the various error conditions during processing a service request can be handled.

We expect our client – server communication working in a flawless operational condition, running error free software. But we are prepared to handle exceptions. Are we? So far in the examples of the previous sessions were not. We did not care about exceptions. The result? In any error incident it took ages to figure out what the problem is and more importantly how to fix it.

1
0 1898
Article Sylvain Guilbaud · Oct 4, 2016 6m read

This sample class will add parameter DSINTERVAL to each class containing the parameter DSTIME

To execute it from a Terminal :


SAMPLES>d ##class(adm.param).add(,,1)
[SAMPLES] parameter DSINTERVAL=5 added to class DeepSee.Study.CityRainfall (via adm.param)
[SAMPLES] parameter DSINTERVAL=5 added to class HoleFoods.Transaction (via adm.param)
[SAMPLES] parameter DSINTERVAL=5 added to class News.DeepSee.NewsArticle (via adm.param)
DSINTERVAL parameter was added to 3 classes
6
1 1140
Question Paul Riker · Oct 5, 2016

I'm trying to read PID-3 and route the message based on if a certain prefix existed, but I keep getting Property Does Not Exist.

I've tried

HL7.(PID:PatientIDInternalID()) Contains "COS"

HL7.(PID:PatientIDInternalID(1)) Contains "COS"

HL7.{PID:PatientIDInternalID()} Contains "COS"

HL7.{PID:PatientIDInternalID(1)} Contains "COS"

This is a 2.3 MDM message. Thanks!

1
0 641
Article Istvan Hahn · Oct 5, 2016 13m read

This article gives a brief introduction how a RESTful service consumer and a RESTful service provider exchange data. It is a beginner’s guide. Data is transferred from a consumer to a provider as parameters of the service. Parameters are part of a service request. The result of the service action a response is returned from a provider to a consumer. Both the service request and response are standard HTTP messages. Since HTTP is a flexible standard regarding to the message contents, RESTful services also enjoy the versatility of data transfer methods.

0
0 4658
Question William Proctor · Sep 30, 2016

Good Morning and thanks in advance for all replies.  I have created a PowerShell script for backing up CACHE and all related files to be run on a nightly basis.  My script works as long as the Unknownuser has %all access which is not acceptable in our production environment.  I have tried every format I can thank of to get the script to use a specific id with no luck.  How can I get this command to run under a specific id? 

..\bin\cache -s. -U%SYS "##Class(Backup.General).ExternalFreeze() <d:\backup\login.scr" 

The file just has

userid`r`n
​password`r`n

5
0 757
Article Evgeny Shvarov · Aug 31, 2016 1m read

Hi!

Sometimes you see that call to DeepSee cube building method:

w ##class(%DeepSee.Utils).%BuildCube("CubeName")

does nothing.

Here are my 2 cents on possible reasons.

1. Run DeepSee Reset method in certain Namespace:

NAMESPACE> w ##class(%DeepSee.Utils).%Reset()

and try again.

2. Make sure, that all the indices in your base class for the cube are rebuilt, rebuild them and run it again:

w ##class(%DeepSee.Utils).%BuildCube("CubeName")

Hope this will save some time for you, and will be helpful as was to me.

2
0 468
Article Mike Kadow · Sep 15, 2016 2m read

NewBie's Corner Session 27 Traversing A Global with $Order Part 1

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

Traversing A Global

Perhaps the most difficult concept in Caché/MUMPS is its Global Structure. This session and several that follow it deals with the Global Structure. However, just presenting the material will not guarantee your understanding of it. You must experiment with the data and concepts that are presented.

In this session, we are going to create a small Global of three levels deep, and then show the code to Traverse the Global.

20
0 911
Article Mike Kadow · Sep 23, 2016 5m read

NewBie's Corner Session 28 Various Methods to Traverse a Global

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

Judging from the number of responses to Session 27 Traversing A Global, developers are passionate about their methods. I am not here to judge the merit of the various methods.

Over the next few pages I will demonstrate a number of methods to Traverse a Global. If you don't already have a favorite they may help you pick one.

I will repeat the method from Session 27 just to have all methods in one post.

13
0 718
Question Rustam Ibragimov · Aug 5, 2016

Hello, guys.

I need to copy the text from one stream to another filestream and save it. I am using  

do fileStream.CopyFromAndSave(rtn.Code)

However, if "rtn" stream contains Russian characters I get something like "???". Is there any way to convert stream to Unicode?  Something like $zc(str, "O", "UTF8") for streams.

3
0 474
Question James Fitzpatrick · Sep 28, 2016

Hi all,

This is a real long shot, but does anyone have experience integrating MS wsHttpBinding with a Cache application?

Link 

I ask because my project had some initial design discussions for new web service communication and this specification was mentioned. 

Thanks.

1
0 367
Announcement Evgeny Shvarov · Oct 1, 2016

Hi, Community!

Here is the digest of Articles and Questions published on InterSystems Developer Community in September 2016.

Most viewed

Mirroring 101: a brief guide and FAQ - 238

NewBie's Corner Session 27 Traversing A Global with $Order Part 1 - 214

Cache for Raspberry Pi? - 209

Free Text Search: The Way To Search Your Text Fields That SQL Developers Are Hiding From You!* - 199

REST in Pieces - 196

User authentication using Arduino with RFID - 146

Windows 7 performs shutdown too fast for Cache to close and so it gets forced down - 143

Cache or Caché? - 141

NewBie's Corner Session 28 Various Methods to Traverse a Global - 134

Cache Certification - 128

Most voted

Ensemble and file outbound adapters - a small hint - 11

Free Text Search: The Way To Search Your Text Fields That SQL Developers Are Hiding From You!* - 9

Windows write caching - 9

Advanced URL mapping for REST - 6

Windows 7 performs shutdown too fast for Cache to close and so it gets forced down - 6

Featured InterSystems Video: OAuth 2.0 Overview - 6

The Art of Mapping Globals to Classes  (2 of 3) - 5

Running HealthShare XSLTs from Terminal - 5

Cache for Raspberry Pi? - 5

Cache or Caché? - 5

Most commented

NewBie's Corner Session 27 Traversing A Global with $Order Part 1 - 16

Cache for Raspberry Pi? - 14

question on ExternalFreeze on windows platform -- - 14

Cache or Caché? - 12

Mirroring 101: a brief guide and FAQ - 10

Windows 7 performs shutdown too fast for Cache to close and so it gets forced down - 9

Multiple namespaces in web application - 8

cleaning up CSP sessions (aka where/who/what is the %CSP.Daemon?) - 8

NewBie's Corner Session 28 Various Methods to Traverse a Global - 8

Free Text Search: The Way To Search Your Text Fields That SQL Developers Are Hiding From You!* - 7

0
0 404