Skip to content

Commit

Permalink
Added in some sample workflows and updated sushi-config to create the…
Browse files Browse the repository at this point in the history
… workflow page. There is an issue with the menu. Added generic user/pass from settings for OpenMRS demo experiment rest file.
  • Loading branch information
lukeaduncan committed Jun 29, 2023
1 parent 654db8b commit c49e5ac
Show file tree
Hide file tree
Showing 8 changed files with 181 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ Thumbs.db
input/tests/results

# .env
.env
.envlocal-templates
local-template
53 changes: 53 additions & 0 deletions input/images-source/dedup-workflow.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@startuml
skinparam svgDimensionStyle false
hide footbox
participant "KenyaEMR 1" as EMR1
participant "KenyaEMR 2" as EMR2
participant "Data Mediator" as Data
participant "MPI" as MPI
participant "CQF Ruler" as CQL
participant "Report Generator" as Report

activate CQL
loop Copy Data to FHIR/CQL Server
activate Data
activate EMR1
Data -> EMR1: Query for FHIR resource updates\n**GET ///<Resource>//\n ?_lastUpdated=gtYYYY-MM-DD**
EMR1 -> Data: Return FHIR resources
deactivate EMR1
activate MPI
Data -> MPI: Match Patient records to MPI
MPI -> Data: Return unique identifier
deactivate MPI
Data -> CQL: Save FHIR resources to server\n**PUT ///<Resource>/////<id>//**\nor\n**POST ///<Bundle>//**
CQL -> Data: Return confirmation or error
deactivate Data
end

loop Copy Data to FHIR/CQL Server
activate Data
activate EMR2
Data -> EMR2: Query for FHIR resource updates\n**GET ///<Resource>//\n ?_lastUpdated=gtYYYY-MM-DD**
EMR2 -> Data: Return FHIR resources
deactivate EMR2
activate MPI
Data -> MPI: Match Patient records to MPI
MPI -> Data: Return unique identifier
deactivate MPI
Data -> CQL: Save FHIR resources to server\n**PUT ///<Resource>/////<id>//**\nor\n**POST ///<Bundle>//**
CQL -> Data: Return confirmation or error
deactivate Data
end

activate Report
opt Update indicator resources
Report -> CQL: Save updated Measure, Library, Terminology resources\n**PUT ///<Resource>/////<id>//**\nor\n**POST ///<Bundle>//**
CQL -> Report: Return confirmation or error
end

Report -> CQL: Evaluate measure for the period\n**GET /Measure/TXCURR/$evaluate-measure\n ?periodStart=YYYY-MM-DD&periodEnd=YYYY-MM-DD**
CQL -> Report: Return MeasureReport
deactivate Report
deactivate CQL

@enduml
44 changes: 44 additions & 0 deletions input/images-source/multiple-workflow.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@startuml
skinparam svgDimensionStyle false
hide footbox
participant "KenyaEMR 1" as EMR1
participant "KenyaEMR 2" as EMR2
participant "Data Mediator" as Data
participant "CQF Ruler" as CQL
participant "Report Generator" as Report

activate CQL
loop Copy Data to FHIR/CQL Server
activate Data
activate EMR1
Data -> EMR1: Query for FHIR resource updates\n**GET ///<Resource>//\n ?_lastUpdated=gtYYYY-MM-DD**
EMR1 -> Data: Return FHIR resources
deactivate EMR1
Data -> CQL: Save FHIR resources to server\n**PUT ///<Resource>/////<id>//**\nor\n**POST ///<Bundle>//**
CQL -> Data: Return confirmation or error
deactivate Data
end

loop Copy Data to FHIR/CQL Server
activate Data
activate EMR2
Data -> EMR2: Query for FHIR resource updates\n**GET ///<Resource>//\n ?_lastUpdated=gtYYYY-MM-DD**
EMR2 -> Data: Return FHIR resources
deactivate EMR2
Data -> CQL: Save FHIR resources to server\n**PUT ///<Resource>/////<id>//**\nor\n**POST ///<Bundle>//**
CQL -> Data: Return confirmation or error
deactivate Data
end

activate Report
opt Update indicator resources
Report -> CQL: Save updated Measure, Library, Terminology resources\n**PUT ///<Resource>/////<id>//**\nor\n**POST ///<Bundle>//**
CQL -> Report: Return confirmation or error
end

Report -> CQL: Evaluate measure for the period\n**GET /Measure/TXCURR/$evaluate-measure\n ?periodStart=YYYY-MM-DD&periodEnd=YYYY-MM-DD**
CQL -> Report: Return MeasureReport
deactivate Report
deactivate CQL

@enduml
32 changes: 32 additions & 0 deletions input/images-source/simple-workflow.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@startuml
skinparam svgDimensionStyle false
hide footbox
participant "KenyaEMR" as EMR
participant "Data Mediator" as Data
participant "CQF Ruler" as CQL
participant "Report Generator" as Report

activate CQL
loop Copy Data to FHIR/CQL Server
activate Data
activate EMR
Data -> EMR: Query for FHIR resource updates\n**GET ///<Resource>//\n ?_lastUpdated=gtYYYY-MM-DD**
EMR -> Data: Return FHIR resources
deactivate EMR
Data -> CQL: Save FHIR resources to server\n**PUT ///<Resource>/////<id>//**\nor\n**POST ///<Bundle>//**
CQL -> Data: Return confirmation or error
deactivate Data
end

activate Report
opt Update indicator resources
Report -> CQL: Save updated Measure, Library, Terminology resources\n**PUT ///<Resource>/////<id>//**\nor\n**POST ///<Bundle>//**
CQL -> Report: Return confirmation or error
end

Report -> CQL: Evaluate measure for the period\n**GET /Measure/TXCURR/$evaluate-measure\n ?periodStart=YYYY-MM-DD&periodEnd=YYYY-MM-DD**
CQL -> Report: Return MeasureReport
deactivate Report
deactivate CQL

@enduml
1 change: 1 addition & 0 deletions input/pagecontent/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

<a name="navigation"> </a>
<p>The top menu allows quick navigation to the different sections, and a <a href="toc.html">Table of Contents</a> is provided with the entire content of this Implementation Guide. (Be aware that some pages have multiple tabs).</p>
<p><a href="workflows.html">Some workflows have been defined.</a></p>
<p></p>
<a name="ip"> </a>
<h3>Intellectual Property Considerations</h3>
Expand Down
32 changes: 32 additions & 0 deletions input/pagecontent/workflows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Simple Iteration

This iteration is the simplest version where the KenyaEMR data is loaded into a FHIR Server with CQL support. This will work from multiple source data systems to get combined MeasureReports across all imported data.

This iteration will also be specific to the KenyaEMR data model without needing mapping to unused data elements. Future iterations will be created to use a more standard model that is mapped to the KenyaEMR model.

<div>
{% include simple-workflow.svg %}
</div>
<div style="clear: left;"></div>

## Simple Standard Iteration

This iteration is exactly the same as the Simple Iteration, but the CQL logic will be system agnostic and require mapping of concepts and possibly custom CQL expressions to align with the system specific data model.

## Multiple Source Iteration

This iteration adds some further complexity in importing data from multiple EMRs. This doesn't include any deduplication, but shows how any number of systems can send data to the CQL server.

<div>
{% include multiple-workflow.svg %}
</div>
<div style="clear: left;"></div>

## Multiple Sources with Deduplication

This iteration adds in a deduplication service to ensure data from multiple sources aren't counted multiple times. The CQL logic will use the unique identifier from the MPI to avoid counting records mulitple times.

<div>
{% include dedup-workflow.svg %}
</div>
<div style="clear: left;"></div>
6 changes: 5 additions & 1 deletion input/tests/server/OpenMRSFHIRExperiments.rest
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@fhir = https://demo.openmrs.org/openmrs/ws/fhir2/R4
@auth = user:pass
@auth = admin:Admin123

GET {{fhir}}/Patient?_count=100 HTTP/1.1
Authorization: Basic {{auth}}
Expand All @@ -25,4 +25,8 @@ Authorization: Basic {{auth}}

###
GET {{fhir}}/Encounter/24638591-9586-4b2b-a511-17bc1b79d1ba HTTP/1.1
Authorization: Basic {{auth}}

###
GET {{fhir}}/metadata
Authorization: Basic {{auth}}
18 changes: 12 additions & 6 deletions sushi-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,14 @@ dependencies:
# file name extension. Any subproperties that are valid filenames
# with supported extensions (e.g., .md/.xml) will be treated as
# sub-pages.
#pages:
# index.md:
# title: Example Home
pages:
index.xml:
title: Home
changes.xml:
title: Changes
workflows.md:
title: Workflows
generation: markdown
# implementation.xml:
# examples.xml:
# title: Examples Overview
Expand Down Expand Up @@ -167,9 +172,10 @@ dependencies:
# currently only supports one level deep on sub-menus.
# To provide a custom menu.xml file, do not include this property and
# include a `menu.xml` file in input/includes.
#menu:
# Home: index.html
# Artifacts:
menu:
Home: index.html
Workflows: workflows.html
Artifacts: artifacts.html
# Profiles: artifacts.html#2
# Extensions: artifacts.html#3
# Value Sets: artifacts.html#4
Expand Down

0 comments on commit c49e5ac

Please sign in to comment.