Find a patient
Find a patient’s records in a folder or by search. Search runs on the device. The Seald Healthcare Cloud never sees the query.
Who can do this: a member of the key domains in scope. Search covers only key domains the person is a member of.
The samples use the allowed helper from Access decisions.
1. List a folder or search
Search matches names and the dataset’s index fields. To search by an identifier, such as a medical record number, the dataset must list it in indexFields.
// one folderconst listing = await allowed(await client.folders.list(folder));
// or a searchconst found = await client.folders.search({ text: 'Jordan Lee' }, { datasets: ['encounters'] });// one folderlet listing = try await allowed(client.folders.list(folder))
// or a searchlet found = try await client.folders.search(SearchQuery(text: "Jordan Lee"), datasets: ["encounters"])// one folderval listing = allowed(client.folders.list(folder))
// or a searchval found = client.folders.search(SearchQuery(text = "Jordan Lee"), datasets = listOf("encounters"))2. Show the entries
Render entries. A search also returns indexes, one decision per folder index. Show each denied index, because its entries are missing.
render(found.entries);for (const index of found.indexes) if (index.decision.outcome === 'deny') showMissing(index.domain);render(found.entries)for index in found.indexes { if case .deny = index.decision { showMissing(index.domain) } }render(found.entries)found.indexes.filter { it.decision is Decided.Deny }.forEach { showMissing(it.domain) }3. Open the chosen entry
Opening an entry is a separate decision. See Edit a record and save a new version.
Next
- List and search for every
SearchQueryfield andEntryfield.