Lines 4-44javascript
5 * @beta New in this release; surface may evolve as the EHR adapters stabilize.
8 * - Sync status (`status`)
9 * - Bulk imports (`import`)
10 * - FHIR-shaped CRUD on resources (`resources.*`)
11 * - Patient-centric views (`patients`, `patientSummary`, `patientTimeline`)
12 * - Pre-aggregated typed views per resource type (`views.*`)
14 * All operations are workspace-scoped; the FHIR server identity is determined
15 * by the workspace's connected EHR integration.
17export class FhirResource extends WorkspaceScopedResource {
18 /** Get current FHIR sync status (server identity, last sync, counts) */
20 return extractData(await this.client.GET('/v1/{workspace_id}/fhir/status', {
21 params: { path: { workspace_id: this.workspaceId } },
24 /** Trigger a FHIR import (full or partial, depending on request) */
26 return extractData(await this.client.POST('/v1/{workspace_id}/fhir/import', {
MediumDynamic Require
Package source references dynamic require/import behavior.
dist/resources/fhir.jsView on unpkg · L24 27 params: { path: { workspace_id: this.workspaceId } },
31 /** Search patients by demographics or identifiers */
32 async searchPatients(params) {
33 return extractData(await this.client.GET('/v1/{workspace_id}/fhir/patients', {
34 params: { path: { workspace_id: this.workspaceId }, query: params },
37 /** Get a patient summary (canonical demographics + active conditions/meds) */
38 async getPatientSummary(patientId) {
39 return extractData(await this.client.GET('/v1/{workspace_id}/fhir/patients/{patient_id}/summary', {
40 params: { path: { workspace_id: this.workspaceId, patient_id: patientId } },
43 /** Get a patient's longitudinal clinical timeline */
44 async getPatientTimeline(patientId) {