From 6c9013be2302f6ced08cbde144a3352d8d39e95c Mon Sep 17 00:00:00 2001 From: kghoreshi Date: Mon, 7 Mar 2022 18:29:18 -0500 Subject: [PATCH] send message --- src/App.jsx | 5 +- .../QuestionnaireForm/QuestionnaireForm.jsx | 6 ++ .../RemsInterface/RemsInterface.css | 51 ++++++++++++++++ .../RemsInterface/RemsInterface.jsx | 59 +++++++++++++++++++ .../RemsInterface/ResourceEntry.jsx | 33 +++++++++++ 5 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 src/components/RemsInterface/RemsInterface.css create mode 100644 src/components/RemsInterface/RemsInterface.jsx create mode 100644 src/components/RemsInterface/ResourceEntry.jsx diff --git a/src/App.jsx b/src/App.jsx index 0c665df6..c1818ccc 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -12,6 +12,7 @@ import Testing from "./components/ConsoleBox/Testing"; import UserMessage from "./components/UserMessage/UserMessage"; import TaskPopup from "./components/Popup/TaskPopup"; import PatientSelect from "./components/PatientSelect/PatientSelect"; +import RemsInterface from "./components/RemsInterface/RemsInterface"; // uncomment for testing UserMessage // let sampleError = { @@ -600,8 +601,8 @@ export default class App extends Component { > - {this.state.priorAuthClaim ? ( - + {this.state.specialtyRxBundle ? ( + ) : ( { + const resource = entry.resource; + console.log(resource); + return( +
+ +
+ ) + }) + } + render() { + return ( +
+
+ {this.renderBundle()} + + +
+
+
+
+ ) + } +} diff --git a/src/components/RemsInterface/ResourceEntry.jsx b/src/components/RemsInterface/ResourceEntry.jsx new file mode 100644 index 00000000..acea9ce2 --- /dev/null +++ b/src/components/RemsInterface/ResourceEntry.jsx @@ -0,0 +1,33 @@ +import React, {Component} from 'react' +import "./RemsInterface.css"; + +export default class ResourceEntry extends Component { + constructor(props) { + super(props); + this.state = { + viewDetails: null, + }; + this.openDetails = this.openDetails.bind(this); + + } + + + openDetails() { + + this.setState((prevState) => { + return { viewDetails: !prevState.viewDetails }; + }) + + + } + render() { + return ( +
+
+
{this.props.resource["resourceType"]}
+
+ {this.state.viewDetails ?
{JSON.stringify(this.props.resource,null,'\t')}
: null} +
+ ) + } +} \ No newline at end of file