Prerequisite: To use these features Noah ES Client 4.15 must be installed. These features will not work with Noah ES Client 4.14.2.
Communicating with Noah ES Client
A local Noah ES Client installation run on machines with Noah ES Client 4.15 or later installed at https://localhost:8090. The following HTTP methods can be used to communicate with Noah ES Client.
Get Noah Client instance ID.
The Noah instance ID is used to subscribe to Noah client events.
Route: GET https://localhost:8090/NoahWebIntegrationGUIStart/noah4/instanceid
Postman Example:
1.) Route
2.) Successful Return Body
Start Noah ES Client.
Route: GET https://localhost:8090/NoahWebIntegrationGUIStart/noah4
Postman Example:
1.) Route
2.) Successful Return Body
Set selected patient - Noah ES Client Automatically Started if not running
Set the selected patient to given patient GUID. Noah ES Client will start if it's not already running.
Route: GET https://localhost:8090/NoahWebIntegrationGUIStart/noah4/patientguid/{patientguid}
Postman Example:
1.) Route
*Note: I set a patient id in my Noah ES account as a variable in the params.
2.) Successful Return Body
Get selected patient.
Route: GET https://localhost:8090/NoahWebIntegrationGUIStart/noah4/currentpatient
Postman Example:
1.) Route
2.) Successful Return Body
Set Patient
· Method: POST
· Endpoint: https://localhost:8090/NoahWebIntegrationGUIStart /noah4/setpatient
· Request Format: JSON
· Response Format: JSON
· Introduced in Noah version: 4.16
Headers:
Content-Type: application/json
Body:
{ "patientGuid": "550e8400-e29b-41d4-a716-446655440000", "options": { "StartGui": true, "ShowAllPatients": false, "SelectDetailsView": true } }
patientGuid (string, nullable):
When null, no changes are made to the current active patient.
When null and StartGui is true, the Noah ES Client starts without a specific patient selected.
When non-null, the patient with the matching GUID is set as the active patient in the Noah Business System.
When non-null and StartGui is false, the Noah ES Client does not start, but the specified patient is set as active.
options (object, optional):
StartGui (boolean, nullable):
When true, starts the Noah ES Client GUI.
When null, no changes are made to the current GUI state.
When false, the GUI is not started.
ShowAllPatients (boolean, nullable):
When false, the Noah ES Client does not display patients in the patient list.
When null, no changes are made to the current patient list state.
When true, patients in the list are displayed.
SelectDetailsView (boolean, nullable):
When true, the patient list collapses in the Noah ES Client.
When null, no changes are made to the current state of the patient list view.
A value of false is not utilized and has no effect.
Response Format
PatientGuid (string): The GUID of the active patient in the Noah ES Client.
Example Response (patient guid exists):
{
"PatientGuid": "550e8400-e29b-41d4-a716-446655440000"
}
Example Response (patient guid does NOT exist):
{
"PatientGuid": null
}
Detecting Noah ES Client patient selection changes
Connect to the SignalR Hub at clientrtm path on the API URL e.g. https://api.qa.eu.noah-es.com/clientrtm
Invoke the hub method “SubscribeTenant” method with tenant id and Noah ES Client instance id e.g. await _hubConnection.InvokeAsync("SubscribeTenant", {tenantId}, {noahInstanceId});
Listen for events on the “OnEvent” hub method e.g. _hubConnection.On<NoahClientEvent>("OnEvent", NoahClientEventHandler);
The event handler receives a message in the format:public class NoahClientEvent { public NoahClientEventType EventType { get; set; } public DateTime EventDate { get; set; } public string CorrelationId { get; set; } public string TenantId { get; set; } public string InstanceId { get; set; } public Guid? PatientId { get; set; } public Guid? ActionId { get; set; } public string UserId { get; set; } } Only patient selected event is currently supported. public enum NoahClientEventType { PatientSelected }
When disconnecting, invoke the hub method “LeaveTenant”