Skip to content

Commit 051cf79

Browse files
authored
Merge pull request #101 from mcode/dev
Dev
2 parents 3218321 + 9af375c commit 051cf79

8 files changed

Lines changed: 23 additions & 18 deletions

File tree

Dockerfile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
FROM node:14-alpine
2-
ENV NODE_ENV production
32

43
WORKDIR /home/node/app
54
COPY --chown=node:node . .
6-
RUN npm install -g typescript
75

86
WORKDIR /home/node/app/backend
97
RUN npm install
10-
RUN npm link typescript
118

129
WORKDIR /home/node/app/frontend
1310
RUN npm install
14-
RUN npm link typescript
1511

1612
WORKDIR /home/node/app
1713

18-
# RUN npm install pm2 -g
19-
2014
EXPOSE 5050
21-
EXPOSE 5051
2215

23-
CMD ./dockerRunnerProd.sh
16+
HEALTHCHECK --interval=30s --start-period=15s --timeout=10m --retries=10 CMD (wget --no-verbose --tries=1 --spider http://localhost:5051/doctorOrders/api/getRx/pending && wget --no-verbose --tries=1 --spider http://localhost:5050) || exit 1
17+
18+
CMD ./dockerRunnerProd.sh

Dockerfile.dev

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@ FROM node:14-alpine
22

33
WORKDIR /home/node/app
44
COPY --chown=node:node . .
5-
RUN npm install -g typescript
65

76
WORKDIR /home/node/app/backend
87
RUN npm install
9-
RUN npm link typescript
108

119
WORKDIR /home/node/app/frontend
1210
RUN npm install
13-
RUN npm link typescript
1411

1512
WORKDIR /home/node/app
1613

backend/env.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
},
2121
"MONGO_USERNAME": {
2222
"type": "string",
23-
"default": "rems-admin-pims-root"
23+
"default": "pims-user"
2424
},
2525

2626
"MONGO_PASSWORD": {
2727
"type": "string",
28-
"default": "rems-admin-pims-password"
28+
"default": "pims-pass"
2929
},
3030

3131
"MONGO_URL": {
@@ -35,7 +35,7 @@
3535

3636
"AUTH_SOURCE": {
3737
"type": "string",
38-
"default": "admin"
38+
"default": "pims"
3939
},
4040

4141
"HTTPS_KEY_PATH": {
@@ -61,5 +61,9 @@
6161
"INTERMEDIARY_FHIR_URL": {
6262
"type": "string",
6363
"default": "http://localhost:3003/4_0_0"
64+
},
65+
"REMS_ADMIN_NCPDP": {
66+
"type": "string",
67+
"default": "http://localhost:8090/ncpdp/script"
6468
}
6569
}

backend/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"sinon": "^15.0.3",
4747
"ts-node": "^10.9.1",
4848
"ts-node-dev": "^2.0.0",
49-
"typescript": "^4.9.3"
49+
"typescript": "^4.9.5"
5050
},
5151
"scripts": {
5252
"start": "ts-node-dev src/server.ts",

backend/src/routes/doctorOrders.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,15 @@ router.patch('/api/updateRx/:id/pickedUp', async (req, res) => {
177177
}
178178
});
179179
console.log('Sent RxFill to EHR and received status from EHR', status.data);
180+
181+
const remsAdminStatus = await axios.post(env.REMS_ADMIN_NCPDP, rxFill, {
182+
headers: {
183+
Accept: 'application/xml', // Expect that the Status that the rems admin returns back is in XML
184+
'Content-Type': 'application/xml' // Tell the rems admin that the RxFill is in XML
185+
}
186+
});
187+
188+
console.log('Sent RxFill to rems admin and received status from rems admin: ', remsAdminStatus);
180189
} catch (error) {
181190
console.log('Could not send RxFill to EHR', error);
182191
return error;

frontend/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"ts-jest": "^27.1.2",
4848
"ts-node": "^10.9.1",
4949
"ts-node-dev": "^2.0.0",
50-
"typescript": "^4.9.3"
50+
"typescript": "^4.9.5"
5151
},
5252
"scripts": {
5353
"start": "react-scripts start",

0 commit comments

Comments
 (0)