Question Manikandasubramani S · Feb 12, 2019

Hi All,

I am trying to get JSON data from a REST api.  I am using my web browser to get the data by hitting the URL.

The data is receiving properly, but the JSON contains a few HTML tags.

These tags are not not receiving in the browser while hitting the url. Is there any way to overcome this issue ?

Thanks,

2
1 578
InterSystems Official Thomas Carroll · Feb 14, 2019

Breaking news!

InterSystems just announced the availability of the InterSystems IRIS for Health™ Data Platform across the Amazon Web ServicesGoogle Cloud, and Microsoft Azure marketplaces.

With access to InterSystems unified data platform on all three major cloud providers, developers and customers have flexibility to rapidly build and scale the digital applications driving the future of care on the platform of their choice. 

To learn more please follow this link

0
0 597
Question Sergio Vidal · Feb 14, 2019

Hi

I'm trying to send a request to a REST API Service.

I'm using this code (Adapter is "EnsLib.HTTP.OutboundAdapter")

Method Put(pRequest As SIGE.Grupo.BO.Operation.putRequest, Output pResponse As SIGE.Grupo.BO.Operation.putResponse) As %Status
{
set tSC = $$$OK
try
{

     set tFormVar="Content-Type,apikey"
     set tContent="application/json"
     set tApiKey="somekey"


     Set tOut=##class(%IO.StringStream).%New()
     set tSC= ..ObjectToJSONStream(pRequest,.tOut)


     Set tSC=..Adapter.Put(.tHttpResponse,tFormVar,tContent,tApiKey,tOut.Data)
    
If $$$ISERR(tSC)&&$IsObject(tHttpResponse)&&$IsObject(HiI'm trying to send a request to a REST API Service.I'm using this code (Adapter is  "EnsLib.HTTP.OutboundAdapter") Method Put(pRequest As SIGE.Grupo.BO.Operation.putRequest, Output pResponse As SIGE.Grupo.BO.Operation.putResponse) As %Status{set tSC = $$$OKtry{      set tFormVar="Content-Type,apikey"     set tContent="application/json"     set tApiKey="somekey"     Set tOut=##class(%IO.StringStream).%New()     set tSC= ..ObjectToJSONStream(pRequest,.tOut)      Set tSC=..Adapter.Put(.tHttpResponse,tFormVar,tContent,tApiKey,tOut.Data)    If

1
0 1074
Question Thembelani Mlalazi · Feb 14, 2019

Is there a way or can it be done to use conditional logic in sql like so

 Query Q1(formal as %String) As %SQLQuery [ Final ]
{
    
    SELECT patientnumber,ID, CASE
    WHEN ID = 50 THEN "The is 50"
    WHEN ID = 30 THEN "This is 30"
    ELSE "The quantity is under 30"
END FROM Audit.Table WHERE ID = :formal AND EndDate is null} 

}

2
0 418
Question Thiago Zenaro · Oct 30, 2018

Hi community.

I'm trying to create a "setup" method to be called on a batch script but i'm getting the error <INVALID ARGUMENT> when I pass a string as an argument to this method.

The idea is to call the method with a folder as the parameter, for example:

##class(test.MyClass).MyMethod("D:\path\to\my\file.json")
 

My class (just for example)

Class test.MyClass

{
ClassMethod MyMethod(pFilePath)
{
Write pFilePath ,!
}
}

I'm using cmd as follows:

D:\>csession CACHE20172 -U %SYS ##class(test.MyClass).MyMethod(100)
100

If I use a number, It works, but any string value I get the error

Hi community.I'm trying to create a "setup" method to be called on a batch script but i'm getting the error <INVALID ARGUMENT> when I pass a string as an argument to this method.The idea is to call the method with a folder as the parameter, for example:##class(test.MyClass).MyMethod("D:\path\to\my\file.json") My class (just for example)Class test.MyClass{ClassMethod MyMethod(pFilePath){Write pFilePath ,!}}I'm using cmd as follows:D:\>csession CACHE20172 -U %SYS ##class(test.MyClass).MyMethod(100)100If I use a number, It works, but any string value I get the errorD:\>csession CACHE20172 -U

7
0 1204
Question Nicki Vallentgoed · Jun 2, 2017

I've been wondering about some code that I have come across a lot over the years.

Let's assume I have class Cinema and class Film.
Conceptually the data in these classes are never really physically deleted but only flagged as such, due to business requirements.

What I find is that developers tend to create a 3rd class "CinemaFilms", in a child relationship to parent Cinema, with a reference to Film. Rather than a one-to-many between Cinema and Film. 

Class CinemaFilms
{

Relationship cinema As Cinema [ Cardinality = parent, Inverse = Films];
Property film As Film;
}

I've been wondering about some code that I have come across a lot over the years.Let's assume I have class Cinema and class Film.Conceptually the data in these classes are never really physically deleted but only flagged as such, due to business requirements.What I find is that developers tend to create a 3rd class "CinemaFilms", in a child relationship to parent Cinema, with a reference to Film. Rather than a one-to-many between Cinema and Film.

5
1 1489
Question Scott Roth · Feb 13, 2019

I am trying to read in a data file via a Record Map and I am getting the following error...

ERROR #7201: Datatype value '030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_B452' length longer than MAXLEN allowed of 50 > ERROR #5802: Datatype validation failed on property 'osuwmc.MatSys.DataStructures.MatSysIVT.Record:Bin', with value equal to "030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_B452"

I am trying to read in a data file via a Record Map and I am getting the following error...ERROR #7201: Datatype value '030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_B452' length longer than MAXLEN allowed of 50 > ERROR #5802: Datatype validation failed on property 'osuwmc.MatSys.DataStructures.MatSysIVT.Record:Bin', with value equal to "030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_030121_B452"The field in question has a MAXLEN = 5000 see

1
0 719
Question Sergio Martinez · Feb 12, 2019

Suppose we need to store millions of values temporarily, that means, we don't care about them if we lose them but our application use them to get realtime information. Should I use Cachetemp or whatever other DB without journaling enabled? If answer is Cachetemp, shouldn't be a problem if we decide to scale using App Server + ECP? I'm not sure what would happen with the app logic in such architecture as I guess I couldn't map and share cachetemp...

Any idea/suggestion?

5
0 1089
Question Rubens Silva · Aug 9, 2017

Hello.
I just noticed that whenever I parse a JSON using %FromJSON, it always return the property values as primary data types, including long strings.

Hello.I just noticed that whenever I parse a JSON using %FromJSON, it always return the property values as primary data types, including long strings.I did a quick stress test to measure it's capabilities and found out that characteristic,  this is something I needed to figure out beforehand  to implement my REST lib.What I concluded is that %Dynamic depends solely on volatile storage?

8
2 3164
Question Thomas Kelleher · Dec 21, 2018

We have a Cache database in Azure, and want to expose it as an OData source (link).

My first attempt was to use Microsoft's Visual Studio 2017 and Entity Framework to create the data models...but it seems as if EF and Cache don't work together.  (I do have those instructions from 2013, but they don't work.  (See other post. Best answer seems to be "migrate to IRIS 2019.1.")  

Is there any other form of OData support?

1
0 753
Question Jiri Svoboda · Jan 20, 2019

Hi community,

I would like to ask how to correctly enforce SSL on all "developer traffic" -- that is Management portal and Studio connections -- on a Caché instance.

Given large developer permissions, I would like to eliminate all plaintext credentials on the wire.

Currently, we compile our own httpd with SSL support for Management portal, but this breaks Add-Ins for us, in particular the SOAP wizard. So I guess this is not the "canonical way".

Thanks for any suggestions

Jiri

12
0 827
Question Pravin Barton · Sep 6, 2018

I'm using Caché as an OAuth authorization server and I want to accept the password credentials grant type. I've found that if I make an authorize request, the Caché authorization server requires some URL parameters that shouldn't be required in password grant (redirect_uri, state, scope, and response_type). If I include these parameters, it calls my DirectLogin() method instead of just calling ValidateUser() as I would expect from the docs. I have two questions:

1. Why does the authorize request fail without these additional parameters?

I'm using Caché as an OAuth authorization server and I want to accept the password credentials grant type. I've found that if I make an authorize request, the Caché authorization server requires some URL parameters that shouldn't be required in password grant (redirect_uri, state, scope, and response_type). If I include these parameters, it calls my DirectLogin() method instead of just calling ValidateUser() as I would expect from the docs. I have two questions:1. Why does the authorize request fail without these additional parameters?2.

3
1 779
Question Jimmy Christian · Feb 8, 2019

Hello ,

I have a class Method ClassMethod SearchOBXFlag(pSourceMsg As EnsLib.HL7.Message, Identifier As %String) As %String

How can i test this method from terminal or from portal or studio.  In Terminal i am not able to pass a HL7 message to the method since it terminates after segment terminator. It should be great if i can pass a local file with the hl7 message to the function instead.

Any help will be appreciated how to pass a hl7 message to this function inorder to test.

Thanks

Jimmy Christian.

6
0 649
Article Robert Cemper · Feb 8, 2019 2m read

The Caché / Ensemble standard distribution contains in namespace SAMPLES
a nice example of a CSP page consuming WebService as a Client.
I have modified it not only to display the replies but to feed them back into a Global.
I used the classic Hyperevent to achieve this. The replies end up as a log in global^WSREPLY.
When there is no input anymore the page closes and goes away.

There are 2 versions with visible and hidden display during operation.
dc.WSCSP.reverseVerbose.cls and dc.WSCSP.reverseHidden.cls

The message to send is simply passed as a hash after the CSP_URL. (Mind URL encoding!)

The Caché / Ensemble standard distribution contains in namespace SAMPLESa nice example of a CSP page consuming WebService as a Client.I have modified it not only to display the replies but to feed them back into a Global.I used the classic Hyperevent to achieve this. The replies end up as a log in global^WSREPLY.When there is no input anymore the page closes and goes away.There are 2 versions with visible and hidden display during operation.dc.WSCSP.reverseVerbose.cls and dc.WSCSP.reverseHidden.clsThe message to send is simply passed as a hash after the CSP_URL.

0
0 623
Article Robert Cemper · Feb 8, 2019 2m read

It will demonstrate the wide range that is openend by making use
of the power embedded in Node.js and its adapter to Caché, Ensemble, Health,..*
Node / JavaScript have wide reputation to work as a WebSocket client.
By using the Caché adapter it becomes easy to control it and to consume the results as a
Client for WebSocket Servers and to collect the replies in Caché, Ensemble, ..

I used node-v6.16.0-x64.msi and cache610.node as cache.node

You provide a Global for input:

It will demonstrate the wide range that is openend by making useof the power embedded in Node.js and its adapter to Caché, Ensemble, Health,..*Node / JavaScript have wide reputation to work as a WebSocket client.By using the Caché adapter it becomes easy to control it and to consume the results as aClient for WebSocket Servers and to collect the replies in Caché, Ensemble, ..I used node-v6.16.0-x64.msi and cache610.node as cache.nodeYou provide a Global for input: ^WsockIn="wss://ws.postman-echo.com/raw"
 ^WsockIn(0)=6
 ^WsockIn(1)="Hello"
 ^WsockIn(2)="World !"
 ^WsockIn(3)="Robert"
0
1 955
Question Jimmy Christian · Feb 8, 2019

Hello,

I have a Rule Class which receives the HL7 message and sends it to the concerned target based on the condition.

/// 
Class XYZ Extends Ens.Rule.Definition [ CompileAfter = CUSTOM.Util.Rules.FunctionSet ]
{
Parameter RuleAssistClass = "EnsLib.HL7.MsgRouter.RuleAssist";
XData RuleDefinition [ XMLNamespace = "http://www.intersystems.com/rule]
{
<ruleDefinition alias="" context="EnsLib.HL7.MsgRouter.RoutingEngine" production="ABCProduction">
<ruleSet name="" effectiveBegin="" effectiveEnd="">
<rule name="">
<when condition="(SearchOBXFlag(Document,&quot;searchvalue&quot;))">
<send transform=Hello,I have a Rule Class which receives the HL7 message and sends it to the concerned target based on the condition.

4
0 737
Article Evgeny Shvarov · Oct 19, 2018 1m read

Hi!

Sometimes you need to put formatted ObjectScript in a post.

To do that put the code into the editor, select it and click on ObjectScript button.

Once you save/preview the post the code will be highlighted as ObjectScript.

See the gif:

If you use Markdown editor, you can highlight ObjectScript if you place the code inside two tags: <pre><code> .... your code... </code></pre>

1
0 476
Question Laura Cavanaugh · Feb 5, 2019

Our development server is set up to automatically keep the .INT code of compiled classes and routines, but the live servers are set to not keep the .INT code.

I know how to set the system to keep this code ($SYSTEM.OBJ.SetQualifiers() ?)  but what are the ramifications of keeping this code on the live servers?  Is it just a space issue?  I always thought it was to keep the code more private.

Our development server is set up to automatically keep the .INT code of compiled classes and routines, but the live servers are set to not keep the .INT code.I know how to set the system to keep this code ($SYSTEM.OBJ.SetQualifiers() ?)  but what are the ramifications of keeping this code on the live servers?  Is it just a space issue?

4
0 713
Question Rodolfo Santos · Jan 2, 2019

Hello everyone,

I'm using Atelier 1.3. When we configure a server and use HTTP to connect, works fine. But when we activate the Secure connection option I get the Unregonized SSL message, plaintext connection?

Do I need to perform any configuration on my server so that Atelier can access a secure connection?

6
1 526
Question Lawrence Grace · Feb 5, 2019

Does Intersystems Ensemble support (for LGBTQ+) gender code "U" in Healtshare? Specifically for the clinical (or physician) viewer?

Test shows the gender code is consumed without error and stored, but the viewer does not present it except (as far as I can see) in the patient search drop-down.

The 2.3.1 HL7 ADT schema code table lists "U" as a supported option.

Would this require customization in the viewer code to support this?

3
0 511
Question Darin Kurth · Feb 5, 2019

I'm looking for options to create multiple DFT HL7 messages based on data contained in a ZCO segment in a single inbound DFT message.  I have the following ZCO segment:

ZCO|CCC^Charge Code|1306794,1071301,23510,1071424|MFCD^Charge Code|14232,3542|||||

In this example, I need to create a new DFT message based on the data contained in ZCO:2.  Each code needs to be in it's own DFT message and put in FT1:7.1.  The number of codes will vary for each inbound message, but each code will need to create its own outbound message to the client.
 

5
0 1432