kc-sdk 5.8.3883-rc → 5.8.3907-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/kc-sdk.js +9 -2
- package/src/sdk-tester.js +10 -0
package/package.json
CHANGED
package/src/kc-sdk.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var kcSdkVersion = "5.8.
|
|
3
|
+
var kcSdkVersion = "5.8.3907"
|
|
4
4
|
|
|
5
5
|
var kcSdk = function kcSdk() {
|
|
6
6
|
// locals
|
|
@@ -37,6 +37,7 @@ var kcSdk = function kcSdk() {
|
|
|
37
37
|
responseTime: responseTime,
|
|
38
38
|
launch: launchKc,
|
|
39
39
|
loadPatientRecord: loadPatientRecord,
|
|
40
|
+
assignConfig: assignConfig,
|
|
40
41
|
setAuthToken: setAuthToken,
|
|
41
42
|
setI9I10State: setI9I10State,
|
|
42
43
|
setDemographics: setDemographics,
|
|
@@ -242,6 +243,12 @@ var kcSdk = function kcSdk() {
|
|
|
242
243
|
communication(communicationPacket, listeningWindows.KC);
|
|
243
244
|
}
|
|
244
245
|
|
|
246
|
+
function assignConfig(input) {
|
|
247
|
+
communicationPacket.action = 'assignConfig';
|
|
248
|
+
communicationPacket.value = input;
|
|
249
|
+
communication(communicationPacket, listeningWindows.KC);
|
|
250
|
+
}
|
|
251
|
+
|
|
245
252
|
function setI9I10State(state) {
|
|
246
253
|
communicationPacket.action = 'setI9I10State';
|
|
247
254
|
communicationPacket.value = state;
|
|
@@ -442,7 +449,7 @@ var kcSdk = function kcSdk() {
|
|
|
442
449
|
// workflow functions
|
|
443
450
|
function addToWorkflow(wf) {
|
|
444
451
|
var wfArray = Array.isArray(wf) ? wf : [wf];
|
|
445
|
-
var kcWindowFunctions = ['openKc', 'launchKc', 'angularLoadPatientRecord'];
|
|
452
|
+
var kcWindowFunctions = ['openKc', 'launchKc', 'angularLoadPatientRecord', 'assignConfig'];
|
|
446
453
|
var encoderWindowFunctions = ['openEncoder', 'launchEncoder', 'loadPhraseInLogic', 'loadPhraseInIndex', 'loadCodeInTabular'];
|
|
447
454
|
var allWindowFunctions = ['setI9I10State', 'setAuthToken', 'setDemographics', 'closeAllKCWindows']
|
|
448
455
|
|
package/src/sdk-tester.js
CHANGED
|
@@ -66,6 +66,8 @@ function testerController($scope, $timeout, $http, $q,
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
vm.exampleUrl = 'http://www.google.com';
|
|
70
|
+
|
|
69
71
|
vm.exampleDemographicsData = {
|
|
70
72
|
sex: 'M',
|
|
71
73
|
sendingFacility: "001",
|
|
@@ -270,6 +272,11 @@ function testerController($scope, $timeout, $http, $q,
|
|
|
270
272
|
fn: kcSdk.kcWindow.loadPatientRecord,
|
|
271
273
|
windowName: vm.kcWindowName
|
|
272
274
|
},
|
|
275
|
+
{
|
|
276
|
+
name: 'assignConfig',
|
|
277
|
+
fn: kcSdk.kcWindow.assignConfig,
|
|
278
|
+
windowName: vm.kcWindowName
|
|
279
|
+
},
|
|
273
280
|
{
|
|
274
281
|
name: 'setAuthToken',
|
|
275
282
|
fn: kcSdk.kcWindow.setAuthToken,
|
|
@@ -347,6 +354,9 @@ function testerController($scope, $timeout, $http, $q,
|
|
|
347
354
|
case 'angularLoadPatientRecord':
|
|
348
355
|
vm.workflowInput = angular.toJson(vm.examplePatientRecord, 2);
|
|
349
356
|
break;
|
|
357
|
+
case 'assignConfig':
|
|
358
|
+
vm.workflowInput = angular.toJson({ rcpEndpointUri: vm.exampleUrl }, 2);
|
|
359
|
+
break;
|
|
350
360
|
case 'setAuthToken':
|
|
351
361
|
vm.workflowInput = angular.toJson(vm.exampleAuthToken, 2);
|
|
352
362
|
break;
|