@medipass/web-sdk 11.18.12-chore-staff-types-constant.0 → 11.19.1-feature-provider-number-types.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/CHANGELOG.md +11 -0
- package/lib/index.js +1 -1
- package/lib/index.js.flow +2 -0
- package/lib/resources/accounts.js +1 -1
- package/lib/resources/actions.js +1 -1
- package/lib/resources/applications.js +1 -1
- package/lib/resources/attachments.js +1 -1
- package/lib/resources/auth.js +1 -1
- package/lib/resources/bulk-uploads.js +1 -1
- package/lib/resources/business-profiles.js +1 -1
- package/lib/resources/businesses.js +1 -1
- package/lib/resources/claim-items.js +1 -1
- package/lib/resources/devices.js +1 -1
- package/lib/resources/doc-accounts.js +1 -1
- package/lib/resources/documents.js +1 -1
- package/lib/resources/emails.js +1 -1
- package/lib/resources/form-application-templates.js +1 -1
- package/lib/resources/form-applications.js +1 -1
- package/lib/resources/forms.js +1 -1
- package/lib/resources/funder-settings.js +1 -1
- package/lib/resources/funders.js +1 -1
- package/lib/resources/futures.js +1 -1
- package/lib/resources/health-fund-accounts.js +1 -1
- package/lib/resources/health-fund-settings.js +1 -1
- package/lib/resources/healthfunds.js +1 -1
- package/lib/resources/icditems.js +1 -1
- package/lib/resources/invoice-scans.js +1 -1
- package/lib/resources/jhcs.js +1 -1
- package/lib/resources/kyc.js +1 -1
- package/lib/resources/logs.js +1 -1
- package/lib/resources/members.js +1 -1
- package/lib/resources/message-mappings.js +1 -1
- package/lib/resources/minions.js +1 -1
- package/lib/resources/modalities.js +1 -1
- package/lib/resources/notes.js +1 -1
- package/lib/resources/onboarding-applications.js +1 -1
- package/lib/resources/onboarding-requests.js +1 -1
- package/lib/resources/ops.js +1 -1
- package/lib/resources/organisations.js +1 -1
- package/lib/resources/partners.js +1 -1
- package/lib/resources/patients.js +1 -1
- package/lib/resources/payments.js +1 -1
- package/lib/resources/pms.js +1 -1
- package/lib/resources/practice-profiles.js +1 -1
- package/lib/resources/practice-types.js +1 -1
- package/lib/resources/practices.js +1 -1
- package/lib/resources/products.js +1 -1
- package/lib/resources/professional-categories.js +1 -1
- package/lib/resources/provider-number-types.js +51 -0
- package/lib/resources/provider-number-types.js.flow +32 -0
- package/lib/resources/provider-registration-types.js +1 -1
- package/lib/resources/provider-requests.js +1 -1
- package/lib/resources/provider-types.js +1 -1
- package/lib/resources/ref-sources.js +1 -1
- package/lib/resources/risk.js +1 -1
- package/lib/resources/rnas.js +1 -1
- package/lib/resources/roles.js +1 -1
- package/lib/resources/self-checkout-sessions.js +1 -1
- package/lib/resources/services.js +1 -1
- package/lib/resources/settlements.js +1 -1
- package/lib/resources/sign-up.js +1 -1
- package/lib/resources/specialties.js +1 -1
- package/lib/resources/staff-profiles.js +1 -1
- package/lib/resources/staff.js +1 -1
- package/lib/resources/statistics.js +1 -1
- package/lib/resources/subscriptions.js +1 -1
- package/lib/resources/terminals.js +1 -1
- package/lib/resources/transaction-export.js +1 -1
- package/lib/resources/transactions.js +1 -1
- package/lib/resources/triggers.js +1 -1
- package/lib/resources/vendors.js +1 -1
- package/lib/resources/verify.js +1 -1
- package/lib/resources/workers.js +1 -1
- package/lib/resources/workflow-exceptions.js +1 -1
- package/lib/services/aws.js +1 -1
- package/lib/services/version.js +1 -1
- package/lib/{staff-e0e2790e.js → staff-4390ab8c.js} +397 -260
- package/lib/utils/application.js +1 -1
- package/lib/utils/professions.js +1 -1
- package/lib/utils/request.js +1 -1
- package/lib/utils/staff.js +1 -1
- package/lib/utils/staff.js.flow +41 -4
- package/package.json +3 -3
package/lib/utils/application.js
CHANGED
|
@@ -19,7 +19,7 @@ require('./does-param-exist.js');
|
|
|
19
19
|
require('@medipass/utils/sentry');
|
|
20
20
|
require('./get-axios-error.js');
|
|
21
21
|
require('../storage-4b403caa.js');
|
|
22
|
-
var request = require('../staff-
|
|
22
|
+
var request = require('../staff-4390ab8c.js');
|
|
23
23
|
require('lodash/omitBy');
|
|
24
24
|
require('lodash/isEmpty');
|
|
25
25
|
require('store/src/store-engine');
|
package/lib/utils/professions.js
CHANGED
|
@@ -19,7 +19,7 @@ require('./does-param-exist.js');
|
|
|
19
19
|
require('@medipass/utils/sentry');
|
|
20
20
|
require('./get-axios-error.js');
|
|
21
21
|
require('../storage-4b403caa.js');
|
|
22
|
-
var request = require('../staff-
|
|
22
|
+
var request = require('../staff-4390ab8c.js');
|
|
23
23
|
require('lodash/omitBy');
|
|
24
24
|
require('lodash/isEmpty');
|
|
25
25
|
require('store/src/store-engine');
|
package/lib/utils/request.js
CHANGED
|
@@ -19,7 +19,7 @@ require('./does-param-exist.js');
|
|
|
19
19
|
require('@medipass/utils/sentry');
|
|
20
20
|
require('./get-axios-error.js');
|
|
21
21
|
require('../storage-4b403caa.js');
|
|
22
|
-
var request = require('../staff-
|
|
22
|
+
var request = require('../staff-4390ab8c.js');
|
|
23
23
|
require('lodash/omitBy');
|
|
24
24
|
require('lodash/isEmpty');
|
|
25
25
|
require('store/src/store-engine');
|
package/lib/utils/staff.js
CHANGED
|
@@ -19,7 +19,7 @@ require('./does-param-exist.js');
|
|
|
19
19
|
require('@medipass/utils/sentry');
|
|
20
20
|
require('./get-axios-error.js');
|
|
21
21
|
require('../storage-4b403caa.js');
|
|
22
|
-
var request = require('../staff-
|
|
22
|
+
var request = require('../staff-4390ab8c.js');
|
|
23
23
|
require('lodash/omitBy');
|
|
24
24
|
require('lodash/isEmpty');
|
|
25
25
|
require('store/src/store-engine');
|
package/lib/utils/staff.js.flow
CHANGED
|
@@ -4,7 +4,16 @@ import _uniq from 'lodash/uniq';
|
|
|
4
4
|
import sdk from '../index';
|
|
5
5
|
import * as professionsUtils from './professions';
|
|
6
6
|
|
|
7
|
-
export async function parseProviderSet(
|
|
7
|
+
export async function parseProviderSet(
|
|
8
|
+
providerSet,
|
|
9
|
+
{
|
|
10
|
+
businessId,
|
|
11
|
+
funders,
|
|
12
|
+
providerRegistrationTypes,
|
|
13
|
+
providerNumberTypes: _providerNumberTypes,
|
|
14
|
+
parseProviderNumberType = false
|
|
15
|
+
} = {}
|
|
16
|
+
) {
|
|
8
17
|
const fetchModalities = async () => {
|
|
9
18
|
const modalityIds = providerSet.map(providerData => providerData.modalityId);
|
|
10
19
|
const uniqueModalityIds = _uniq(modalityIds).filter(Boolean);
|
|
@@ -24,12 +33,31 @@ export async function parseProviderSet(providerSet, { businessId, funders, provi
|
|
|
24
33
|
return practices;
|
|
25
34
|
};
|
|
26
35
|
|
|
27
|
-
const
|
|
36
|
+
const fetchProviderNumberTypes = async () => {
|
|
37
|
+
if (_providerNumberTypes) return _providerNumberTypes;
|
|
38
|
+
const providerNumberTypeIds = providerSet.map(providerData => providerData.providerNumberTypeId);
|
|
39
|
+
const uniqueProviderNumberTypeIds = _uniq(providerNumberTypeIds).filter(Boolean);
|
|
40
|
+
const providerNumberTypes = await Promise.all(
|
|
41
|
+
uniqueProviderNumberTypeIds.map(providerNumberTypeId =>
|
|
42
|
+
sdk.providerNumberTypes.getProviderNumberType(providerNumberTypeId)
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
return providerNumberTypes;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const [
|
|
49
|
+
fundersResponse,
|
|
50
|
+
practicesResponse,
|
|
51
|
+
modalitiesResponse,
|
|
52
|
+
providerRegistrations,
|
|
53
|
+
providerNumberTypesResponse
|
|
54
|
+
] = await Promise.all([
|
|
28
55
|
funders ? funders : sdk.funders.getFunders(),
|
|
29
56
|
fetchPractices(),
|
|
30
57
|
fetchModalities(),
|
|
31
58
|
// providerSet is in the same shape as professions, so let's just use that func.
|
|
32
|
-
professionsUtils.parseProfessions(providerSet, { providerRegistrationTypes })
|
|
59
|
+
professionsUtils.parseProfessions(providerSet, { providerRegistrationTypes }),
|
|
60
|
+
parseProviderNumberType ? fetchProviderNumberTypes() : []
|
|
33
61
|
]);
|
|
34
62
|
|
|
35
63
|
const fundersMap = fundersResponse.reduce(
|
|
@@ -45,12 +73,21 @@ export async function parseProviderSet(providerSet, { businessId, funders, provi
|
|
|
45
73
|
{}
|
|
46
74
|
);
|
|
47
75
|
|
|
76
|
+
const providerNumberTypesMap = providerNumberTypesResponse?.reduce(
|
|
77
|
+
(currentProviderNumberTypes, providerNumberType) => ({
|
|
78
|
+
...currentProviderNumberTypes,
|
|
79
|
+
[providerNumberType._id]: providerNumberType
|
|
80
|
+
}),
|
|
81
|
+
{}
|
|
82
|
+
);
|
|
83
|
+
|
|
48
84
|
const newProviderSet = providerSet.map((providerData, i) => ({
|
|
49
85
|
...providerData,
|
|
50
86
|
...providerRegistrations[i],
|
|
51
87
|
practice: practicesMap[providerData.practiceId],
|
|
52
88
|
funder: fundersMap[providerData.funderId],
|
|
53
|
-
modality: modalitiesMap[providerData.modalityId]
|
|
89
|
+
modality: modalitiesMap[providerData.modalityId],
|
|
90
|
+
...(parseProviderNumberType && { providerNumberType: providerNumberTypesMap?.[providerData?.providerNumberTypeId] })
|
|
54
91
|
}));
|
|
55
92
|
|
|
56
93
|
return newProviderSet;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medipass/web-sdk",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.19.1-feature-provider-number-types.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@babel/plugin-transform-runtime": "7.8.3",
|
|
45
|
-
"@medipass/utils": "^11.
|
|
45
|
+
"@medipass/utils": "^11.57.0",
|
|
46
46
|
"axios-mock-adapter": "1.19.0",
|
|
47
47
|
"babel-eslint": "10.0.1",
|
|
48
48
|
"eslint": "^4.8.0",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"query-string": "7.0.0",
|
|
51
51
|
"rimraf": "^2.6.2"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "927d18f9eff2468bd7ba203541561907e6086141"
|
|
54
54
|
}
|