Skip to content

Commit

Permalink
Merge pull request #158 from DSACMS/dev
Browse files Browse the repository at this point in the history
Release Dev into Main
  • Loading branch information
IsaacMilarky authored Sep 19, 2024
2 parents 037530e + 72777ce commit 5996b05
Show file tree
Hide file tree
Showing 10 changed files with 244 additions and 94 deletions.
80 changes: 77 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest]
# windows-latest, macos-latest
os: [ubuntu-latest,macos-latest]
# windows-latest

defaults:
run:
Expand Down Expand Up @@ -90,7 +90,36 @@ jobs:
APPLEID: ${{ secrets.APPLEID }}
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
run: npm run dist

- name: Display structure of files
run: ls -R
- name: Upload MacOS DMG Blockmap
uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'macos')
with:
name: DedupliFHIR-${{ github.ref_name }}-arm64.dmg.blockmap
path: |
./frontend/dist/DedupliFHIR-*-arm64.dmg.blockmap
- name: Upload MacOS DMG
uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'macos')
with:
name: DedupliFHIR-${{ github.ref_name }}-arm64.dmg
path: |
./frontend/dist/DedupliFHIR-*-arm64.dmg
- name: Upload MacOS Zip
uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'macos')
with:
name: DedupliFHIR-${{ github.ref_name }}-arm64-mac.zip
path: |
./frontend/dist/DedupliFHIR-*-arm64-mac.zip
- name: Upload MacOS Zip Blockmap
uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'macos')
with:
name: DedupliFHIR-${{ github.ref_name }}-arm64-mac.zip.blockmap
path: |
./frontend/dist/DedupliFHIR-*-arm64-mac.zip.blockmap
- name: Upload AppImage
uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'ubuntu')
Expand Down Expand Up @@ -119,6 +148,22 @@ jobs:
uses: actions/download-artifact@v4
with:
name: DedupliFHIR-${{ github.ref_name }}.snap
- name: Download DedupliFHIR-${{ github.ref_name }}-arm64.dmg.blockmap artifact
uses: actions/download-artifact@v4
with:
name: DedupliFHIR-${{ github.ref_name }}-arm64.dmg.blockmap
- name: Download DedupliFHIR-${{ github.ref_name }}-arm64.dmg artifact
uses: actions/download-artifact@v4
with:
name: DedupliFHIR-${{ github.ref_name }}-arm64.dmg
- name: Download DedupliFHIR-${{ github.ref_name }}-arm64-mac.zip artifact
uses: actions/download-artifact@v4
with:
name: DedupliFHIR-${{ github.ref_name }}-arm64-mac.zip
- name: Download DedupliFHIR-${{ github.ref_name }}-arm64-mac.zip.blockmap artifact
uses: actions/download-artifact@v4
with:
name: DedupliFHIR-${{ github.ref_name }}-arm64-mac.zip.blockmap
- name: Display structure of downloaded files
run: ls -R
- name: Upload DedupliFHIR-${{ github.ref_name }}.AppImage to release
Expand All @@ -135,3 +180,32 @@ jobs:
tag: ${{ github.ref_name }}
file: deduplifhir-app_${{ github.ref_name }}_amd64.snap
overwrite: false
- name: Upload DedupliFHIR-${{ github.ref_name }}-arm64.dmg.blockmap to release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: DedupliFHIR-${{ github.ref_name }}-arm64.dmg.blockmap
overwrite: false
- name: Upload DedupliFHIR-${{ github.ref_name }}-arm64.dmg to release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: DedupliFHIR-${{ github.ref_name }}-arm64.dmg
overwrite: false
- name: Upload DedupliFHIR-${{ github.ref_name }}-arm64-mac.zip to release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: DedupliFHIR-${{ github.ref_name }}-arm64-mac.zip
overwrite: false

- name: Upload DedupliFHIR-${{ github.ref_name }}-arm64-mac.zip.blockmap to release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: DedupliFHIR-${{ github.ref_name }}-arm64-mac.zip.blockmap
overwrite: false
31 changes: 27 additions & 4 deletions frontend/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,47 @@ body {
}

.form {
max-width: 400px;
max-width: 450px;
width: 100%;
margin: 0 auto;
}

h1,
h2,
#file-input-copy {
text-align: center;
text-align: flex-start;
}

.usa-button {
width: 100%;
}

.usa-alert {
#submit {
margin-top: 10px;
margin-bottom: 10px;
}

.usa-button-group {
justify-content: center;
}

.usa-alert,
#results-spreadsheet-instructions {
display: none;
}

#save-file-fail-alert {
margin-bottom: 10px;
}

#deduplication-error-alert {
display: block;
}

.footer {
position: fixed;
bottom: 0;
width: 95%;
width: 70%;
display: flex;
justify-content: flex-end;
align-items: flex-end;
Expand All @@ -61,6 +75,15 @@ img {
animation: spin 2s linear infinite;
}

ul,
ol {
padding-left: 15px;
}

ol {
margin-bottom: 0px;
}

@keyframes spin {
0% {
transform: rotate(0deg);
Expand Down
23 changes: 15 additions & 8 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@
<title>DedupliFHIR</title>
</head>
<body>
<div class="content" style="width: 100%">
<div class="content">
<h1>DedupliFHIR</h1>
<h2>Upload Patient Records File</h2>
<div class="form">
<label class="usa-label" id="file-input-copy" for="file-input-specific"
>Select file to undergo deduplication</label
>To start deduplication, load your file into DedupliFHIR.</label
>
<div class="usa-form-group">
<span class="usa-hint" id="file-input-specific-hint"
>Accepted Types: FHIR, CSV</span
>
>FHIR or CSV file only</span>
<input
id="file-input-specific"
class="usa-file-input"
Expand All @@ -29,7 +27,7 @@ <h2>Upload Patient Records File</h2>
/>
</div>
<div class="usa-form-group">
<label class="usa-label" for="options">Select file format for results data</label>
<label class="usa-label" for="options">Select file format for your results data</label>
<select class="usa-select" name="options" id="options">
<option value=".xlsx" selected="selected" >.xlsx</option>
<option value=".csv">.csv</option>
Expand All @@ -44,12 +42,21 @@ <h2>Upload Patient Records File</h2>
<div class="usa-alert__body">
<h4 class="usa-alert__heading">Error</h4>
<p class="usa-alert__text">
File not found. Please upload a file.
File not found. Please load a file.
</p>
</div>
</div>
<br>
<button type="button" class="usa-button" id="submit" >Submit</button>
<button type="button" class="usa-button" id="submit" >Find the possible duplicates</button>
<div class="security-section" id="security-section">
<p><strong>DedupliFHIR is secure.</strong></p>
<ul class="security-info">
<li>After you download DedupliFHIR, it works locally on your computer, just like other software applications.</li>
<li>Any files you load into DedupliFHIR stay on your computer.</li>
<li>No information is shared.</li>
</ul>
<a href="https://github.com/DSACMS/dedupliFHIR" target="_blank">Learn about DedupliFHIR</a>
</div>
</div>
<div class="footer">
<img src="./assets/logo-cms.svg" alt="CMS.gov Logo">
Expand Down
16 changes: 14 additions & 2 deletions frontend/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,25 @@ var resultsFile;

function findPython() {
const possibilities = [
// In packaged app
// In packaged app (mac / linux)
path.join(process.resourcesPath, "python", "bin", "python"),
path.join(process.resourcesPath, "python", "bin", "python3"),
path.join(process.resourcesPath, "python", "bin", "python3.10"),
path.join(process.resourcesPath, "python", "bin", "python3.11"),
path.join(process.resourcesPath, "python", "bin", "python3.12"),

// In development
// In development (mac / linux)
path.join("..", ".venv", "bin", "python"),

// In packaged app (windows)
path.join(process.resourcesPath, "python", "Scripts", "python.exe"),
path.join(process.resourcesPath, "python", "Scripts", "python3.exe"),
path.join(process.resourcesPath, "python", "Scripts", "python3.10.exe"),
path.join(process.resourcesPath, "python", "Scripts", "python3.11.exe"),
path.join(process.resourcesPath, "python", "Scripts", "python3.12.exe"),

// In development (windows)
path.join("..", ".venv", "Scripts", "python.exe"),
];
for (const path of possibilities) {
if (fs.existsSync(path)) {
Expand Down Expand Up @@ -122,6 +132,8 @@ async function handleSaveFile() {

function createWindow() {
mainWindow = new BrowserWindow({
width: 900,
height: 750,
webPreferences: {
preload: path.join(__dirname, "./preload.js"),
contextIsolation: true,
Expand Down
3 changes: 0 additions & 3 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions frontend/pages/error.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="content">
<h1>DedupliFHIR</h1>

<h2>Results</h2>
<p id="results-ready-text">Your results are ready.</p>

<div class="usa-alert usa-alert--error" id="deduplication-error-alert" role="alert">
<div class="usa-alert__body">
Expand All @@ -21,9 +21,9 @@ <h4 class="usa-alert__heading">Error</h4>
</p>
</div>
</div>

<br>
<a href="../index.html" class="usa-button usa-button--outline"> Return to Home </a>
<p>
<a class="usa-link" href="../index.html" id="return-to-home">Back to home</a>
</p>

<script src="../node_modules/@uswds/uswds/dist/js/uswds.min.js"></script>
</div>
Expand Down
61 changes: 19 additions & 42 deletions frontend/pages/success.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,60 +10,37 @@
<body>
<div class="content">
<h1>DedupliFHIR</h1>

<h2>Results</h2>
<!-- TODO: Add result data to table -->
<!-- <table class="usa-table">
<caption>
Deduplication Results
</caption>
<thead>
<tr>
<th scope="col">Metric</th>
<th scope="col">Value</th>
</tr>
</thead>
<tbody>
TODO: Add number of total records
<tr>
<th scope="row">Total Records</th>
<td>
</td>
</tr>
TODO: Add number of duplicate records
<tr>
<th scope="row">Duplicate Records</th>
<td>
</td>
</tr>
</tbody>
</table> -->
<div class="usa-alert usa-alert--success" id="download-success-alert" role="alert">
<p id="results-ready-text">Your results are ready.</p>
<div class="usa-alert usa-alert--success" id="save-file-success-alert" role="alert">
<div class="usa-alert__body">
<h4 class="usa-alert__heading">Success</h4>
<p class="usa-alert__text">
Results file downloaded!
Results file saved to your computer.
</p>
</div>
</div>
<div class="usa-alert usa-alert--error" id="download-fail-alert" role="alert">
<div class="usa-alert usa-alert--error" id="save-file-fail-alert" role="alert">
<div class="usa-alert__body">
<h4 class="usa-alert__heading">Error</h4>
<p class="usa-alert__text">
Unable to download file. Please try again.
Unable to save file to your computer. Please try again.
</p>
</div>
</div>
<div class="results-spreadsheet-instructions" id="results-spreadsheet-instructions">
<p>
<b>To find possible duplicates:</b>
<ol>
<li>Open your results file.</li>
<li>Find the records with the same <b>cluster_id</b>.</li>
</ol>
<a href="https://github.com/DSACMS/dedupliFHIR/blob/main/research/sept-2024/examples-use-clusterid-to-find-possible-duplicates.md" target="_blank">(See examples.)</a>
</p>
</div>
<br>
<ul class="usa-button-group">
<li class="usa-button-group__item">
<a href="../index.html" class="usa-button usa-button--outline"> Return to Home </a>
</li>
<li class="usa-button-group__item">
<button type="button" class="usa-button" id="download">Download File</button>
</li>
</ul>

<button type="button" class="usa-button" id="save-file">Save the results file</button>
<p>
<a class="usa-link" href="../index.html" id="return-to-home">Back to home</a>
</p>
<script src="../renderer/renderer-success.js"></script>
<script src="../node_modules/@uswds/uswds/dist/js/uswds.min.js"></script>
</div>
Expand Down
Loading

0 comments on commit 5996b05

Please sign in to comment.