Use Docker is not neccessary, Docker is just to deploy the code and test it, but I think that you can just follow the article to create and deploy your own REST service.
To receive REST call directly into a Business Service is not the most recommended because you can't apply any kind of access restriction to the service. What I always recommend is to create a web application managed by a class that extends from %CSP.Rest and resend the JSON received to the Business Service.
Well, I think that nothing has changed, maybe it's a different configuration of the browser or some other subjective circumstance, but I remember to have this situation with Ensemble for long time ago.
I was thinking to use the autosave as backup, not to overwrite the class that you are editing directly. In case that the date of the autosave is later than the date of modification of the class the system should offer to load the autosaved class.
Usually we are focused in new and more "interesting" functionalities of InterSystems products and we totally forget the daily work and how to make the life easier for the users with this type of details.
That's easy! You only need to add in your DTL an action with the following code:
Set matchFound = 0// Get count of OBR segmentsSet tOBXCnt = source.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp(*)")
// Loop through OBXs and evaluate field contentsFor tIter = 1:1:tOBXCnt
{
set nextIter = tIter+1if tIter < tOBXCnt
{
If ((source.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp("_tIter_").OBX:ObservationValue")["SEDATION:") &&
(source.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp("_nextIter_").OBX:ObservationValue")["Procedure"))
{
Set matchFound = 1
}
}
}
if (matchFound = 1)
{
do target.SetValueAt("28014-9","PIDgrpgrp(1).ORCgrp(1).OBR:UniversalServiceID.identifier")
}
ObjectScript
ObjectScript
As you can see, we keep the seach of the "SEDATION:" and "Procedure" strings and after that, if we find it in our source message, we just update the value of the specific field in the target.
As a former Java developer, my suggestion is not to use Enumerations, at the end that field is a common String, if you want to restrict the value of that column do it from the code, not from the database.
Hi @Gautam Rishi ! You can see a similar question here. You can try getting the metadata from the ResultSet or directly getting the ODBCTypes from a query.
go to post
This deserves an article @Alex Woodhead !
go to post
Use Docker is not neccessary, Docker is just to deploy the code and test it, but I think that you can just follow the article to create and deploy your own REST service.
go to post
To receive REST call directly into a Business Service is not the most recommended because you can't apply any kind of access restriction to the service. What I always recommend is to create a web application managed by a class that extends from %CSP.Rest and resend the JSON received to the Business Service.
You can see an example on this article:
https://community.intersystems.com/post/creating-rest-service-iris
go to post
Well, I think that nothing has changed, maybe it's a different configuration of the browser or some other subjective circumstance, but I remember to have this situation with Ensemble for long time ago.
go to post
What can I say...
go to post
Everybody loves Embedded Python!
go to post
And if you want to autostart the production:
set production = "Your.Production" set ^Ens.Configuration("csp","LastProduction") = production do ##class(Ens.Director).SetAutoStart(production)
go to post
Well, if your IRIS doesn't support Embedded Python you can do the following (if you are using a Linux Server):
$ZF(-100,"","magick","\usr\image.pdf","\usr\image.jpg")
go to post
Congratulations to the winners!
go to post
Take a look at the following documentation:
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
go to post
Here you can find a similar question from @Evgeny Shvarov
https://community.intersystems.com/post/how-can-i-change-production-sett...
go to post
I was thinking to use the autosave as backup, not to overwrite the class that you are editing directly. In case that the date of the autosave is later than the date of modification of the class the system should offer to load the autosaved class.
go to post
Adapt and run this query to check what are the ODBC types for your table from the SQL explorer:
SELECT colname,odbctype,isnullable,isreadonly FROM utility.statement_columns('SELECT Name,DOB,Home_City,Home_State from Sample.Person')
go to post
Indeed, Yone.
Usually we are focused in new and more "interesting" functionalities of InterSystems products and we totally forget the daily work and how to make the life easier for the users with this type of details.
go to post
I'm too lazy to update my Dockerfile!
go to post
That's easy! You only need to add in your DTL an action with the following code:
Set matchFound = 0 // Get count of OBR segments Set tOBXCnt = source.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp(*)") // Loop through OBXs and evaluate field contents For tIter = 1:1:tOBXCnt { set nextIter = tIter+1 if tIter < tOBXCnt { If ((source.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp("_tIter_").OBX:ObservationValue")["SEDATION:") && (source.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp("_nextIter_").OBX:ObservationValue")["Procedure")) { Set matchFound = 1 } } } if (matchFound = 1) { do target.SetValueAt("28014-9","PIDgrpgrp(1).ORCgrp(1).OBR:UniversalServiceID.identifier") }
As you can see, we keep the seach of the "SEDATION:" and "Procedure" strings and after that, if we find it in our source message, we just update the value of the specific field in the target.
go to post
As a former Java developer, my suggestion is not to use Enumerations, at the end that field is a common String, if you want to restrict the value of that column do it from the code, not from the database.
go to post
Hi @Gautam Rishi ! You can see a similar question here. You can try getting the metadata from the ResultSet or directly getting the ODBCTypes from a query.
go to post
Thank you @Robert Cemper for your more than generous evaluation of QuinielaML!
go to post
Hi @Prashant Singhal ! Please, read this interesting article to get the data type from a query:
https://community.intersystems.com/post/sql-statement-metadata