Skip to content

Smart on FHIR application for matching patient records with clinical trials

License

Notifications You must be signed in to change notification settings

mcode/clinical-trial-matching-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clinical-trial-matching-app

Requirements

Testing with a launcher

  1. Run npm install to install the necessary packages.
  2. Run npm start to start the application.
  3. Launch the application from the SMART launcher.
    • Visit SMART Launcher
    • Launch http://localhost:3200/launch
      • Ensure that the "Simulate launch within the EHR user interface" option is disabled as local development is unable to set cookies in an iframe over plain http
    • Select a practitioner and a patient
    • Page will load with name of selected patient displayed

Running the matching services:

Present on the application's search page is the option of several matching services. For each one you wish to use, you must also have their wrapper running (see Requirements).

npm install
npm start

NOTE: TrialScope and TrialJectory both run on port 3000 so thus you will not be able to run them at the same time. This is because TrialScope will be phased out soon.

Uploading test patients to the public SMART sandbox

Testing this SMART App is more meaningful when we can supply test patients that exercise various aspects of the application. Test patients are represented as FHIR R4 bundles at src/utils/r4_test_patients. To upload the test patients to the public SMART sandbox:

  1. Add FHIR R4 Patient Bundles at src/utils/r4_test_patients/; e.g. mCODE R1 STU1, US Core, etc. Two example mCODE Patient Bundles are provided.
  2. Run npm run upload-test-patients or npm run upload-test-patients:dump.
    • Result of running either command:
      • The HTTP status response codes of each input Patient Bundle and its entries are printed to the command-line. A 200 OK code indicates a successful upload. A 201 Created code indicates successful upload for the first time. A 400 Bad Request indicates an unsuccessful upload, and a diagnostic message is printed out for further troubleshooting.
    • Additional result of running the latter command:
      • Each inputted Patient Bundle is split into two separate Resources: a Patient and a Bundle containing the remaining Resources. The script then creates an untracked directory, /test_patient_dump/R4/, and populates it with the pairs of Resources. This directory is useful for development or upload troubleshooting purposes.

Running tests

Tests can be run by executing:

npm test

Running the code linter

Code liniting can be run by executing:

npm run lint

Some issues can be automatically corrected with:

npm run lint:js --fix

Learn More

To learn more about Next.js, take a look at the following resources:

About

Smart on FHIR application for matching patient records with clinical trials

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published