Article Istvan Hahn · Oct 20, 2016 6m read

This is a beginner’s guide to the design of a “MicroService” implemented in Ensemble. “MicroService” is a popular phrase these days which has a broad interpretation. My interpretation is: “MicroService” is a “NoSQL Service”. A what? The answer is in the article.

We learnt what the difference is between SQL and NoSQL databases. For me the difference is nearly the same between a SOA Web Service and a “MicroService”. I am going to explain it through an example.

Please note, that although this is a beginner’s guide, I assume deep technology knowledge on data modelling, RESTful services and Ensemble.

0
0 1054
Question Scott Beeson · Oct 18, 2016

This tells me that there is no timezone offset on this table/field:

Select TOP 1 GETDATE() as Now, TimeCreated FROM ens.messageheader ORDER BY TimeCreated DESC;
Now                 TimeCreated         
------------------- ------------------- 
2016-10-18 16:16:49 2016-10-18 16:16:31 

So why is TimeCreated in this resultset 4 hours less than OneMinuteAgo when I'm clearly requesting only records with a TimeCreated greater than OneMinuteAgo?

Select TOP 1 DATEADD(mi, -1, GETDATE()) as OneMinuteAgo, TimeCreated FROM ens.messageheader WHERE TimeCreated > DATEADD(mi, -1, GETDATE()) ORDER BY TimeCreated
13
0 917
Question Tirthankar Bachhar · Oct 20, 2016

Hi,

When we write unit test cases for cache object script code using %UnitTest.TestCase, what  is the best way to write code to identify code coverage?

So, let say my unit test case hit all 10 lines of code of a method for a given class. So, unit test coverage should be 100% for that. But, using line-by-line coverage [(%Monitor.System.LineByLine] getting wrong percentage, because it also includes code comment/documentation as part of code. So, practically we can not ever achieve 100% of code coverage by using this API.

I'm not sure, if am able to describe the problem properly here.

2
0 940
Question Chris Sanford · Oct 13, 2016

My organization has been tasked with parsing raw EDI 271 messages into JSON strings in order to feed a downstream application.  A few key details about the task:

  • The raw EDI 271 will be coming across as a standard format from a single outbound upstream system
  • The EDI 271 messages adhere to the 5010 standard
  • We do not need EVERY field from the EDI message, only a select number of fields.  However some of the fields we need (e.g. coverage details) are dynamic in size and will be variable in # of segments both on the EDI side as well as the receiving JSON side.
  • We will be looking to build
6
0 2773
Question Paul Riker · Oct 17, 2016

I have a persistent class where I am logging each CCDA I receive. I want to store all of the providers associated to that CCDA (many to one). In a relational database, I would have a child table with a foreign key to the primary table. I'm guessing the equivalent to Cache would be 

1. Create a custom class (ProviderList) with the properties I want to store.

2. Add the class as a property of my CCDA persistent class.

Property Providers as Array of ProviderList (SQLProjection = "table/column";

Am I on the right track?

4
0 615
Question Laura Cavanaugh · Oct 17, 2016

Hello community; this may seem odd, but I need to know if there's any way we could be using callin functions from a C application without knowing?  e.g. if other developers created some C programs that call in to Caché that we don't realize are running.  Is that possible?  If so, where would I look to see these programs?  Perhaps the server's task manager? 

Thanks --Laura

2
0 420
Article Jose Ruperez · Oct 13, 2016 1m read

Here you have an easy way to write and execute COS code from your unix scripts. This way one does not need to write routines or even open Studio or Atelier. It can be an option for simple and small actions for instance things like installation tasks or compiling.

See sample bash script (compile.sh) to compile classes:

#!/bin/bash
#####################################################################
# Script to compile classes
# $1 = NAMESPACE
# $2 = ClassName
#
# For example:
# ./compile.sh "SAMPLES" "Sample.Person" 
#####################################################################
2
0 996
Question Rich Taylor · Dec 14, 2015

I need to create a KPI similar to the  DeepSee.Model.KPIs.DemoTrendLines kpi in Samples.  This kpi supports a scorecard widget with a trend line.  It shows patient counts by city with a trend line of the count of patients over a decade.  What I want is to show the trend line based on the average allergy score ([Measures].[Avg Test Score]).  A pivot table query that shows the data I would want to base the trend line on is:

SELECT NON EMPTY [BirthD].[H1].[Decade].Members ON 0,
NON EMPTY [HomeD].[H1].[City].Members ON 1 
FROM [Patients] %FILTER [Measures].[Avg Test Score]

Has anyone done this?

3
0 406
Question Mack Altman · Oct 11, 2016

Would it be possible to include more lines, and maybe even replace line breaks with a space, to allow you to view the posts that are made more efficiently?

For example, I clicked on Caché and noticed that almost everyone began with "Hi", which ended up not really allowing you to review any of the posts before diving deeper.

4
0 264
Article Jose Ruperez · Oct 12, 2016 1m read

With a routine like this one, you can quickly calculate how many lines of code you are working with. And it is not only for routines, it works for classes because remember that classes generate routines !

Here you have the routine source code:

LinesOfCode ;
    new SQLCODE,tRoutine
    set tTotalLOC = 0
    &sql(DECLARE ROUTINES CURSOR FOR
     SELECT NAME 
FROM %Library.RoutineIndex 
WHERE TYPE = 'MAC'
ORDER BY NAME)
    &sql(OPEN ROUTINES)
    &sql(FETCH ROUTINES INTO :tRoutine)
    while (SQLCODE=0)
    {
        write !,$j($i(tCount),5),": ",tRoutine
        set tLOC =
4
0 913
InterSystems Official Steve Brunner · Oct 13, 2016

InterSystems is pleased to announce that Caché and Ensemble 2015.2.5 are now available as maintenance releases.

 

For a complete list of the corrections in 2015.2.5, please review the release notes.

 

Caché and Ensemble are available for the same platforms as 2015.2.4.  The complete set of supported platforms, including specific point releases and patches, is detailed in the Supported Platforms document.

 

The HealthShare team will announce availability of its products separately.

 

The build corresponding to this release is 2015.2.5.953.0

0
0 472
Question Scott Beeson · Oct 11, 2016

I have a list of about 100 MPI IDs that I would like to run a report on.  I want to list times that any data for these patients were accessed.  Currently in "Managed Reports" we have a "Disclosure Report" which I think was a custom development effort, but it is per-patient.

I have a SQL query for the ATNA log but I'm not confident in its accuracy, so I thought I'd reach out and see how other Information Exchange's might get this data.

7
0 587
Article Alexander Koblov · Oct 12, 2016 1m read

Interesting anecdote I want to share. Not 100% Caché related, but I hope it would be useful.

When CSP Gateway is configured on IIS, opening CSP Gateway Configuration page is prohibited by default -- as IIS blocks URLs with '/bin' in it.

In our documentation we advise to add <remove segment="bin" /> to applicationHost.config file. That is correct.

Recently I had problem when manual editing file Windows\System32\inetsrv\config\applicationHost.config has absolutely no effect on IIS.

Turned out (http://serverfault.com/a/599865) IIS was 64-bit and notepad++ that I used for editing was 32-bit.

So,

0
0 1073
Question david clifte · Sep 27, 2016

How to identify a patient of an encounter?

Doing the following query in Edge we are able to list the records of all patients.

I want select all records of a particular patient.

SELECT  top 10 * FROM HS_SDA3_Streamlet.Encounter 

13
0 897
Article Istvan Hahn · Oct 12, 2016 12m read

Beginner’s guide to RESTful Application Program Interface (API) design and documentation. Through the example you will learn some common pattern for RESTful API.

Before you read

You need to know

  • How to create RESTful web service in Ensemble
  • How to consume RESTful web service in Ensemble
  • How to pass service parameters
  • How to return service result

What is a Service API?

What is an Application Programming Interface?

0
2 3265