Skip to content

Commit

Permalink
Merge pull request I-TECH-UW#1 from mozzy11/main
Browse files Browse the repository at this point in the history
add cql module
  • Loading branch information
mozzy11 authored Aug 12, 2024
2 parents f98e6f6 + 7680123 commit dc47881
Show file tree
Hide file tree
Showing 12 changed files with 307 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and Validate Configuration

on:
pull_request:
branches: [main]
branches: [none]

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run E2E Tests on Release PRs

on:
pull_request:
branches: [main]
branches: [none]

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests-on-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Run E2E Tests on PRs and Commits

on:
push:
branches: [main]
branches: [none]
pull_request:
branches: [main]
branches: [none]

jobs:
build:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Publish Docker Images

on:
push:
branches: [main]
workflow_dispatch:

env:
REGISTRY: docker.io
IMAGE_NAME: ${{ vars.DOCKERHUB_USERNAME }}/openmrs-distro-who-hiv-dak

jobs:
build-and-push-image-backend-dev:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4


# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME}}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
65 changes: 65 additions & 0 deletions dak/content/libraries/Library-HIVDTTestLogic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"resourceType" : "Library",
"id" : "HIVDTTestLogic",
"meta" : {
"profile" : ["http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary",
"http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary",
"http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library",
"http://hl7.org/fhir/uv/cql/StructureDefinition/cql-module"]
},
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Library HIVDTTestLogic</b></p><a name=\"HIVDTTestLogic\"> </a><a name=\"hcHIVDTTestLogic\"> </a><a name=\"HIVDTTestLogic-en-US\"> </a><h2>Parameters</h2><table class=\"grid\"><tr><td>True condition</td><td>out</td><td>0</td><td>1</td><td>boolean</td></tr><tr><td>False condition</td><td>out</td><td>0</td><td>1</td><td>boolean</td></tr><tr><td>Output text</td><td>out</td><td>0</td><td>1</td><td>string</td></tr></table><h2>Contents</h2><p><code>text/cql</code></p><pre><code class=\"language-sql\">define &quot;True condition&quot;:\n true\n\ndefine &quot;False condition&quot;:\n false\n\ndefine &quot;Output text&quot;:\n 'Spam! Spam! Spam! Spam! Lovely spam! Wonderful spam! Spam spa-a-a-a-a-am spam spa-a-a-a-a-am spam! Lovely spam! Lovely spam! Lovely spam! Lovely spam! Spam spam spam spam!'\n</code></pre><p><code>Content not shown - (</code><code>application/elm+xml</code>, size = 2Kb )</p></div>"
},
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability",
"valueCode" : "computable"
}],
"url" : "http://smart.who.int/HIV/Library/HIVDTTestLogic",
"version" : "0.2.0",
"name" : "HIVDTTestLogic",
"title" : "HIV.DT Test Logic",
"status" : "draft",
"experimental" : true,
"type" : {
"coding" : [{
"system" : "http://terminology.hl7.org/CodeSystem/library-type",
"code" : "logic-library"
}]
},
"date" : "2024-08-08T06:57:34+00:00",
"publisher" : "WHO",
"contact" : [{
"name" : "WHO",
"telecom" : [{
"system" : "url",
"value" : "http://who.int"
}]
}],
"description" : "HIV.DT Test Logic",
"parameter" : [{
"name" : "True condition",
"use" : "out",
"min" : 0,
"max" : "1",
"type" : "boolean"
},
{
"name" : "False condition",
"use" : "out",
"min" : 0,
"max" : "1",
"type" : "boolean"
},
{
"name" : "Output text",
"use" : "out",
"min" : 0,
"max" : "1",
"type" : "string"
}],
"content" : [{
"contentType" : "text/cql",
"data" : "ZGVmaW5lICJUcnVlIGNvbmRpdGlvbiI6CiAgdHJ1ZQoKZGVmaW5lICJGYWxzZSBjb25kaXRpb24iOgogIGZhbHNlCgpkZWZpbmUgIk91dHB1dCB0ZXh0IjoKICAnU3BhbSEgU3BhbSEgU3BhbSEgU3BhbSEgTG92ZWx5IHNwYW0hIFdvbmRlcmZ1bCBzcGFtISBTcGFtIHNwYS1hLWEtYS1hLWFtIHNwYW0gc3BhLWEtYS1hLWEtYW0gc3BhbSEgTG92ZWx5IHNwYW0hIExvdmVseSBzcGFtISBMb3ZlbHkgc3BhbSEgTG92ZWx5IHNwYW0hIFNwYW0gc3BhbSBzcGFtIHNwYW0hJwo="
}]
}
109 changes: 109 additions & 0 deletions dak/content/plandefinitions/PlanDefinition-HIVTestLogicDT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"resourceType": "PlanDefinition",
"id": "HIVTestLogicDT",
"meta": {
"profile": [
"http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition",
"http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareableplandefinition",
"http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishableplandefinition"
]
},
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: PlanDefinition HIVTestLogicDT</b></p><a name=\"HIVTestLogicDT\"> </a><a name=\"hcHIVTestLogicDT\"> </a><a name=\"HIVTestLogicDT-en-US\"> </a><p><b>url</b>: <a href=\"PlanDefinition-HIVTestLogicDT.html\">PlanDefinition HIV.DT Test Logic Process</a></p><p><b>version</b>: 0.2.0</p><p><b>name</b>: HIVTestLogicDT</p><p><b>title</b>: HIV.DT Test Logic Process</p><p><b>type</b>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/plan-definition-type eca-rule}\">ECA Rule</span></p><p><b>status</b>: Draft</p><p><b>experimental</b>: true</p><p><b>date</b>: 2024-08-08 06:57:34+0000</p><p><b>publisher</b>: WHO</p><p><b>contact</b>: WHO: <a href=\"http://who.int\">http://who.int</a></p><p><b>description</b>: </p><div><p>Test Logic Process</p>\n</div><h3>RelatedArtifacts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Type</b></td><td><b>Citation</b></td></tr><tr><td style=\"display: none\">*</td><td>Citation</td><td><div><p>Consolidated Guidelines on HIV Testing Services (2019)</p>\n</div></td></tr></table><p><b>library</b>: <a href=\"Library-HIVDTTestLogic.html\">HIV.DT Test Logic</a></p><blockquote><p><b>action</b></p><p><b>textEquivalent</b>: Spammy action</p><blockquote><p><b>condition</b></p><p><b>kind</b>: Applicability</p><h3>Expressions</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Language</b></td><td><b>Expression</b></td></tr><tr><td style=\"display: none\">*</td><td>text/cql-identifier</td><td>True condition</td></tr></table></blockquote><blockquote><p><b>dynamicValue</b></p><p><b>path</b>: description</p><h3>Expressions</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Language</b></td><td><b>Expression</b></td></tr><tr><td style=\"display: none\">*</td><td>text/cql-identifier</td><td>Output text</td></tr></table></blockquote></blockquote><blockquote><p><b>action</b></p><p><b>textEquivalent</b>: Non-spammy action</p><blockquote><p><b>condition</b></p><p><b>kind</b>: Applicability</p><h3>Expressions</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Language</b></td><td><b>Expression</b></td></tr><tr><td style=\"display: none\">*</td><td>text/cql-identifier</td><td>False condition</td></tr></table></blockquote><blockquote><p><b>dynamicValue</b></p><p><b>path</b>: description</p><h3>Expressions</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Language</b></td><td><b>Expression</b></td></tr><tr><td style=\"display: none\">*</td><td>text/cql-identifier</td><td>Output text</td></tr></table></blockquote></blockquote></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability",
"valueCode": "computable"
}
],
"url": "http://smart.who.int/hiv/PlanDefinition/HIVB2DT",
"version": "0.2.0",
"name": "HIVTestLogicDT",
"title": "HIV.DT Test Logic Process",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/plan-definition-type",
"code": "eca-rule"
}
]
},
"status": "draft",
"experimental": true,
"date": "2024-08-08T06:57:34+00:00",
"publisher": "WHO",
"contact": [
{
"name": "WHO",
"telecom": [
{
"system": "url",
"value": "http://who.int"
}
]
}
],
"description": "Test Logic Process",
"relatedArtifact": [
{
"type": "citation",
"citation": "Consolidated Guidelines on HIV Testing Services (2019)"
}
],
"library": [
"http://smart.who.int/HIV/Library/HIVDTTestLogic"
],
"action": [
{
"title": "Test Action Gruop",
"action": [
{
"title": "Spammy action",
"textEquivalent": "Spammy action",
"condition": [
{
"kind": "applicability",
"expression": {
"language": "text/cql-identifier",
"expression": "True condition"
}
}
],
"dynamicValue": [
{
"path": "description",
"expression": {
"language": "text/cql-identifier",
"expression": "Output text"
}
}
]
},
{
"title": "Non-spammy action",
"textEquivalent": "Non-spammy action",
"condition": [
{
"kind": "applicability",
"expression": {
"language": "text/cql-identifier",
"expression": "True condition"
}
}
],
"dynamicValue": [
{
"path": "description",
"expression": {
"language": "text/cql-identifier",
"expression": "Output text"
}
}
]
}
]
}
]
}
52 changes: 52 additions & 0 deletions dak/terminology/ValueSet-HIV.A.DE5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"resourceType": "ValueSet",
"id": "HIV.A.DE5",
"meta": {
"profile": [
"http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablevalueset",
"http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablevalueset",
"http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablevalueset"
]
},
"text": {
"status": "extensions",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: ValueSet HIV.A.DE5</b></p><a name=\"HIV.A.DE5\"> </a><a name=\"hcHIV.A.DE5\"> </a><a name=\"HIV.A.DE5-en-US\"> </a><ul><li>Include these codes as defined in <a href=\"CodeSystem-HIVConcepts.html\"><code>http://smart.who.int/hiv/CodeSystem/HIVConcepts</code></a><table class=\"none\"><tr><td style=\"white-space:nowrap\"><b>Code</b></td><td><b>Display</b></td><td><b>Definition</b></td></tr><tr><td><a href=\"CodeSystem-HIVConcepts.html#HIVConcepts-HIV.46A.46DE6\">HIV.A.DE6</a></td><td>Community</td><td>Referred by the community level services</td></tr><tr><td><a href=\"CodeSystem-HIVConcepts.html#HIVConcepts-HIV.46A.46DE7\">HIV.A.DE7</a></td><td>Facility</td><td>Referred by the health facility</td></tr></table></li></ul></div>"
},
"url": "http://smart.who.int/hiv/ValueSet/HIV.A.DE5",
"version": "0.2.0",
"name": "HIVADE5",
"title": "Referred by ValueSet",
"status": "active",
"experimental": true,
"date": "2024-08-02T14:11:44+00:00",
"publisher": "WHO",
"contact": [
{
"name": "WHO",
"telecom": [
{
"system": "url",
"value": "http://who.int"
}
]
}
],
"description": "Value set of how the client was referred",
"compose": {
"include": [
{
"system": "http://smart.who.int/hiv/CodeSystem/HIVConcepts",
"concept": [
{
"code": "HIV.A.DE6",
"display": "Community"
},
{
"code": "HIV.A.DE7",
"display": "Facility"
}
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<globalProperties>
<globalProperty>
<property>referencedemodata.createDemoPatientsOnNextStartup</property>
<value>50</value>
<value>1</value>
</globalProperty>
</globalProperties>

Expand Down
1 change: 1 addition & 0 deletions distro/distro.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ omod.ordertemplates=${ordertemplates.version}
omod.patientflags=${patientflags.version}
omod.o3forms=${o3forms.version}
omod.authentication=${authentication.version}
omod.cql=${cql.version}

9 changes: 8 additions & 1 deletion distro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@
<htmlwidgets.version>1.11.0</htmlwidgets.version>
<serialization-xstream.version>0.2.16</serialization-xstream.version>
<ordertemplates.version>1.0.2</ordertemplates.version>
<patientflags.version>3.0.7</patientflags.version>
<patientflags.version>3.0.8-cql-SNAPSHOT</patientflags.version>
<o3forms.version>2.3.0-SNAPSHOT</o3forms.version>
<cql.version>1.0.0-SNAPSHOT</cql.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -199,6 +200,12 @@
<version>${o3forms.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>cql-omod</artifactId>
<version>${cql.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down
10 changes: 7 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ version: "3.7"

services:
gateway:
image: openmrs/openmrs-reference-application-3-gateway:${TAG:-qa}
image: openmrs/openmrs-reference-application-3-gateway:dev3
container_name: gateway
restart: "unless-stopped"
depends_on:
- frontend
Expand All @@ -11,7 +12,8 @@ services:
- "80:80"

frontend:
image: openmrs/openmrs-reference-application-3-frontend:${TAG:-qa}
image: openmrs/openmrs-reference-application-3-frontend:dev3
container_name: frontend
restart: "unless-stopped"
environment:
SPA_PATH: /openmrs/spa
Expand All @@ -25,7 +27,8 @@ services:
- backend

backend:
image: openmrs/openmrs-reference-application-3-backend:${TAG:-qa}
image: itechuw/openmrs-distro-who-hiv-dak:main
container_name: backend
restart: "unless-stopped"
depends_on:
- db
Expand All @@ -41,6 +44,7 @@ services:
test: ["CMD", "curl", "-f", "http://localhost:8080/openmrs"]
timeout: 5s
volumes:
- ./dak/:/openmrs/dak/
- openmrs-data:/openmrs/data

# MariaDB
Expand Down
Loading

0 comments on commit dc47881

Please sign in to comment.