Skip to content

Commit

Permalink
Workflow updates and CCD rendering fixes (#74)
Browse files Browse the repository at this point in the history
* Fixes

* Workflow fixes
  • Loading branch information
pmanko committed Jan 7, 2022
1 parent 2fb9e88 commit 4eac587
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 58 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/ci.yml
Expand Up @@ -9,7 +9,8 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]

release:
types: [ created ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -33,12 +34,12 @@ jobs:
uses: stCarolas/setup-maven@v4
with:
maven-version: 3.6.3
# - name: Cache Maven packages
# uses: actions/cache@v2
# with:
# path: ~/.m2
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
# restore-keys: ${{ runner.os }}-m2
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- uses: s4u/maven-settings-action@v2.2.0
with:
servers: |
Expand All @@ -55,4 +56,9 @@ jobs:
]
githubServer: false
- name: Build with Maven
run: mvn -P 'github-packages' -B install
run: mvn -P 'github-packages' install
- name: Publish package
run: mvn -P github-packages -DskipTests -Dfindbugs.skip=true -Dpmd.skip=true -Dcpd.skip=true -B deploy
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
if: github.event_name == 'release' && github.event.action == 'created'
48 changes: 0 additions & 48 deletions .github/workflows/release.yml

This file was deleted.

Expand Up @@ -219,7 +219,14 @@ public String parseCcdToHtml(Bundle resource, File ccdTemplate) throws IOExcepti
ccdStringMap.put("conditions", conditions);
ccdStringMap.put("diagnosticReports", diagnosticReports);
GStringTemplateEngine templateEngine = new GStringTemplateEngine();
String htmlString = templateEngine.createTemplate(ccdTemplate).make(ccdStringMap).toString();
String htmlString;
try {
htmlString = templateEngine.createTemplate(ccdTemplate).make(ccdStringMap).toString();
} catch (Exception e) {
logger.error("Could not parse HTML!\n" + e.toString());
htmlString = "<h2>CCD was not rendered correctly</h2>";
}

return htmlString;
}

Expand Down Expand Up @@ -515,7 +522,7 @@ private static void mapPatientResource(Map<String, Object> ccdStringMap, org.hl7
putValue(ccdStringMap, "givenName", patientName.getGiven().toString().replace("[", "").replace("]", ""));
putValue(ccdStringMap, "birthDate", util.formatDate(birthDate));
putValue(ccdStringMap, "gender", gender);
putValue(ccdStringMap, "address", addressFirstRep.getText());
putValue(ccdStringMap, "address", addressFirstRep);

putValue(ccdStringMap, "patientId", patientId.getValue());
putValue(ccdStringMap, "maritalStatus", maritalStatus.getText());
Expand Down

0 comments on commit 4eac587

Please sign in to comment.