Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions content/patterns/emerging-disease-detection/_index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
title: Emerging Disease Detection
date: 2023-10-01
validated: false
summary: This pattern is based on a demo implementation of an automated data pipeline for sepsis analysis previously developed by Red Hat.
products:
- Red Hat OpenShift Container Platform
- Red Hat OpenShift Serverless
industries:
- medical
aliases: /emerging-disease-detection/
pattern_logo: emerging-disease-detection.png
links:
install: getting-started
arch: https://www.redhat.com/architect/portfolio/architecturedetail?ppid=6
help: https://groups.google.com/g/validatedpatterns
bugs: https://github.com/validatedpatterns/emerging-disease-detection/issues
ci: edd
---

:toc:
:imagesdir: /images
:_content-type: ASSEMBLY
include::modules/comm-attributes.adoc[]:

== Background

Use case::

* Use a AI automation at the edge to detect emerging diseases.
* Use an event driven architecture
* Securely manage secrets across the deployment.
+
[NOTE]
====
Based on the requirements of a specific implementation, certain details might differ. However, all validated patterns that are based on a portfolio architecture, generalize one or more successful deployments of a use case.
====

Background::
No technology is better poised to transform Healthcare as AI and Business Process Automation. Coupled with an Edge Architecture, these continuous monitoring and detection systems can scale to provide early warning intervention and measurable process improvements, anywhere.

Detection of disease states like sepsis, stroke, pulmonary embolism, and heart attack requires low-latency, broadband, asynchronous streaming capabilities. We have prototyped an early warning platform built with a distributed edge architecture, fed by at-home post-operative monitoring (fitbit, smart phone, wifi devices) and automated Clinical care escalation and coordination processes. This platform has the potential to significantly lower network traffic and cost while providing early warning interventions for our nation's Veterans.

[id="about-solution"]
== About the solution

To demonstrate the effectiveness of the solution this pattern focuses on the specific problem of Sepsis. Sepsis is the body's extreme response to an infection. It is a life-threatening medical emergency. Sepsis is a costly and life threatening condition that can result in multi-organ failure. Beating conditions like sepsis requires rapid detection and mitigation of risks. With the immune system compromised, recovery at home is often preferred to minimize the risk for cross-infections, yet medical teams often lack the capability to perform constant surveillance for emerging risks across their patient cohorts, especially in rural settings. In this session, we will demonstrate an early warning system driven by Clinical AI at the Edge, fed by at-home post-operative monitoring and automated Clinical care escalation and coordination processes.

Sepsis is a costly and life threatening condition that can result in multi-organ failure. Beating conditions like sepsis requires rapid detection and mitigation of risks. With the immune system compromised, recovery at home is often preferred to minimize the risk for cross-infections, yet medical teams often lack the capability to perform constant surveillance for emerging risks across their patient cohorts, especially in rural settings. In this demonstration, we will follow a vulnerable, post-operative patient, Alani, as she recovers from surgery in her home setting.

== Technology Highlights:
* Event-Driven Architecture
* Mobile Engagement
* Machine Learning
* BPM+ Process Automation


//figure 1 originally
.Overview of the solution reference architecture
image::emerging-disease-detection/edd-reference-architecture.png[Reference Architecture]

In the following figure, logically, this solution can be viewed as being composed of an automation component, unified management including secrets management, and the clusters under management, all running on top of a user-chosen mixture of on-premise data centers and public clouds.

//figure 2 originally
.Sepsis Detection Workflow
image::emerging-disease-detection/edd-sepsis-detection-ml-workflow.png[ML Workflow]

[id="about-technology"]
== About the technology

The following technologies are used in this solution:

https://www.redhat.com/en/technologies/cloud-computing/openshift/try-it[Red Hat OpenShift Platform]::
An enterprise-ready Kubernetes container platform built for an open hybrid cloud strategy. It provides a consistent application platform to manage hybrid cloud, public cloud, and edge deployments. It delivers a complete application platform for both traditional and cloud-native applications, allowing them to run anywhere. OpenShift has a pre-configured, pre-installed, and self-updating monitoring stack that provides monitoring for core platform components. It also enables the use of external secret management systems, for example, HashiCorp Vault in this case, to securely add secrets into the OpenShift platform.

https://www.redhat.com/en/technologies/cloud-computing/openshift/try-it[Red Hat OpenShift GitOps]::
A declarative application continuous delivery tool for Kubernetes based on the ArgoCD project. Application definitions, configurations, and environments are declarative and version controlled in Git. It can automatically push the desired application state into a cluster, quickly find out if the application state is in sync with the desired state, and manage applications in multi-cluster environments.

https://www.redhat.com/en/technologies/management/ansible[Red Hat Ansible Automation Platform]::
Provides an enterprise framework for building and operating IT automation at scale across hybrid clouds including edge deployments. It enables users across an organization to create, share, and manage automation, from development and operations to security and network teams.

Hashicorp Vault::
Provides a secure centralized store for dynamic infrastructure and applications across clusters, including over low-trust networks between clouds and data centers.

This solution also uses a variety of _observability tools_ including the Prometheus monitoring and Grafana dashboard that are integrated with OpenShift as well as components of the Observatorium meta-project which includes Thanos and the Loki API.
227 changes: 227 additions & 0 deletions content/patterns/emerging-disease-detection/getting-started.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
---
title: Getting Started
weight: 10
aliases: /emerging-disease-detection/getting-started/
---

:toc:
:imagesdir: /images
:_content-type: ASSEMBLY

== Prerequisites

. An OpenShift cluster (Go to https://console.redhat.com/openshift/create[the OpenShift console]). Cluster must have a dynamic StorageClass to provision PersistentVolumes. See also link:../../emerging-disease-detection/cluster-sizing[sizing your cluster].
. A GitHub account (and a token for it with repositories permissions, to read from and write to your forks)

For installation tooling dependencies, see link:https://validatedpatterns.io/learn/quickstart/[Patterns quick start].

The use of this pattern depends on having a Red Hat OpenShift cluster. In this version of the validated pattern
there is no dedicated Hub / Edge cluster for the *Emerging Disease Detection* pattern. This single node pattern can be extend as a managed cluster(s) to a central hub. See link:../../emerging-disease-detection/ideas-for-customization[ideas for customization.]

If you do not have a running Red Hat OpenShift cluster you can start one on a
public or private cloud by using link:https://console.redhat.com/openshift/create[Red Hat's cloud service].

[id="utilities"]
= Utilities

A number of utilities have been built by the validated patterns team to lower the barrier to entry for using the community or Red Hat Validated Patterns. To use these utilities you will need to export some environment variables for your cloud provider:

[id="preparation"]
= Preparation

. Fork the link:https://github.com/validatedpatterns/emerging-disease-detection[emerging-disease-detection] repo on GitHub. It is necessary to fork because your fork will be updated as part of the GitOps and DevOps processes.
. Clone the forked copy of this repository.
+
[,sh]
----
git clone git@github.com:<your-username>/emerging-disease-detection.git
----

. Create a local copy of the Helm secrets values file that can safely include credentials
+
*DO NOT COMMIT THIS FILE*
+
You do not want to push credentials to GitHub.
+
[,sh]
----
cp values-secret.yaml.template ~/values-secret.yaml
vi ~/values-secret.yaml
----

*values-secret.yaml example*

[source,yaml]
----
secrets:
- name: rhpam
vaultPrefixes:
- global
fields:
- name: rhpam_api_passwd
value: kieserver
- name: sso_siteadmin_password
value: r3dh4t1!
- name: kie_admin_password
value: admin
- name: kieserver_user_password
value: kieserver
- name: psql_passwd
value: rhpam

- name: fhir-psql-db
vaultPrefixes:
- global
fields:
- name: psql_credentials_secret
value: psql_secret
- name: psql_user_name
value: fhir
- name: psql_user_passwd
value: fhir
----

When you edit the file you can make changes to the various DB and Grafana passwords if you wish.

. Customize the `values-global.yaml` for your deployment
+
[,sh]
----
git checkout -b my-branch
vi values-global.yaml
----

*Replace instances of PROVIDE_ with your specific configuration*

[source,yaml]
----
global:
pattern: emerging-disease-detection
hubClusterDomain: "AUTO" # this is for test only This value is automatically fetched when Invoking against a cluster

options:
useCSV: false
syncPolicy: Automatic
installPlanApproval: Automatic

main:
clusterGroupName: hub
gitOpsSpec:
operatorChannel: gitops-1.9
----

[,sh]
----
git add values-global.yaml
git commit values-global.yaml
git push origin my-branch
----

. You can deploy the pattern using the link:/infrastructure/using-validated-pattern-operator/[validated pattern operator]. If you do use the operator then skip to Validating the Environment below.
. Preview the changes that will be made to the Helm charts.
+
[,sh]
----
./pattern.sh make show
----

. Login to your cluster using oc login or exporting the KUBECONFIG
+
[,sh]
----
oc login
----
+
.or set KUBECONFIG to the path to your `kubeconfig` file. For example
+
[,sh]
----
export KUBECONFIG=~/my-ocp-env/auth/kubeconfig
----

[id="check-the-values-files-before-deployment-getting-started"]
== Check the values files before deployment

You can run a check before deployment to make sure that you have the required variables to deploy the
Emerging Disease Detection Validated Pattern.

You can run `make predeploy` to check your values. This will allow you to review your values and changed them in
the case there are typos or old values. The values files that should be reviewed prior to deploying the
Medical Diagnosis Validated Pattern are:

|===
| Values File | Description

| values-secret.yaml / values-secret-emerging-disease-detection.yaml
| This is the values file that will include the rhpam and fhir-psql-db sections with all database et al secrets

| values-global.yaml
| File that is used to contain all the global values used by Helm
|===

= Deploy

. Apply the changes to your cluster
+
[,sh]
----
./pattern.sh make install
----
+
If the install fails and you go back over the instructions and see what was missed and change it, then run `make update` to continue the installation.

. This takes some time. Especially for the OpenShift Data Foundation operator components to install and synchronize. The `make install` provides some progress updates during the install. It can take up to twenty minutes. Compare your `make install` run progress with the following video showing a successful install.

. Check that the operators have been installed in the UI.
.. To verify, in the OpenShift Container Platform web console, navigate to *Operators → Installed Operators* page.
.. Check that the Operator is installed in the `openshift-operators` namespace and its status is `Succeeded`.

[id="using-openshift-gitops-to-check-on-application-progress-getting-started"]
== Using OpenShift GitOps to check on Application progress

You can also check on the progress using OpenShift GitOps to check on the various applications deployed.

. Obtain the ArgoCD URLs and passwords.
+
The URLs and login credentials for ArgoCD change depending on the pattern
name and the site names they control. Follow the instructions below to find
them, however you choose to deploy the pattern.
+
Display the fully qualified domain names, and matching login credentials, for
all ArgoCD instances:
+
[,sh]
----
ARGO_CMD=`oc get secrets -A -o jsonpath='{range .items[*]}{"oc get -n "}{.metadata.namespace}{" routes; oc -n "}{.metadata.namespace}{" extract secrets/"}{.metadata.name}{" --to=-\\n"}{end}' | grep gitops-cluster`
CMD=`echo $ARGO_CMD | sed 's|- oc|-;oc|g'`
eval $CMD
----
+
The result should look something like:
+
[,text]
----
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
hub-gitops-server hub-gitops-server-emerging-disease-detection-hub.apps.wh-edd-cluster.aws.validatedpatterns.com hub-gitops-server https passthrough/Redirect None
# admin.password
xsyYU6eSWtwniEk1X3jL0c2TGfQgVpDH
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
cluster cluster-openshift-gitops.apps.wh-edd-cluster.aws.validatedpatterns.com cluster 8080 reencrypt/Allow None
kam kam-openshift-gitops.apps.wh-edd-cluster.aws.validatedpatterns.com kam 8443 passthrough/None None
openshift-gitops-server openshift-gitops-server-openshift-gitops.apps.wh-edd-cluster.aws.validatedpatterns.com openshift-gitops-server https passthrough/Redirect None
# admin.password
FdGgWHsBYkeqOczE3PuRpU1jLn7C2fD6
----
+
The most important ArgoCD instance to examine at this point is `emerging-disease-detection-hub`. This is where all the applications for the pattern can be tracked.

. Check all applications are synchronised. There are thirteen different ArgoCD "applications" deployed as part of this pattern.

[id="viewing-the-sepsis-application-dashboard-getting-started"]
== Viewing the Sepsis Detection dashboard
TO-DO: Describe how to examine the various parts of the Sepsis application

= Next Steps

link:https://groups.google.com/g/hybrid-cloud-patterns[Help & Feedback]
link:https://github.com/validatedpatterns/emerging-disease-detection/issues[Report Bugs]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.