The method you want to change the language (locale or NLS) is Config.NLS.Locales -- Install()

You can see the available locales at this portal page: [System Administration] > [Configuration] > [National Language Settings] > Locale Definitions

So to put that into a manifest:

    <Namespace Name="%SYS" Create="no">
        <Log Text="Changing the Locale" Level="0"/>
        <Invoke Class="Config.NLS.Locales" Method = "Install" CheckStatus="true">
            <Arg Value="danw"/> 
            <!-- danw is the Danish Locale, Replace with Desired  -->
        </Invoke>
    </Namespace>

If you're looking for how to run irispython --

In installation-dir/bin there is a binary irispython that is part of the installation Link

$ /usr/irissys/bin/irispython
Python 3.8.10 (default, Sep 28 2021, 16:10:42) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import iris
>>> iris.utils._OriginalNamespace()
'USER'

And to set the namespace:

import os
os.environ['IRISNAMESPACE'] = 'MyNamespace'
# must come after you set namespace or user
import iris

And to set the user credentials

import os
from getpass import getpass
os.environ['IRISUSERNAME'] = input('username> ')
os.environ['IRISPASSWORD'] = getpass('password >>>') 
# must come after you set namespace or user
import iris

I am not sure! This will secure any traffic hosted by the instance itself on the port added to the config (10443 in the example). It also does not change the way links are generated. If the portal webpage uses relative links, then it could secure those requests, but they ultimately don't connect through the instance so really security is out of our hands there.

This method simply opens an additional port on the included Apache server secured by the self-signed certificate. The non-secure ports will still work so this isn't a viable production strategy.

Hi Dan, Can you please update the following to make this tutorial up-to-date?

  • The endpoints in the Google1N and Google2n depend on your server and ssl port. Maybe make a note there that .../csp/google/Web.OAUTH2.... would be /csp/user/Web or /csp/namespaceABC/Web.Oauth2 depending on where you implement the code.
  • The issuing endpoints for the tutorial have changed to the following: https://accounts.google.com/.well-known/openid-configuration

Hi Craig,

ImportFromString returns an HL7 Message, it does not populate an existing instance of EnsLib.HL7.Message.

Moreover, make sure that you are reading the entire message with %request.Content.Read, you'll probably want to wrap that in a loop.

Here is the code I get to work on my instance (2017.1)
 

SET tContent = %request.Content.Read()
WHILE '%request.Content.AtEnd {
SET tContent = tContent + %request.Content.Read()
}
SET tReq = {}.%FromJSON(tContent)
SET tInput = tReq.Message
// Remove your %New() statement and set tMsg like this
SET tMsg = ##class(EnsLib.HL7.Message).ImportFromString(tInput)
// Then you can either set the doctype manually or use PokeDocType()
// ...

To use FHIR in HealthConnect you will probably want to start with the installer kits. Each of these will add some bits and pieces of functionality to your current working production:

For example, to install a foundation namespace and add FHIR STU3 support to it:

SET nNamespace = "FHIR"

// Switch to the HSLIB so we can call our installer methods
ZN "HSLIB"

// Make the new namespace
SET sc = ##class(HS.HC.Util.Installer).InstallFoundation(nNamespace)
THROW:$$$ISERR(sc) ##class(%Exception.StatusException).CreateFromStatus(sc)

// Add in all of the FHIR components and create a web app
SET sc = ##class(HS.HC.Util.Installer.Kit.FHIR.HealthConnect).Add( , nNamespace, "STU3", "/csp/healthshare/" _ nNamespace _ "/fhir/stu3", "/csp/healthshare/" _ nNamespace _ "/fhir-oidc/stu3")
THROW:$$$ISERR(sc) ##class(%Exception.StatusException).CreateFromStatus(sc)

Once you have this installed, you can use a custom business process to coordinate all of the downstream calls to the external systems. For example, your production might request downstream resources and construct a FHIR response bundle from them.

You can change the header keys of a %Net.HttpRequest

// Make Request
  SET tHttpRequest=##class(%Net.HttpRequest).%New()

  // Set header
  SET tSC = tHttpRequest.SetHeader("Content-Type", "text/plain")

  // Check for Errors
  THROW:$$$ISERR(tSC) ##class(%Exception.StatusException).CreateFromStatus(tSC)

Thus, to put this all together;

  1. Extend the EnsLib.HL7.Operation.HTTPOperation
  2. Copy the SendMessage method from the super EnsLib.HL7.HTTPOperation
  3. Make a small change to set the header after the first line.
// Sample Code, Not Complete
Class Niko.EnsLib.HL7.Operation.HTTPOperation Extends EnsLib.HL7.Operation.HTTPOperation
{

Method SendMessage(pMsgOut As EnsLib.HL7.Message, Output pMsgIn As EnsLib.HL7.Message, pExpectedSequenceNumber As %String) As %Status
{
    Set pMsgIn=$$$NULLOREF, tHttpRequest=##class(%Net.HttpRequest).%New(), tHttpRequest.WriteRawMode=1
    // Add these two lines after the firt in SendMessage. Change the content type to your desired header.
    SET tSC = tHttpRequest.SetHeader("Content-Type", "text/plain")
    THROW:$$$ISERR(tSC) ##class(%Exception.StatusException).CreateFromStatus(tSC)

    // Copy the rest of the SendMessage Method from the standard EnsLib.HL7.Operation.HTTPOperation
}
}