Article Ewan Whyte · Mar 19, 2024 3m read

Introduction

There is a Link Procedure Wizard option within the Management Portal (System > SQL >Wizards > Link Procedure) which I had reliability issues with so I decided to use this solution instead.

Problem

You need to query an external SQL database to use the response within a namespace. This guide is assuming that you already have a working stored procedure in SSMS although you could instead use a SQL block within the operation. Stored procedures in SSMS are preferred to maintain integrity, Embedded SQL can get very confusing if you have a complicated SQL statement.

0
0 405
Question Ewan Whyte · Aug 3, 2020

Hi, I want to INSERT a customerID and customerName to a table if the customerID does not exist. Or UPDATE if they've changed their name.
I've reviewed the documentation (https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=R…) and have confused myself with the INSERT OR UPDATE statement. Rather than using two individual statements , is there a way to get it in one?

What I have at the moment doesn't do anything. In fact it errors.

I intend to use this within a code block in a DTL.

3
0 588
Question Ewan Whyte · Jul 8, 2020

Hi,

I'm trying to ultimately create a function that I can use with HL7 messages that calls a stored procedure held on a SQL Server.

Initially I triedextending the function class to use the sql inbound adapter and/or EnsLib.SQL.Common, but this wouldn't work from the class method for the function.

Then I attempted to use the linked stored procedure using the wizard where it connected fine and I could find the sp but but it wouldn't return any data when ran. The test sp should just return an int.

The class document produced is this.

5
0 1217
Question Ewan Whyte · Jun 22, 2020

Hi, I have a timestamp of 201906192359 with a HL7 and I need to add a minute to it to get 201906200000. Is there an easy way within Healthshare to do this?

It seems easy enough within SQL but I cannot get the SQL to work within Healthshare,  this is what I have for SQL which does the job in SQL Server.

 SELECT REPLACE(REPLACE(REPLACE(CONVERT(CHAR(16),DATEADD(mi,1,STUFF(STUFF(@test,11,0,':'),9,0,' ')),120),'-',''),' ',''),':','');

Within Healthshare I've tried to use this SQL to populate a :dateout variable using this code but it isn't updating :dateout. (datein: = 201906192359)

3
0 374
Question Ewan Whyte · Jun 29, 2018

I'm trying to add an Operation to store DICOM files but each time I add a Operation using the class EnsLib.DICOM.Operation.TCP it reverts into Services and I cannot work out why this is happening. I've tried following the guide online (link at the bottom) but the Operation still reverts to a Service.

Any pointers would be appreciated,

Thank you.

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…

1
0 375
Question Ewan Whyte · Feb 21, 2018

I'm trying to get a count of specific message type with a specific entry and thought I could build the query in Message Viewer but  this does not provide counts (as far as I am aware). So when I take the SQL from 'Show Query' it omits the segment criteria as the code shows below. 

 I have attached the criteria that has been excluded. Is this possible?

Thank you

2
0 1599
Question Ewan Whyte · Dec 4, 2017

I have a HL7 schema listed within Healthshare that is marked as 'Standard' however this doesn't appear to not a standard schema and more of a custom one created (there are very specific Z segments within it) that has somehow been marked as a standard. Is there a way to change it from a Standard to Custom? I realise that this cannot be completed within Healthshare but is there a way to change this within Studio?

Thanks

1
0 349