Enrico Parisi · Jun 16, 2024 go to post

Do you want to use SSL/TLS for incoming connection to IRIS (Ensemble) or want to use SSL/TLS for outgoing connections from IRIS (Ensemble) to other systems, possibly using some HTTP/SOAP/etc. adapter?

Please provide some detail.

Enrico Parisi · Jun 16, 2024 go to post

I agree, but that's not the scenario of the initial question!

I tried to address and provide a solution to the original question that it seems has some previous constraints imposed by the current design, not to argue of what it could have been done if....

Enrico Parisi · Jun 16, 2024 go to post

I'm not sure if this apply to your case but in the past we found that a very old database (20+ years) that has been upgraded many time over the years had bitmap indices "not compacted" and we gained a lot of space and, more importantly, huge performance improvement running %SYS.Maint.Bitmap documented here:

This utility is used to compact bitmap/bitslice indices. Over time in a volatile table (think lots of INSERTs and DELETEs) the storage for a bitmap index may become less efficient. To a lesser extent index value changes, i.e. UPDATES, can also degrade bitmap performance.

Enrico Parisi · Jun 16, 2024 go to post

So, this imply that the sample message published in the document "IHE Laboratory Technical Framework, Volume 2a (LAB TF-2a)" is actually an invalid message?

Enrico Parisi · Jun 16, 2024 go to post

I've used Object Script to update linked tables projected as IRIS/Caché classes, like in your sample, since very long time and it works.

As the error says, your issue is that some property/column cannot be set/modified, I'm pretty sure the same issue arise if you use SQL to update/insert the same column.

Without the table definition it's impossible to guess what's the field and why that column cannot be set.
Maybe some of the fields are part of the primary key that includes other fields that are not set?
Make sure that the table is properly linked, the link table wizard sometime need "guidance" on properly linking tables, particularly in defining primary keys...

Anyway, if properly linked, you can definitely treat/manage/manipulate linked tables the same way as native IRIS/Caché  classes.classes. 

Enrico Parisi · Jun 16, 2024 go to post

From a class that extends %CSP.Page you can include a CSP page using the Include() method inherited from %CSP.Page, like:

Do ..Include("TestInclude.csp")

This is what is actually generated when a csp page containing a CSP INCLUDE tag documented here is compiled, like:

Please note this is legacy (deprecated?).

Enrico Parisi · Jun 16, 2024 go to post

Another option is to use the %SYS.GlobalQuery_Size() class query documented here, it can be conveniently used from SQL like:

call %SYS.GlobalQuery_Size('c:\intersystems\iris\mgr\',,'*',1,,1)

It can be called from the portal SQL or any SQL odbc/jdbc client tool.

Enrico Parisi · Jun 16, 2024 go to post

Ciao Pietro,

as said %DynamicAbstractObject has excellent performance and can handle easily very large JSON streams/files.
Depending on your system settings, for large JSON you may need to accommodate process memory, fortunately you can adjust it in your code at runtime so you can write robust code that does not depend on system configuration parameters.
Note that the default value of "Maximum Per-Process Memory" has changed during time, so a new installation and an upgraded installation have different values.

IMHO the real question here is: in what side of the JSON processing is your code?

Are you generating the JSON or are you receiving the JSON from a third party?

If you are receiving the JSON, then I don't think there is much you can do about, just load it and IRIS will handle it.
I'm pretty sure that any attempt to "split" the loading of the JSON stream/file will result in worst performance and consumed resources.
To split a large JSON you need to parse it anyway....

If you are generating the JSON, then depending on the project and specifications constraints, you may split you payload in chunks, for example in FHIR the server can choose to break a bundle it up into "pages".

I'm not sure if your question is about loading the JSON file/stream into a %DynamicAbstractObject or about processing the large %DynamicAbstractObject once it has been imported from JSON?

What's your problem and what's your goal?

Enrico Parisi · Jun 16, 2024 go to post

It looks like an <UNDEFINED> error occurs in a SQL query generated code.

Debugging generated code it's not easy/simple, I would double check SQL queries and parameters passed to the queries in the CSP page.

Enrico Parisi · Jun 6, 2024 go to post

It depends on your timezone, well...the timezone configured in the IRIS system! 😊

Does the trailing +01:00 represent your timezone? Or what?

I'm in a UTC+2 timezone, so:

USER>w $zdt($zdth("1988-08-18 00:00:00.000",3),3,5,2)
1988-08-18T00:00:00.00+02:00
Enrico Parisi · Jun 4, 2024 go to post

Does the returned sc status contains the <INVALID OREF> error?

Add this line following the one I suggested:

if $$$ISERR(sc) $$$LOGERROR($system.Status.GetErrorText(sc)

Then check the event log after calling your component and post here what you find in the event log.

Enrico Parisi · Jun 4, 2024 go to post

An integrity check also treats it as if it was a single file. This is only going to be more of an issue as the max size increses.

There is no other option for integrity check because in multi volume database a global can span across multiple volumes/files and a global structure must be fully scanned to check integrity.

If this is a concern, maybe splitting a global across multiple "small" (the concept of small may vary! 😁) database using subscript mapping can be an option.
Integrity check is performed at database/global level, not namespace/global level.

Enrico Parisi · Jun 4, 2024 go to post

Evidently there is an issue where you reference MSH:9.2, without details of your rule definition is virtually impossible to guess where the problem is.

Enrico Parisi · Jun 3, 2024 go to post

I'd suggest to check the returned %Status from the %FromFHIRJSON() method.

Instead of:

do ..FHIRAdapter.%FromFHIRJSON(pRequest.Payload.Read(),.pmReqFHIRobj,"HS.FHIR.Model.Resource.Bundle")

Use:

set sc=..FHIRAdapter.%FromFHIRJSON(pRequest.Payload.Read(),.pmReqFHIRobj,"HS.FHIR.Model.Resource.Bundle")

Then check the status.

Enrico Parisi · Jun 1, 2024 go to post

What platform?

Using the IRIS Community Edition kit you can install only client components, including ODBC driver:

Enrico Parisi · May 30, 2024 go to post

You may have the option of using Extended Global References and in particular Bracket Syntax with References to Databases.

In your code you need to change all your global references from:
^SYS("CommonConfig")
to
^[%dbConfig]SYS("CommonConfig")

Then, for normal situation where you want the %ALL mapping to apply, just use:
set %dbConfig=""
When you need to explicitly map it to a BARCONFIG database, then:
set %dbConfig="^^:ds:BARCONFIG"

This way you can switch from default %ALL mapping to "explicit reference" within your code.
In the example I used a % local variable (%dbConfig) to hold the "database name reference" because it has a global scope, you may use a different approach like a property in some of your classes, a macro with some reference (in a global?) or...whatever is appropriate for your environment.

Enrico Parisi · May 28, 2024 go to post

Length 50

 

Spoiler

ClassMethod Count(i As %String) As %Integer
{
	f p=1:1:$l(i){i ")]}D>"[$e(i,p),$i(c)} q +$g(c)
}
Enrico Parisi · May 28, 2024 go to post

Length: 77

 

Spoiler

ClassMethod Count(i As %String) As %Integer
{
	s i=$tr(i,":;8B=-^co~","") f p=1:1:$l(i){i ")]}D>"[$e(i,p),$i(c)} q +$g(c)
}
Enrico Parisi · May 27, 2024 go to post

I'm no Python expert at all, but it looks like user and password are missing. (uid and pwd??)

Enrico Parisi · May 24, 2024 go to post

From the error you get I suspect you are sending your HS.Message.PatientFetchRequestAsync to the wrong service/endpoint in the remote server.

How are you sending your request and how the operation is configured?

Enrico Parisi · May 23, 2024 go to post

irislib database is mounted as readonly database, so journal is disabled.

irislocaldata database contains items used internally by IRIS and journal is disabled by design.

This is standard/normal in any IRIS installation.

I doubt your issue is caused by these journal being disabled and I would not tamper default/standard journal configuration for system databases.

Enrico Parisi · May 23, 2024 go to post

The class HS.FHIR.DTL.vR4.Model.Resource.Bundle is a registered object and cannot be used in a persistent class property.

Enrico Parisi · May 23, 2024 go to post

The first parameter (Lookup Table Name) of Exists function must be quoted: Exists("HologicProcedureFilter",.....)

If you want, you can switch to the old zen based rule editor, in the upper right of the page click on the user icon and select Open in Zen rule editor:

Note that it will open the rule in new tab, leaving the old tab open, make sure you use only one tab to edit the rule!

Enrico Parisi · May 23, 2024 go to post

A production/ensemble message, a request in your case, MUST be a %Persistent class.

BundleObject is a %DynamicObject and is not (does not extend) a %Presistent class.

Enrico Parisi · May 23, 2024 go to post

In your messages.log do you see entries like:

[Generic.Event] VSS Writer: OnFreeze
......
......
[Generic.Event] VSS Writer: OnThaw

This is what is logged when a VSS snapshot is performed in windows.

In "well behaved Windows server" this two messages are less that a minute apart

Enrico Parisi · May 23, 2024 go to post

VSS in Windows is Volume Shadow Copy Service that (to simplify) provide snapshots for the disk storage.

IRIS now support VSS for external backups.

Are you performing a backup when this happen?

I suggest to check the Windows event log for issues with VSS.
 

Enrico Parisi · May 22, 2024 go to post

Assuming response1 json ALWAYS contain a single entry, then:

    ; import stream into Dynamic Object
    Set Response1=##class(%DynamicObject).%FromJSON(response1.informesAutorizadosRangoFechas)
    Set Response2=##class(%DynamicObject).%FromJSON(response2.informesAutorizadosRangoFechas)
    
    Write "Response1 has ",Response1.entry.%Size()," entries",!
    Write "Response2 has ",Response2.entry.%Size()," entries",!

    ; loop all the entries in Response2
    Set EntryIter=Response2.entry.%GetIterator()
    While EntryIter.%GetNext(.EntryKey, .Entry) {
        Write "Response2, entry ",EntryKey+1," has ",Entry.resource.%Size()," resources",!

        ; loop all resources within Entry
        Set ResourceIter=Entry.resource.%GetIterator()
        While ResourceIter.%GetNext(.ResourceKey, .Resource) {

            ; add resource from Result2 in first entry of Result1
            Do Response1.entry.%Get(0).resource.%Push(Resource)  
        }   
    }
    Write "Merged Response1 has ",Response1.entry.%Get(0).resource.%Size()," resources",!

Using your samples the output is:

Response1 has 1 entries
Response2 has 7 entries
Response2, entry 1 has 1 resources
Response2, entry 2 has 1 resources
Response2, entry 3 has 1 resources
Response2, entry 4 has 1 resources
Response2, entry 5 has 1 resources
Response2, entry 6 has 1 resources
Response2, entry 7 has 1 resources
Merged Response1 has 8 resources

The resulting json is different than your manual merge.......