It has been a while since I had a similar issue, but I usually rebuild the indices from within the SQL portal which appears to be described in the link you provided under Building Indices with the Management Portal.
Off the top of my mind I'm not positive how to incorporate into your query, but I have achieved enormous performance improvements using %Parallel in sub queries so it may be worth a few simple 'show plan' tests. As mentioned above ensuring you have the proper indexes would be my first step here as well.
The HS.FHIR.REST.Handler class has the LogCSPRequest and LogCSPResponse methods which have examples of ISC Soap logging from within the code. It is easier to use the GUI as mentioned by Rich, but if you have enormous amounts of traffic this may be worth investigation.
Try using single quotes in your SQL query and also defining your column name:
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 As myValue FROM Audit.Table WHERE ID = :formal AND EndDate is null }
Try pasting the link in a browser. I am able to hit that link from my local laptop, but if your ensemble servers are locked down to certain IP's and ports than that could be the issue
Sending requests to an external application or API is generally handled by an operation. The beauty of selecting an operation to hit an external endpoint is the ease of use with the out of the box HTTP outbound adapter. Depending on your implementation the out of the box HTTP outbound adapter may suffice, but that is not always the case say for example if you need to GET a security token prior to the POST of the actual request you would like to send.
Extending the REST operation would be my first step, but only after successful response messages are received from the external endpoint by using your favorite SOAP test tool such as POSTMAN or SOAPUI. Once you have successful response messages from the external application or API you just have to mimic this request content within the code of the operation you would like to create. I recommend reaching out to your sales engineer or referring to this link: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...
Personally, I create and use an XXX_Dummy_Service as a generic inbound TCP/IP operation or business service. In order to grab the messages in question I simply query for them using interface explorer which offers a free 30 or maybe even 45 day trial. Anyway, using this API to interact with Ensemble is easier for me to filter down to resend only what I desire and is easy to resend to a different environment for testing purposes etc.
I implemented an excel export option for CCD activity dashboards many times. Here is the generic javascript that you can find all over the web:
$(document).ready(function () {
function exportTableToCSV($table, filename) {
var $rows = $table.find('tr:has(td)'),
// Temporary delimiter characters unlikely to be typed by keyboard // This is to avoid accidentally splitting the actual contents tmpColDelim = String.fromCharCode(11), // vertical tab character tmpRowDelim = String.fromCharCode(0), // null character
// actual delimiter characters for CSV format colDelim = '","', rowDelim = '"\r\n"',
// Grab text from table into CSV formatted string csv = '"' + $rows.map(function (i, row) { var $row = $(row), $cols = $row.find('td');
return $cols.map(function (j, col) { var $col = $(col), text = $col.text();
// This must be a hyperlink $(".export").on('click', function (event) { // CSV exportTableToCSV.apply(this, [$('# directactivitytable>table'), 'export.csv']);
// IF CSV, don't do event.preventDefault() or return false // We actually need this to be a typical hyperlink }); });
Here is the custom javascript where you need to reference your specific classes:
$(".submit").on('click', function (event) { var activitytable = #server(HIE.Test.CareConnect.Util.C5Dash.ActivityTable())#; $('#activitytable').html(activitytable); var inputBoxValue = $('#query').val(); var directactivitytable = #server(HIE.Test.CareConnect.Util.C5Dash.DirectActivityTable(inputBoxValue))#; $('#directactivitytable').html(directactivitytable); });
And finally the div tags for a given webpage could be as follows:
go to post
I believe you may be missing a counter variable which you could test by simply putting a 1 in the property shown in your first screenshot i.e.
target.{PID.PatientName(1).FamilyName}
Also, for ease of reading I generally convert the field names to the corresponding location so if desired the above could be
target.{PID.5(1).1}
I hope this helps.
go to post
This free guide is pretty great if you are asking for Postman help? https://community.getpostman.com/t/the-postman-cheatsheet-quick-reference-guide-2019/1054
My colleague @Sourabh.Sethi created a pretty great video on this subject yesterday which may also help: https://community.intersystems.com/post/new-coding-talk-informative-and-fast-web-api-objectscript-and-ensemblehealthshare
go to post
Hello. For a given production item name you can enable: Write ##class(Ens.Director).EnableConfigItem(Item.Name,1,0)
or disable: Write ##class(Ens.Director).EnableConfigItem(Item.Name,0,0)
Does that answer you question, Jimmy?
go to post
Yeah, that makes sense. I have yet to need to rebuild indices in a live environment, but good to know. Thanks!
go to post
It has been a while since I had a similar issue, but I usually rebuild the indices from within the SQL portal which appears to be described in the link you provided under Building Indices with the Management Portal.
go to post
In 2017 and above you can use %Parallel mentioned here: https://docs.intersystems.com/csp/docbook/DocBook.UI.Page.cls?KEY=GSQLOPT_optquery#GSQLOPT_optquery_parallel
Off the top of my mind I'm not positive how to incorporate into your query, but I have achieved enormous performance improvements using %Parallel in sub queries so it may be worth a few simple 'show plan' tests. As mentioned above ensuring you have the proper indexes would be my first step here as well.
go to post
The HS.FHIR.REST.Handler class has the LogCSPRequest and LogCSPResponse methods which have examples of ISC Soap logging from within the code. It is easier to use the GUI as mentioned by Rich, but if you have enormous amounts of traffic this may be worth investigation.
go to post
Try using single quotes in your SQL query and also defining your column name:
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
As myValue
FROM Audit.Table WHERE ID = :formal AND EndDate is null
}
go to post
Hi Jim - The business process expects the XML representation of the record which is completed by the business service.
In the example below Field1 and Field2 correspond to the field names assigned within the record map class:
<test>
<Record>
<Field1>XYZ00012345</Field1>
<Field2>ABC00012345</Field2>
</Record>
</test>
go to post
The CAST function has some examples that do not use embedded SQL: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...
go to post
Try pasting the link in a browser. I am able to hit that link from my local laptop, but if your ensemble servers are locked down to certain IP's and ports than that could be the issue
go to post
Sending requests to an external application or API is generally handled by an operation. The beauty of selecting an operation to hit an external endpoint is the ease of use with the out of the box HTTP outbound adapter. Depending on your implementation the out of the box HTTP outbound adapter may suffice, but that is not always the case say for example if you need to GET a security token prior to the POST of the actual request you would like to send.
Extending the REST operation would be my first step, but only after successful response messages are received from the external endpoint by using your favorite SOAP test tool such as POSTMAN or SOAPUI. Once you have successful response messages from the external application or API you just have to mimic this request content within the code of the operation you would like to create. I recommend reaching out to your sales engineer or referring to this link: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...
go to post
Personally, I create and use an XXX_Dummy_Service as a generic inbound TCP/IP operation or business service. In order to grab the messages in question I simply query for them using interface explorer which offers a free 30 or maybe even 45 day trial. Anyway, using this API to interact with Ensemble is easier for me to filter down to resend only what I desire and is easy to resend to a different environment for testing purposes etc.
go to post
I implemented an excel export option for CCD activity dashboards many times. Here is the generic javascript that you can find all over the web:
$(document).ready(function () {
function exportTableToCSV($table, filename) {
var $rows = $table.find('tr:has(td)'),
// Temporary delimiter characters unlikely to be typed by keyboard
// This is to avoid accidentally splitting the actual contents
tmpColDelim = String.fromCharCode(11), // vertical tab character
tmpRowDelim = String.fromCharCode(0), // null character
// actual delimiter characters for CSV format
colDelim = '","',
rowDelim = '"\r\n"',
// Grab text from table into CSV formatted string
csv = '"' + $rows.map(function (i, row) {
var $row = $(row),
$cols = $row.find('td');
return $cols.map(function (j, col) {
var $col = $(col),
text = $col.text();
return text.replace(/"/g, '""'); // escape double quotes
}).get().join(tmpColDelim);
}).get().join(tmpRowDelim)
.split(tmpRowDelim).join(rowDelim)
.split(tmpColDelim).join(colDelim) + '"',
// Data URI
csvData = 'data:application/csv;charset=utf-8,' + encodeURIComponent(csv);
$(this)
.attr({
'download': filename,
'href': csvData,
'target': '_blank'
});
}
// This must be a hyperlink directactivitytable>table'), 'export.csv']);
$(".export").on('click', function (event) {
// CSV
exportTableToCSV.apply(this, [$('#
// IF CSV, don't do event.preventDefault() or return false
// We actually need this to be a typical hyperlink
});
});
Here is the custom javascript where you need to reference your specific classes:
var activitytable = #server(HIE.Test.CareConnect.Util.C5Dash.ActivityTable())#;
$('#activitytable').html(activitytable);
var inputBoxValue = $('#query').val();
var directactivitytable = #server(HIE.Test.CareConnect.Util.C5Dash.DirectActivityTable(inputBoxValue))#;
$('#directactivitytable').html(directactivitytable);
});
And finally the div tags for a given webpage could be as follows:
<div class="uk-width-medium-1-1">
<hr class="uk-grid-divider">
<form class="uk-form" >
<p>
<a href="#" class="export">Export Table data into Excel</a>
</p>
</form>
<div class="uk-overflow-container">
<hr>
<div id="directactivitytable"></div>
</hr>
</div>
</hr>
</div>
</div>