CNotes is a web application that allows users to view a simpler summarized version of their clinical notes data. To use the web app visit https://cnotes-84a3dd9afa2f.herokuapp.com/.
This application is built using SvelteKit.
NOTE: this app has been taken down indefinitely.
- Install dependencies.
npm install
# or
npm ci- In the root of the repo, create a file called
.env. A sample file can be found below. Make sure to replaceAPI_KEYwith your own OpenAI API key.
API_KEY=<OPENAI_API_KEY>
MODEL_VER=gpt-3.5-turbo
ENV=LOCAL
FHIR_SERVER_URL=- Start a local development server.
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open- Access the running application by visiting
http://localhost:5173/.
Note: the following steps are not necessary to run a local instance.
- In the root of the repo, create a file called
.env.prod. A sample file can be found below.
API_KEY=<OPENAI_API_KEY>
MODEL_VER=gpt-3.5-turbo
ENV=PROD
FHIR_SERVER_URL="https://sample-url.com/fhir/"- Create a containerized production version of the app. The production build can be previews with
npm run preview.
docker-compose buildThe command above will result in a Docker image called cnotes.
- Visit the live application at
https://cnotes-84a3dd9afa2f.herokuapp.com/(no longer available), or the local server at http://localhost:5173/. - Select a date range from for which you would like to search clinical notes for.
- Click on the
Get Clinical Notesbutton to retrieve clinical notes. - Once the clinical notes have been retrieved, click on the
Summarizebutton to generate a summary of the clinical notes.
This web application queries an external FHIR server in order to retrieve the clinical notes for a patient for a given date range.
The pertinent data is then extracted from the server response bundle, and the clinical notes are parsed from the DocumentReference resources found within the bundle.
The resulting dataset is then be sent to an external language model for it to be summarized. This process may have to be repeated several times depending on the length of the input data. This is achieved through use of Open AI's ChatGPT API using GPT-3.5 model.
Figure 1: architectural diagram.
-
Clinical Note: the result of a health provider recording their interactions with a patient. Clinical notes can be "a record of visit, capturing the clinician’s subjective and objective findings, observations, diagnoses and recommended treatment plans" [1].
Within FHIR specifically, clinical notes can be one of at least eight different times of common clinical notes, which include consultation, discharge summary, history & physical, procedure, progress, imaging narrative, laboratory report narrative, and pathology report narrative notes [2].
-
FHIR: The Fast Healthcare Interoperability Resources (FHIR, pronounced "fire") standard is a set of rules and specifications for exchanging electronic health care data [3].
-
DocumentReference: In FHIR, a reference to a document of any kind for any purpose [4].
-
Understanding clinical notes: https://medium.com/@dothealth/understanding-clinical-notes-d98afeabf90
-
Clinical Notes Guidance: https://hl7.org/fhir/us/core/stu4/clinical-notes-guidance.html
-
Fast Healthcare Interoperability Resources - https://en.wikipedia.org/wiki/Fast_Healthcare_Interoperability_Resources
-
Resource DocumentReference - https://www.hl7.org/fhir/documentreference.html

