Question Nicky Zhu · Nov 8, 2024

Hi guys,

Is it possible to apply business rule on a XML without Schema?

Say, I'm trying to make some business rules on FHIR XML payload. I transferred the XML stream as an EnsLib.EDI.XML.Document in a BPL and passed it to a General Business Rule.

Set context.xmlDocument = ##Class(EnsLib.EDI.XML.Document).ImportFromLibraryStream(##class(HS.SDA3.QuickStream).%OpenId(request.QuickStreamId))

I'm handling following XML document 

With this rule

Then I got stuck at visiting the elements in the XML.

I.e How may I evaluate the profile value?

Thanks。

0
0 0
Question Nicky Zhu · Jan 10, 2023

Hi guys,

Suppose I have a JSON string as below:

{"MessageID":"11111","save_date1":"2022-02-02 01:01:34","Sender_ID1":"esb","sent_date2":"1985-12-11 11:42:00"}

The two date variables are all formatted as ODBC date time, when I tried to import it to a %JSON.Adapter object, the date format was rejected as below

Error #9406:Unexpected format for value of field, save_date1, using class base mapping

Thus I'm trying to format all possible ODBC date time in the incoming JSON with Regular expression:

2
0 380
Question Nicky Zhu · Jun 10, 2022

Hi,guys

My client is using IRIS 2021.1 Interoperability and they want to highlight the sessions with unresolved(without resent and completed operations) errors so their maintenance team can have a list of unresolved sessions to check against.

When I'm working on it, it seems to be it is is difficult to decide whether a session have unresolved errors. For example,

2
0 426
Question Nicky Zhu · Apr 25, 2022

Hi guys,

How to find out the number of active connections (including SQL, http, tcp and all remote connections) of an IRIS instance? A core based license is used.

I've checked the document and find %SYS.ProcessQuery.

I'm currently using this sql:

select count(distinct Pid) From %SYS.ProcessQuery
where ClientIPAddress is not null
and ClientIPAddress <> '127.0.0.1'
and ClientIPAddress <> 'localhost'
and IsGhost = '0'

Is it accurate or do we have a better option?

Thanks in advance.

4
0 404
Question Nicky Zhu · Nov 3, 2021

Hi guys,

My client has a requirement to add a column of random numbers to the query result.

I wrote a function as below:

Class Utils.SqlUtility Extends %RegisteredObject
{

ClassMethod GetSomeNumber(intInput As %Integer) As %Integer [ SqlName = GetNumber, SqlProc ]
{
    Return $R(intInput)
}

}

But in the returned sql result, every row share the same value, as below,

SELECT Utils.GetNumber('456'),
ID, Citizenship, DOB, FirstName, Gender, IDNumber, LastName, PatientNumber, PhoneNumber
FROM CDR.Patient

How may I refactor the function or sql to make the random value really random on each of the rows?

Thanks.

6
0 1084
Question Nicky Zhu · Mar 17, 2021

Hi guys,

We are connecting to a 3rd party SOAP web service. The wsdl looks like below

Please notice that the portType was defined as /cvpService. 

Then when we are trying to use SOAP Wizard to generate a client for the service, we will encounter the following error which prevented the generation

It seems that '/cvpService'  can not be used as a valid class name (or even method name) thus the generation failed.

Thus I have 2 questions about the failure

3
0 359
Question Nicky Zhu · Jan 7, 2021

Hi guys,

In our clients environment, multiple sources will connect to one DB (all through JDBC connections) and perform various operations. Sometimes they found some data was deleted without  reason.  Thus they want some feature like SQL Server Database Audit Specifications that can log who at what time with which IP deleted data in a specific DB.

I've checked IRIS Audit but I didn't  find feature about  that . How can we audit and log  delete  of a known DB? The deletions might be performed by delete statament or truncate table stattement.

Thanks.

5
0 651
Question Nicky Zhu · Jun 19, 2020

Hi all,

I added an additional shard node to an existing shard by accident.

After the add, it can not be removed and query from the master shard now fails. I did not find any data  from shard master in the shard node.

How to recover it and remove the shard node from the shard master?

Thanks.

2
0 217
Question Nicky Zhu · Jan 4, 2019

Hi guys,

I have a customer trying to extract data from Hive. I've tried to use Data migration to migrate a table into IRIS with JDBC driver. But the migration task always fails as below

Then I tried to create a link table, the task fails too with the following error:

I've tried several ID combinations such as rowkey+userid, userid + datatime, the results are all errors caused by stream property. 

The source table are composed of only Hive string fields.I wonder how may I migrate Hive tables into IRIS. Thanks.

4
0 445
Question Nicky Zhu · Sep 3, 2018

Hi, guys,

I've written a DT for a partner which transfers a csv file into SDA3. 

I', using record map to gather data from a folder storing csv files and using the DT to tranfer the records into sda3 entities.

The followings are the codes of that DT:

Class POC.DT.CSV2SDA3 Extends Ens.DataTransformDTL [ DependsOn = (User.PhysicalExam.Record, POC.SDA.Container) ]

{

Parameter IGNOREMISSINGSOURCE = 1;

Parameter REPORTERRORS = 1;

Parameter TREATEMPTYREPEATINGFIELDASNULL = 0;

XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ]

{

1
0 409
Question Nicky Zhu · Jun 22, 2018

Hi folks,

One of my clients want to project a null property of a cache object to an empty XML element. Say, if we have a class:

Class Diabetes.BS.Message.LabReportMessage Extends Ens.Request
{

Property Report As %String;

Property IsRisky As %Boolean;

Property RiskValue As %String ;

}

If the instance of this class has a null RiskValue, after projection, they want the XML as following:

<LabReportMessage>
                <Report>Somestring</Report>
                <IsRisky>1</IsRisky>
                <RiskValue/>
 </LabReportMessage>

Is there any way we can do it? Thanks.

1
0 950
Question Nicky Zhu · Jun 4, 2018

Hi, guys,

One of my clients was required by the hospital to name their webservice operation as Action_Subject, ie. Get_PatientInfo

When I define the web method as "Get_PatientInfo" as below,

/// MyApp.MyService
Class MyApp.MyService Extends %SOAP.WebService [ ProcedureBlock ]
{

/// Name of the WebService.
Parameter SERVICENAME = "MyService";

/// TODO: change this to actual SOAP namespace.
/// SOAP Namespace for the WebService
Parameter NAMESPACE = "http://tempuri.org";

/// Namespaces of referenced classes will be used in the WSDL.
Parameter USECLASSNAMESPACES = 1;

4
0 734
Question Nicky Zhu · May 20, 2018

Hi guys, I'm helping one of our customer to use unattended install to standardize their deployment. I'm using Unattended Installation and Installation Manifest

Although I can use the combination to install HealthConnect and then create namespaces and DBs as they need, there are still several tasks that I did not find the solution yet. As following:

1. Configure mirrors

2. Set the directory to store journals

3. For a given Ensemble name space, configure the period length in purging messages.

4. Set up some scheduled tasks to PurgeErrorsAndLogs or PurgeAudit

7
0 611
Question Nicky Zhu · Oct 24, 2017

Hi guys,

I'm trying to immigrate some of my HealthInsight dashboards and pivot tables to another HS instance.

In some pivot tables, I defined them with a set of calculated dimensions defined in the analyzer, e.g as below:

Then when I exported the cubes and pivot tables in used to my new envirmonment. When I open my pivot tables again, the calculated dimensions are missing and hence my pivot tables no longer work:

Is there any way to export those calculated dimensions so that I can used them else where? 

6
0 494
Question Nicky Zhu · Jun 6, 2017

Hi, guys,

I'm working on zen report to display an examination report for a client.

They stored order information in several tables. Examination findings and diagnosis were recorded in a html page and codes of the page was stored in another table. We need to put them together in one single report.

So far we can only read the html codes from that table  which is a whole page since it start from label <html> and have <header>. We know that if we are using javascript we can display the page by assigning the codes to innerHtml property of an iframe object.

6
0 599