@ovok/core 0.4.47 → 0.4.49-dev.492
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/README.md
CHANGED
|
@@ -30,6 +30,16 @@ yarn add @ovok/core
|
|
|
30
30
|
pnpm add @ovok/core
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
### Release channels
|
|
34
|
+
|
|
35
|
+
| Channel | Branch | Install |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| Stable | `main` | `npm install @ovok/core` |
|
|
38
|
+
| Release candidate | `staging` | `npm install @ovok/core@next` |
|
|
39
|
+
| Development | `development` | `npm install @ovok/core@dev` |
|
|
40
|
+
|
|
41
|
+
Development builds are versioned `X.Y.Z-dev.<commit count>`. Their git tag and GitHub release add the commit as `+<short sha>`.
|
|
42
|
+
|
|
33
43
|
## Quick Start
|
|
34
44
|
|
|
35
45
|
```typescript
|
|
@@ -628,15 +638,19 @@ turning the feature on; an unmapped email can still produce the uniform 202
|
|
|
628
638
|
response without sending a message. `useUpdatePatientSharingSettings()` is the
|
|
629
639
|
corresponding mutation hook.
|
|
630
640
|
|
|
631
|
-
`listPatientSharing()` returns `outgoing`, `incoming`, `practitioners`,
|
|
632
|
-
`relatedPersons`. `practitioners` lists active shares of a patient's
|
|
633
|
-
with practitioners; `relatedPersons` lists the Observation codes a
|
|
634
|
-
with carers.
|
|
635
|
-
|
|
641
|
+
`listPatientSharing()` returns `outgoing`, `incoming`, `practitioners`,
|
|
642
|
+
`relatedPersons`, and `received`. `practitioners` lists active shares of a patient's
|
|
643
|
+
whole record with practitioners; `relatedPersons` lists the Observation codes a
|
|
644
|
+
patient shares with carers. `received` is for a signed-in carer: the shares patients
|
|
645
|
+
gave them, each with the sharing patient and its `codes`. A carer gets only
|
|
646
|
+
`received`, and a patient always gets an empty `received`. For compatibility with
|
|
647
|
+
older servers, the SDK defaults any missing `practitioners`, `relatedPersons` or
|
|
648
|
+
`received` array to `[]`. Listing is for patients and carers; a practitioner gets 403.
|
|
636
649
|
`revokePatientSharing(consentId)` uses the existing DELETE route
|
|
637
|
-
to end a share immediately or decline a pending invite.
|
|
638
|
-
|
|
639
|
-
(`
|
|
650
|
+
to end a share immediately or decline a pending invite. A carer calls it with a
|
|
651
|
+
`received` share's `consentId` to leave that share. It returns 204; 404
|
|
652
|
+
(`Share not found.`) means the caller is not a party, and a 409 means the share
|
|
653
|
+
already ended or kept changing; reload the list and retry. A
|
|
640
654
|
practitioner's whole-record share has no measurement-code list.
|
|
641
655
|
|
|
642
656
|
Invitations are named by purpose, all backed by `/v1/invites/*`:
|
|
@@ -18,11 +18,12 @@ function redeemPatientSharingInvite(body, requestOptions) {
|
|
|
18
18
|
}
|
|
19
19
|
function listPatientSharing(requestOptions) {
|
|
20
20
|
return this.get("/v1/patient-sharing/shares", ...(0, request_options_1.optionalArg)(requestOptions)).then((shares) => {
|
|
21
|
-
var _a, _b;
|
|
21
|
+
var _a, _b, _c;
|
|
22
22
|
return ({
|
|
23
23
|
...shares,
|
|
24
24
|
practitioners: (_a = shares.practitioners) !== null && _a !== void 0 ? _a : [],
|
|
25
25
|
relatedPersons: (_b = shares.relatedPersons) !== null && _b !== void 0 ? _b : [],
|
|
26
|
+
received: (_c = shares.received) !== null && _c !== void 0 ? _c : [],
|
|
26
27
|
});
|
|
27
28
|
});
|
|
28
29
|
}
|
|
@@ -42,6 +42,8 @@ export type PatientSharingShares = {
|
|
|
42
42
|
incoming: PatientSharingShare[];
|
|
43
43
|
practitioners: PatientSharingPractitionerShare[];
|
|
44
44
|
relatedPersons: PatientSharingRelatedPersonShare[];
|
|
45
|
+
/** For a signed-in carer: the shares patients gave them. Empty for a patient. */
|
|
46
|
+
received: PatientSharingRelatedPersonShare[];
|
|
45
47
|
};
|
|
46
48
|
export type CreatePatientSharingInvite = {
|
|
47
49
|
codes: string[];
|
|
@@ -48,7 +48,7 @@ exports.OVOK_CORE_REQUIREMENTS = {
|
|
|
48
48
|
description: "The FHIR surface a server must provide for the @ovok/core client library's own methods to function.",
|
|
49
49
|
software: {
|
|
50
50
|
name: "@ovok/core",
|
|
51
|
-
version: "0.4.
|
|
51
|
+
version: "0.4.49-dev.492+6365d2b",
|
|
52
52
|
},
|
|
53
53
|
fhirVersion: "4.0.1",
|
|
54
54
|
format: ["json"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ovok/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.49-dev.492+6365d2b",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
"build": "rm -rf dist && tsc",
|
|
14
14
|
"docs:api-reference": "node scripts/generate-api-reference.mjs",
|
|
15
15
|
"verify:package": "node scripts/verify-package.mjs",
|
|
16
|
-
"prepare": "yarn lint && yarn build"
|
|
17
|
-
"release": "release-it"
|
|
16
|
+
"prepare": "yarn lint && yarn build"
|
|
18
17
|
},
|
|
19
18
|
"author": "Fatih Kayan <fatih.kayan@actimi.com> (https://fatihkayan.dev/)",
|
|
20
19
|
"license": "MIT",
|
|
@@ -32,8 +31,9 @@
|
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
33
|
"@eslint/js": "^9.15.0",
|
|
34
|
+
"@medplum/core": "^5.1.26",
|
|
35
35
|
"@medplum/fhirtypes": "^5.1.26",
|
|
36
|
-
"@
|
|
36
|
+
"@medplum/react-hooks": "^5.1.26",
|
|
37
37
|
"@stylistic/eslint-plugin": "^2.12.1",
|
|
38
38
|
"@types/jest": "^29.5.14",
|
|
39
39
|
"@types/node": "^20.11.0",
|
|
@@ -48,44 +48,15 @@
|
|
|
48
48
|
"jest": "^29.7.0",
|
|
49
49
|
"react": "^18.3.1",
|
|
50
50
|
"react-test-renderer": "^18.3.1",
|
|
51
|
-
"release-it": "^19.0.6",
|
|
52
51
|
"ts-jest": "^29.2.5",
|
|
53
52
|
"ts-node": "^10.9.2",
|
|
54
53
|
"typescript": "^5.3.3",
|
|
55
|
-
"typescript-eslint": "^8.15.0"
|
|
56
|
-
"@medplum/core": "^5.1.26",
|
|
57
|
-
"@medplum/react-hooks": "^5.1.26"
|
|
54
|
+
"typescript-eslint": "^8.15.0"
|
|
58
55
|
},
|
|
59
56
|
"peerDependencies": {
|
|
60
|
-
"@medplum/fhirtypes": ">=3.2.22",
|
|
61
|
-
"react": "*",
|
|
62
57
|
"@medplum/core": ">=3.2.19",
|
|
63
|
-
"@medplum/
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"git": {
|
|
67
|
-
"commitMessage": "chore: release ${version} [skip ci]",
|
|
68
|
-
"tagName": "v${version}",
|
|
69
|
-
"commit": true,
|
|
70
|
-
"tag": true,
|
|
71
|
-
"push": true
|
|
72
|
-
},
|
|
73
|
-
"npm": {
|
|
74
|
-
"publish": true,
|
|
75
|
-
"skipChecks": true
|
|
76
|
-
},
|
|
77
|
-
"github": {
|
|
78
|
-
"release": true
|
|
79
|
-
},
|
|
80
|
-
"hooks": {
|
|
81
|
-
"after:bump": "node scripts/sync-capability-version.mjs"
|
|
82
|
-
},
|
|
83
|
-
"plugins": {
|
|
84
|
-
"@release-it/conventional-changelog": {
|
|
85
|
-
"preset": "angular",
|
|
86
|
-
"infile": "CHANGELOG.md",
|
|
87
|
-
"header": "# Changelog"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
58
|
+
"@medplum/fhirtypes": ">=3.2.22",
|
|
59
|
+
"@medplum/react-hooks": ">=3.2.19",
|
|
60
|
+
"react": "*"
|
|
90
61
|
}
|
|
91
62
|
}
|