-
An external client POSTs a FHIR R4 bundle (with a Patient, Location and multiple Observation resources ) to the RESTful API of the HAPI FHIR JPA server.
-
HAPI FHIR JPA Server persists (using Hiberate) to its PostgreSQL database. FHIR resources are stored as gzip blobs in the following table of the HAPI FHIR database schema: public.hfj_res_ver .
-
Debezium detects the additional records to the public.hfj_res_ver table and puts them in motion by sending the raw GZIP blobs to a kafka topic: fhir.public.hfj_res_ver
-
Messages in the fhir.public.hfj_res_ver topic can now be viewed via monitoring tools such as KafDrop. The sepsisdetection_rhpam application is also a consumer on that topic. During consumption of a Patient resource, the following occurs:
-
Given a patiend ID, the RESTful API of the HAPI FHIR server is queried for a list of all Observation resources for the Patient in a given time period. This list of Observation resources is used as the payload of an HTTP POST request to the sepsisdetection-ml function. The function responds with an indication of whether sepsis is likely or not.
-
A FHIR R4 RiskAssessment resource (which includes the data indicating likelyhood of sepsis) is posted to the FHIR Server via its RESTful APIs.
-
The RH-PAM process-engine embedded in the sepsisdetection-RHPAM application is invoked and a sepsis-detection business process is started. These business process and corresponding human tasks can be monitored via tools such as RH-PAMs dashbuilder component.
-
-
The sepsisdetection-ui application interacts with the RESTful KIE-Server APIs of sepsisdetection-rhpam and renders a user interface that allows for management of the sepsis-detection business process and corresponding human tasks.
-
The sepsisdetection-ui pulls in an IFrame from HealthFlow.
Ansible is included to deploy this application to OpenShift in a repeatable manner.
-
OpenShift Container Platform version 4.7.* or more recent. Resource requirements needed by the app (doesn’t include resource requirements of Openshift to support itself) is as follows:
-
RAM: 6 GB
-
CPU: 8
-
Storage: 10 PVCs of type RWO (no RWX requirement) and each of size 5 GiB
-
-
cluster-admin credentials to this OpenShift cluster are needed
-
Corresponding
ocutility installed locallyAll versions of this utility are available at either of the following:
-
https://access.redhat.com/downloads/content/290
RHN subscription required
-
https://mirror.openshift.com/pub/openshift-v4/clients/ocp/?C=M;O=D
Accessible without a RHN subscription
-
-
ansible installed locally
ie:
dnf install ansible -
git installed locally
-
Using the
ocutility that corresponds to the version of OpenShift that you will deploy to, log into the cluster:$ oc login <OCP API Server url> -u <cluster-admin userId> -p <passwd>
-
Clone the source code of this project:
$ git clone https://github.com/redhat-naps-da/himss_interoperability_showcase_2021
-
Change to the ansible directory of this project:
$ cd ansible
-
Deploy to OpenShift:
$ ansible-playbook playbooks/install.yml
-
Deployment should complete in about 15 minutes.
-
Notice the creation of a new OCP namespace where the application resides: user1-sepsisdetection
-
At the completion of the installation, expect to see messages similar to the following:
... PLAY RECAP ******************************************************************************************************************************************************************************************************* localhost : ok=137 changed=77 unreachable=0 failed=0 skipped=14 rescued=0 ignored=0
-
-
Optional: Uninstall from OpenShift:
$ ansible-playbook playbooks/uninstall.yml
As seen in the list of routes created in the user1_sepsisdetection namespace, the demo provides the following user interfaces and APIs:
This service consists of the RH-PAM process_engine embedded in SpringBoot.
-
This service consumes messages from Red Hat AMQ Streams
-
This service also exposes the following RESTful APIs:
-
KIE-Server REST APIs:
-
Swagger documentation is available in json format as per the following:
$ curl -v -u "kieserver:kieserver" https://$(oc get route sepsisdetection-rhpam -n user1-sepsisdetection --template='{{ .spec.host }}')/rest/swagger.json | jq .
-
-
FHIR Enabled REST APIs:
Augments the RH-PAM KIE-Server with additional APIs that allow for handling FHIR related process and task variables
-
The application includes a HAPI FHIR Server that exposes RESTful endpoints.
The demo scenario starts by submitting an HTTP POST with a FHIR bundle (which includes a FHIR R4 Patient) to the HAPI FHIR Server.
-
Set FHIR_SERVER_URL env var:
-
If testing environment deployed to OpenShift:
FHIR_SERVER_URL=https://$(oc get route fhir-server -n user1-sepsisdetection --template='{{ .spec.host }}') -
If testing environment deployed locally:
FHIR_SERVER_URL=http://localhost:8080
-
-
POST Observation to FHIR server
$ curl -X POST \ -H "Content-Type:application/fhir+json" \ $FHIR_SERVER_URL/fhir \ -d "@sepsisdetection-rhpam/src/test/resources/fhir/ObservationPatientBundle.json"
HealthFlow was initially supposed to have been deployed on the kubeframe as part of the demo, but they couldn’t get it containerized in time, so it was relegated to being displayed in that iFrame. There’s a container image out there for it, but it’s monolithic and bulky, and we kind of shelved helping them with it for the time being. It’s based on a project called Meteor, and includes an embedded FHIR server with database instance, as well as some other stuff. Pretty heavy duty.
Example URL:
The sepsisdetection-rhpam deployment is enabled with the kie_server as well as various endpoints that can consume FHIR payloads.
-
Set SEPSISDETECTION_RHPAM_URL env var:
-
If testing environment deployed locally:
SEPSISDETECTION_RHPAM_URL=http://localhost:9080
-
If testing environment deployed to OpenShift:
SEPSISDETECTION_RHPAM_URL=https://$(oc get route sepsisdetection-rhpam -n user1-sepsisdetection --template='{{ .spec.host }}')
-
-
Health Check Report
$ curl -u "kieserver:kieserver" -H 'Accept:application/json' $SEPSISDETECTION_RHPAM_URL/rest/server/healthcheck?report=true
-
View raw swagger json
$ curl -v -u "kieserver:kieserver" $SEPSISDETECTION_RHPAM_URL/rest/swagger.json | jq .
-
View swagger-ui:
Point your browser to the output of the following:
$ echo -en "\n$SEPSISDETECTION_RHPAM_URL/rest/api-docs/?url=$SEPSISDETECTION_RHPAM_URL/rest/swagger.json\n"
-
List KIE Containers
$ curl -u "kieserver:kieserver" -X GET $SEPSISDETECTION_RHPAM_URL/rest/server/containers
-
List process definitions in JSON representation:
$ curl -u "kieserver:kieserver" -X GET -H 'Accept:application/json' $SEPSISDETECTION_RHPAM_URL/rest/server/containers/sepsisdetection-kjar/processes/
-
List cases in JSON representation:
$ curl -u "kieserver:kieserver" -X GET -H 'Accept:application/json' $SEPSISDETECTION_RHPAM_URL/rest/server/queries/cases/
This project includes a docker-compose config file that allows for deployment of the application as containers in your local environment.
-
Start application pod with all linux containers:
$ docker-compose -f etc/docker-compose.yaml up -d
NoteIf underlying linux container system in use in your local environment is podman, then follow this set-up guide. -
The following diagram depicts the containers instantiated as part of this pod:
-
Post Debezium configs to kafka_connect container:
$ curl -X POST \ -H "Accept:application/json" -H "Content-Type:application/json" \ localhost:8083/connectors/ \ -d "@etc/hapi-fhir/debezium-fhir-server-pgsql.json"NoteThis step is not needed when running the solution in OpenShift. It’s only needed when running the solution in a local containerized environmennt (ie: docker-compose) -
Stop application pod with all linux containers:
$ docker-compose -f etc/docker-compose.yaml down
-
Build and install kjar project:
$ cd sepsisdetection-kjar $ mvn clean install -DskipTests
-
Build KIE-Server executable from this project:
$ cd sepsisdetection-rhpam $ mvn clean package
-
Build and Start app
$ mvn clean package -DskipTests && \ java -Dorg.kie.server.repo=../etc/sepsisdetection-rhpam/runtime_configs \ -jar target/sepsisdetection-rhpam-0.0.1.jar &> /tmp/sepsisdetection-rhpam.log & -
Optional: Create a kie-container in kie-server (kie-container should already be registered as per contents of etc/rhpam/sepsisdetection-rhpam.xml )
$ export KJAR_VERSION=1.0.0 $ export KIE_SERVER_CONTAINER_NAME=sepsisdetection-rhpam $ sed "s/{KIE_SERVER_CONTAINER_NAME}/$KIE_SERVER_CONTAINER_NAME/g" etc/rhpam/kie_container.json \ | sed "s/{KJAR_VERSION}/$KJAR_VERSION/g" \ > /tmp/kie_container.json && \ curl -u "kieserver:kieserver" -X PUT -H 'Content-type:application/json' localhost:9080/rest/server/containers/$KIE_SERVER_CONTAINER_NAME-$KJAR_VERSION -d '@/tmp/kie_container.json'
-
linkhttps://access.redhat.com/documentation/en-us/red_hat_decision_manager/7.11/html-single/integrating_red_hat_decision_manager_with_other_products_and_components/index#assembly-springboot-business-apps[RH-PAM apps with SpringBoot]
-
Decide what to do about integrating with Healthflow.io . Maybe create a simulator
-
Persisting list of Observations as part of process instance variables caused problems when retrieving those pInstance variables and marshalling to json (so as to be rendered in sepsisdetection-ui ).
-
Modify Makefile (as needed)
-
Build image and deploy to quay:
$ make docker-build docker-push
-
Deploy operator in OpenShift cluster:
$ make deploy cd config/manager && /u01/labs/mw/redhat-naps-da/himss_interoperability_showcase_2021/ansible/bin/kustomize edit set image controller=quay.io/redhat_naps_da/sepsisdetection-operator:0.0.2 /u01/labs/mw/redhat-naps-da/himss_interoperability_showcase_2021/ansible/bin/kustomize build config/default | kubectl apply -f - I0831 13:00:25.259384 30895 request.go:668] Waited for 1.075752563s due to client-side throttling, not priority and fairness, request: GET:https://api.cluster-3983.3983.sandbox362.opentlc.com:6443/apis/security.internal.openshift.io/v1?timeout=32s namespace/ansible-system created customresourcedefinition.apiextensions.k8s.io/himss2021s.cache.redhat.com created serviceaccount/ansible-controller-manager created role.rbac.authorization.k8s.io/ansible-leader-election-role created clusterrole.rbac.authorization.k8s.io/ansible-manager-role created clusterrole.rbac.authorization.k8s.io/ansible-metrics-reader created clusterrole.rbac.authorization.k8s.io/ansible-proxy-role created rolebinding.rbac.authorization.k8s.io/ansible-leader-election-rolebinding created clusterrolebinding.rbac.authorization.k8s.io/ansible-manager-rolebinding created clusterrolebinding.rbac.authorization.k8s.io/ansible-proxy-rolebinding created configmap/ansible-manager-config created service/ansible-controller-manager-metrics-service created deployment.apps/ansible-controller-manager created
-
Install HIMSS2021 resource
$ oc apply -f config/samples/cache_v1alpha1_himss2021.yaml
-
Acquire needed configs for use in RHPDS:
$ mkdir rhpds $ bin/kustomize build config/default > rhpds/sepsisdetection-operator-all-configs.yml $ cp config/samples/cache_v1alpha1_himss2021.yaml rhpds
-
Demo Onboarding request into RHPDS
-
agnosticd pull request











