diff --git a/.gitignore b/.gitignore index 0445a1b8..e856ea58 100644 --- a/.gitignore +++ b/.gitignore @@ -62,4 +62,5 @@ typings/ # local build files build/ -package-lock.json \ No newline at end of file +package-lock.json +src/db.json diff --git a/src/components/RequestBox/RequestBox.js b/src/components/RequestBox/RequestBox.js index 1c4375b2..37e79dc2 100644 --- a/src/components/RequestBox/RequestBox.js +++ b/src/components/RequestBox/RequestBox.js @@ -340,7 +340,7 @@ export default class RequestBox extends Component { if (this.props.access_token) { params['tokenResponse'] = {access_token: this.props.access_token.access_token}; } - const disableSendToCRD = this.isOrderNotSelected(); + const disableSendToCRD = this.isOrderNotSelected() || this.props.loading ; const disableLaunchDTR = this.isOrderNotSelected() && Object.keys(this.state.response).length === 0; return (
@@ -398,6 +398,9 @@ export default class RequestBox extends Component {
+
+
+
diff --git a/src/containers/RequestBuilder.js b/src/containers/RequestBuilder.js index 68d3d797..f4065801 100644 --- a/src/containers/RequestBuilder.js +++ b/src/containers/RequestBuilder.js @@ -109,7 +109,9 @@ export default class RequestBuilder extends Component { } + submit_info(prefetch, request, patient, hook, deidentifyRecords) { + this.setState({loading: true}); this.consoleLog("Initiating form submission", types.info); this.setState({patient}); const hookConfig = { @@ -363,6 +365,7 @@ retrieveLaunchContext(link, accessToken, patientId, fhirBaseUrl, fhirVersion) { launchUrl={this.state.launchUrl} responseExpirationDays={this.state.responseExpirationDays} ref={this.requestBox} + loading={this.state.loading} />