I've created a scheduled task that dumps HL7 messages to flat files. It uses the OutputToLibraryStream() method of EnsLib.HL7.Message. I'd like to be able to run it on a mirror member host whether it's primary or backup.

When run against a database that's mounted read-only, it works fine. However, when I attempt to run it against a mirror backup database, I get the following error:

#5002: Cache error: <PROTECT>%LoadData+7^EnsLib.HL7.Message.1

Tracing that back to the source, I find:

0 9
0 369

Hi guys!

Was coding today with InterSystems IRIS in a docker container and decided to share with you the commands you may find useful in everyday coding.

# docker-compose build

command to build a container. Remember, it is useful if you have dockerfile in the repo.

if the build is successful call the following to launch it:

# docker-compose up -d

Find IRIS management portal on:

localhost:port/csp/sys/%25CSP.Portal.Home.zen?$NAMESPACE=%25SYS

where the port is what you set in docker-compose.yml - 52775 in this case.

Run the following if you want to launch a terminal session inside IRIS container:

# docker-compose iris iris session iris

gfhj gj 


sdfdsfsdf





USER>

And run the following to shut down the container:

# docker-compose down

Troubleshooting

5 4
4 600
Question
· Sep 14, 2019
Replacing character groups

What's the best way to replace character groups?

I want not to remove character groups as $zstrip does but to replace them with whitespaces.

$translate needs explicit character list.

Effectively I want to remove any characters besides letters, numbers and a small (known) subset of punctuation characters, replacing everything else with whitespaces.

0 6
0 548
Question
· Sep 12, 2019
Clean up code after compile

After upgrading I ran a $SYSTEM.OBJ.CompileAllNamespaces("u"). What I got in return was kind of a shock.

In reviewing errors I am seeing code being referenced but no longer applies. It is referring to stuff that might of been defined in the Context , Formal Spec ,Thread , etc.

ERROR #5373: Class 'osuwmc.CPD.DataStructures.TblPharmacyDEA', used by 'osuwmc.CPD.BusinessOperation:SelectProviderTempDEA:FormalSpec', does not exist

0 1
1 429
Question
· Sep 10, 2019
%OpenId Query

I am new to cache programming language . I am facing below issue . please assist.

Question: One persistent class ID column is a combination of its properties (Roll No and Marks) [ Exact: RollNo||Marks]. When i am running the query from Management portal it is displaying data in the same format and data is there. But in the code if i am making below statement, i am getting null value.

Set ExistsID=##Class(User.School).%ExistsId(RollNo_"||"_Marks)

set ID=##Class(User.School).%OpenId(RollNo_"||"_Marks)

0 8
0 1.1K

Hello,

I had an issue when using the method Exists, I noticed that if you provide a directory for this method it returns 1.
This is really misleading, because sometimes the input could be a directory and the only way to predict this is to also test if the file is a directory.

I didn't tested using the Attributes method, but I supposed that this means could also be a solution for that issue.
But still, I expected the Exists method to return 1 for files and 0 for directories, since there's also method called DirectoryExists already.

0 4
0 414

OAuth server to be deployed on the IRIS learning cloud platform. Clients - one on the other instance of the learning IRIS server, the other client locally on my computer in the container docker.

Both clients get a seemingly correct link (through ##class(%SYS.OAuth2.Authorization).GetAuthorizationCodeEndpoint()) to the login request form:

1 3
1 763
Article
· Aug 21, 2019 2m read
ToolBox-4-Iris

Hello everyone,
After some work with IRIS we want to share our ToolBox-4-Iris with you.

What is this about?

The ToolBox-4-Iris is an API for IRIS with a collection of handy and useful tools - features that are not available in IRIS, but greatly simplify application development. To save time and effort on the "typical tools" that every developer needs. This includes additional classes, individual methods or even more efficient macros, which are described in the respective packages.

Content

11 3
1 382

Hi Community!

Sometimes I meet a method which accepts 10+ parameters.

And often I need only the 8th parameter to pass. And I call the method something like:

do ##class(Some.Feature).Method(,,,,,,,"flag")

And I don't like this method when I call it like this cause, you know, often I just miss the number of commas and raise some other flag I wanted.

How do you avoid this situations?

If you meet such a code, how do you call it and sure that you didn't miss the number of ","?

What is a good number of parameters in a method and f you need to pass more parameters in a method what do you do?

3 27
1 1.5K

The .NET Core Identity model has an IPasswordHasher<> interface for for

  • Hashing a password so that it can be stored in a database
  • Verifying a provided plain-text password matches a previously stored hash.

I am getting invalid password errors during the login process when the .NET Core Identity model computes a hash from a plain text input and compares it to a password hash value I've returned from Caché. The default hashing algorithm is PBKDF2 with HMAC-SHA256, 128-bit salt, 256-bit subkey, and 10,000 iterations (detailed article on .NET Core Identity PasswordHasher). The algorithm Caché uses is probably different which may be why I am getting errors.

0 6
1 2.2K

Object Synchronization is a feature that has been around for a while, since Caché days, but I wanted to explore a bit more how it works. I've always thought that database automatic synchronization is complex by nature but, for some particular scenarios shouldn't be so hard. So I considered a very simple use case (OK, perhaps the typical one, I'm not discovering anything... but if it's common and it works, it's good wink ).

6 1
2 450
Question
· Aug 15, 2019
List property

I have a list property that I query from the database to get the values contained in that list using $LISTFROMSTRING() when the list is returned the list values contain a rectangle like character similar to when you copy past something to the Terminal and it has a preceding space .The problem is I need to compare those values to other values and they do not match because of this value I have tried to use $EXTRACT(value,*W) and *P but this is not striping the preceding character how do I get rid of this character any ideas please.

0 3
0 465

I have an OAuth 2.0 development environment where Caché is serving all three roles as the Authorization Server, Client and Resource Server based on a great 3-part series on OAuth 2.0 by @Daniel Kutac. I have a simple password grant type where an x-www-form-urlencoded body (as described in this post) is sent as a POST to the token endpoint at https://localhost:57773/oauth2/token and a response body with a HTTP Response 200 header is returned. The response body looks something like this.

2 3
0 2.3K

Hello,

I am struggling to print out the actual property values of the Security.System class.

https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls

I was hoping to be able to print the Authentication Enabled properties of a system from the command line using the Get or GetProperties class method. Currently, however, I am only able to get a return 1 or Invalid Oref error.

0 5
0 331

Hi all, I have released the latest version of VSCode extension for ObjectScript already a month ago, and finally a time for the info about this new release.

So, what's new in the release:

What's new in this version

  • added export setting "objectscript.export.addCategory" if enabled uses the previous behaviour, adds category folder to export folder, disabled by default
  • added Server actions menu, by clicking on server info from status bar. Open Management portal, Class Reference and toggle connection.
  • Class Suggestion in ##class, Extends, As, CompileAfter, DependsOn, PropertyClass
  • $SYSTEM suggestion by Classes from %SYSTEM
  • Import and compile folder or file by context menu in File Explorer
  • Server Explorer, now possible to open any other namespace
  • Macros suggestion

For details how it works now, look further.

9 14
5 942

Hi,

I have a method that has multiple parameters and is normally used from other classes in ObjectScript. Most of the parameters have default values. Withing the server code that's perfect. In some areas I can call myMethod(,,"sometext") or myMethod(tVariab) and thats fine... I use it as it's required in each place.

But now I want to expose it as a REST service so I need to buld a kind of wrapper., another method in a REST dispatcher class that will receive the parameters in a JSON object and will call the server method already implemented. Something like:

0 3
0 736

A SOLID Design in Cache Object

In this session, we will discussing SOLID Principle of Programming and will implement in a example.
I have used Cache Object Programming Language for examples.
We will go step by step to understand the requirement, then what common mistakes we use to do while designing, understanding each principles and then complete design with its implementation via Cache Objects.

3 7
2 466

Hi Everyone!

Please watch the new video on InterSystems Developers YouTube, recorded by @Sourabh Sethi in the "Coding Talks" format:

Informative and Fast WEB API VIA ObjectScript and Ensemble/HealthShare

https://www.youtube.com/embed/fhwiSy54lyY
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

0 0
0 397