src/components/RequestBox/RequestBox.js
// TODO - see how to submit response for alternative therapy
see how to submit response for alternative therapy
see how to submit response for alternative therapy
replaceRequestAndSubmit(request) {
    let resourceType = request.resourceType.toUpperCase();
    console.log("replaceRequestAndSubmit: " + request.resourceType);
    if (resourceType === "DEVICEREQUEST") {
      this.setState({ deviceRequest: request });
    } else if (resourceType === "SERVICEREQUEST") {
      this.setState({ serviceRequest: request });
    } else if (resourceType === "MEDICATIONREQUEST") {
        this.setState({ medicationRequest: request });
    } else if (resourceType === "MEDICATIONDISPENSE") {
      this.setState({ medicationDispense: request });
    }
    const prefetch = this.makePrefetch(request);
    this.props.submitInfo(prefetch, request, this.state.patient, null, "order-sign");
  }
replaceRequestAndSubmit ( request ) { let resourceType = request . resourceType . toUpperCase ( ) ; console . log ( "replaceRequestAndSubmit: " + request . resourceType ) ; if ( resourceType === "DEVICEREQUEST" ) { this . setState ( { deviceRequest : request } ) ; } else if ( resourceType === "SERVICEREQUEST" ) { this . setState ( { serviceRequest : request } ) ; } else if ( resourceType === "MEDICATIONREQUEST" ) { this . setState ( { medicationRequest : request } ) ; } else if ( resourceType === "MEDICATIONDISPENSE" ) { this . setState ( { medicationDispense : request } ) ; } const prefetch = this . makePrefetch ( request ) ; this . props . submitInfo ( prefetch , request , this . state . patient , null , "order-sign" ) ; }
TODO - see how to submit response for alternative therapy
TODO - see how to submit response for alternative therapy
// replace the request in the state with the new one // build the prefetch // submit the CRD request