diff --git a/src/components/RequestBox/InProgressFormBox/InProgressFormBox.js b/src/components/RequestBox/InProgressFormBox/InProgressFormBox.js new file mode 100644 index 00000000..7cfe2573 --- /dev/null +++ b/src/components/RequestBox/InProgressFormBox/InProgressFormBox.js @@ -0,0 +1,29 @@ +import { Box, Button, Paper, Typography, ButtonGroup } from '@mui/material'; +import React from 'react'; +import './InProgressFormBoxStyle.css'; + +export default function InProgressFormBox(props) { + return ( + props.qrResponse.questionnaire ? ( + + + In Progress Form + + + Practitioner: {props.qrResponse.author ? props.qrResponse.author.reference : 'empty'} + + + Last Edited: {props.qrResponse.authored ? props.qrResponse.authored : 'empty'} + + + Form Link: {props.qrResponse.questionnaire ? props.qrResponse.questionnaire : 'empty'} + + + + + + ) : '' + ); +} \ No newline at end of file diff --git a/src/components/RequestBox/InProgressFormBox/InProgressFormBoxStyle.css b/src/components/RequestBox/InProgressFormBox/InProgressFormBoxStyle.css new file mode 100644 index 00000000..4e8b3eea --- /dev/null +++ b/src/components/RequestBox/InProgressFormBox/InProgressFormBoxStyle.css @@ -0,0 +1,10 @@ +.inprogress-container { + background-color:#f8f8f8; + border: 1px solid black; + border-radius: 5px; + padding:20px; + margin:20px 0 20px 0; + + /* This should be inherited, need to change */ + width:48.5vw; +} \ No newline at end of file diff --git a/src/components/RequestBox/RequestBox.js b/src/components/RequestBox/RequestBox.js index ea995e28..35deb168 100644 --- a/src/components/RequestBox/RequestBox.js +++ b/src/components/RequestBox/RequestBox.js @@ -7,6 +7,7 @@ import { defaultValues, shortNameMap, types } from '../../util/data'; import { getAge } from '../../util/fhir'; import { retrieveLaunchContext } from '../../util/util'; import './request.css'; +import InProgressFormBox from './InProgressFormBox/InProgressFormBox.js'; import PatientSearchBar from './PatientSearchBar/PatientSearchBar.js'; @@ -201,7 +202,6 @@ export default class RequestBox extends Component { State: {this.state.patientState ? this.state.patientState : this.emptyField} {this.renderOtherInfo()} - {this.renderQRInfo()} ); } @@ -225,32 +225,6 @@ export default class RequestBox extends Component { ); } - renderQRInfo() { - const qrResponse = this.state.response; - return ( -
- {qrResponse.questionnaire ? ( - <> -
- In Progress Form -
-
- Form: {qrResponse.questionnaire ? qrResponse.questionnaire : this.emptyField} -
-
- Author: {qrResponse.author ? qrResponse.author.reference : this.emptyField} -
-
- Date: {qrResponse.authored ? qrResponse.authored : this.emptyField} -
- - ) : ( -
- )} -
- ); - } - renderPrefetchedResources() { const prefetchMap = new Map(Object.entries(this.state.prefetchedResources)); if (prefetchMap.size > 0) { @@ -460,7 +434,6 @@ export default class RequestBox extends Component { render() { const disableSendToCRD = this.isOrderNotSelected() || this.props.loading; - const disableLaunchDTR = !this.state.response.questionnaire; const disableSendRx = this.isOrderNotSelected() || this.props.loading; const disableLaunchSmartOnFhir = this.isPatientNotSelected(); return ( @@ -512,10 +485,11 @@ export default class RequestBox extends Component {
{this.state.patient.id ? (
+ - diff --git a/src/components/RequestBox/request.css b/src/components/RequestBox/request.css index 4bac5323..2da628c9 100644 --- a/src/components/RequestBox/request.css +++ b/src/components/RequestBox/request.css @@ -12,7 +12,7 @@ .request { border: 1px solid black; - height:530px; + height:375px; padding: 10px; border-radius: 5px; background-color: rgb(248, 248, 248)