Tani Frankel · Feb 26, 2023 go to post

Indeed it is in the Location Header.

From the related FHIR docs:

The server returns a 201 Created HTTP status code, and SHALL also return a Location header which contains the new Logical Id and Version Id of the created resource version:

  Location: [base]/[type]/[id]/_history/[vid]

where [id] and [vid] are the newly created id and version id for the resource version. The Location header should be as specific as possible - if the server understands versioning, the version is included. If a server does not track versions, the Location header will just contain [base]/[type]/[id]. The Location MAY be an absolute or relative URL.

Tani Frankel · Feb 21, 2023 go to post

See the RESOURCE Class Parameter of a Zen page, see related Docs.

Then you can provide or not provide permissions on this Resource for your Role.
 

Tani Frankel · Feb 20, 2023 go to post

Thank you for the update Mark, happy it's working well for you.

And thank you for posing your question on the community so it could be helpful for other users in the future, to make the usage clearer for them.

By the way, you mention testing, so you might find this tool useful in this context.

Tani Frankel · Feb 19, 2023 go to post

We have also added support for conditional updates within a transaction Bundle in version 2022.3 (i.e. a PUT with a conditional reference). 

You can try it out there.

Tani Frankel · Feb 19, 2023 go to post

Hi Mark,

Indeed all you need to do with your class/es is extend it/them from the DeleteHelper class. No need to add your own %OnDelete() method (in fact that might interfere with the method generation).

From your comment I cannot tell clearly enough what exactly did not get deleted (or of course why).

Per your question, in general what you can expect to see, as per the example I provided, is that the %OnDelete method (label) gets generated in the generated routine (INT).

If you want you can elaborate a little further about the full structure of your classes (you mention PathologyResult and FreeTextLine, but then later also Location which is unclear how it is related), and data (you just mention some ID numbers, but not really who's who), including message header info, and what you see when you purge the data (messages).

(if you want you can even share the actual classes, if you would prefer, also privately).

Maybe then I can be of more assistance.

Tani Frankel · Jan 10, 2023 go to post

Dmitry, following up on @Eduard Lebedyuk's comment, and even though you seem to say IIS is not the cause, this does "smell" like an IIS-related configuration.

I suggest you look here in the IIS docs, and in this related thread.

This setting enables to provide custom error pages instead of the "raw" downstream original server error (to be friendlier to users, or to possibly hide sensitive error details).

Try turning this setting off and see if this helps (if Apache is also available for example you can attempt testing with it as well to compare results).

Tani Frankel · Dec 15, 2022 go to post

Following up on Shawn's response, these resources might also be helpful in the meantime, and perhaps for others -

"See how to use key features of the Healthcare Action Engine to set up real-time alerts for clinicians. In this exercise, you will build decision support, design a notification using a CDS Hooks card, and write a rule to deliver it."

[I believe the same comment Shawn mentioned about being required to be a HealthShare customer in order to access this content is relevant here as well.]

Tani Frankel · Dec 8, 2022 go to post

I know I'm late to the game, but a few notes I thought were worth mentioning in the context of the question and the discussion here -

1. Re using $sortbegin/$sortend - if you want to take this approach, there are dedicated methods on all %Persistent objects that do exactly this - %SortBegin() and %SortEnd(). Note you can use this per index (or for all) and you don't have to worry about the name of the global etc. So this should definitely be preferred IMHO.

By the way, if you are interested, you can see that the "behind-the-scenes" of %Populate's Populate() method uses this approach (a little advanced generator code...), as well as %SQLImportMgr's GenerateImportRoutine() method.

2. I don't know if this is relevant for your case, but also for the benefit of the wider community and other use-cases, when it comes to bulk/batch fast operations, if Java or .Net are relevant, then our XEP (eXtreme Event Processing) framework could be a good option. And there indeed you have control over when to perform the indexing.

3. I know the discussion was geared towards OOP and not SQL (and the SQL %NOINDEX option was mentioned more than once), depending on how the data is arriving, you might want to consider using the latest (SQL-based) LOAD (BULK) DATA capability.

4. Relating back to #2 above, re XEP. Behind the scenes the XEP access uses (in some cases) a server-side %SaveDirect() method. In theory you can use this yourself. Note it does not address the no indexing topic (again you can consider using #1 - %SortBegin() and %SortEnd() for that) but it has some other performance advantages as apposed to a regular %Save() (it also has some limitations...). Note there is quite an amount of "hassle" about "preparing" the data for this method, as it needs to be in the $ListBuild format the class's storage expects (and possibly other data nodes). Therefore it is quite rarely used directly (not via XEP). But if you have high performance needs, it might be worth considering this, and comparing the benefit it could provide you vs. the drawbacks it has.

Tani Frankel · Feb 9, 2022 go to post

Thanks Jeff!

This is an important update for our customers -

On one hand making them aware they now also have the CD releases as non-container kits, while on the other hand reminding them regarding the limitations of these kind of CD releases.

Tani Frankel · Dec 29, 2021 go to post

Working with Yakov on this, we saw that for SCOPE_IDENTITY() to work on the SQL Serve side it needs to be in the same "scope" of the INSERT (for example in the same Stored Procedure), see here for reference.

So what Yakov ended up doing was encapsulating the INSERT and SELECT SCOPE_IDENTITY() into a Stored Procedure which returns the newly inserted Row ID, and call the SP via the Adapter, thus inserting the new record and getting back the new ID.

Tani Frankel · Dec 28, 2021 go to post

Congratulation to all winners!

And especially to our local representative - @Yuval Golan!

Yuval last year you were 3rd place, and this year up to 2nd... Bravo! @Kevin An beware next year wink

Tani Frankel · Dec 20, 2021 go to post

Thanks Bob, yes, indeed JDBC/ODBC and using Couchbase's N1QL queries (and JSON results) is another connectivity option.

If someone "wrapped" such connectivity into some Adapter that could also be interesting.

Tani Frankel · Dec 11, 2021 go to post

I was able to get in, for example:

$ docker-ls tags --registry https://containers.intersystems.com intersystems/irishealth ...
requesting list . done
repository: intersystems/irishealth
tags:
- 2019.1.1.615.1
- 2020.1.0.217.1
- 2020.1.1.408.0
- 2020.2.0.211.0
- 2020.3.0.221.0
- 2020.4.0.547.0
- 2021.1.0.215.0
- 2021.2.0.617.0
Tani Frankel · Oct 28, 2021 go to post

Ok, Carig, so sorry about the superfluous explanation about the SQL Package to Schema name mapping...

But now I do understand the problem better -

First, as you realized you don't need the asterisk (*), just the name of the schema.

And second you need to use the term SCHEMA in your statement before the schema name, or else we expect a table name (hence the error you got - table ... not found).

So per the example I quoted originally above from the documentation:

GRANT SELECT ON SCHEMA Sample TO Deborah

In your example this would be:

GRANT SELECT ON SCHEMA MyPkg_Messages TO myRole

I just added the word 'SCHEMA' before the schema name.

Hope this will get it to work for you.

Tani Frankel · Oct 27, 2021 go to post

Hi Craig,

I'm not 100% sure this is the problem you are seeing (you might be aware of this already) - but worth a try - 

When you define an OO package name (and sub-packages) for your classes, these "project" to SQL Schema names a little differently, so instead of "dots" (.) in your full package name you would have underscores (_) in your schema name.

For example PackageA.PackageB.Class would be PackageA_PackageB.Class - so the schema name would be PackageA_PackageB (and not PackageA.PackageB).

See here for example about this in the Documentation.

Tani Frankel · Oct 21, 2021 go to post

Hi Craig,

Perhaps this could help -

From: https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_grant

You can use SCHEMA schema-name as the object-list value to grant the object-privilege to all of the tables, views, and stored procedures in the named schema, in the current namespace. For example, GRANT SELECT ON SCHEMA Sample TO Deborah grants this user SELECT privilege for all objects in the Sample schema. This includes all objects that will be defined in this schema in the future. You can specify multiple schemas as a comma-separated list; for example, GRANT SELECT ON SCHEMA Sample,Cinema TO Deborah grants SELECT privilege for all objects in both the Sample and the Cinema schemas.

Tani Frankel · Sep 2, 2021 go to post

I'm not sure if I fully understand your question Eduard, but the token itself, internally, is built by the original request's Message Header ID (and the Production name; concatenated with a pipe - |)

E.g., from the code (in Ens.Host):

Method GetDeferredResponseToken(pMessageHeader As Ens.MessageHeader) As %String
{
    Quit pMessageHeader.%Id()_"|"_$$$EnsRuntime("Name")
}

ClassMethod SendDeferredResponse(pDeferredResponseToken As %String, pResponse As %Library.Persistent) As %Status
{
    Set tSC=$$$OK
    Try {
        Set tMessageHeaderId=$p(pDeferredResponseToken,"|",1)
        Set tProductionName=$p(pDeferredResponseToken,"|",2)

Note this is of course internal implementation, and I don't think it is documented or supported (i.e. might change in future versions without notice).

Tani Frankel · Sep 2, 2021 go to post

Thanks for filling in the picture Michael.
So this seems to fit into the theory I had about the error indicating your SOAP client is not receiving the response it expected.

You can see the server (the SOAP service) you are turning to is running into an internal error (HTTP status 500) and you also have details about the error they ran into "javax.... " and their relevant stack.

I suggest, if it is possible, that you turn to the entity that is behind this service and report to them the error you are getting (makes sense also to share with them what you see in the log that you are sending to them).

And they might be able to help you.

Tani Frankel · Sep 1, 2021 go to post

Hi Michael,

It's a little difficult to tell just from the description you provided what the problem exactly is, but my guesstimate would be that it actually is not related to the encoding (UTF8 vs ISO-8859-1) of what you are sending, but something to do with the response you are getting back.

As the error you quoted mentions - "... returned response with unexpected...".

And specifically the error is complaining about the content-type being text/html where it should probably be expected to be (in the case of SOAP) xml.

So it looks like you provided an extract from the SOAP log - but of what was sent (Output) but not what was received back.

Maybe share that part and we'd be able to help a little more.

Tani Frankel · Aug 8, 2021 go to post

You can use (inside %SYS) Config.Namespaces:Get().

For example -

%SYS > set status = ##class(Config.Namespaces).Get("USER",.properties)

%SYS > zwrite properties
properties("Globals")="USER"
properties("Library")="CACHELIB"
properties("Routines")="USER"
properties("SysGlobals")="CACHESYS"
properties("SysRoutines")="CACHESYS"
properties("TempGlobals")="CACHETEMP"
%SYS > set dataDatabaseName = properties("Globals")

%SYS > write dataDatabaseName
USER
%SYS > set codeDatabaseName = properties("Routines")

%SYS > write codeDatabaseName
USER

Of course assuming you are coming from other namespace into %SYS, you can have the name of that namespace in a variable, and use that variable instead of "USER" in my example above.

If you want the actual directory/folder of the database you can also then use Config.Databases:Get(), for example:

%SYS > set status = ##class(Config.Databases).Get("USER",.properties)

%SYS > zwrite properties
properties("ClusterMountMode")=0
properties("Directory")="C:\InterSystems\IRIS\mgr\user\"
properties("MountAtStartup")=0
properties("MountRequired")=0
properties("Server")=""
properties("StreamLocation")=""

And if you want directly just the locations of the databases, and not their names, you could use %SYS.Namespace:GetAllNSInfo() (without having to move into %SYS first) as @Julius Kavay mentioned.

For example:

USER > do ##class(%SYS.Namespace).GetAllNSInfo("USER",.info)

USER > zwrite info
info("GlobalDB","Directory")="c:\intersystems\IRIS\mgr\user\"
info("GlobalDB","Mounted")=1
info("GlobalDB","ReadOnly")=0
info("GlobalDB","Resource")="%DB_USER"
info("GlobalDB","Status")=1
info("GlobalDB","System")=""
info("RoutineDB","Directory")="c:\intersystems\IRIS\mgr\user\"
info("RoutineDB","Mounted")=1
info("RoutineDB","ReadOnly")=0
info("RoutineDB","Resource")="%DB_USER"
info("RoutineDB","Status")=1
info("RoutineDB","System")=""