Network Connections

NetworkConnections Module JavaScript API

The NetworkConnections module allows you to access the Network Connections found in the Network Connections menu, as seen below. The Network Connections can be accessed as NetworkConnection objects.

Network Connections Menu
Default Network Connections as configured in the Default Connections menu can also be accessed.
Default Network Connections

 

NetworkConnections

The NetworkConnections module exposes method for obtaining NetworkConnection objects, including the default Network Connections.

Methods

getConnection(name: string): NetworkConnection

Returns the Network Connection that has the provided name.

var connection = NetworkConnections.getConnection('DaaS Caristix FHIR R4 Server');
// Should return the Network Connection with the name "DaaS Caristix FHIR Server R4 Server"
// and the host "daas.caristix.com/fhir_r4"

getDefaultReceiveHL7Connection(): NetworkConnection

Returns the default HL7 Receive Network Connection.

var sendConnection = NetworkConnections.getDefaultReceiveHL7Connection();
// Should return the Network Connection with the name "Caristix Field Mapping Channel"
// and the host "daas.caristix.com"

getDefaultSendHL7Connection(): NetworkConnection

Returns the default HL7 Send Network Connection.

var ReceiveConnection = NetworkConnections.getDefaultSendHL7Connection();
// Should return the Network Connection with the name "Caristix Field Mapping Channel"
// and the host "daas.caristix.com"

getDefaultWebServiceConnection(): NetworkConnection

Returns the default HL7 Send Network Connection.

var webServiceConnection = NetworkConnections.getDefaultWebServiceConnection();
// Should return the Network Connection with the name "DaaS Caristix FHIR Server R4 Server"
// and the host "daas.caristix.com/fhir_r4"

 

NetworkConnection

The NetworkConnection object allows you to read all the Network Connection properties that you can access from within the Network Connections menu, as well as a method for obtaining the fully-qualified URL of the Network Connection.

Properties

name: string

The Network Connection’s Name property.

var name = connection.name
// name should be "Daas Caristix FHIR R4 Server"

host: string

The Network Connection’s Host property.

var host = connection.host
// host should be "daas.caristix.com/fhir_r4"

port: number

The Network Connection’s Port property.

var port = connection.port;
// port should be 443

timeout: number

The Network Connection’s default Timeout property.

var timeout = connection.timeout;
// timeout should be 30

certificate: string

The Network Connection’s Client Certificate serial number.

var certificate = connection.certificate

Methods

getUrl(): string

Returns the Network Connection’s fully-qualified URL, including protocol, host and port.
If the protocol is not included in the Host property, the protocol is either https (if the port is 443) or http (if using any other port).
The default ports for serving content over HTTP and HTTPS, 80 and 443 respectively, are excluded from the URL.

var url = connection.getUrl()";
// url should be "https://daas.caristix.com/fhir_r4"