Skip to content

Commit

Permalink
ci: add data conversion github action (#2910)
Browse files Browse the repository at this point in the history
* ci: add data conversion github action

* ci: set working directory

* ci: env setup

* ci: try using localhost instead of host.docker.internal

* build: try out external_links

* build: try using include

* build: and the build command

* docs: update readme with commands

* fix: try just changing the id of one

* fix: update more ids

* fix: more ids

* build: give both docker-compose the same name space

* Update containers/ecr-viewer/README.md
  • Loading branch information
mcmcgrath13 authored Nov 20, 2024
1 parent 9984428 commit 4b5de32
Show file tree
Hide file tree
Showing 22 changed files with 60 additions and 38 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/container-ecr-viewer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Check Out Changes
uses: actions/checkout@v4

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

- name: Build ${{ env.CONTAINER }} Container
uses: docker/build-push-action@v3
with:
Expand All @@ -150,3 +144,22 @@ jobs:
push: false
cache-from: type=gha
cache-to: type=gha,mode=max

convert-data:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}

- name: Set up env vars
run: npm run setup-local-env
working-directory: ./containers/${{env.CONTAINER}}

- name: Run seed data conversion
run: npm run convert-seed-data:build
working-directory: ./containers/${{env.CONTAINER}}
4 changes: 2 additions & 2 deletions containers/ecr-viewer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ The eCR Viewer is primailly deveoped on Mac silicon machines, See this [integrea

Sample eICRs are included in `containers/ecr-viewer/seed-scripts/baseECR/`. If you ever need to update the eCRs or add new eCRs you can regenerate the data by:

1. Run `npm run convert-seed-data` to re-run the FHIR conversion of the seed eCRs
2. Delete the current volume used by your DB: `docker compose -f ./docker-compose.yml --profile "*" down -v`
1. Delete the current volume used by your DB: `docker compose -f ./docker-compose.yml --profile "*" down -v`
2. Run `npm run convert-seed-data` to re-run the FHIR conversion of the seed eCRs
3. Run `npm run local-dev` to re-run the eCR Viewer with the newly converted data.

### Developer Commands
Expand Down
2 changes: 2 additions & 0 deletions containers/ecr-viewer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: ecr-viewer

services:
ecr-viewer:
build:
Expand Down
4 changes: 2 additions & 2 deletions containers/ecr-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"test": "TZ=America/New_York jest",
"test:watch": "TZ=America/New_York jest --watch",
"clear-local": "docker compose -f ./docker-compose.yml --profile \"*\" down -v",
"convert-seed-data": "npx @dotenvx/dotenvx run -f .env.local -- sh -c 'docker compose -f ./docker-compose.yml --profile ${SOURCE} --profile ${METADATA_DATABASE_TYPE} --profile ecr-viewer up -d && docker compose -f ./seed-scripts/docker-compose-seed.yml up --abort-on-container-exit && docker compose -f ./docker-compose.yml --profile \"*\" down && docker compose -f ./seed-scripts/docker-compose-seed.yml --profile \"*\" down'",
"convert-seed-data:build": "npx @dotenvx/dotenvx run -f .env.local -- sh -c 'docker compose -f ./docker-compose.yml --profile ${SOURCE} --profile ${METADATA_DATABASE_TYPE} --profile ecr-viewer up -d --build && docker compose -f ./seed-scripts/docker-compose-seed.yml up --abort-on-container-exit --build && docker compose -f ./docker-compose.yml --profile \"*\" down && docker compose -f ./seed-scripts/docker-compose-seed.yml --profile \"*\" down'",
"convert-seed-data": "npx @dotenvx/dotenvx run -f .env.local -- sh -c 'docker compose -f ./seed-scripts/docker-compose-seed.yml --profile ${SOURCE} --profile ${METADATA_DATABASE_TYPE} --profile ecr-viewer up --abort-on-container-exit'",
"convert-seed-data:build": "npx @dotenvx/dotenvx run -f .env.local -- sh -c 'docker compose -f ./seed-scripts/docker-compose-seed.yml --profile ${SOURCE} --profile ${METADATA_DATABASE_TYPE} --profile ecr-viewer up --abort-on-container-exit --build'",
"update-cypress-data": "docker compose -f ./seed-scripts/docker-compose-create-sql.yml up --build --abort-on-container-exit",
"cypress:open": "cypress open",
"cypress:run": "cypress run",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
<table class="header_table">
<tbody>
<tr>
<td class="td_header_role_name"><span class="td_label">eICR Identifier:</span></td><td class="td_header_role_value">13b27ce6-4c0b-4c1f-8349-035f551ddb62 2.16.840.1.113883.3.109.3.6659.3.63.1.99998.2.2.35</td>
<td class="td_header_role_name"><span class="td_label">eICR Identifier:</span></td><td class="td_header_role_value">13b27ce6-4c0b-4c1f-8349-035f551ddb62 2.16.840.1.113883.3.109.3.6659.3.63.1.99998.2.2.36</td>
</tr>
</tbody>
</table>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ <h2 class="section-title col-md-6" id="author-performer">Author Organization</h2
<div class="col-md-8">Amanda Assigned and Associates CA</div>
</div>
<div class="row">
<div class="col-md-8">0035 OID: 2.16.840.1.113883.3.109.3.6659.3.63.1.99998.2.2.35</div>
<div class="col-md-8">0035 OID: 2.16.840.1.113883.3.109.3.6659.3.63.1.99998.2.2.36</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -2070,7 +2070,7 @@ <h2 class="section-title col-md-6">Document Information</h2>
</thead>
<tbody>
<tr>
<td>13b27ce6-4c0b-4c1f-8349-035f551ddb62 OID: 2.16.840.1.113883.3.109.3.6659.3.63.1.99998.2.2.35</td><td>10/17/2022, 13:33 </td>
<td>13b27ce6-4c0b-4c1f-8349-035f551ddb62 OID: 2.16.840.1.113883.3.109.3.6659.3.63.1.99998.2.2.36</td><td>10/17/2022, 13:33 </td>
</tr>
</tbody>
</table>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
<table class="header_table">
<tbody>
<tr>
<td class="td_header_role_name"><span class="td_label">eICR Identifier:</span></td><td class="td_header_role_value">9ca5ffb0-5a54-408a-8fee-246abbfe89b7 2.16.840.1.113883.3.109.3.6659.3.63.1.99998.2.2.35</td>
<td class="td_header_role_name"><span class="td_label">eICR Identifier:</span></td><td class="td_header_role_value">9ca5ffb0-5a54-408a-8fee-246abbfe89b7 2.16.840.1.113883.3.109.3.6659.3.63.1.99998.2.2.37</td>
</tr>
</tbody>
</table>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ <h2 class="section-title col-md-6" id="author-performer">Author Organization</h2
<div class="col-md-8">Amanda Assigned and Associates CA</div>
</div>
<div class="row">
<div class="col-md-8">0035 OID: 2.16.840.1.113883.3.109.3.6659.3.63.1.99998.2.2.35</div>
<div class="col-md-8">0035 OID: 2.16.840.1.113883.3.109.3.6659.3.63.1.99998.2.2.37</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -1998,7 +1998,7 @@ <h2 class="section-title col-md-6">Document Information</h2>
</thead>
<tbody>
<tr>
<td>9ca5ffb0-5a54-408a-8fee-246abbfe89b7 OID: 2.16.840.1.113883.3.109.3.6659.3.63.1.99998.2.2.35</td><td>03/11/2022, 06:49 </td>
<td>9ca5ffb0-5a54-408a-8fee-246abbfe89b7 OID: 2.16.840.1.113883.3.109.3.6659.3.63.1.99998.2.2.37</td><td>03/11/2022, 06:49 </td>
</tr>
</tbody>
</table>
Expand Down
Loading

0 comments on commit 4b5de32

Please sign in to comment.