Skip to content

Commit

Permalink
Update to latest hapi-fhir-jpaserver-starter (#769)
Browse files Browse the repository at this point in the history
* update jpa

* update external

* updating to latest hapi

* compiled ruler with updates, wip

* operation migration table in readMe

* Update dependency versions

* Delete unused code

* Update to br-cs-merged code

* More dependency cleanup

* Update to use MR cache

* Whoops, didn't mean to override

* More dependency fixes

* Update github actions

* jacoco

* Fix integration tests

* Fixing tests

* Various test fixes and updates

* WIP, fixing tests

* Disable extract provider and fix extract tests

* Fixing tests

* Update to latest jpaserver-starter branch

* Remove extract provider

* Update the Readme with migration status of operations

* Fix cds hooks test

---------

Co-authored-by: Justin McKelvy <[email protected]>
Co-authored-by: Brenin Rhodes <[email protected]>
  • Loading branch information
3 people authored Apr 4, 2024
1 parent b4f8b8a commit c8d86f4
Show file tree
Hide file tree
Showing 1,044 changed files with 826 additions and 587,608 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/check-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: Check PR
on: pull_request

jobs:
maven:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Run Checks
run: mvn --batch-mode --no-transfer-progress --update-snapshots verify
maven:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Run Checks
run: mvn --batch-mode --no-transfer-progress --update-snapshots verify
84 changes: 42 additions & 42 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
name: Publish Snapshot
on:
push:
branches:
- master
push:
branches:
- master

jobs:
maven:
runs-on: ubuntu-latest
steps:
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish snapshot
run: mvn --batch-mode -no-transfer-progress --update-snapshots deploy
env:
MAVEN_USERNAME: ${{ vars.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
contentgroup/cqf-ruler:latest
alphora/cqf-ruler:latest
build-args: COMMIT_HASH=${{ env.SHORT_SHA }}
cache-from: type=gha
cache-to: type=gha,mode=max
maven:
runs-on: ubuntu-latest
steps:
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish snapshot
run: mvn --batch-mode -no-transfer-progress --update-snapshots deploy
env:
MAVEN_USERNAME: ${{ vars.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
contentgroup/cqf-ruler:latest
alphora/cqf-ruler:latest
build-args: COMMIT_HASH=${{ env.SHORT_SHA }}
cache-from: type=gha
cache-to: type=gha,mode=max
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,4 @@ Snap.*
.flattened-pom.xml

thunder-tests/thunderActivity.json
.aider*
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "external/hapi-fhir-jpaserver-starter"]
path = external/hapi-fhir-jpaserver-starter
url = https://github.com/hapifhir/hapi-fhir-jpaserver-starter.git
branch = 6.6.1-cr-updates
branch = br-cs-merged
4 changes: 1 addition & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
"streetsidesoftware.code-spell-checker-scientific-terms",
"streetsidesoftware.code-spell-checker-medical-terms",
"shengchen.vscode-checkstyle",
"sonarsource.sonarlint-vscode",
"redhat.fabric8-analytics",
"vscjava.vscode-java-test"
"sonarsource.sonarlint-vscode"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
Expand Down
27 changes: 8 additions & 19 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [


{
"type": "java",
"name": "Launch Application",
Expand All @@ -19,7 +17,7 @@
"-Dhapi.fhir.bulk_export_enabled=false",
"-Dspring.batch.job.enabled=false",
"-Dspring.main.allow-bean-definition-overriding=true"
],
]
},
{
"type": "java",
Expand All @@ -38,14 +36,11 @@
"-Dspring.datasource.url=jdbc:h2:mem:test_mem",
"-Dspring.datasource.dataClassName=org.h2.Driver",
"-Dspring.jpa.properties.hibernate.dialect=ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect",
"-Dhapi.fhir.cdshooks.enabled=true"
"-Dhapi.fhir.cr_enabled=true",
"-Dhapi.fhir.cdshooks.enabled=true",
"-Dhapi.fhir.cr.enabled=true",
"-Dspring.main.allow-bean-definition-overriding=true"
],
"classPaths": [
"$Auto",
"$Runtime"
]
"classPaths": ["$Auto", "$Runtime"]
},
{
"type": "java",
Expand All @@ -65,10 +60,7 @@
"-Dhapi.fhir.bulk_export_enabled=false",
"-Dspring.batch.job.enabled=false"
],
"classPaths": [
"$Auto",
"$Runtime"
]
"classPaths": ["$Auto", "$Runtime"]
},
{
"type": "java",
Expand All @@ -89,10 +81,7 @@
"-Dspring.datasource.dataClassName=org.h2.Driver",
"-Dspring.jpa.properties.hibernate.dialect=ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect"
],
"classPaths": [
"$Auto",
"$Runtime"
]
"classPaths": ["$Auto", "$Runtime"]
},
{
"type": "java",
Expand All @@ -105,7 +94,7 @@
"type": "java",
"name": "Launch Current File",
"request": "launch",
"mainClass": "${file}",
"mainClass": "${file}"
}
]
}
}
15 changes: 2 additions & 13 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,18 @@
"-Ddebug=true",
"-Dloader.debug=true"
]
},
}
],
"java.test.defaultConfig": "test-config",
"java.checkstyle.configuration": "${workspaceFolder}/config/checkstyle/checkstyle.xml",
"java.checkstyle.version": "9.2.1",
"cSpell.enabledLanguageIds": [
"java",
"json",
"xml",
"markdown"
],
"cSpell.enabledLanguageIds": ["java", "json", "xml", "markdown"],
"cSpell.ignorePaths": [
".git/objects",
".vscode",
"**/pom.xml",
"checkstyle.xml"
],
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"cSpell.words": [
"Alphora",
"autoconfiguration",
Expand Down Expand Up @@ -84,9 +76,6 @@
"**/.settings": true,
"**/.factorypath": true
},
"files.eol": "\r\n",
"editor.formatOnSave": true,
"thunder-client.saveToWorkspace": true,
"java.jdt.ls.vmargs": "-Xmx2G -XX:+UseG1GC -XX:+UseStringDeduplication",
"java.compile.nullAnalysis.mode": "automatic"
}
45 changes: 40 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

---

The cqf-ruler is based on the [HAPI FHIR JPA Server Starter](https://github.com/hapifhir/hapi-fhir-jpaserver-starter) and adds a set of plugins that provide an implementation of FHIR's [Clinical Reasoning Module](
http://hl7.org/fhir/clinicalreasoning-module.html), serve as a
The cqf-ruler is based on the [HAPI FHIR JPA Server Starter](https://github.com/hapifhir/hapi-fhir-jpaserver-starter) and adds a set of plugins that provide an implementation of FHIR's [Clinical Reasoning Module](http://hl7.org/fhir/clinicalreasoning-module.html), serve as a
knowledge artifact repository, and a [cds-hooks](https://cds-hooks.org/) compatible clinical decision support service. The cqf-ruler provides an [extensibility API](#plugins) to allow adding custom FHIR operations without the need to fork or clone the entire project.

See the [wiki](https://github.com/DBCG/cqf-ruler/wiki/Home) for more information
Expand All @@ -30,6 +29,7 @@ The public sandbox is not persistent, has no authentication, and is regularly re

The easiest way to get started with the cqf-ruler is to pull and run the docker image.
For avoiding to run docker container by default root user permission, the container from this image will run with a user named `cqfruler`

```bash
docker pull alphora/cqf-ruler
docker run -p 8080:8080 alphora/cqf-ruler
Expand Down Expand Up @@ -75,8 +75,7 @@ to clean up any unneeded or unused files, use:

#### Java

Go to [http://www.oracle.com/technetwork/java/javase/downloads/](
http://www.oracle.com/technetwork/java/javase/downloads/) and download the
Go to [http://www.oracle.com/technetwork/java/javase/downloads/](http://www.oracle.com/technetwork/java/javase/downloads/) and download the
latest (version 11 or higher) JDK for your platform, and install it.

#### Apache Maven
Expand Down Expand Up @@ -123,12 +122,48 @@ Inquires for commercial support can be directed to [[email protected]](info@alpho

[Clinical Quality Language](https://github.com/cqframework/clinical_quality_language) - Tooling in support of the CQL specification, including the CQL verifier/translator used in this project.

[CQL Evaluator](https://github.com/DBCG/cql-evaluator) - Provides the CQL execution environment used by the cqf-ruler.
[CQF Clinical Reasoning](https://github.com/cqframework/clinical-reasoning) - Provides the CQL and Clinical Reasoning support used by the cqf-ruler.

[CQF Tooling](https://github.com/cqframework/cqf-tooling) - Provides several operations that the cqf-ruler exposes are services, such as $refresh-generated content.

[CQL Support for VS Code](https://marketplace.visualstudio.com/items?itemName=cqframework.cql) - CQL IDE plugin with syntax highlighting, linting, and local CQL evaluation.

## Operation Migration

Several operations that once were built and exposed in the cqf-ruler have since migrated upstream into [Clinical-Reasoning](https://github.com/cqframework/clinical-reasoning)
and exposed in versions of [Hapi-Fhir](https://github.com/hapifhir/hapi-fhir) & [Hapi-Fhir-JpaServer-Starter](https://github.com/hapifhir/hapi-fhir-jpaserver-starter).

This table maintains a current view of what operations have migrated out of this project and which are remaining.

- Migrated = source code in Clinical-Reasoning
- To Do = source code in Cqf-Ruler

| Plugin | ResourceType | Operation | Status |
| -------------- | --------------------- | ---------------------------- | ------------|
| CR | Measure | $evaluate-measure | migrated |
| CR | Measure | $submit-data | migrated |
| CR | Measure | $care-gaps | migrated |
| CR | Measure | $data-requirements | To do |
| CR | Measure | $collect-data | To do |
| CR | PlanDefinition | $apply | migrated |
| CR | PlanDefinition | $package | migrated |
| CR | ActivityDefinition | $apply | migrated |
| CPG | N/A | $cql | migrated |
| CPG | Library | $evaluate | migrated |
| SDC | Questionnaire | $package | migrated |
| SDC | Questionnaire | $populate | migrated |
| SDC | QuestionnaireResponse | $extract | migrated |
| SDC | Observation | $transform | dropped<sup>1</sup> |
| RA | Measure | $davinci-ra.evaluate-measure | dropped<sup>2</sup> |
| Case-Reporting | MeasureReport | $extract-line-list-data | To do |
| Case-Reporting | N/A | $process-message-bundle | To do |
| ERSD | N/A | $ersd-v2-to-v1-transform | To do |
| cds-hooks | N/A | discovery and service | In progress |

<sup>1</sup> This was a provisional operation in the SDC Ig that has been removed

<sup>2</sup> The RA IG has evolved significantly and this operation needs to be reimplemented.

## License

Copyright 2019+ Dynamic Content Group, LLC (dba Alphora)
Expand Down
Loading

0 comments on commit c8d86f4

Please sign in to comment.