@openmrs/esm-api 5.3.3-pre.1237 → 5.3.3-pre.1247
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/.turbo/turbo-build.log +2 -2
- package/__mocks__/openmrs-esm-config.mock.ts +1 -3
- package/dist/openmrs-esm-api.js.map +1 -1
- package/jest.config.js +8 -9
- package/package.json +4 -4
- package/src/environment.ts +1 -4
- package/src/index.ts +9 -9
- package/src/openmrs-backend-dependencies.ts +2 -2
- package/src/openmrs-fetch.test.ts +63 -78
- package/src/openmrs-fetch.ts +32 -63
- package/src/public.ts +8 -8
- package/src/setup.ts +6 -7
- package/src/shared-api-objects/current-patient.test.ts +20 -28
- package/src/shared-api-objects/current-patient.ts +11 -18
- package/src/shared-api-objects/current-user.ts +29 -57
- package/src/shared-api-objects/location.ts +6 -7
- package/src/shared-api-objects/visit-type.ts +6 -7
- package/src/shared-api-objects/visit-utils.ts +35 -48
- package/src/types/fetch.ts +1 -1
- package/src/types/fhir.ts +95 -95
- package/src/types/index.ts +5 -5
- package/src/types/visit-resource.ts +1 -1
- package/webpack.config.js +14 -14
package/src/types/fhir.ts
CHANGED
|
@@ -5,98 +5,98 @@ we can remove this file in favor of the one they maintain
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
export type ResourceName =
|
|
8
|
-
|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
8
|
+
| 'DomainResource'
|
|
9
|
+
| 'Organization'
|
|
10
|
+
| 'Location'
|
|
11
|
+
| 'HealthcareService'
|
|
12
|
+
| 'Practitioner'
|
|
13
|
+
| 'Patient'
|
|
14
|
+
| 'RelatedPerson'
|
|
15
|
+
| 'Device'
|
|
16
|
+
| 'Account'
|
|
17
|
+
| 'AllergyIntolerance'
|
|
18
|
+
| 'Schedule'
|
|
19
|
+
| 'Slot'
|
|
20
|
+
| 'Appointment'
|
|
21
|
+
| 'AppointmentResponse'
|
|
22
|
+
| 'AuditEvent'
|
|
23
|
+
| 'Basic'
|
|
24
|
+
| 'BodySite'
|
|
25
|
+
| 'Substance'
|
|
26
|
+
| 'Medication'
|
|
27
|
+
| 'Group'
|
|
28
|
+
| 'Specimen'
|
|
29
|
+
| 'DeviceComponent'
|
|
30
|
+
| 'DeviceMetric'
|
|
31
|
+
| 'ValueSet'
|
|
32
|
+
| 'Questionnaire'
|
|
33
|
+
| 'QuestionnaireResponse'
|
|
34
|
+
| 'Observation'
|
|
35
|
+
| 'FamilyMemberHistory'
|
|
36
|
+
| 'DocumentReference'
|
|
37
|
+
| 'DiagnosticOrder'
|
|
38
|
+
| 'ProcedureRequest'
|
|
39
|
+
| 'ReferralRequest'
|
|
40
|
+
| 'Procedure'
|
|
41
|
+
| 'ImagingStudy'
|
|
42
|
+
| 'ImagingObjectSelection'
|
|
43
|
+
| 'Media'
|
|
44
|
+
| 'DiagnosticReport'
|
|
45
|
+
| 'CommunicationRequest'
|
|
46
|
+
| 'DeviceUseRequest'
|
|
47
|
+
| 'MedicationOrder'
|
|
48
|
+
| 'NutritionOrder'
|
|
49
|
+
| 'Order'
|
|
50
|
+
| 'ProcessRequest'
|
|
51
|
+
| 'SupplyRequest'
|
|
52
|
+
| 'VisionPrescription'
|
|
53
|
+
| 'ClinicalImpression'
|
|
54
|
+
| 'Condition'
|
|
55
|
+
| 'EpisodeOfCare'
|
|
56
|
+
| 'Encounter'
|
|
57
|
+
| 'MedicationStatement'
|
|
58
|
+
| 'RiskAssessment'
|
|
59
|
+
| 'Goal'
|
|
60
|
+
| 'CarePlan'
|
|
61
|
+
| 'Composition'
|
|
62
|
+
| 'Contract'
|
|
63
|
+
| 'Coverage'
|
|
64
|
+
| 'ClaimResponse'
|
|
65
|
+
| 'Claim'
|
|
66
|
+
| 'Communication'
|
|
67
|
+
| 'StructureDefinition'
|
|
68
|
+
| 'ConceptMap'
|
|
69
|
+
| 'OperationDefinition'
|
|
70
|
+
| 'Conformance'
|
|
71
|
+
| 'DataElement'
|
|
72
|
+
| 'DetectedIssue'
|
|
73
|
+
| 'DeviceUseStatement'
|
|
74
|
+
| 'DocumentManifest'
|
|
75
|
+
| 'EligibilityRequest'
|
|
76
|
+
| 'EligibilityResponse'
|
|
77
|
+
| 'EnrollmentRequest'
|
|
78
|
+
| 'EnrollmentResponse'
|
|
79
|
+
| 'ExplanationOfBenefit'
|
|
80
|
+
| 'Flag'
|
|
81
|
+
| 'Immunization'
|
|
82
|
+
| 'ImmunizationRecommendation'
|
|
83
|
+
| 'ImplementationGuide'
|
|
84
|
+
| 'List'
|
|
85
|
+
| 'MedicationAdministration'
|
|
86
|
+
| 'MedicationDispense'
|
|
87
|
+
| 'OperationOutcome'
|
|
88
|
+
| 'MessageHeader'
|
|
89
|
+
| 'NamingSystem'
|
|
90
|
+
| 'OrderResponse'
|
|
91
|
+
| 'PaymentNotice'
|
|
92
|
+
| 'PaymentReconciliation'
|
|
93
|
+
| 'Person'
|
|
94
|
+
| 'ProcessResponse'
|
|
95
|
+
| 'Provenance'
|
|
96
|
+
| 'SearchParameter'
|
|
97
|
+
| 'Subscription'
|
|
98
|
+
| 'SupplyDelivery'
|
|
99
|
+
| 'TestScript'
|
|
100
|
+
| 'Binary'
|
|
101
|
+
| 'Bundle'
|
|
102
|
+
| 'Parameters';
|
package/src/types/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from './fetch';
|
|
2
|
+
export * from './fhir-resource';
|
|
3
|
+
export * from './openmrs-resource';
|
|
4
|
+
export * from './user-resource';
|
|
5
|
+
export * from './visit-resource';
|
package/webpack.config.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
const ForkTsCheckerWebpackPlugin = require(
|
|
2
|
-
const { resolve } = require(
|
|
3
|
-
const { CleanWebpackPlugin } = require(
|
|
4
|
-
const { BundleAnalyzerPlugin } = require(
|
|
1
|
+
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
|
2
|
+
const { resolve } = require('path');
|
|
3
|
+
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
4
|
+
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
|
5
5
|
|
|
6
|
-
const { peerDependencies } = require(
|
|
6
|
+
const { peerDependencies } = require('./package.json');
|
|
7
7
|
|
|
8
8
|
module.exports = (env) => ({
|
|
9
|
-
entry: [resolve(__dirname,
|
|
9
|
+
entry: [resolve(__dirname, 'src/index.ts')],
|
|
10
10
|
output: {
|
|
11
|
-
filename:
|
|
12
|
-
path: resolve(__dirname,
|
|
13
|
-
library: { type:
|
|
11
|
+
filename: 'openmrs-esm-api.js',
|
|
12
|
+
path: resolve(__dirname, 'dist'),
|
|
13
|
+
library: { type: 'system' },
|
|
14
14
|
},
|
|
15
|
-
devtool:
|
|
15
|
+
devtool: 'source-map',
|
|
16
16
|
module: {
|
|
17
17
|
rules: [
|
|
18
18
|
{
|
|
19
19
|
test: /\.m?(js|ts|tsx)$/,
|
|
20
20
|
exclude: /node_modules/,
|
|
21
|
-
use:
|
|
21
|
+
use: 'swc-loader',
|
|
22
22
|
},
|
|
23
23
|
],
|
|
24
24
|
},
|
|
25
25
|
resolve: {
|
|
26
|
-
extensions: [
|
|
26
|
+
extensions: ['.ts', '.js', '.tsx', '.jsx'],
|
|
27
27
|
},
|
|
28
28
|
plugins: [
|
|
29
29
|
new CleanWebpackPlugin(),
|
|
30
30
|
new ForkTsCheckerWebpackPlugin(),
|
|
31
31
|
new BundleAnalyzerPlugin({
|
|
32
|
-
analyzerMode: env && env.analyze ?
|
|
32
|
+
analyzerMode: env && env.analyze ? 'static' : 'disabled',
|
|
33
33
|
}),
|
|
34
34
|
],
|
|
35
35
|
externals: Object.keys(peerDependencies || {}),
|
|
36
36
|
devServer: {
|
|
37
37
|
disableHostCheck: true,
|
|
38
38
|
headers: {
|
|
39
|
-
|
|
39
|
+
'Access-Control-Allow-Origin': '*',
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
42
|
});
|