Skip to content

Commit e2e5e92

Browse files
authored
auth number to case number migration (#174)
* update rems admin to work with auth number to case number migration * remove case number from output params * put back case number - handle in pims * formatting * run prettier * run eslint * update ci/cd * remove all instances of auth number * fix tests? * test dependency
1 parent b4ba2ed commit e2e5e92

13 files changed

Lines changed: 47 additions & 40 deletions

File tree

.github/workflows/ci-workflow.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,22 @@ jobs:
77
name: Check tsc, lint, and prettier
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v1
1110
- name: Checkout Repository
1211
uses: actions/checkout@v3
1312
with:
1413
submodules: true
15-
node-version: '14.x'
14+
clean: true
15+
16+
- uses: actions/setup-node@v1
17+
with:
18+
node-version: "18.x"
1619

1720
- run: npm install
1821
- run: npm run lint
1922
- run: npm run prettier
2023
env:
2124
CI: true
25+
2226
test:
2327
name: Test on node ${{ matrix.node-version }} and ${{ matrix.os }}
2428
runs-on: ${{ matrix.os }}
@@ -29,12 +33,24 @@ jobs:
2933

3034
steps:
3135
- uses: actions/checkout@v1
36+
3237
- name: Use Node.js ${{ matrix.node-version }}
3338
uses: actions/setup-node@v1
3439
with:
3540
node-version: ${{ matrix.node-version }}
41+
42+
- name: Install OpenSSL 1.1 on Ubuntu
43+
if: matrix.os == 'ubuntu-latest'
44+
run: |
45+
sudo apt-get update
46+
sudo apt-get install -y libssl1.1 || {
47+
# Fallback for newer Ubuntu versions
48+
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
49+
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
50+
}
51+
3652
- run: npm install
3753
- run: git submodule update --init
3854
- run: npm test
3955
env:
40-
CI: true
56+
CI: true

.github/workflows/docker-cd-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
uses: actions/checkout@v3
1515
with:
1616
submodules: true
17+
clean: true
1718

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

.github/workflows/docker-cd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
uses: actions/checkout@v3
1515
with:
1616
submodules: true
17+
clean: true
1718

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

.github/workflows/docker-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
uses: actions/checkout@v3
1616
with:
1717
submodules: true
18+
clean: true
1819

1920
- name: Test Server Docker image Builds
2021
run: docker build .

.github/workflows/docker-tag-cd.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
uses: actions/checkout@v3
1515
with:
1616
submodules: true
17-
17+
clean: true
18+
1819
- name: Setup Docker Buildx
1920
uses: docker/setup-buildx-action@v2
2021

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ The FHIR server built into the REMS Admin can be queried for the questionnaire p
8484
- Input requires a parameter containing the following:
8585
- `patient` - Patient FHIR Resource, must include `medication` with `patient`
8686
- `medication` - Medication or MedicationRequest FHIR Resource, must include `patient` with `medication`
87-
- `authNumber` - String containing the REMS Authorization Number, may be sent without `patient` or `medication`
87+
- `caseNumber` - String containing the REMS Case Number, may be sent without `patient` or `medication`
8888
- Returns a GuidanceResponse within a Parameter with the status
8989
- Contains Nested GuidanceResponse resources for each ETASU requirement with their status
9090
- `/4_0_0/Questionnaire/\<form-name\>/$questionnaire-package` - The endpoint for the FHIR Operation used for retrieving the Questionnaire package for a given form

frontend/src/views/DataViews/CaseCollection.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import FormPopup from '../FormPopup';
2121

2222
export type RemsCase = {
2323
case_number?: string;
24-
auth_number?: string;
2524
patientFirstName?: string;
2625
patientLastName?: string;
2726
patientDOB?: string;
@@ -162,7 +161,6 @@ const CaseCollection = (props: { refresh: boolean }) => {
162161
<TableCell align="right">Patient DOB</TableCell>
163162
<TableCell align="right">Status</TableCell>
164163
<TableCell align="right">Dispense Status</TableCell>
165-
<TableCell align="left">Authorization Number</TableCell>
166164
<TableCell align="right">Met Requirements</TableCell>
167165
<TableCell align="right">Delete</TableCell>
168166
</TableRow>
@@ -180,7 +178,6 @@ const CaseCollection = (props: { refresh: boolean }) => {
180178
<TableCell align="right">{row.patientDOB}</TableCell>
181179
<TableCell align="right">{row.status}</TableCell>
182180
<TableCell align="right">{row.dispenseStatus}</TableCell>
183-
<TableCell align="right">{row.auth_number}</TableCell>
184181
<TableCell align="center">{metReq}</TableCell>
185182
<TableCell align="right">
186183
<IconButton

frontend/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default defineConfig({
99
base: '',
1010
plugins: [react()],
1111
preview: {
12-
allowedHosts: ['.mitre.org', '.us-east-1.elb.amazonaws.com'],
12+
allowedHosts: ['.mitre.org', '.us-east-1.elb.amazonaws.com']
1313
},
1414
define: {
1515
'process.env': process.env

src/fhir/guidanceResponseUtilities.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class GuidanceResponseUtilities {
2828
etasu: Pick<
2929
RemsCase,
3030
| 'drugName'
31-
| 'auth_number'
31+
| 'case_number'
3232
| 'status'
3333
| 'drugCode'
3434
| 'patientFirstName'
@@ -78,15 +78,15 @@ export class GuidanceResponseUtilities {
7878
outputParameters.parameter?.push(parameter);
7979
}
8080
});
81-
outputParameters.parameter?.push({ name: 'auth_number', valueString: etasu?.auth_number });
81+
outputParameters.parameter?.push({ name: 'case_number', valueString: etasu?.case_number });
8282
return outputParameters;
8383
}
8484

8585
static createEtasuGuidanceResponse(
8686
etasu: Pick<
8787
RemsCase,
8888
| 'drugName'
89-
| 'auth_number'
89+
| 'case_number'
9090
| 'status'
9191
| 'drugCode'
9292
| 'patientFirstName'

src/fhir/models.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export interface MetRequirements extends Document {
3232

3333
export interface RemsCase extends Document {
3434
case_number: string;
35-
auth_number: string;
3635
status: string;
3736
dispenseStatus: string;
3837
drugName: string;
@@ -90,7 +89,6 @@ export const metRequirementsCollection = model<MetRequirements>(
9089

9190
const remsCaseCollectionSchema = new Schema<RemsCase>({
9291
case_number: { type: String },
93-
auth_number: { type: String },
9492
status: { type: String },
9593
dispenseStatus: { type: String },
9694
drugName: { type: String },

0 commit comments

Comments
 (0)