•
1.
2.
3.
Source A Source B Source C Source D
FHIR representation
FHIR is key to solving semantic data normalization challenge- needed for reproducible AI
FHIR Resources examples:Patient, Encounter, Practitioner, Procedure, Condition, Observation, Procedure Request, Medication Request, Medication Administration.
Time
BQ FHIR Analytics StoreDe-id services
AI Training/Testing/Validations
Discovery/Experiments, Dashboards, Reports, Analysis Notebooks
De-Id Analytics Store, Features, Measures.
AI Inference Models
Inference Output (FHIR) Engagement Applications
Synthetic data for AI training
MODEL ARTIFACT and LINEAGE TRACKING. MODEL PERF. MONITORING. DATA VALIDATION.
Streaming data FHIR API StoreCloud Function
Feature Definitions
Orchestrated experimentation
Development datasets
Source RepositoryData
ExtractionData Valid.
Data Prep.
Model Training
Model Eval.
Training pipeline CI/CD
Build components &
pipelines
Run automated tests
Tag and store artifacts
Deploy to target
environment
Artifact Store
Trainingdatasets
Model Registry
Continuous training
ML Metadata Store
Source code
ML pipeline Artifacts
TrainedModels
Model Valid.
Data Extraction
Data Valid.
Data Prep.
Model Training
Model Eval.
Model Valid.
Exploratory Data Analysis
Feature Store
Patient’s longitudinal records in FHIR format data warehouse
Confidential & Proprietary
Data Distribution in source systems
Human Bias
Human Bias
Human Bias
Human Bias
Human Bias
Classification Bias
Selection Bias
Information Bias
Selection/Classification Bias
Selection Bias
Patient has symptoms, acute illness and seeks
care
Enter data in EMR vs. Scanned PDF
Coding and submission of
claims
Adjudication and Payment of Claims
Exams, Diagnostics, Prescription
Verify across multiple resources Combine multiple sources Maintain Provenance and Lineage of Data
Multiple mentions of diagnostic code to confirm.
Occurrence of disease specific procedure.
Medication specific to the disease.
Lab tests specific to the disease.
Validate structured data with in Clinical notes, images, and scanned documents.
Combine Inpatient, Outpatient, and Telehealth encounters - longitudinal patient record in FHIR representation.
Use catalog for datasets and models - document datasets and model metadata.
Document source of data, source type, last updated, user/process.
Document how a certain feature is created, which models use the feature.
Organize by Patient Timeline / Time Window.
Define Prediction Task.
Find / Derive Labels.
Select Cohort.
Create new features (if needed).
●
●
What are we predicting? (task)For whom are we predicting? (cohort)When are we predicting? (prediction time)What’s the outcome of the prediction? (label)
What are we predicting? (task)
For whom are we predicting? (cohort)
When are we predicting? (prediction time)
All in-patients who’ve been in the hospital for 24 hrs
When will this patient leave the hospital
24 hours after admission
What’s the outcome of the prediction? (label)
Length of stay in days: 1-3, 3-7, 7-14, or 14+ days
SELECTId,subject.patientid,class.code as enc_class,period.start as periodStart,period.end as periodEnd,date_diff(cast(substr(period.end,0,10) as date),cast(substr(period.start,0,10) as date),day)as LOSFROM Encounter WHERE class.code='IMP'
Define length of stay from FHIR - Encounter table.
Creating “Length of Stay” Label from FHIR data
A set of patients that satisfies some inclusion
criterion, typically an exposure /outcome of some sort.
Exposure Outcome
A condition of interest that could happen after the exposure
Something that could happen to the patient.
Diabetic
HbA1c > 6.5 Count of Glucose test
Knowledgebase: Diabetes → GlucoseDiabetes → HbA1C
https://phekb.org/
https://rdrr.io/github/OHDSI/Aphrodite/
WITH diabetes as (
SELECT
dx.patientId as patientId,
dx.codeCodingCode as diagnosis_code,
dx.codeCodingDisplay as diagnosis_desc,
obs.codeText as obs_desc
FROM `gcp-hcls-demo.fhir_batch_analytics.condition` as dx
JOIN `gcp-hcls-demo.fhir_batch_analytics.observation` as obs
ON obs.patientId=dx.patientId
WHERE lower(dx.codeCodingDisplay) like '%diabe%'
and lower(obs.codeText) ='glucose'
),
medication_counts as (
SELECT
rx.patientId as patientId,
COUNT(DISTINCT rx.medicationCodeableConceptCodingCode) AS med_count
FROM `gcp-hcls-demo.fhir_batch_analytics.medication_request` as rx
WHERE status = 'active'
GROUP BY 1
)
SELECT
diabetes.patientId,
diabetes.diagnosis_code,
diabetes.diagnosis_desc,
medication_counts.med_count
FROM diabetes,medication_counts
where diabetes.patientId = medication_counts.patientId
ORDER BY med_count descDefine diabetic patients -using Condition, Observation, and Medications table.
Cohort Selection Example
Aggregation of Codes Scoring Fields
Use BMI as a measure.
Comorbidity Burden - account for overall illness and avoid comparing sick people to healthy people.
Severity of Illness Scores: SAPS, SOFA, OASIS, APACHE
Use medication class instead of medication code.
Use condition category or procedure modality.
Adding Knowledge/Context
Socio Economic and social vulnerability status from public data - census etc.
SOFA score calculation from EHR data example: https://github.com/MIT-LCP/mimic-code/blob/master/concepts/severityscores/sofa.sql
1.
2.
3.
Utility: Purpose of the model. What action can be taken on the model outcome to improve “X” for “Y”.
Feasibility: Workflow and IT integration. Implementation and maintenance cost.
Impact: On clinical care, patient outcomes, and operational efficiency.
Timeline
Inpatient admission Discharge Readmission Renal Failure
Window of ObservationWindow of Prediction and Action:Hours, Days, Months, Years
Past Events
ActionBeneficiary Incentives and Authority
Economic Validity
Regulation/FDA approval
Patient Privacy and Consent
Resource Capacity
Logistics and Cost
1.
2.
3.
Time
BQ FHIR Analytics StoreDe-id services
AI Training/Testing/Validations
Discovery/Experiments, Dashboards, Reports, Analysis Notebooks
De-Id Analytics Store, Features, Measures.
AI Inference Models
Inference Output (FHIR) Engagement Applications
Synthetic data for AI training
MODEL ARTIFACT and LINEAGE TRACKING. MODEL PERF. MONITORING. DATA VALIDATION.
Streaming data FHIR APICloud Function
Feature Definitions
Model Deployment CI/CDSource Repository
Serving infrastructure
Build Prediction Service
Run Automated Tests
Deploy to Target Environment
Log StoreLive Data
Model Registry
Explain Evaluate MonitorPredict
Serving Logs
1.
2.
3.
Google EHR Deep Learning Paper
Emory Sepsis Deep Learning
Artificial Intelligence in intensive care
Example of a Sequence Deep Learning Architecture
Tensorflow Extended (TFX)
Google Cloud AI Platform Pipeline
FHIR API Specification
FHIR Risk Assessment Resource
Google FHIR Example
Tensorflow Word Embeddings
HIPAA Aligned Cloud Architecture
GCP Healthcare Analytics Platform
GCP Healthcare API
Healthcare Data Harmonization
Healthcare Data Protection Suite
Various GCP Healthcare Examples
● Leveraging Synthetic Data to Benchmark a Cloud-Based FHIR API
Onix
Friday, Nov 20th, 2:00 pm-2:45 pm ET
Related Presentations
● Let’s Build! Google Cloud FHIR APIs Thursday, Nov 19th, 5:15 pm-6:00 pm CET
● FHIR Analytics using OHDSI Tools on CloudThursday, Nov 19th, 5:40 pm-6:00 pm CET
••••