Skip to content
Merged

Dev #176

Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 19 additions & 3 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@ jobs:
name: Check tsc, lint, and prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true
node-version: '14.x'
clean: true

- uses: actions/setup-node@v1
with:
node-version: "18.x"

- run: npm install
- run: npm run lint
- run: npm run prettier
env:
CI: true

test:
name: Test on node ${{ matrix.node-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -29,12 +33,24 @@ jobs:

steps:
- uses: actions/checkout@v1

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install OpenSSL 1.1 on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libssl1.1 || {
# Fallback for newer Ubuntu versions
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
}

- run: npm install
- run: git submodule update --init
- run: npm test
env:
CI: true
CI: true
1 change: 1 addition & 0 deletions .github/workflows/docker-cd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
uses: actions/checkout@v3
with:
submodules: true
clean: true

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
uses: actions/checkout@v3
with:
submodules: true
clean: true

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: actions/checkout@v3
with:
submodules: true
clean: true

- name: Test Server Docker image Builds
run: docker build .
3 changes: 2 additions & 1 deletion .github/workflows/docker-tag-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
uses: actions/checkout@v3
with:
submodules: true

clean: true

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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ The FHIR server built into the REMS Admin can be queried for the questionnaire p
- Input requires a parameter containing the following:
- `patient` - Patient FHIR Resource, must include `medication` with `patient`
- `medication` - Medication or MedicationRequest FHIR Resource, must include `patient` with `medication`
- `authNumber` - String containing the REMS Authorization Number, may be sent without `patient` or `medication`
- `caseNumber` - String containing the REMS Case Number, may be sent without `patient` or `medication`
- Returns a GuidanceResponse within a Parameter with the status
- Contains Nested GuidanceResponse resources for each ETASU requirement with their status
- `/4_0_0/Questionnaire/\<form-name\>/$questionnaire-package` - The endpoint for the FHIR Operation used for retrieving the Questionnaire package for a given form
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
"globals": "^15.9.0",
"typescript": "^5.5.3",
"typescript-eslint": "^8.0.1",
"vite": "^5.4.1"
"vite": "^5.4.19"
}
}
3 changes: 0 additions & 3 deletions frontend/src/views/DataViews/CaseCollection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import FormPopup from '../FormPopup';

export type RemsCase = {
case_number?: string;
auth_number?: string;
patientFirstName?: string;
patientLastName?: string;
patientDOB?: string;
Expand Down Expand Up @@ -162,7 +161,6 @@ const CaseCollection = (props: { refresh: boolean }) => {
<TableCell align="right">Patient DOB</TableCell>
<TableCell align="right">Status</TableCell>
<TableCell align="right">Dispense Status</TableCell>
<TableCell align="left">Authorization Number</TableCell>
<TableCell align="right">Met Requirements</TableCell>
<TableCell align="right">Delete</TableCell>
</TableRow>
Expand All @@ -180,7 +178,6 @@ const CaseCollection = (props: { refresh: boolean }) => {
<TableCell align="right">{row.patientDOB}</TableCell>
<TableCell align="right">{row.status}</TableCell>
<TableCell align="right">{row.dispenseStatus}</TableCell>
<TableCell align="right">{row.auth_number}</TableCell>
<TableCell align="center">{metReq}</TableCell>
<TableCell align="right">
<IconButton
Expand Down
6 changes: 5 additions & 1 deletion frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@
// depending on your application, base can also be "/"
base: '',
plugins: [react()],
preview: {
allowedHosts: ['.mitre.org', '.us-east-1.elb.amazonaws.com']
},
define: {
'process.env': process.env
},
server: {
port: parseInt(process.env.FRONTEND_PORT!),

Check warning on line 18 in frontend/vite.config.ts

View workflow job for this annotation

GitHub Actions / Check tsc, lint, and prettier

Forbidden non-null assertion

Check warning on line 18 in frontend/vite.config.ts

View workflow job for this annotation

GitHub Actions / Check tsc, lint, and prettier

Forbidden non-null assertion
open: false,
host: true
host: true,
allowedHosts: ['.mitre.org', '.us-east-1.elb.amazonaws.com']
}
});
10 changes: 9 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,15 @@ export default {
},
questionnaireresponse: {
service: './src/services/questionnaireresponse.service.ts',
versions: [fhirConstants.VERSIONS['4_0_0']]
versions: [fhirConstants.VERSIONS['4_0_0']],
operation: [
{
name: 'submit',
route: '/$submit',
method: 'POST',
reference: 'http://hl7.org/fhir/OperationDefinition/QuestionnaireResponse-submit'
}
]
},
valueset: {
service: './src/services/valueset.service.ts',
Expand Down
6 changes: 3 additions & 3 deletions src/fhir/guidanceResponseUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class GuidanceResponseUtilities {
etasu: Pick<
RemsCase,
| 'drugName'
| 'auth_number'
| 'case_number'
| 'status'
| 'drugCode'
| 'patientFirstName'
Expand Down Expand Up @@ -78,15 +78,15 @@ export class GuidanceResponseUtilities {
outputParameters.parameter?.push(parameter);
}
});
outputParameters.parameter?.push({ name: 'auth_number', valueString: etasu?.auth_number });
outputParameters.parameter?.push({ name: 'case_number', valueString: etasu?.case_number });
return outputParameters;
}

static createEtasuGuidanceResponse(
etasu: Pick<
RemsCase,
| 'drugName'
| 'auth_number'
| 'case_number'
| 'status'
| 'drugCode'
| 'patientFirstName'
Expand Down
2 changes: 0 additions & 2 deletions src/fhir/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export interface MetRequirements extends Document {

export interface RemsCase extends Document {
case_number: string;
auth_number: string;
status: string;
dispenseStatus: string;
drugName: string;
Expand Down Expand Up @@ -90,7 +89,6 @@ export const metRequirementsCollection = model<MetRequirements>(

const remsCaseCollectionSchema = new Schema<RemsCase>({
case_number: { type: String },
auth_number: { type: String },
status: { type: String },
dispenseStatus: { type: String },
drugName: { type: String },
Expand Down
Loading
Loading