Managing patients
import {
Api,
Filter,
FilterChainPatient,
Patient,
PatientByHcPartyNameContainsFuzzyFilter,
hex2ua
} from '@icure/api'
import {crypto} from '@icure/api/node-compat.js'
const host = 'https://kraken.icure.dev/rest/v1';
const { patientApi, userApi, healthcarePartyApi, cryptoApi } = Api(host, 'esmith', 'mypassword', crypto)
const loggedUser = await userApi.getCurrentUser();
const loggedHcp = await healthcarePartyApi.getCurrentHealthcareParty()
await cryptoApi.loadKeyPairsAsTextInBrowserLocalStorage(
loggedUser.healthcarePartyId,
hex2ua("308204bc02...473a613059")
)
await cryptoApi.checkPrivateKeyValidity(loggedHcp)Last updated
Was this helpful?