Skip to content
Merged
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
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