Lab Instructions
Lab Instructions for HealthGorilla ETL with CCD
Prerequisites
Checked out Lab Repo from GitHub CS595 Lab RepoStep
Pull the code to get the latest updates for GitHub Repo
Python version 3.10 or later
A Python virtual environment to link and use for the project
Do Git Pull on lab repo to make sure you have the latest updates
Setup and Verify LOF Services
Open <Project Root>
Activate the python virtual environment
Go to
lof
folderEdit
.env file
Update client_id and client_secret values with the credentials you have receivedclient_id= client_secret=
Install Requirements
pip install -r requirements.txt
Run
services.py
You should see the message :
LoF Services verified successfully
Possible Error Messages and resolution:
Missing or Incorrect client_id
Failed to get LoF auth token: 400 : {"error":"Invalid client ID"}
Resolution: Update correct client_id in .env file
Missing or Incorrect client_secret
Failed to get LoF auth token: 401 : {"error":"Unauthorized: Client authentication failed","status":401}
Resolution: Update correct client_secret in .env file
HIN lab
In this lab we will be
Retrieve two patients from Health Gorilla
Registering them with CCD using CCD patient register API
Retrieve patient conditions in HealthGorilla
Populate them to CCD FHIR DB using python FHIRClient SDK
Setup HIN lab
Open <Project Root>
Activate the python virtual environment
Go to /labs/hin
Install Requirements
pip install -r requirements.txt
Make sure CCD Services are running
Login to CCD UI
Instructions
Note: Anytime during the exercise if you need to delete patients and rerun the exercise, uncomment the Delete the patient by MRN block
in main, update the MRN and delete the patient and patient FHIR data
Step 1 - Populating Patients
Implement
retrieve_patient_from_hg
functionImplement
transform_hg_to_ccd
functionUncomment
hg_etl_pipeline.create_patients()
code in the main block and runOn a successful run
You should see the below logs
1 match found in Health Gorilla for patient Rantdt Hotestead with HG ID: 1b7aca64e07d9a4b8ea0ff22 Patient registration status code : 201 1 match found in Health Gorilla for patient Angi Roftec with HG ID: 3e7aca64fa952e7abc670566 Patient registration status code : 201
You should the new patients on the CCD UI
Note: It may take few seconds for the new patients to become visible. Refresh the page. Wait for sometime. If you don't see the new patients close CCD and re-login
Note down the MRN for the patients
Step 2 - Update MRN
Comment
hg_etl_pipeline.create_patients()
code in the main blockOpen patients.json file
Update the corresponding MRN from Step 1 for each patient
Step 3 - Populate Conditions
Implement retrieve_conditions_from_hg
Implement create_ccd_condition
Uncomment Step 3 code block in main and run
The program should run successfully and should insert all the patient conditions from HealthGorilla
Adding some conditions may fail due to some mismatch and missing values.
You can ignore that
Validating the patient conditions on FHIR
http://localhost:8080/fhir/Condition?subject=<your_patient_id>&_pretty=true
Validating the patient conditions on CCD Facesheet
Submission
Both Patient JSON files as per step 3.e
Both Patient Screenshots as per step 3.f
Last updated