George James · Jul 24, 2024 go to post

Have a look at your browser's console log - the page may be experiencing an error before it completes loading.

George James · Jul 23, 2024 go to post

The directory name for this database looks a little odd. 

Is it really intended to be in c:\intersystems\irishealth\mgr\interfaces\stream? 

I would have expected a database named INTERFACES to be located in c:\intersystems\irishealth\mgr\interfaces not in the stream sub-directory of that location.

George James · Oct 11, 2023 go to post

As well as Business Partners, there are several other minor items, such as Schedule Specs, that often need to be deployed to test and live instances.

Deltanji, our source-control solution for IRIS, has built-in support for these kinds of things.  It can treat any row in a table as a managed component that can be deployed along with the rest of your production items.

More info about Deltanji here: https://georgejames.com/deltanji/

George James · Aug 9, 2023 go to post

Just 1 more vote needed to pass the threshold.  But even more votes would add more weight.  

George James · Feb 15, 2023 go to post

ChatGTP always seems to give very convincing answers, but often they can be wrong in unexpected ways.

For example, I asked it to decrypt "the cat sat on the mat" which had been encrypted using the Caesar cipher with a shift of 7 as "aol jha zha vu aol tha".  

This was it's answer:

Sure! The Caesar cipher is a simple substitution cipher that replaces each letter in the plaintext with a letter a fixed number of positions down the alphabet. In the case of the Caesar cipher, the shift is typically three letters.

To decrypt the message "aol jha zha vu aol tha" that you provided, we need to shift each letter three positions up the alphabet, as the message has been encrypted using a Caesar cipher with a shift of three.

Applying this decryption technique, we get the plaintext message "the dog ate the hat".

Quite amusing.

George James · Feb 8, 2023 go to post

This is a nice project and sure to be very useful.

Just for fun I thought it would be interesting to see what ChatGPT had to say about it.  So I asked the question:

Give me some unit tests for this code:
 
Class dc.sample.ObjectScript 
{
ClassMethod TheAnswerForEverything() As %Integer
{
    Set a = 42
    Write "Hello World!",!
    Write "This is InterSystems IRIS with version ",$zv,!
    Write "Current time is: "_$zdt($h,2)
    Return a
}
}
This was what ChatGPT gave as a response:
 
Here are some unit tests for the dc.sample.ObjectScript class:
  1. Test the return value of TheAnswerForEverything method: This test should check if the method returns the expected value of 42.
 
Class dc.sample.ObjectScriptTest Extends %UnitTest.Case 
{ 
Method testTheAnswerForEverything() As %Status 
{ 
    set answer = ##class(dc.sample.ObjectScript).TheAnswerForEverything() 
    set expectedAnswer = 42 
    do $assert(answer = expectedAnswer, "The answer is incorrect") 
    Quit $$$OK 
} 

}

  1. Test the output of the method: This test should check if the method writes the expected output to the console.
Class dc.sample.ObjectScriptTest Extends %UnitTest.Case 
{ 
Method testTheAnswerForEverythingOutput() As %Status 
{ 
    set sc = ##class(dc.sample.ObjectScript).TheAnswerForEverything() 
    set expectedOutput = "Hello World!\r\nThis is InterSystems IRIS with version "_$zv_"\r\nCurrent time is: "_$zdt($h,2) 
    do $assert($io.output = expectedOutput, "The output is incorrect") 
    Quit $$$OK 

} 

} 
  1. Test the output format: This test should check if the method writes the output in the expected format.
Class dc.sample.ObjectScriptTest Extends %UnitTest.Case 
{ 
Method testTheAnswerForEverythingFormat() As %Status 
{ 
    set sc = ##class(dc.sample.ObjectScript).TheAnswerForEverything() 
    set expectedOutput = "Hello World!\r\nThis is InterSystems IRIS with version "_$zv_"\r\nCurrent time is: "_$zdt($h,2) 
    do $assert($io.output = expectedOutput, "The output format is incorrect") 
    Quit $$$OK 

} 
    
} 

So I found this quite interesting.  $assert($io.output.. is obviously wrong but the rest is correct enough to give a head start on writing some test cases and we can only expect ChatGPT to get better and better.

 
George James · Oct 22, 2022 go to post

We have our own installer which predates ZPM.  I believe ZPM would be able to install Deltanji on IRIS but it is not something we have done yet. 

Many InterSystems customers are still using Caché and as far as I know ZPM doesn't work on Caché so we'd need to maintain two installers.

George James · Oct 22, 2022 go to post

UDL and obviously XML for the contents of the ProductionDefinition XData block.

All elements of Productions are fully supported by Deltanji.  Specifically the following component types: HL7, X12, Lookup Tables, Business Rules, Data Transformations, Record Maps, Production Classes (class methods etc), Production Settings and Production Configuration Items.

At the last count Deltanji supports 58 different component types as standard, plus many that our customers have written themselves for their own purposes.

George James · Oct 22, 2022 go to post

Yes, of course.  It's a standard feature of Deltanji. Any component can be exported to a file.

George James · Oct 20, 2022 go to post

We do leverage parts of the Ens.Deployment package, but the real secret sauce is the driver based architecture of Deltanji that lets us do this so easily.  This makes each <item> element of XData block a first class component that can be versioned, managed and audited just like any other component.

George James · Jul 8, 2022 go to post

$ORDER() is the contemporary equivalent to $NEXT().  $ZORDER() would have been the equivalent to $QUERY() but I'm not sure if it existed in 1978, I think it may have been introduced a little later in DSM-11.

George James · Mar 29, 2022 go to post

This would only kill variables at the current stack level.  I think you rather want to do:

%SYS 4d3>quit
 
%SYS>kill  zremove

Nevertheless a useful tip.  Many people don't seem to realize that they need to issue a quit to unwind the stack after an error.

George James · Feb 3, 2022 go to post

Sadly, this solution doesn't quite work for negative unpaired integers.  For example "1,-1,-2"

George James · Feb 2, 2022 go to post

Or

s y=$lfs(o) f i=1:1 ret:'$lf(y,i)+'$lf(y,-i)=1 i

...but this still only returns the absolute value, so not a valid solution either.

George James · Feb 2, 2022 go to post

I think the problem as stated implies that there will always be at least one unpaired number: "... except for one integer that is either only negative or only positive"

George James · Feb 2, 2022 go to post

Of course, this solution does not implement the rule "The only-positive or only-negative integer may appear more than once" :(

George James · Jan 26, 2022 go to post

Hi Con

Actually, xsl-fo has it's own way of styling so what I suggested, which would work for html, probably isn't applicable for xsl-fo.

George

George James · Jan 26, 2022 go to post

Hi Sreevani

In ObjectScript you can include a double-quote character inside a quoted string by doubling it up.

set teststr ="<book id=""bk105""><author type=""old"">Corets, Eva</author><title>The Sundered Grail</title><genre>Fantasy</genre></book>"

Since in this example, your string clearly contains html you might find that using single-quotes inside your string would be cleaner and easier to read, making it more maintainable:

set teststr ="<book id='bk105'><author type='old'>Corets, Eva</author><title>The Sundered Grail</title><genre>Fantasy</genre></book>"

George

George James · Jan 26, 2022 go to post

Hi Con

I think your problem might be that background-image and background-repeat are CSS properties, not HTML attributes.  Color works because it is an HTML attribute (although you should use the CSS style property for this as well these days).

Try:

<xsl:if test="$Value = 400">
     <xsl:attribute name='style'>background-image: url("images/trash-icon.png"); background-repeat: no-repeat;</xsl:attribute>
     <xsl:attribute name='color'>#ffffff</xsl:attribute>
</xsl:if>

If that works then you might want to consider using a class attribute to reference a stylesheet rather than including a style attribute directly, but that's another matter.

George