diff --git a/src/components/RemsInterface/RemsInterface.jsx b/src/components/RemsInterface/RemsInterface.jsx index f34590b9..5de5a0ba 100644 --- a/src/components/RemsInterface/RemsInterface.jsx +++ b/src/components/RemsInterface/RemsInterface.jsx @@ -14,7 +14,7 @@ export default class RemsInterface extends Component { }; this.getAxiosOptions = this.getAxiosOptions.bind(this); - this.sendMessage = this.sendMessage.bind(this); + this.sendRemsMessage = this.sendRemsMessage.bind(this); this.renderBundle= this.renderBundle.bind(this); } getAxiosOptions() { @@ -27,9 +27,9 @@ export default class RemsInterface extends Component { return options; } - sendMessage(destination) { - console.log(this.props.specialtyRxBundle); - axios.post(destination, this.props.specialtyRxBundle, this.getAxiosOptions()); + async sendRemsMessage() { + const remsAdminResponse = await axios.post("http://localhost:8090/api/rems", this.props.specialtyRxBundle, this.getAxiosOptions()); + axios.post("http://localhost:3010/api/doctorOrder/fhir/rems", remsAdminResponse.data, this.getAxiosOptions()); } renderBundle() { @@ -48,7 +48,7 @@ export default class RemsInterface extends Component {
{this.renderBundle()} - +