Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
smalho01 committed Sep 16, 2024
2 parents 562e00c + 5518287 commit ebc2b38
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/env.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
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

0 comments on commit ebc2b38

Please sign in to comment.