0 Followers · 332 Posts

Caché Server Pages (CSP) is both an architecture and toolset used to build an interactive web applications with the InterSystems Data Platform.

Question Aman · Jul 2, 2024

Hello Community,

I'm a beginner and currently working on a project to convert CCDA files to FHIR using InterSystems IRIS. I have developed a web form to upload CCDA files, and I'm attempting to convert the uploaded CCDA files to FHIR. However, I am encountering an issue where the conversion process results in an empty entry.
Here's the Output it displays on HTML page:

Size of CCDA Stream: 74152
vR4
{"resourceType":"Bundle","type":"transaction","entry":[]}

Here is my code: CCDtoFHIR.csp

0
0 0
Question Matheus Augusto · Jun 13, 2024

Is there any way to include a CSP page within a CLS?
Example: #Include file.csp 

Context: I work with a legacy that most screens are built using only CLS. I'm trying to change this by separating the frontend layers to be built only with CSP and backend layers using CLS. I improvised a method that injects an iframe to render the CSP in CLS through that iframe, but I'm still not happy. I need to know if there is any way to include this CSP using some specific resource for this.

0
0 0
Question Yone Moreno · Nov 22, 2023

Hello,

First of all thanks for your help.

We have the following scenario: some responses include special characters as ">" and "<" which are being put inside a property defined as:

Property PACPROBLEMAS As %String(MAXLEN = "", XMLNAME = "PAC_PROBLEMAS");

So then, when we observe the LOG SOAP it shows that the Target System replies to the ESB as follows:

➡️ <PAC_PROBLEMAS>46807#278.01#OBESIDAD INFANTIL GRAVE     ( Z-SCORE IMC &gt;2,70 ) #19/09/2019##N#</PAC_PROBLEMAS>

4
0 745
Question Bransen Smith · Apr 23, 2024

I am attempting to configure an inbound service that utilizes the EnsLib.SOAP.GenericService class. This service receives HL7-v3 content wrapped in SOAP requests. Despite reading the documentation on configuring SOAP services, I am still confused.

In my current configuration item "Fr_Centrak_RTLS", I have ‘Enable Standard Requests’ checked, ‘Pool Size’ set to 0, and the port is unspecified.

I have also configured a web application with the following details:

0
0 374
Article Rob Tweed · Apr 30, 2024 3m read

A few weeks ago I posted an announcement about a JavaScript-based interface for our mg_web WebServer interfacing addon module.  mg_web isn't just restricted to use by JavaScript developers though.  Many readers will be ObjectScript developers who are more used to using CSP as their web gateway.  Some may even have much older legacy WebLink-based applications (and be wondering how to support them given that IRIS does not support WebLink).

This article aims to provide some more information on mg_web and to explain why it's worth a look for ObjectScript developers.

0
0 306
Question Colin Gadumer · Apr 2, 2024

I'm currently fighting with SoapUI to get the HS WSDLs imported.

My first issue is, the IRISUsername and IRISPassword parameters don't seem to work.

i've tried the following url:

https://ifwap0661.ad.klinik.xxxyyy.de/ucrdev/csp/healthshare/hsreposito…

result:
Error loading: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: The entity name must immediately follow the '&' in the entity reference.   

not entirely sure what is happening here.

0
0 160
Article Hiroshi Sato · Apr 4, 2024 1m read

InterSystems FAQ rubric

The Web/CSP Gateway management page is typically configured so that it cannot be accessed from client machines.

To access from any client, do the following:

  1. Launch a browser from a system with access to the Web/CSP Gateway management page and access the Management Portal.
  2. Under Management Portal > System Administration > Configuration > click CSP Gateway Management.
  3. Click Default Parameters that appear in the left pane of the page that appears.
  4. Enter *.*.*.* in the system management machine and press the Save Settings button.
0
0 262
Question Yone Moreno · Feb 1, 2024

Hello,

First of all thanks for your time, and thanks for your help.

We have the following doubt: how HTTP status is being replied from a SOAP Service to the Outbund System?

Where in HealtShare 2020's classes is being replied an HTTP/200 OK or an HTTP/500 or any SOAP HTTP status code?

We ask this because some outbound systems do need to have an HTTP 200 to being able to process our SOAP responses.

We have been examining the following classes:

EnsLib.SOAP.Service

%SOAP.WebService

%SOAP.WebBase

We have also read:

0
0 255
Question Kurro Lopez · Feb 12, 2024

Hi all,

As you know, it is very complicated to debug a Business Service Rest API because the object is created when the applications receive a request, so we cannot have the JobId that we can use to debug.

https://docs.intersystems.com/iris20211/csp/docbook/DocBook.UI.Page.cls…

So, I'm trying to get the JobId when the class is being created, write a trace in OnInit() method and write the JobId in a log info

Method OnInit() As%Status
{
	$$$LOGINFO("JobId: "_$JOB)
	hang20breakQuit..OnInit()
}
0
0 215
Article Yuri Marx · Jan 29, 2024 12m read

The %CSP.Login class is the utility class provided by InterSystems IRIS to do custom login pages. If you want to control your IRIS application authentication UI, you must extend %CSP.Login and override some methods according to your needs. This article is going to detail those methods and what you can do with them. In addition to that, you will get an explanation of the delegated authentication mechanism provided by ZAUTHENTICATE.mac routine. Ultimately, you will be able to create customized authentication logic, including the ability to validate existing users in other non-IRIS data

0
0 721
Question Yone Moreno · Jan 22, 2024

Good morning,

First of all thanks for reading this question.

We have been asked by a client to check if our Soap Service has charset / encoding "UTF-8".

We have been investigating the class "EnsLib.SOAP.InboundAdapter".

We only observe one reference to the charset as "Set tCT=$S(tCST:"binary/CST; charset=UTF-8"

Inside the method: WriteResp

We have read:

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…

2
0 193
Question Kevin B Lavallee · Sep 30, 2022

Hello,

I am trying to use the %ToJSON method on my dynamic object, calling it with a "DO" and not passing in outstrm parameter.

We are trying to avoid MAXSTRING errors that we get with some of our abnormally large messages.  In order to do this, I am trying to update my code to not call the socket's "Write" method after converting the dynamic object to a JSON string using the %ToString method's output.  Per the documentation on the %ToJSON method:
    If outstrm is not specified and the method is called via DO, the JSON string is written to the current output device

10
0 384
Discussion Stefan Cronje · Dec 15, 2023

Hi all,

The last time I used CSP was back in 2008, so I am very rusty on it.
This question might have been asked many times, and the answer probably is that it is a matter of preference.

Are there scenarios to which CSP pages is easier/better to use than classes extending from %CSP.Page?
I want to build a little thing and don't want to start at the wrong end.
Doing an API-based, heavy client-side framework is not a requirement, and I would prefer not to do it that way.

Some of the criteria

4
0 332
Question Mark Scicluna · Jan 3, 2024

I wish to retrieve data from a cache table and then chart the results using javascript/chart.js.  I have had numerous iterations of the code attempting to do this (none of which worked) and my latest iteration is shown below.  

<html>
<head>
   <title>Cache Server Page</title>


   <!-- Include the Chart.js library -->
   <script src="chart.umd.min.js"></script>
   
<csp:SQLQUERY NAME='resultSet' P1='A'>
select Value, StatsDate from Stats 
</csp:SQLQUERY>


<script LANGUAGE="JavaScript">
// Initialize arrays to store data
var xValues [];
var yValues [];
</script>

<csp:WHILE CONDITION="resultSet.Next()">     

8
0 315
Question Yone Moreno · Nov 24, 2023

Hello,

First of all thanks for your time, thoughts, teaching and help:

We wonder how could we get the metrics from http://[Ip]:[Port]/api/monitor/metrics and use them in Kibana to chart statistics.

We would like to ask you how do you use the api monitor metrics, and as a second question, how would you suggest to utilize them in a third party software as Kibana to chart them.
 

We have thought to do the following:

0
1 175
Question Yone Moreno · Nov 20, 2023

Hello,

First of all thanks for your time reading this doubt.

We have discovered the following behaviour. Inside a Router we have a roule which needs to filter out the ADT_A08 messages which have not OBXs.

The legacy system had this rule implemented:

(((Document.{OBX(1).SetIDOBX}<"1")||((Document.{EVN:EventReasonCode}!="COD")&&(Document.{EVN:EventReasonCode}!="FIN")))

However we have tested it and it does not filter out the ADT_A08 messages.

Is there any way to express inside a Rule, that we need to discard ADT_A08 messages which have not OBXs?

5
0 222
Article Mihoko Iijima · Nov 2, 2023 3m read

InterSystems FAQ rubric

For routines (*.mac)

You can hide the source by exporting/importing only the *.obj that is generated after compiling the source program.

The command execution example specifies EX1Sample.obj and EX2Sample.obj, which are generated by compiling EX1Sample.mac and EX2Sample.mac, as export targets and exports them to the second argument file.

After moving to another namespace, I am using the exported XML file to perform the import.

1
0 597
Article Mihoko Iijima · Sep 21, 2023 1m read

InterSystems FAQ rubric

The meaning of each timeout value is as follows.

1. [Server response timeout]

If IRIS/Caché processing (routine or query execution) does not finish within this set time, the browser will return an error.

For example, if this value is 60 seconds and it takes 90 seconds to execute a routine/method/query, an error will occur.

2. [Queued request timeout]

For each IRIS/Caché server configured in CSP/REST, you can limit the number of processes that can run CSP/REST concurrently.

2
0 505
Question Pedro Lopes · Aug 31, 2023

The program below works perfectly when I call it directly from the Terminal, however when I call it from within a CSP it does not work (It does not do the SELECT).

In the USER namespace, the program works both in the Terminal and on the CSP , but in another namespace it only works when called directly in the Terminal.

PropList(class) ;
 k pl S c=0 s class="'"_class_"'"
 K ^PropList s ^PropList=class
 S lista=$SYSTEM.SQL.Execute("SELECT * FROM Projet.GerePageCSP")
 while lista.%Next() {
 S c=c+1,pl(c)=lista.%Get("NomdePage")
 S ^PropList(c)=pl(c)
 }
 Q

________________________ CSP _______________________

4
0 281
Question Sandeep K C · Aug 23, 2023

Hi Guys,

For Login in CSP application, I am displaying custom Login page which is rendered from subclass CSS.CSP.Login that extends %CSP.Login, and also got IBA.CSP.Page that extends %CSP.Page with overridden method OnPreHTTP(). This setup is working perfectly for normal login.  

When I define Invalid login limit and enable Disable account if login limit reached in System > Security Management > System-wide Security Parameters, the users get disabled after certain invalid login attempts.

4
0 386
Question Sandeep K C · Aug 22, 2023

Hi guys,

In Cache CSP application, I have enabled Password expiration days to certain days in System > Security Management > System-wide Security Parameters. When password expires for the users and they try to login the login page takes to standard cache password change page. 

Is there anyway I can display my overridden page instead of standard cache password change page? 

Reason to display my own page:  I needed to break down the UserName, for eg: UserName into CompanyID - IBA and User ID - san.

2
0 191
Question Sakthivel Perumal · Aug 16, 2023

I have a webpage in CSP in which there is a link to download files (files are located in specific folder). When the user clicks on the link , it has to download the file into their local machine. Attached code for both upload and download the file from server, upload is working and download is printing the file in webpage rather than downloading it. Appreciate your help.

Upload (Working fine): 

4
0 415
Article Robert Cemper · Aug 17, 2023 1m read

Inspired by a Question from @Evgeny Shvarov and a Reply from @Ashok Kumar T
I have created a base for Global download as XML file

How to use:
 
just call the page like http://<your_server>/csp/samples2/dc.Gdown.cls?GBL=global_name

gbl-name  without the initial ^ (caret)
The output has a default name <global_name>.XML  Your choice is available.

Known Limits:

  • you have to install it at your sourcing server
  • it is not tested/working across namespaces
  • there is no partial download
  • error handling is just basic or missing

There is space for personal improvements.
and this is it:

2
1 258
Article Megumi Kakechi · Aug 3, 2023 1m read

InterSystems FAQ rubric

You can set individual error pages for the following Web Gateway error messages/system responses:

  • server error
  • server busy
  • server unavailable
  • server timeout
  • connection closed

Settings are made on the Web Gateway Management screen ([Management Portal] > [System Administration] > [Configuration] > [Web Gateway Management] > [Configuration] > [Default Parameters]).

In the Error Page section of the Default Parameters menu, set the filename of the html page to display or the URL to redirect to when an error occurs.

  

0
1 334
Question Michael Davidovich · Jan 31, 2023

When manually coding REST services and using GET /api/mgmnt/v1/:namespace/spec/:application/ to return an OpenAPI spec, how do you specify supported properties (OpenAPI Properties in Use | Creating REST Services | InterSystems IRIS Data Platform 2021.1) like responses, definitions, and information in paths like summary and description?

GET /api/mgmnt/v1/:namespace/spec/:application/ | Creating REST Services | InterSystems IRIS Data Platform 2022.2

7
1 349
Question Eduard Lebedyuk · Jul 20, 2023

I have the following setup: REST broker calls inProc BO via BS. As BO initialization is time-consuming, I want to reuse the same BO during the CSP process lifetime.

I have tried the following approaches:

  1. Set %session.Preserve to 1 (I would prefer not to use it as the BO object is not linked to a specific client)
  2. Set $$$EnsInProcPersist to 1 (looked relevant)
  3. Cached BS between calls

However, every time I call my REST endpoint, I get a new BO. Is there a way to cache inProc BOs in the CSP context?

0
0 123