@openmrs/esm-framework 10.0.1-pre.5240 → 10.0.1-pre.5251
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 +1 -1
- package/docs/functions/getVisitStore.md +1 -1
- package/docs/functions/getVisitsForPatient.md +1 -1
- package/docs/functions/saveVisit.md +1 -1
- package/docs/functions/setCurrentVisit.md +1 -1
- package/docs/functions/updateVisit.md +1 -1
- package/docs/functions/useVisitContextStore.md +39 -5
- package/docs/interfaces/VisitStoreState.md +0 -16
- package/docs/variables/defaultVisitCustomRepresentation.md +1 -1
- package/docs/variables/getStartedVisit.md +1 -1
- package/package.json +20 -20
package/.turbo/turbo-build.log
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **getVisitStore**(): `StoreApi`\<[`VisitStoreState`](../interfaces/VisitStoreState.md)\>
|
|
6
6
|
|
|
7
|
-
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:
|
|
7
|
+
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:68](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L68)
|
|
8
8
|
|
|
9
9
|
Returns the global visit store that manages the current visit state. The store
|
|
10
10
|
contains information about the current patient's visit and provides methods
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **getVisitsForPatient**(`patientUuid`, `abortController`, `v?`): `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\<\{ `results`: [`Visit`](../interfaces/Visit.md)[]; \}\>\>
|
|
6
6
|
|
|
7
|
-
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:
|
|
7
|
+
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:173](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L173)
|
|
8
8
|
|
|
9
9
|
## Parameters
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **saveVisit**(`payload`, `abortController`): `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\<[`Visit`](../interfaces/Visit.md)\>\>
|
|
6
6
|
|
|
7
|
-
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:
|
|
7
|
+
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:127](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L127)
|
|
8
8
|
|
|
9
9
|
Creates a new visit by sending a POST request to the OpenMRS REST API.
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **setCurrentVisit**(`patientUuid`, `visitUuid`): `void`
|
|
6
6
|
|
|
7
|
-
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:
|
|
7
|
+
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:88](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L88)
|
|
8
8
|
|
|
9
9
|
Sets the current visit for a patient in the global visit store. This is used
|
|
10
10
|
to manually specify which visit should be considered "active" for the given patient.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **updateVisit**(`uuid`, `payload`, `abortController`): `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\<[`Visit`](../interfaces/Visit.md)\>\>
|
|
6
6
|
|
|
7
|
-
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:
|
|
7
|
+
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:155](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L155)
|
|
8
8
|
|
|
9
9
|
Updates an existing visit by sending a POST request to the OpenMRS REST API.
|
|
10
10
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# Function: useVisitContextStore()
|
|
4
4
|
|
|
5
|
-
> **useVisitContextStore**(`mutateVisitCallback?`):
|
|
5
|
+
> **useVisitContextStore**(`mutateVisitCallback?`): `object`
|
|
6
6
|
|
|
7
|
-
Defined in: [packages/framework/esm-react-utils/src/useVisitContextStore.ts:
|
|
7
|
+
Defined in: [packages/framework/esm-react-utils/src/useVisitContextStore.ts:44](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useVisitContextStore.ts#L44)
|
|
8
8
|
|
|
9
9
|
A hook to return the visit context store and corresponding actions.
|
|
10
10
|
|
|
@@ -15,9 +15,43 @@ A hook to return the visit context store and corresponding actions.
|
|
|
15
15
|
() => `void`
|
|
16
16
|
|
|
17
17
|
An optional mutate callback to register. If provided, the
|
|
18
|
-
|
|
19
|
-
callbacks
|
|
18
|
+
returned `mutateVisit` function will invoke this callback (along with any other
|
|
19
|
+
callbacks registered by other components). Pass a callback with a stable identity;
|
|
20
|
+
one that changes on every render re-registers on every render.
|
|
20
21
|
|
|
21
22
|
## Returns
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
### manuallySetVisitUuid
|
|
25
|
+
|
|
26
|
+
> **manuallySetVisitUuid**: `null` \| `string`
|
|
27
|
+
|
|
28
|
+
### mutateVisit()
|
|
29
|
+
|
|
30
|
+
> **mutateVisit**: () => `void`
|
|
31
|
+
|
|
32
|
+
Invokes every registered mutate callback, revalidating visit data across the application.
|
|
33
|
+
|
|
34
|
+
Iterates over a copy so that a callback which registers or unregisters another does not
|
|
35
|
+
disturb the traversal.
|
|
36
|
+
|
|
37
|
+
#### Returns
|
|
38
|
+
|
|
39
|
+
`void`
|
|
40
|
+
|
|
41
|
+
### patientUuid
|
|
42
|
+
|
|
43
|
+
> **patientUuid**: `null` \| `string`
|
|
44
|
+
|
|
45
|
+
### setVisitContext()
|
|
46
|
+
|
|
47
|
+
> **setVisitContext**(...`args`): `void`
|
|
48
|
+
|
|
49
|
+
#### Parameters
|
|
50
|
+
|
|
51
|
+
##### args
|
|
52
|
+
|
|
53
|
+
...\[`null` \| [`Visit`](../interfaces/Visit.md)\]
|
|
54
|
+
|
|
55
|
+
#### Returns
|
|
56
|
+
|
|
57
|
+
`void`
|
|
@@ -14,22 +14,6 @@ Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:27](https://githu
|
|
|
14
14
|
|
|
15
15
|
***
|
|
16
16
|
|
|
17
|
-
### mutateVisitCallbacks
|
|
18
|
-
|
|
19
|
-
> **mutateVisitCallbacks**: `object`
|
|
20
|
-
|
|
21
|
-
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:34](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L34)
|
|
22
|
-
|
|
23
|
-
Stores a record of SWR mutate callbacks that should be called when
|
|
24
|
-
the Visit with the specified uuid is modified. The callbacks are keyed
|
|
25
|
-
by unique component IDs.
|
|
26
|
-
|
|
27
|
-
#### Index Signature
|
|
28
|
-
|
|
29
|
-
\[`componentId`: `string`\]: () => `void`
|
|
30
|
-
|
|
31
|
-
***
|
|
32
|
-
|
|
33
17
|
### patientUuid
|
|
34
18
|
|
|
35
19
|
> **patientUuid**: `null` \| `string`
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> `const` **defaultVisitCustomRepresentation**: `string`
|
|
6
6
|
|
|
7
|
-
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:
|
|
7
|
+
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:35](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L35)
|
|
8
8
|
|
|
9
9
|
The default custom representation string for fetching visit data from the REST API.
|
|
10
10
|
This representation includes comprehensive visit details such as encounters, patient,
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
> `const` **getStartedVisit**: `BehaviorSubject`\<`null` \| [`VisitItem`](../interfaces/VisitItem.md)\>
|
|
6
6
|
|
|
7
|
-
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:
|
|
7
|
+
Defined in: [packages/framework/esm-emr-api/src/visit-utils.ts:190](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-emr-api/src/visit-utils.ts#L190)
|
|
8
8
|
|
|
9
9
|
## Deprecated
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-framework",
|
|
3
|
-
"version": "10.0.1-pre.
|
|
3
|
+
"version": "10.0.1-pre.5251",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -59,24 +59,24 @@
|
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@openmrs/esm-api": "10.0.1-pre.
|
|
63
|
-
"@openmrs/esm-config": "10.0.1-pre.
|
|
64
|
-
"@openmrs/esm-context": "10.0.1-pre.
|
|
65
|
-
"@openmrs/esm-dynamic-loading": "10.0.1-pre.
|
|
66
|
-
"@openmrs/esm-emr-api": "10.0.1-pre.
|
|
67
|
-
"@openmrs/esm-error-handling": "10.0.1-pre.
|
|
68
|
-
"@openmrs/esm-expression-evaluator": "10.0.1-pre.
|
|
69
|
-
"@openmrs/esm-extensions": "10.0.1-pre.
|
|
70
|
-
"@openmrs/esm-feature-flags": "10.0.1-pre.
|
|
71
|
-
"@openmrs/esm-globals": "10.0.1-pre.
|
|
72
|
-
"@openmrs/esm-navigation": "10.0.1-pre.
|
|
73
|
-
"@openmrs/esm-offline": "10.0.1-pre.
|
|
74
|
-
"@openmrs/esm-react-utils": "10.0.1-pre.
|
|
75
|
-
"@openmrs/esm-routes": "10.0.1-pre.
|
|
76
|
-
"@openmrs/esm-state": "10.0.1-pre.
|
|
77
|
-
"@openmrs/esm-styleguide": "10.0.1-pre.
|
|
78
|
-
"@openmrs/esm-translations": "10.0.1-pre.
|
|
79
|
-
"@openmrs/esm-utils": "10.0.1-pre.
|
|
62
|
+
"@openmrs/esm-api": "10.0.1-pre.5251",
|
|
63
|
+
"@openmrs/esm-config": "10.0.1-pre.5251",
|
|
64
|
+
"@openmrs/esm-context": "10.0.1-pre.5251",
|
|
65
|
+
"@openmrs/esm-dynamic-loading": "10.0.1-pre.5251",
|
|
66
|
+
"@openmrs/esm-emr-api": "10.0.1-pre.5251",
|
|
67
|
+
"@openmrs/esm-error-handling": "10.0.1-pre.5251",
|
|
68
|
+
"@openmrs/esm-expression-evaluator": "10.0.1-pre.5251",
|
|
69
|
+
"@openmrs/esm-extensions": "10.0.1-pre.5251",
|
|
70
|
+
"@openmrs/esm-feature-flags": "10.0.1-pre.5251",
|
|
71
|
+
"@openmrs/esm-globals": "10.0.1-pre.5251",
|
|
72
|
+
"@openmrs/esm-navigation": "10.0.1-pre.5251",
|
|
73
|
+
"@openmrs/esm-offline": "10.0.1-pre.5251",
|
|
74
|
+
"@openmrs/esm-react-utils": "10.0.1-pre.5251",
|
|
75
|
+
"@openmrs/esm-routes": "10.0.1-pre.5251",
|
|
76
|
+
"@openmrs/esm-state": "10.0.1-pre.5251",
|
|
77
|
+
"@openmrs/esm-styleguide": "10.0.1-pre.5251",
|
|
78
|
+
"@openmrs/esm-translations": "10.0.1-pre.5251",
|
|
79
|
+
"@openmrs/esm-utils": "10.0.1-pre.5251"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"dayjs": "1.x",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"swr": "2.x"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@openmrs/typedoc-plugin-file-categories": "10.0.1-pre.
|
|
92
|
+
"@openmrs/typedoc-plugin-file-categories": "10.0.1-pre.5251",
|
|
93
93
|
"@swc/cli": "0.8.1",
|
|
94
94
|
"@swc/core": "1.15.21",
|
|
95
95
|
"@vitest/coverage-v8": "^4.1.2",
|