Namespaces
ovok.sharing
Share a patient's observations with other people through invites, and manage active shares.
- Stable unknown
- Release candidate since 0.4.49-rc.4
- Development since 0.4.49-dev.517+4645a0a
ovok.sharing lets a patient share chosen observation codes with another person, and see or revoke those shares. Patient apps call it for the signed-in patient. A project admin turns sharing on in the sharing settings.
Invite someone
The patient creates an invite for a set of observation codes and passes the inviteId and code to the recipient.
const invite = await ovok.sharing.invites.create({
codes: ['8867-4'],
endsAt: null,
});
console.log(invite.inviteId, invite.code, invite.expiresAt);endsAtis an ISO 8601 end time, ornullfor no end.- The invite expires at
expiresAt.
Redeem an invite
The recipient redeems it while signed in.
const share = await ovok.sharing.invites.redeem({ inviteId, code });- It resolves to the created share.
- To accept a record-share invite with the active profile,
ovok.invites.acceptpicks the right route for you.
List and revoke shares
const { outgoing, incoming, practitioners, relatedPersons, received } = await ovok.sharing.shares.list();
await ovok.sharing.shares.revoke(consentId);- Groups the server does not send yet come back as empty arrays.
revoketakes the id of the share's consent.
Change sharing settings
const settings = await ovok.sharing.settings.retrieve();
await ovok.sharing.settings.update({ enabled: true, practitionerSharingEnabled: true });updatereplaces the settings.practitionerSharingEnabled: nullleaves that flag unchanged.
Reference
- sharing API reference: every method and type.
- invites guide
- Errors and retries
Last updated on