diff --git a/src/components/RequestBox/PatientSearchBar/PatientSearchBar.js b/src/components/RequestBox/PatientSearchBar/PatientSearchBar.js index 250428f4..338b366f 100644 --- a/src/components/RequestBox/PatientSearchBar/PatientSearchBar.js +++ b/src/components/RequestBox/PatientSearchBar/PatientSearchBar.js @@ -78,6 +78,8 @@ export default function PatientSearchBar(props) { key={patient.id} patient={props.searchablePatients.find(item => item.id === patient.id)} client={props.client} + request={props.request} + launchUrl={props.launchUrl} callback={props.callback} callbackList={props.callbackList} callbackMap={props.callbackMap} diff --git a/src/components/RequestBox/RequestBox.js b/src/components/RequestBox/RequestBox.js index 913b4d3f..53627c31 100644 --- a/src/components/RequestBox/RequestBox.js +++ b/src/components/RequestBox/RequestBox.js @@ -158,6 +158,7 @@ export default class RequestBox extends Component { if (prefetchMap.size > 0) { return this.renderRequestResources(prefetchMap); } + return
; } renderRequestResources(requestResources) { @@ -385,12 +386,6 @@ export default class RequestBox extends Component {
- {Object.keys(this.props.response).length ? - - : } + : + + - {!responseOptions.length && returned ? ( - No in progress forms - ) : ( - this.makeDropdown( - responseOptions, - 'Choose an in-progress form', - this.state.response, - this.handleResponseChange - ) - )} -
+ } + { this.state.showQuestionnaires ? + + : + + + + + + } + + { this.state.showMedications ? +
+ { this.makeResponseTable(medicationColumns, options, 'medication', patient) } +
+ : } + { this.state.showQuestionnaires ? +
+ { this.makeQuestionnaireTable(questionnaireColumns, responseOptions, 'questionnaire', patient) } +
+ : } ); } diff --git a/src/components/SMARTBox/smart.css b/src/components/SMARTBox/smart.css index 243de77e..f95cd6dd 100644 --- a/src/components/SMARTBox/smart.css +++ b/src/components/SMARTBox/smart.css @@ -11,9 +11,28 @@ html{ padding:10px 10px 15px 10px; flex:1; background-color: #ddd; - display: grid; - grid-template-columns: 15% 35% 35% 10%; - column-gap: 5px; + display: flex; + justify-content: space-between; +} +.button-options { + display: flex; + column-gap: 12px; +} + +.patient-table-info { + /* display: flex; */ + margin-bottom: 10px; +} +tr:nth-child(odd) { + background-color: #ddd !important; +} +.hover-row:hover { + background-color: #E7F1FF !important; +} + +.big-button { + display: flex !important; + flex-direction: column !important; } .patient-box{ @@ -63,12 +82,9 @@ html{ float:right; } -.patient-info { - display:inline-block; -} - .request-info { - display: inherit; + display: flex; + flex-direction: column; } @@ -84,9 +100,7 @@ html{ } .select-btn { - height: 40px; - align-self: center; - margin-top: 25px !important; + height: 52px; } .emptyForm { diff --git a/src/containers/RequestBuilder.js b/src/containers/RequestBuilder.js index eba3a64c..a75d266c 100644 --- a/src/containers/RequestBuilder.js +++ b/src/containers/RequestBuilder.js @@ -28,7 +28,7 @@ export default class RequestBuilder extends Component { patient: {}, expanded: false, patientList: [], - response: null, + response: {}, code: null, codeSystem: null, display: null, @@ -298,6 +298,8 @@ export default class RequestBuilder extends Component { getPatients = {this.getPatients} searchablePatients={this.state.patientList} client={this.props.client} + request={this.state.request} + launchUrl={this.state.launchUrl} callback={this.updateStateElement} callbackList={this.updateStateList} callbackMap={this.updateStateMap}