Announcement Anastasia Dyubaylo · Jun 15, 2022

Hello and welcome to the next InterSystems technical article writing competition!

🐍 InterSystems Tech Article Contest: Python Edition 🐍

Write an article on any topic related to the usage of Python with InterSystems technologies from June 20 to July 20July 31– extended!

🎁 Prizes for everyone: A special prize pack for each author who takes part in the competition!

🏆 Main Prizes: AirPods Max; Apple Watch SE; Apple HomePod mini / Apple Pencil 

16
1 2068
Question Gertjan Klein · Jul 28, 2022

I am writing documentation in VS Code, using markdown, and am including some COS snippets in it, e.g.:

```objectscript
[Some COS snippet]
```

The IRIS language server (etc.) is enabled, and classes in the repository this documentation is in, are syntax highlighted properly. However, the code fragment in the documentation isn't. Syntax highlighting for e.g. XML does work.

Am I doing something wrong, or is this not supported?

3
0 1132
Article Lucas Enard · Jul 27, 2022 7m read

Following this GitHub we will see how the FIX protocol can be implemented easily using IRIS and Python.

If you don't have much time focus on the Send a Quote before the Order part near the end, as it will, in a matter of minute, tell you how to send a Quote Request followed by an Order Request and show you the result from the server, and that in no more than five clicks.

IRIS-fix-protocol

Implementation of the fix protocol using an IRIS python container for the initiator and a regular python container for the acceptor.

The Financial Information eXchange (FIX®) Protocol has revolutionized the

4
0 1124
Article Robert Cemper · Jul 28, 2022 2m read

If one of your packages on OEX receives a review you get notified by OEX only own YOUR package.   
The rating reflects the experience of the reviewer with the status found at the time of review.   
It is kind of a snapshot and might have changed meanwhile.   
Reviews by other members of the community are marked by * in the last column.

I also placed a bunch of Pull Requests on Github when I found a problem I could fix.    
Some were accepted and merged, and some were just ignored.     
So if you did a major change and expect a changed review just let me know.

# Package Review Stars
0
0 289
Article Dan Berges · May 30, 2022 1m read

Alt Text

Hi everyone!

Just wanted to share here a quick post about my project for the Grand Prix :)

FHIR Patient Viewer is a single-page, reactive rendering tool built on Vue.js that displays in a human-friendly way the data returned from a /Patient/{id}/$everything call made to an InterSystems FHIR server. In the readme, I've included 3 main things: 1. A video demo connecting FHIR Patient Viewer to a sandbox IRIS FHIR server (the fastest way to test it); 2. A second video showing how I would use FHIR Patient Viewer in a production environment (using a custom backend to handle the API calls, written i

4
0 1390
Question Stefan Schick · Jul 20, 2022

Hello everyone,

I want to restore a database from an external backup with the journal files.

The manual says I should (in short):

  1. Stop journaling with ^JRNSTOP
  2. Restore the database file IRIS.DAT
  3. Run the journal restore utility with ^JRNRESTO
  4. Restart journaling ^JRNSTART

Since I want to restore one database only step 1 would disable journaling for the whole instance, not only for the database to be restored. As I understand, it would be impossible to restore a different database if there occurs a problem while journaling is disabled during the recovery process?

My question is: Can j

6
0 950
Article Timothy Leavitt · Jun 28, 2022 2m read

An interesting pattern around unique indices came up recently (in internal discussion re: isc.rest) and I'd like to highlight it for the community.

As a motivating use case: suppose you have a class representing a tree, where each node also has a name, and we want nodes to be unique by name and parent node. We want each root node to have a unique name too. A natural implementation would be:

Class DC.Demo.Node Extends%Persistent
{

Property Parent As DC.Demo.Node;Property Name As%String [ Required ];
Index ParentAndName On (Parent, Name) [ Unique ];
Storage Default
{
<Data name="No
8
0 1255
Article Evgeniy Potapov · Jul 19, 2022 7m read

When we collect temporary data (the number of purchases in the store, the number of comments on the post), it may happen that there is no data for a certain period of time. In this case, this time period (hour, day, month) is not represented in the database, that is, there is not a single row for this period. In other words, there are no rows in the database for this period.

When we start building analytical reports based on data from IRIS or Adaptive Analytics cubes, a visualization problem appears. On charts and tables, we expect to see a value of 0 for the period with missing data, but the






1
0 558
Article Eduard Lebedyuk · Nov 20, 2019 9m read

In this article, I would like to talk about the spec-first approach to REST API development.

While traditional code-first REST API development goes like this:

  • Writing code
  • REST-enabling it
  • Documenting it (as a REST API)

Spec-first follows the same steps but reverse. We start with a spec, also doubling as documentation, generate a boilerplate REST app from that and finally write some business logic.

This is advantageous because:

  • You always have relevant and useful documentation for external or frontend developers who want to use your REST API
  • Specification created in OAS (Swagger) can be imported into a variety of tools allowing editing, client generation, API Management, Unit Testing and automation or simplification of many other tasks
  • Improved API architecture.  In code-first approach, API is developed method by method so a developer can easily lose track of the overall API  architecture, however with the spec-first developer is forced to interact with an API from the position if API consumer which usually helps with designing cleaner API architecture
  • Faster development - as all boilerplate code is automatically generated you won't have to write it, all that's left is developing business logic.
  • Faster feedback loops - consumers can get a view of the API immediately and they can easier offer suggestions simply by modifying the spec

Let's develop our API in a spec-first approach!

6
10 3522
Question Michael Davidovich · Jul 26, 2022

I have successfully created REST service classes on my local IRIS server following this book: Using the /api/mgmnt/ Service | Creating REST Services | InterSystems IRIS Data Platform 2021.2

I am now 1) trying to edit impl.cls in VS Code and 2) export it to my local repo so I can push to the remote repo.

When I click on my project in VS Code and 'Add to project' and choose the new package, spec.cls and impl.cls, I get the following error:

ERROR #5540: SQLCODE: -114 Message: Unable to acquire lock for INSERT of child row for parent table '%Studio.Project' with parent id = 'Default_project'

H

12
0 446
Question Joseph Tsang · Jul 14, 2022

Is there anyone using this callback in the code? I was searching in the latest IRIS documentation for any handy callbacks of the %Persistent class which allows me to execute some codes just right after a transaction has been committed (TCOMMIT). The description of this %OnSaveFinally() sounds the thing I want because it said:

If the calling method started a transaction then that transaction is completed prior to invoking the callback.

However, I later discovered in my own test that this callback is triggered after %Save(), not after TCOMMIT.

5
0 558
Question Mark OReilly · Jun 8, 2022

Hi:

Had an issue after upgrading to 2021.1 where search bar for interoability will bring up "INVALID ACTION". 

On upgrading to 2022.1 this still occurs. 

It did not occur on another environement that was upgraded from 2017.2 straight to 2022.1 

Is there any solution? Loads up SYS in url rather than customnamespacename

Issue is the url for instance brings through ip/csp/sys/EnsPortal.DTLEditor.zen?$NAMESPACE=X 

ip/csp/healthshare/customnamespace/EnsPortal.DTLEditor.zen?$NAMESPACE=X

I encountered this before and forget if there was a solution for this

1
0 380
Question Fabio Care · Jul 27, 2022

Hello all, 

i am currently struggling following the instructions for reading an image file into the database as a base64 string.

My goal is to save an image into a global as base64. I followed different guides like:

https://community.intersystems.com/post/how-save-png-image-cache-base64…

https://community.intersystems.com/post/how-save-fileimage-some-specifi…

https://cedocs.intersystems.com/ens20152/csp/documatic/%25CSP.Documatic…

Here is my current code:

 FILE,BASE64
 Set file=##class

5
0 643
Discussion Dmitry Maslennikov · Jul 10, 2022

I would say it is a post of pain after years of using InterrSystems IRIS Docker images in many projects.

And I hope InterSystems will hear me and do something with it.

We have a lot of issues with Docker images, but I see no progress in solving them.

  • containers.intersystems.com - any new releases substitute previous versions, makes build useless
    • ARM64 images have separate names, and it makes a pain to use them
  • flags in iris-main, appears and disappears from version to version, which may fail the start the container
  • healthcheck does not work as expected
3
0 816
Article Oliver Wilms · Jul 25, 2022 3m read

Hello,

I became aware of Python in the early 2000s when I started automating tasks. Some of our processes utilized python scripts. I never figured it out very well, and we decided to do away with Python because nobody on our team was familiar with it.

Along the way, I heard a lot about Python. My interest was renewed when InterSystems offered bonus points for using Python in contests.

The things I like the most about Python so far is how easy it is to find the mean of the ages of all Titanic passengers. For my test-data app I wanted to find the largest value in the ‘Qty’ column in a CSV fil

0
0 322
Question Adrian Izadpanah · Jul 25, 2022

Hi all,

I am looking at a task which involves processing an XML file. Picking the file up from a folder (c:\test.xml) reading the data out of the XML and archiving the xml after it has been processed.

I was wondering what the best way of doing this would be?

I have got as far as creating a service in Ensemble. The Service I have created uses the class name EnsLib.XML.Object.Service.FileService.

Any advice or tutorials/guides would be much appreciated.

Many Thanks

3
0 452
Question Iryna Mykhailova · Jul 22, 2022

Hello,

I found another question on how to change the language for Studio (but it would've been nice to have my actual language used - Ukrainian, since it's available, or was available). Still, I can't seem to figure out how to get rid of gibberish in the menu without changing the Windows settings:

5
0 382
Question Kurro Lopez · Jul 21, 2022

Hi all,

I've just  update the version of WebTerminal using the link, but now it doesn't work.

When call to /terminal is displaying the following error:

{
    "errors":[ {
            "code":5002,
            "domain":"%ObjectErrors",
            "error":"ERROR #5002: Error de cache: <INVALID OREF>zWrite+5^WebTerminal.StaticContent.1",
            "id":"ObjectScriptError",
            "params":["<INVALID OREF>zWrite+5^WebTerminal.StaticContent.1"
            ]
        }
    ],
    "summary":"ERROR #5002: Error de cache: <INVALID OREF>zWrite+5^WebTerminal.StaticContent.1"
}

Anyone

3
0 322
Question Markus Suonpää · Jul 1, 2022

How do I access items and their settings of production by using Objectscript? I have already tried making SQL queries to Ens_Config.Production table and using methods in Ens.Director and EnsPortal.Utils classes but I just can't get a hang of it.

The unfortunate reason, why I need to do this, is that our environments (DEV, QA and PROD) have gone in really bad shape over the years and now the software development is just pure agony since environments are not in sync. Comparing different environments is also extremely difficult since it is hard to even tell which classes are in use. The idea was

9
0 919
Job Sridhar Mandalapu · Jul 24, 2022

Our Organization is working towards a long term contract with regards to HealthShare implementation in the US and are interested in speaking with HealthShare unified care record certified consultants who reside in the continental united states. Send me an message if you are interested in knowing more.

1
0 265