Enrico Parisi · Aug 1, 2025 go to post

If you post an example of the code you are using maybe someone can help you understand the problem.

Enrico Parisi · Jul 4, 2025 go to post

Never, ever, concatenate parameters to an SQL Query!

Fixed for you:

Set sqlQuery = "SELECT * FROM %Dictionary.PropertyDefinition WHERE parent = ? ORDER BY SequenceNumber"Set resultSet = ##class(%SQL.Statement).%New()
    Set status = resultSet.%Prepare(sqlQuery)
    $$$ThrowOnError(status)
    Set tResult = resultSet.%Execute(className)
    
    While tResult.%Next() {
        Set Name = tResult.%Get("Name")
        ...
        }

Back to your initial question, what is your definition of "sorted by Storage"?

If you need the ($list) position of properties within the global, then your query does not answer your question.
I'm writing this in case other community members read this question/answer.

Enrico Parisi · Jul 1, 2025 go to post

It takes a lot of imagination and fantasy to understand what you need without an example of (pipe delimited) input and (json) output.😉😊

Enrico Parisi · Jul 1, 2025 go to post
Set json=##class(%DynamicAbstractObject).%FromJSONFile("c:\temp\scott.json")
	Set itemIter=json.items.%GetIterator()
	While itemIter.%GetNext(.key, .item) {
		Set identifiersIter=item.identifiers.%GetIterator()
		While identifiersIter.%GetNext(.key, .identifier) {
			If (identifier.typeDiscriminator="ClassifiedId") && (identifier.type.term."en_US"="Scopus Author ID") {
				Write"pureId: ",identifier.pureId,!
				Write"uri: ",identifier.type.uri,!
				
			}
		}
	}

Output:

pureId: xxxxxxxx
uri: /dk/atira/pure/person/personsources/scopusauthor

P.S.: please note that, as posted, the json sample you provide is invalid.

Enrico Parisi · Jul 1, 2025 go to post

%System/%System/RoutineChange

A process generates a %System/%System/RoutineChange event because a routine has been compiled or deleted. When enabled, this event causes a record to be written to the audit log whenever a routine or class is compiled. The Description field of the audit record includes the database directory where the modification took place, what routine or class was modified, and the word “Deleted” if the routine was deleted.

This Audit Event is available in IRIS, I have no idea if was available back in 2018.

Enrico Parisi · Jun 30, 2025 go to post

Yes, pretty sure, that is what is taught in the ISC training courses and what the documentation says:

Description ($PROPERTY)
Property names are case-sensitive

Selecting Fields
Field names in a SELECT statement are not case-sensitive. SqlFieldName names and property names are case-sensitive.

Rules for Class Member Names
Note that the system preserves the case that you use when you define classes, and you must exactly match the case as given in the class definition. However, two class members cannot have names that differ only in case. For example, the identifiers id1 and ID1 are considered identical for purposes of (uniqueness.)

Enrico Parisi · Jun 30, 2025 go to post

You probably have a special use case but, in general, I don't think it makes a lot of sense because:

  1. Class properties ARE Case-sensitive by its nature (contrary to your statement in Ideas portal)
  2. JSON fields ARE Case-sensitive by its nature (as per JSON standard)
Enrico Parisi · Jun 29, 2025 go to post

REST code write the response to the current device.

An idea (to be tested) could be to intercept the calls in early stages, save the current device and change the current device to "some other device" (to be defined), then, after the code has finished, save the output to your log and switch to the "old" current device and write the output.

I think it can be done, it surely have some performance impact but...maybe feasible.

Enrico Parisi · Jun 29, 2025 go to post

It has been very interesting and, as usual, keeping in touch with old fellows as well meeting new ones is the most valuable think of the conference.

And, HEY! only 10 month to the next conference!
Washington DC from 27th to 29th of April!

Please note that next conference will start with the Welcome Reception on Monday (usually Sunday).

I'm looking forward to meet you all in DC! 😊

Enrico Parisi · Jun 29, 2025 go to post

It's not possible, the response is "sent to the browser" (via Web Gateway....) immediately, there is no buffer or anything.

If you want to capture YOUR response, put it in a buffer and when you are done, send it from your buffer "to the browser"

Enrico Parisi · Jun 29, 2025 go to post

Please provide more context and details when you post questions.

To get the request submitted body (if any) you can use the Content property of the %CSP.Request object (i.e. %request).

For the response it's not possible, the response is "sent to the browser" (via Web Gateway....) immediately, there is no buffer or anything.

If you want to capture YOUR response, put it in a buffer and when you are done, send it from your buffer "to the browser"

Enrico Parisi · Jun 29, 2025 go to post

Hi @Irène Mykhailova, I think the Idea I posted does contains all the information you asked, maybe not formatted as requested.

Anyway, I've edited the Idea with the same info but...formatted differently 😊

Enrico Parisi · Jun 25, 2025 go to post

If I recall it correctly when a message is suspended a warning event is logged in the Event Log.

Try searching for warnings from that BO around the time it was suspended and from there you can get the trace.

Enrico Parisi · Jun 22, 2025 go to post

Hi @Benjamin De Boe, this is GREAT news, it's going to be EXTREMELY useful in many environments I'm working with. I fully agree with you that most of the times exporting statistics from a development environment to a production environment is not advisable, so much so that I've created an entry in the Ideas Portal to give us the option to disable exporting statistics (i.e. use /exportselectivity=0 qualifier) when exporting production component.
Note that at the moment is not possible to export without including statistics when exporting a Production or Production components and this a pity, therefore I created the Idea:

Do not include table statistics when exporting Production for deployment
I encourage anyone that agree or is interested to vote for ti! 😊

Enrico Parisi · Jun 14, 2025 go to post

No, it doesn't.

If the variable String contains a Base 64 encoded HL7 message, then:

Set HL7MessageResponse=##class(EnsLib.HL7.Message).ImportFromString($system.Encryption.Base64Decode(String),.sc)
    ; handle sc error hereSet DocType=##class(EnsLib.HL7.Schema).ResolveSchemaTypeToDocType(HL7MessageResponse.TypeVersion,HL7MessageResponse.Name)
    Set sc=HL7MessageResponse.PokeDocType(DocType)
    ; handle sc error here

After that, the variable HL7MessageResponse is an instance (OREF, object reference) of an Ens.HL7.Message with proper DocType, Name, etc. that you can use as HL7 response back to your HL7 BP Router.

Enrico Parisi · Jun 13, 2025 go to post

What's the datatype of the HL7 message in SendMessageRespose?

I assume that the HL7 message in SendMessageRespose is a %String.

String variable contains the HL7 message, then:

Set HL7MessageResponse=##class(EnsLib.HL7.Message).ImportFromString(String,.sc)
    ; handle sc error hereSet DocType=##class(EnsLib.HL7.Schema).ResolveSchemaTypeToDocType(HL7MessageResponse.TypeVersion,HL7MessageResponse.Name)
    Set sc=HL7MessageResponse.PokeDocType(DocType)
    ; handle sc error here
Enrico Parisi · Jun 13, 2025 go to post

How did you installed set up your FHIR Server?

When installed using the IRIS portal the FHIR Web Application is automatically created and configured with the following Application Roles :
%DB_HSCUSTOM
%DB_HSLIB
%DB_HSSYS
%DB_<YourNamespace>X0001R
%DB_<YourNamespace>X0001V
%HS_DB_<YourNamespace>
%HS_ImpersonateUser

Enrico Parisi · Jun 12, 2025 go to post

The log from ^ISCLOG you posted does not reflect the code you posted.

Something MUST happen to the CBORDRequest.encodedMessage property AFTER the code you posted before the request is sent.

Please post as much code you can up until InvokeClient().

Enrico Parisi · Jun 11, 2025 go to post

Fixed for you:

/// Returns Age in years from DOB in YYYYMMDD format/// Make sure DOB is not null ("") before calling the function.ClassMethod GetAge(DateOfBirth As%String) As%Integer
{
    Set today=$zd($h,8)	
    Set age=$e(today,1,4)-$e(DateOfBirth,1,4)
    If$e(today,5,8) < $e(DateOfBirth,5,8) Set age=age-1Quit age
}

Not that complex after all.

Enrico Parisi · Jun 11, 2025 go to post

From the ISCSOAP log it's evident that the the content of encodedMessage property/tag is not the encoded HL7 raw message but it was assigned with an oref (object reference, an object instance) of the osuwmc.Nutrition.OSU.CBOARDNetMenuRequest.SendMessageRequest class.

This is not what the code you posted is doing, so I guess the actual code is different or the encodedMessage property is set to an oref after the code you posted.

It looks like somewhere after that code there is a:

Set CBORDRequest.encodedMessage=CBORDRequest

Beside that, my curiosity:

set a = $SYSTEM.Encryption.Base64Encode((pMsgOut.RawContent))
Why two parenthesis?

set CBORDRequest.encodedMessage = $Get(a)
Why using $Get for a variable that is indeed/for sure defined?

Enrico Parisi · Jun 11, 2025 go to post

What product? IRIS, IRIS fir Health, HealthShare HC or HealthShare?

How did you created in the Management Portal the new database/namespace?

Enrico Parisi · Jun 10, 2025 go to post

Do you need to decode a Base64 stream or you just need to read a stream to a string?

If so, then:

Set string=stream.Read($$$MaxStringLength)