oro-sdk 5.14.0-dev1.0 → 5.14.0
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/dist/oro-sdk.cjs.development.js +35 -25
- package/dist/oro-sdk.cjs.development.js.map +1 -1
- package/dist/oro-sdk.cjs.production.min.js +1 -1
- package/dist/oro-sdk.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk.esm.js +35 -25
- package/dist/oro-sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/helpers/consult.ts +2 -2
- package/src/helpers/patient-registration.ts +4 -0
- package/src/helpers/prescription-refill.ts +5 -0
- package/LICENSE +0 -21
@@ -1058,13 +1058,13 @@ function _getOrCreatePatientConsultationUuid() {
|
|
1058
1058
|
break;
|
1059
1059
|
}
|
1060
1060
|
return _context.abrupt("return", oroClient.consultClient.getConsultByUUID(payment.uuidConsult)["catch"](function (err) {
|
1061
|
-
console.error('Error while retrieving consult', err);
|
1061
|
+
console.error('Error while retrieving consult from linked payment infos', err);
|
1062
1062
|
throw err;
|
1063
1063
|
}));
|
1064
1064
|
case 7:
|
1065
1065
|
_context.next = 9;
|
1066
1066
|
return oroClient.consultClient.consultCreate(consult)["catch"](function (err) {
|
1067
|
-
console.error('Error while creating consult', err);
|
1067
|
+
console.error('Error while creating consult after a payment found with no consult linked', err);
|
1068
1068
|
throw err;
|
1069
1069
|
});
|
1070
1070
|
case 9:
|
@@ -1322,25 +1322,30 @@ function _registerPatient() {
|
|
1322
1322
|
}
|
1323
1323
|
throw errorsThrown;
|
1324
1324
|
case 59:
|
1325
|
-
|
1325
|
+
if (consult.statusMedical === initApis.MedicalStatus.Assigning) {
|
1326
|
+
//hopefully svelte query received all updates
|
1327
|
+
console.warn('Consult assignation took too much time, moving to new anyway');
|
1328
|
+
}
|
1329
|
+
// Deem the consultation as ready
|
1330
|
+
_context3.next = 62;
|
1326
1331
|
return oroClient.consultClient.updateConsultByUUID(consult.uuid, {
|
1327
1332
|
statusMedical: initApis.MedicalStatus.New
|
1328
1333
|
});
|
1329
|
-
case
|
1334
|
+
case 62:
|
1330
1335
|
// if we got through the complete flow, the registration succeeded
|
1331
1336
|
if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'success');
|
1332
1337
|
return _context3.abrupt("return", "break");
|
1333
|
-
case
|
1334
|
-
_context3.prev =
|
1338
|
+
case 66:
|
1339
|
+
_context3.prev = 66;
|
1335
1340
|
_context3.t0 = _context3["catch"](0);
|
1336
1341
|
console.error("[SDK] Error occured during registration: " + _context3.t0 + ", retrying... Retries remaining: " + retry);
|
1337
1342
|
errorsThrown = [];
|
1338
1343
|
return _context3.abrupt("return", "continue");
|
1339
|
-
case
|
1344
|
+
case 71:
|
1340
1345
|
case "end":
|
1341
1346
|
return _context3.stop();
|
1342
1347
|
}
|
1343
|
-
}, _loop, null, [[0,
|
1348
|
+
}, _loop, null, [[0, 66]]);
|
1344
1349
|
});
|
1345
1350
|
case 9:
|
1346
1351
|
if (!(retry > 0)) {
|
@@ -1843,7 +1848,7 @@ function _createRefill() {
|
|
1843
1848
|
stepsTotalNum = 6;
|
1844
1849
|
case 5:
|
1845
1850
|
if (!(retry > 0)) {
|
1846
|
-
_context.next =
|
1851
|
+
_context.next = 55;
|
1847
1852
|
break;
|
1848
1853
|
}
|
1849
1854
|
_context.prev = 6;
|
@@ -1920,49 +1925,54 @@ function _createRefill() {
|
|
1920
1925
|
}
|
1921
1926
|
throw errorsThrown;
|
1922
1927
|
case 38:
|
1923
|
-
|
1928
|
+
if (newConsult.statusMedical === initApis.MedicalStatus.Assigning) {
|
1929
|
+
//hopefully svelte query received all updates
|
1930
|
+
console.warn('Consult Refill assignation took too much time, moving to new anyway');
|
1931
|
+
}
|
1932
|
+
// Deem the consultation as ready
|
1933
|
+
_context.next = 41;
|
1924
1934
|
return oroClient.consultClient.updateConsultByUUID(newConsult.uuid, {
|
1925
1935
|
statusMedical: initApis.MedicalStatus.New
|
1926
1936
|
});
|
1927
|
-
case
|
1937
|
+
case 41:
|
1928
1938
|
// if we got through the complete flow, the registration succeeded
|
1929
1939
|
if (onProgress) onProgress(currentStep++ / stepsTotalNum, 'success');
|
1930
|
-
_context.next =
|
1940
|
+
_context.next = 44;
|
1931
1941
|
return oroClient.cleanIndex();
|
1932
|
-
case
|
1933
|
-
return _context.abrupt("break",
|
1934
|
-
case
|
1935
|
-
_context.prev =
|
1942
|
+
case 44:
|
1943
|
+
return _context.abrupt("break", 55);
|
1944
|
+
case 47:
|
1945
|
+
_context.prev = 47;
|
1936
1946
|
_context.t0 = _context["catch"](6);
|
1937
1947
|
console.error("[SDK] Error occured during prescription refill request: " + _context.t0 + ", retrying... Retries remaining: " + retry);
|
1938
1948
|
errorsThrown = [];
|
1939
|
-
return _context.abrupt("continue",
|
1940
|
-
case
|
1949
|
+
return _context.abrupt("continue", 52);
|
1950
|
+
case 52:
|
1941
1951
|
retry--;
|
1942
1952
|
_context.next = 5;
|
1943
1953
|
break;
|
1944
|
-
case
|
1954
|
+
case 55:
|
1945
1955
|
if (!(retry <= 0)) {
|
1946
|
-
_context.next =
|
1956
|
+
_context.next = 58;
|
1947
1957
|
break;
|
1948
1958
|
}
|
1949
1959
|
console.error('[SDK] prescription refill request failed: MAX_RETRIES reached');
|
1950
1960
|
throw 'RegistrationFailed';
|
1951
|
-
case
|
1961
|
+
case 58:
|
1952
1962
|
if (newConsult) {
|
1953
|
-
_context.next =
|
1963
|
+
_context.next = 61;
|
1954
1964
|
break;
|
1955
1965
|
}
|
1956
1966
|
console.error('[SDK] prescription refill request failed: MAX_RETRIES reached');
|
1957
1967
|
throw 'RegistrationFailed';
|
1958
|
-
case
|
1968
|
+
case 61:
|
1959
1969
|
console.log('Successfully Created refill');
|
1960
1970
|
return _context.abrupt("return", newConsult);
|
1961
|
-
case
|
1971
|
+
case 63:
|
1962
1972
|
case "end":
|
1963
1973
|
return _context.stop();
|
1964
1974
|
}
|
1965
|
-
}, _callee, null, [[6,
|
1975
|
+
}, _callee, null, [[6, 47]]);
|
1966
1976
|
}));
|
1967
1977
|
return _createRefill.apply(this, arguments);
|
1968
1978
|
}
|