Skip to content

Commit

Permalink
Merge pull request #101 from mcode/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
smalho01 authored Sep 16, 2024
2 parents 3218321 + 9af375c commit 051cf79
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 18 deletions.
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
FROM node:14-alpine
ENV NODE_ENV production

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

WORKDIR /home/node/app/backend
RUN npm install
RUN npm link typescript

WORKDIR /home/node/app/frontend
RUN npm install
RUN npm link typescript

WORKDIR /home/node/app

# RUN npm install pm2 -g

EXPOSE 5050
EXPOSE 5051

CMD ./dockerRunnerProd.sh
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

CMD ./dockerRunnerProd.sh
3 changes: 0 additions & 3 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ FROM node:14-alpine

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

WORKDIR /home/node/app/backend
RUN npm install
RUN npm link typescript

WORKDIR /home/node/app/frontend
RUN npm install
RUN npm link typescript

WORKDIR /home/node/app

Expand Down
10 changes: 7 additions & 3 deletions backend/env.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
},
"MONGO_USERNAME": {
"type": "string",
"default": "rems-admin-pims-root"
"default": "pims-user"
},

"MONGO_PASSWORD": {
"type": "string",
"default": "rems-admin-pims-password"
"default": "pims-pass"
},

"MONGO_URL": {
Expand All @@ -35,7 +35,7 @@

"AUTH_SOURCE": {
"type": "string",
"default": "admin"
"default": "pims"
},

"HTTPS_KEY_PATH": {
Expand All @@ -61,5 +61,9 @@
"INTERMEDIARY_FHIR_URL": {
"type": "string",
"default": "http://localhost:3003/4_0_0"
},
"REMS_ADMIN_NCPDP": {
"type": "string",
"default": "http://localhost:8090/ncpdp/script"
}
}
2 changes: 1 addition & 1 deletion backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"sinon": "^15.0.3",
"ts-node": "^10.9.1",
"ts-node-dev": "^2.0.0",
"typescript": "^4.9.3"
"typescript": "^4.9.5"
},
"scripts": {
"start": "ts-node-dev src/server.ts",
Expand Down
9 changes: 9 additions & 0 deletions backend/src/routes/doctorOrders.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,15 @@ router.patch('/api/updateRx/:id/pickedUp', async (req, res) => {
}
});
console.log('Sent RxFill to EHR and received status from EHR', status.data);

const remsAdminStatus = await axios.post(env.REMS_ADMIN_NCPDP, rxFill, {
headers: {
Accept: 'application/xml', // Expect that the Status that the rems admin returns back is in XML
'Content-Type': 'application/xml' // Tell the rems admin that the RxFill is in XML
}
});

console.log('Sent RxFill to rems admin and received status from rems admin: ', remsAdminStatus);
} catch (error) {
console.log('Could not send RxFill to EHR', error);
return error;
Expand Down
2 changes: 1 addition & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"ts-jest": "^27.1.2",
"ts-node": "^10.9.1",
"ts-node-dev": "^2.0.0",
"typescript": "^4.9.3"
"typescript": "^4.9.5"
},
"scripts": {
"start": "react-scripts start",
Expand Down

0 comments on commit 051cf79

Please sign in to comment.