Question
· Jul 17, 2018
Cache Dynamic SQL Pagination

Would like to know if there is an alternative or better way to paginate through a dataset using dynamic SQL than what I am using below. The problem is that as the potential pool of data gets larger, this code slows down to the point of not being useable. In analyzing each line of code below, it appears the slow down is related to the initial rset.%Next() iteration. Is there anything available which does not require a subquery/%VID such as a simple LIMIT/OFFSET?

My code is similar to :

s sql=##class(%SQL.Statement).%New()

1 25
3 2.8K

Hello,

We wonder how could we send an HL7 message to a service to test it.

For example, we have a service, at localhost port 19111

We have tried to use SoapUI to send a REST POST request as follows:

At the event log we see the following trace:

Then, if we try with POSTMAN as follows:

0 3
0 2.7K

I'm trying to convert a CSV inbound to an HL7 MFN^M16 outbound. I know I'm using book information as the CSV but I don't think that matters. Please let me know if that's incorrect.

My service is reading the file in just fine and when I don't have a DLT transformer the raw message passes through to outbound file folder just fine. However, when I include a basic DLT that simply copies a couple of fields over I get the "Ens.StreamContainer" error. Everything also seems to be good in the Record Mapper.

0 4
0 2.7K
Question
· Sep 8, 2016
Cache for Raspberry Pi?

Some may think it's a strange / daft idea, but just today the Raspberry Pi folks have announced that they've now sold more than 10 million of them..and counting. That's a huge potential marketplace, and a great platform for getting people to hear about Cache and try it out. Given its focus on the education sector, another great way of getting heard about.

5 18
0 2.7K
Question
· Oct 12, 2019
How do you search with REST

The question is pretty much in title. I'm developing a REST API, it has a search endpoint with 10 optional parameters. How do I pass them and stay RESTFul?

To ease the question a bit let's agree that:

  • all parameters are AND parameters, user can't make combos, ORs, etc. User can only provide values
  • all values are integers so I don't have to think about URL limits
  • all values are atomic
  • all conditions are about equivalency

Some options I know of:

1. URL parameters.

0 9
0 2.6K
Question
· Apr 11, 2017
Authentication with REST

We are building a bunch of rest based services using Ens 2016.2 to serve our browser based application (Angular 4).

Two questions:

1. The initial authentication seems only work if credentials are placed in the url parameters. Trying to use the Authorization header instead, the client code immediately complains about Access-Control-Allow-Origin. How can I resolve this?

2. After initial authentication, what is the proper way to send subsequent rest calls without having to include credential every time?

2 7
0 2.6K

Hi, Is there a way to count the number of segments in a HL7 Mesage? I tried the examples from the other answers but nothing works for me.

I am writing a function to get the last OBX segment field value 5. Below is a sample screenshot of what I want.

The number of obx segments can change, so I want to count the last obx segment and then get the field 5 value.

Would appreciate some guidance on this.

0 10
0 2.6K
Question
· Apr 1, 2017
XML to Json conversion

Hello,

Are there any utilities/api in HealthConnect 2016.2.1 that will allow conversion of XML virtual document to Json format? We were thinking to convert HL7 ADT message to XML via Ensemble DTL and then send it to another BP to convert to Json format for transmission via Web Services. To my understanding there isn't anyway to represent Json as a virtual object so it can be use for direct mapping of HL7 2.x message to Json via Ensemble DTL.

Thanks

Yuriy

0 3
0 2.6K

Is there an easy way to open classes in VS Code?

In studio you go open and just type the class name and it opens up the class.

In VS Code need to know the full path, is there a quick way? It is probably the one thing preventing from using VSCode full time (apart from not seeing the .luts or csp files)

0 15
0 2.6K

Hi All -

I was wondering if the below query could be enhanced to automatically look back 24 hours from the current datetime the query is run. As is now I, of course, have to update the date range in the WHERE clause manually.

The query is just getting all MessageBodyClassNames, counting them and then doing an AVG on TimeCreated and TimeProcessed. Nothing too complex.

SELECT MessageBodyClassName, count(ID) as Count_Of_Messages, avg(datediff(ss, TimeCreated, TimeProcessed)) as avg_processing_time_in_seconds

FROM %PARALLEL Ens.MessageHeader

0 1
1 2.6K
Question
· Aug 16, 2017
PROTECT error

I try to run below two statements

Set tRS = ##class(%ResultSet).%New("%Dictionary.ClassDefinition:SubclassOf")
​set tSC = tRS.Execute("%Persistent")

and I always get <PROTECT>check+5^%Dictionary.ClassDefinitionQuery.1

The login user is _SYSTEM and should have all the permissions.

I cannot run queries in the $SYSTEM.SQL.Shell(). I would get <PROTECT>%GenerateMetadata+16^%SQL.StatementMetadata.1

However, when I run the query through SMP, everything is fine.

Any idea where could I start to investigate ?

Thanks.

1 5
0 2.5K
Question
· Dec 17, 2018
Adding fault to a wsdl

Hi,

The fault message definition is missing from my service WSDL. I would like to add these bold styled text to my WSDL. How can I do that? The aim is when I get the WSDL of MyService with ?wsdl URL the response contains the bold styled text.

For example:

0 3
0 2.5K
Question
· Mar 22, 2017
Unable to sFTP to vendor

We have many sFTP business operations that work successfully. I just modified an existing one to point to a new IP and Port, as well as use new credentials (username and password only). When I attempt to sFTP a file, I receive the following error.

0 5
0 2.5K
404 Not Found

{
"error": {
 "errors": [
  {
   "domain": "global",
   "reason": "notFound",
   "message": "Not Found"
  }
 ],
 "code": 404,
 "message": "Not Found"
 }
}

I want to do something like the above sample from a Google Storage JSON API. I have a call to Write obj.%ToJSON() followed by return ..ReportHttpStatusCode(..#HTTP404NOTFOUND) however the HTTP Status code is always 200. If I remove the Write obj.%ToJSON() statement it returns a 404 status with no body. How do I return both?

0 1
0 2.5K