Skip to content

Feature/fhircast#5988

Draft
awatson1978 wants to merge 15 commits into
OHIF:masterfrom
awatson1978:fhircast-mvd
Draft

Feature/fhircast#5988
awatson1978 wants to merge 15 commits into
OHIF:masterfrom
awatson1978:fhircast-mvd

Conversation

@awatson1978
Copy link
Copy Markdown

@awatson1978 awatson1978 commented Apr 30, 2026

Context

FHIRCast Minimum Viable Demo (MVD)

Majority of feature exists in the following extension:
https://github.com/node-on-fhir/nof-ohif-viewer

However, changes to websockets and addition of a FHIR datastore are required. Staging here as a draft pull request, so we can have architecture review and discussion.

Changes & Results

Here's a summary of the changes:

platform/app/.env

  • Added a SMART_CLIENT_ID environment variable for SMART on FHIR authentication, with a comment explaining it can override the value in config/default.js.

platform/app/.webpack/webpack.pwa.js

  • Refactored the default proxy config from the old shorthand '/dicomweb': 'http://localhost:5000' to the explicit context/target object format.
  • Added a new /fhir-proxy dev server proxy that forwards requests to http://localhost:3100, strips the /fhir-proxy prefix, and enables WebSocket proxying.
  • Fixed the hasProxy merge logic — changed from overwriting the entire proxy array (proxy = [...]) to appending with .push(), so the new FHIR proxy entry isn't clobbered when env-based proxy vars are set.

platform/app/pluginConfig.json

  • Registered a new extension: @ohif/extension-nof-ohif-viewer (v0.0.1)
  • Registered a new mode: node-on-fhir (unscoped, no version)

platform/app/public/config/default.js

  • Added a FHIR R4 data source under the @ohif/extension-nof-ohif-viewer.dataSourcesModule.fhir namespace, with source name fhir, a friendly name, and a smartClientId.

Overall: This commit integrates a "Node on FHIR" extension and mode into OHIF, adding SMART on FHIR client configuration, a FHIR proxy for local development, and the necessary plugin/data-source registrations.

OHIF Preferences panels supports SMART registration

Screenshot 2026-04-30 at 3 48 31 AM

RIS reading worklist supports a SMART Launch functionality

Screenshot 2026-04-30 at 3 53 04 AM

OHIF extension receives the SMART Launch URL and fetches the FHIR data; Subscribe to FHIRcast

Screenshot 2026-04-30 at 3 52 21 AM

RIS updates the underlying ImagingStudy status; event bus triggers FHIRCast

Screenshot 2026-04-30 at 3 54 48 AM

OHIF receives events via FHIRCast

Screenshot 2026-04-30 at 3 55 18 AM

Testing

  1. Install Node on FHIR
  2. Install radiology-workflow, fhircast, and record-lifecycle repos into npmPackages directory
    3a.. See the following RIS Installation Instructions for a more detailed walkthrough.

3b.

cd demo-test
ls
git clone https://github.com/node-on-fhir/honeycomb/tree/radiology-workflow nof3100
ls -la
git clone https://github.com/node-on-fhir/honeycomb nof3100
cd nof3100/
mkdir npmPackages
cd npmPackages/
git clone https://github.com/node-on-fhir/radiology-workflow
git clone https://github.com/node-on-fhir/fhircast
git clone https://github.com/node-on-fhir/record-lifecycle
cd ../..
git clone https://github.com/OHIF/Viewers
cd extensions
git https://github.com/node-on-fhir/nof-ohif-viewer
  1. Run the RIS, probably with a command similar to this:
INITIALIZE_CONSENT_ENGINE=true EXTRA_WORKFLOWS=@node-on-fhir/radiology-workflow,@node-on-fhir/fhircast-module,@node-on-fhir/record-lifecycle meteor run --settings npmPackages/fhircast/settings/settings.fhircast.json --extra-packages "clinical:us-core,clinical:international-patient-summary,clinical:synthea,clinical:admin-tools,clinical:data-importer" --port 3100

Install OHIF with FHIR Datastore and FHIRCast

  1. Install OHIF/Viewers
  2. Change to this branch and fetch data
  3. Install the nof-ohif-viewer extension
SMART_CLIENT_ID=my-client-id yarn dev
  1. Register OHIF/Viewers as a SMART on FHIR client (from Preferences config page)
  2. In the RIS:

5.a Register a new user
5.b Load a Synthea sample patient in with the data-importer
5.c Select the patient from the Patient Directory
5.d Use the Order Entry page to add an XR order
5.e Go to the Tech Worklist, start and complete the exam; attach a .dcm file
5.f Go to the Reading Worklist, launch the exam in OHIF

  1. Back in OHIF
    6.a Verify that dicom image loads
    6.b Subscribe to the patient (third tab)

  2. RIS again
    7.a. Read the exam; finalize

  3. Very that OHIF receives the event

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • [] My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] OS: macOS Tahoe (26.3.1)
  • [] Node version: v25.9.0
  • [] Browser: Chrome 147.0.7727.103 (arm64)

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 30, 2026

Deploy Preview for ohif-dev failed. Why did it fail? →

Name Link
🔨 Latest commit b5f90b7
🔍 Latest deploy log https://app.netlify.com/projects/ohif-dev/deploys/6a02d44c1a671f0008af6859

@awatson1978 awatson1978 marked this pull request as draft April 30, 2026 08:44
Comment thread platform/app/.env
Comment thread platform/app/public/config/default.js
Comment on lines +68 to +71
},
{
"packageName": "@ohif/extension-nof-ohif-viewer",
"version": "0.0.1"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 New extension not installed as a dependency

@ohif/extension-nof-ohif-viewer@0.0.1 is registered here but is absent from package.json and yarn.lock. The OHIF plugin loader will try to resolve this package at build time and fail with a module-not-found error. The package must be added to the relevant package.json (and yarn.lock updated via yarn install) before this entry is usable.

Prompt To Fix With AI
This is a comment left during a code review.
Path: platform/app/pluginConfig.json
Line: 68-71

Comment:
**New extension not installed as a dependency**

`@ohif/extension-nof-ohif-viewer@0.0.1` is registered here but is absent from `package.json` and `yarn.lock`. The OHIF plugin loader will try to resolve this package at build time and fail with a module-not-found error. The package must be added to the relevant `package.json` (and `yarn.lock` updated via `yarn install`) before this entry is usable.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines 104 to +106
"packageName": "@ohif/mode-ultrasound-pleura-bline",
"version": "3.0.0"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Mode missing version field and not installed as a dependency

node-on-fhir has no version field, unlike every other extension and mode in this file (all of which declare a semver version). Additionally, this package does not appear in package.json or yarn.lock, so the build will fail to resolve it. A version should be added and the package installed.

Suggested change
"packageName": "@ohif/mode-ultrasound-pleura-bline",
"version": "3.0.0"
},
{
"packageName": "node-on-fhir",
"version": "0.0.1"
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: platform/app/pluginConfig.json
Line: 104-106

Comment:
**Mode missing `version` field and not installed as a dependency**

`node-on-fhir` has no `version` field, unlike every other extension and mode in this file (all of which declare a semver version). Additionally, this package does not appear in `package.json` or `yarn.lock`, so the build will fail to resolve it. A `version` should be added and the package installed.

```suggestion
    {
      "packageName": "node-on-fhir",
      "version": "0.0.1"
    }
```

How can I resolve this? If you propose a fix, please make it concise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants