Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA => main #29

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
791ef33
ED-8580: Temporarily use dev ersd.json for prod debugging
ayjaweems Feb 23, 2024
76ae450
ED-8580: Fix API key reference in RestApiAuthorizerImpl
ayjaweems Apr 10, 2024
1d19e6e
ED-8580: Fix API timeout error
ayjaweems Apr 11, 2024
25c8bf6
ED-8580: Revert ersd.json file reference in prod
ayjaweems Apr 11, 2024
95581d9
Merge pull request #21 from RXNT/feature/ED-8580
ayjaweems Apr 11, 2024
f464b46
ED-8580: Fix JSON request to EHRV8ExtensionAPI (#24)
ayjaweems May 21, 2024
e057dee
Sync upstream ecr changes and fix conflicts
sneu012 Jul 12, 2024
af3a171
Run dev-workflow on task/upstream-merge-staging branch
ayjaweems Jul 12, 2024
363fbc4
Attempt to fix workflow
ayjaweems Jul 12, 2024
b19b1fc
Attempt to fix workflow (pt 2)
ayjaweems Jul 12, 2024
79b84c5
Update workflow.yml
lcssanches Jul 12, 2024
388f2c5
Enable deploy-gatekeeper for this branch
ayjaweems Jul 15, 2024
620c954
Skip scheduled tasks timer in appdev
ayjaweems Jul 15, 2024
044029d
Merge branch 'task/upstream-merge-staging' of https://github.com/RXNT…
ayjaweems Jul 15, 2024
9980ba6
ED-9654: Update ersd.json to v3
ayjaweems Aug 7, 2024
183e648
Merge pull request #28 from RXNT/feature/ED-9654-use-ersd-v3
ayjaweems Aug 7, 2024
41c5806
Merge branch 'development' into task/upstream-merge-staging
ayjaweems Aug 7, 2024
28d8006
Remove task/upstream-merge-staging workflow changes
ayjaweems Aug 7, 2024
e338d90
Merge pull request #27 from RXNT/task/upstream-merge-staging
ayjaweems Aug 8, 2024
52f7c7c
Merge branch 'development' of https://github.com/RXNT/eCRNow into QA
ayjaweems Aug 8, 2024
84a5166
Merge branch 'main' into QA
ayjaweems Aug 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .circleci/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ commands:
command: sudo apt update && sudo apt-get install net-tools -y && sudo apt-get install dnsutils -y
- azure-cli/install
- azure-cli/login-with-service-principal
- run:
name: Select AZ Subscription
command: az account set --subscription $AZURE_SP_SUBSCRIPTION
- run:
name: Install openvpn
command: sudo apt-get install openvpn -y
Expand Down Expand Up @@ -315,6 +318,9 @@ jobs:
steps:
- run: echo "starting..."
- azure-cli/login-with-service-principal
- run:
name: Select AZ Subscription
command: az account set --subscription $AZURE_SP_SUBSCRIPTION
- attach_workspace:
at: /workspace/
- azure-deploy-docker-java:
Expand Down
14 changes: 14 additions & 0 deletions AppUpgradeFrom2.0To3.0.md → AppUMigrationInstructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,18 @@ The callback function registered with the timers during creation will route the
6. The existing timers will fire and eventually bleed out of the table. This may take many days or weeks depending on the type of encounters.
7. Once the existing timers bleed out, all transactions going forward will be on 3.X.X of the app.

**Migrating from existing infrastructure to a new infrastructure**

Sometimes vendors would like to migrate from existing infrastructure (say from on-prem) to a new infrastructure (say cloud), then there is a series
of steps that need to be followed to ensure smooth transition of the ecrNow App data.
These steps apply when migrating from one cloud provider (say AWS or Azure) to another cloud provider( say Azure or AWS) or when migrating to new
instances within the same cloud provider.

1. Plan the migration such that there is minimal downtime.
2. For the duration of the migration, stop invoking /api/systemLaunch or /api/launchPatient or /api/relaunchPatient APIs.
3.





63 changes: 61 additions & 2 deletions CustomQueryConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ encounter=/Encounter/{{context.encounterId}}
conditions=/Condition?patient=Patient/{{context.patientId}}&clinical-status=http://terminology.hl7.org/CodeSystem/condition-clinical|active
labTests=/Observation?patient=Patient/{{context.patientId}}&category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory&date=ge{{context.encounterStartDate}

# 3. Configuring the custom queries #
# 3. Configuring the custom queries for ERSDv2 #

In order to specify the custom queries, the following variable is used

Expand Down Expand Up @@ -76,7 +76,66 @@ Sample_ERSD.json
...
}

# 4. Leveraging _include parameter in custom queries to improve performance
# 4. Configuring the custom queries for ERSDv3 #

In order to specify the custom queries, the following variable is used

custom-query.directory

The directory is the location where custom query files can be placed.
One custom query file can be created for each ERSD file.

The file naming convention should conform to the following:

[Bundle Id of the ERSD file ]-[SpecificationLibrary.meta.versionId].queries

## Library.meta.versionId ##

The Library resource used is the SpecificationLibrary present in the ERSD.
The SpecificationLibrary is identified using hte Meta.profile element which should be equal to "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-specification-library"
The Library.meta.versionId is "3.0.0" below.

Sample SpecificationLibrary resource from ERSD:
{
"fullUrl": "http://ersd.aimsplatform.org/fhir/Library/SpecificationLibrary",
"resource": {
"description": "Defines the asset-collection library containing the US Public Health specification assets.",
"experimental": false,
"id": "SpecificationLibrary",
"meta": {
"profile": [
"http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-specification-library"
],
"versionId": "3.0.0" ### This is the version Id
},
}


## Bundle Id ##

The Bundle Id for the ERSD json below is "rctc-release-2022-07-13-Bundle-rctc"

Sample_ERSD.json
{
"resourceType": "Bundle",
"id": "rctc-release-2022-07-13-Bundle-rctc", ### This is the Bundle Id
"meta":
{
"versionId": "1",
"lastUpdated": "2022-07-18T21:32:25.000+00:00",
"source": "#fsOSEUhB1HVhhCy9"
},
...
}


For the above ERSD and Library resource found in the ERSD, the following custom query file should be created.

rctc-release-2022-07-13-Bundle-rctc-3.0.0.queries



# 5. Leveraging _include parameter in custom queries to improve performance

In order to trigger and create an eICR, the eCRNow App makes FHIR queries to the EHR and receives data for processing.
In doing so for certain types of Resources, related resource data has to be extracted from the EHR. These related resources are
Expand Down
31 changes: 23 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ For more information on electronic case reporting please refer to the following

* [More information on electronic case reporting (eCR)](https://ecr.aimsplatform.org)

* [More background information on ecrNow FHIR App](https://ecr.aimsplatform.org/ecr-now-fhir-app)
* [More background information on ecrNow FHIR App](https://ecr.aimsplatform.org/general/ecr-now-fhir-app)

# 2. App Architecture #
The app is architected as a Java Spring Boot app using Java Spring framework for the application layer, Hibernate and PostgreSQL for the backend technologies and ReactJS for the front end. The app can be instantiated as a micro service and containerized using Docker or other technologies for deployments.
Expand Down Expand Up @@ -64,7 +64,8 @@ The eCRNow-UI project and application is used to configure the eCRNow App. Altho
## 4.1 Pre-Requisites: ##
The following technologies should have been installed on your machine where you will build, test and deploy your applications.

* Java 8 or higher.
* Java 8 for main / master branch.
* Java 17 or higher should use the "java-17-master" branch.
* PostgresSQL Database 10.x or higher.
* NodeJS 12.4.1 or above
* Maven 3.3.x or higher.
Expand All @@ -86,8 +87,7 @@ The following technologies should have been installed on your machine where you
**Backend:**

File: src/main/resources/application.properties

Change the database user name, password to reflect the database that was created in step 2 above.
The database name and password along with an encryption key are passed as command line arguments or environment variables as detailed in Step 5 below.

*ERSD FILE LOCATION*

Expand All @@ -103,7 +103,8 @@ Currently this link only works state-side and if you are out of country, please
*SCHEMATRON FILE LOCATION*

Change the Schematron File location to reflect where to find the actual eICR Schematron.
The schematron file can be downloaded from https://gforge.hl7.org/gf/project/pher/scmsvn/?action=browse&path=%2Ftrunk%2FPHCASERPT_eICR%2Fschematron%2F with the appropriate HL7 authorization.
CDA eICR R1.1 : The schematron file can be downloaded from https://github.com/HL7/CDA-phcaserpt-1.1.1/tree/main/validation .
CDA eICR R3.1 : The schematron file can be downloaded from https://github.com/HL7/CDA-phcaserpt-1.1.1/tree/main/validation](https://github.com/HL7/CDA-phcaserpt-1.3.0/tree/CDA-phcaserpt-1.3.1/validation .

*SCHEMA FILE LOCATION*

Expand All @@ -113,17 +114,30 @@ The attribute ```xsd.schemas.location``` has to be set to the CDA XSD with SDTC
Change the logfile location to reflect where you want to log the data.

4. Build the App by running the following maven command.
```
mvn clean install -DJAVA.VERSION=<java_version>
```

For Java 8

```
mvn clean install -DJAVA.VERSION=1.8
```

```mvn clean install```
For Java 17

```
mvn clean install -DJAVA.VERSION=17
```

5. Run the App using the following command from the eCRNow project root directory.

```java -Djdbc.username=postgres -Djdbc.password=postgres -Dsecurity.key=test123 -jar ./target/ecr-now.war```
```java -Djdbc.username=postgres -Djdbc.password=postgres -Dsecurity.key=test123 -DJAVA.VERSION=<JAVA VERSION> -jar ./target/ecr-now.war```

The security.key is something that you can configure in the environment or your container approach and is used for encrypting sensitive information such as clientids, client secrets and direct transport account information in the database.

NOTE: If you are using Windows system to run the application, then use the command formatted like below.
```java "-Djdbc.username=postgres" "-Djdbc.password=postgres" "-Dsecurity.key=test123" -jar .\target\ecr-now.war```
```java "-Djdbc.username=postgres" "-Djdbc.password=postgres" "-Dsecurity.key=test123" "-DJAVA.VERSION=<JAVA VERSION>" -jar .\target\ecr-now.war```

6. **App configuration for EHR server:**

Expand Down Expand Up @@ -164,3 +178,4 @@ Organizations implementing in production settings should consider the following:
1. Properly securing the app user interface if it is used within the enterprise and protecting access.
2. Implement organization policies around database settings (ports), schemas, encryption.
3. Implement other security best practices.

742,619 changes: 742,619 additions & 0 deletions documents/app-artifacts/kars/ersd_app_release2.json

Large diffs are not rendered by default.

Binary file added documents/eCR Now App Configuration Guide_v2.docx
Binary file not shown.
Binary file added documents/eCR_R1.1_FHIR_Mapping_R4_v3.xlsx
Binary file not shown.
58 changes: 58 additions & 0 deletions documents/java_setup_and_execution_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Passing Java Version for Building and Running the Application

## Prerequisites

- Java Development Kit (JDK) installed on your system
- Apache Maven installed on your system
- Your Spring Boot application codebase

# Setting Java Version for Spring Boot Application

This document provides instructions for specifying the Java version during the building and running processes of your Spring Boot application.

## Building the Application

To specify the Java version during the build process, use the following Maven command with the `-D` flag:
````
mvn clean install -Djava.version=<java_version>
````
## Example

Java 8
````
mvn clean install -Djava.version=1.8
````

Java 17
````
mvn clean install -DJAVA.VERSION=17
````




## Running Spring Boot Application

This guide explains how to run a Spring Boot application and how to pass values during the runtime process.


1. Open a terminal or command prompt.

2. Navigate to the root directory of your Spring Boot application.

3. Run the following Maven command to start the application:

````
mvn spring-boot:run -Djava.version=<java_version>
````

## Example

Java 8
````
mvn spring-boot:run -Djava.version=1.8
````

Java 17
````
mvn spring-boot:run -Djava.version=17
Loading