diff --git a/backend/routes/doctorOrders.js b/backend/routes/doctorOrders.js index 7e5d4ea..304524c 100644 --- a/backend/routes/doctorOrders.js +++ b/backend/routes/doctorOrders.js @@ -8,7 +8,7 @@ const axios = require('axios').default; const DoctorOrder = require('../models/doctorOrders'); -router.patch("/fhir/rems/:id", async (req, res, next) => { +router.patch("/([$])process-message/:id", async (req, res, next) => { const documentId = req.params.id; let documentOrder = await DoctorOrder.findById(documentId); const crdUrl = (process.env.CRD_BASE_URL ? process.env.CRD_BASE_URL : "http://localhost:8090/") + "rems/" + documentOrder.caseNumber; @@ -25,7 +25,7 @@ router.patch("/fhir/rems/:id", async (req, res, next) => { }); }); -router.patch("/fhir/rems/pickedUp/:id", async (req, res, next) => { +router.patch("/([$])process-message/pickedUp/:id", async (req, res, next) => { const documentId = req.params.id; const documentOrder = await DoctorOrder.findById(documentId); @@ -45,7 +45,7 @@ router.patch("/fhir/rems/pickedUp/:id", async (req, res, next) => { }); -router.post("/fhir/rems", (req, res, next) => { +router.post("/([$])process-message", (req, res, next) => { const docOrder = parseRemsAdminRequest(req.body); docOrder.save().then(createdDocOrder => { res.status(201).json({ diff --git a/src/app/mainwindow/a-inventory-window/a-shopping-cart-window/DoctorOrderServices.service.ts b/src/app/mainwindow/a-inventory-window/a-shopping-cart-window/DoctorOrderServices.service.ts index cd6e383..c8ce08f 100644 --- a/src/app/mainwindow/a-inventory-window/a-shopping-cart-window/DoctorOrderServices.service.ts +++ b/src/app/mainwindow/a-inventory-window/a-shopping-cart-window/DoctorOrderServices.service.ts @@ -38,13 +38,13 @@ export class DoctorOrderServices{ createVerifiedDoctorOrder(id: string){ - return this.http.patch(environment.backendBaseUrl + "/api/doctorOrder/fhir/rems/" + id, {}) + return this.http.patch(environment.backendBaseUrl + "/api/doctorOrder/$process-message/" + id, {}) } createPickedUpDoctorOrder(id: string){ - return this.http.patch(environment.backendBaseUrl + "/api/doctorOrder/fhir/rems/pickedUp/" + id, {}) + return this.http.patch(environment.backendBaseUrl + "/api/doctorOrder/$process-message/pickedUp/" + id, {}) }