diff --git a/src/App.jsx b/src/App.jsx
index 190eb598..a599f890 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -10,7 +10,6 @@ import PriorAuth from "./components/PriorAuth/PriorAuth";
import QuestionnaireForm from "./components/QuestionnaireForm/QuestionnaireForm";
import Testing from "./components/ConsoleBox/Testing";
import UserMessage from "./components/UserMessage/UserMessage";
-import TaskPopup from "./components/Popup/TaskPopup";
import PatientSelect from "./components/PatientSelect/PatientSelect";
// uncomment for testing UserMessage
@@ -543,14 +542,6 @@ export default class App extends Component {
};
renderButtons(ref) {
- const element = (
)
- ReactDOM.render(element, ref);
}
renderErrors() {
diff --git a/src/components/Popup/Task.css b/src/components/Popup/Task.css
deleted file mode 100644
index 8d27bbe3..00000000
--- a/src/components/Popup/Task.css
+++ /dev/null
@@ -1,21 +0,0 @@
-.taskInput {
- padding: 5px 0 3px;
-}
-
-.task-popup-button {
- z-index: 40;
- border: 1px solid white;
- color: white;
- float:right;
- margin-right: 10px;
- margin-top: 5px;
- padding: 4px 8px !important;
-}
-
-.openPop {
- z-index: 900 !important;
-}
-
-.dialog {
- width: 700px;
-}
diff --git a/src/components/Popup/TaskForm.jsx b/src/components/Popup/TaskForm.jsx
deleted file mode 100644
index f7ffb8f4..00000000
--- a/src/components/Popup/TaskForm.jsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import React, { Component } from "react";
-import './Task.css';
-import questionnaire from './TaskQuestionnaire';
-
-export default class TaskForm extends Component {
- constructor(props) {
- super(props);
- this.state = {
- };
- }
-
-componentDidMount() {
- this.renderTaskQuestionnaire();
-}
-
-renderTaskQuestionnaire() {
- let lform = LForms.Util.convertFHIRQuestionnaireToLForms(questionnaire, "R4");
- lform.templateOptions = {
- showFormHeader: false,
- showColumnHeaders: false,
- showQuestionCode: false,
- hideFormControls: true,
- showFormOptionPanelButton: false//,
- //allowHTMLInInstructions: true,
- //showCodingInstruction: true
- };
- const bb = LForms.Util.addFormToPage(lform, 'taskContainer');
- }
-
- render() {
- return (
-
- );
- }
-
-}
\ No newline at end of file
diff --git a/src/components/Popup/TaskPopup.jsx b/src/components/Popup/TaskPopup.jsx
deleted file mode 100644
index 39063d51..00000000
--- a/src/components/Popup/TaskPopup.jsx
+++ /dev/null
@@ -1,112 +0,0 @@
-import React, { Component } from "react";
-import Button from '@material-ui/core/Button';
-import TextField from '@material-ui/core/TextField';
-import Dialog from '@material-ui/core/Dialog';
-import DialogActions from '@material-ui/core/DialogActions';
-import DialogContent from '@material-ui/core/DialogContent';
-import DialogContentText from '@material-ui/core/DialogContentText';
-import DialogTitle from '@material-ui/core/DialogTitle';
-import { findValueByPrefix } from "../../util/util.js";
-import {createTask} from "../../util/taskCreation";
-
-import './Task.css';
-import questionnaire from './TaskQuestionnaire';
-import TaskForm from './TaskForm';
-
-export default class TaskPopup extends Component {
- constructor(props) {
- super(props);
- this.state = {
- open: false
- };
- this.handleClickOpen = this.handleClickOpen.bind(this);
- this.handleClose = this.handleClose.bind(this);
- this.submitTask = this.submitTask.bind(this);
- }
-
-componentDidMount() {
- this.renderTaskQuestionnaire();
- document.body.style.overflow = 'auto';
-}
-
-handleClickOpen() {
- this.setState({open: true});
- };
-
-handleClose() {
- document.body.style.overflow = 'auto';
- this.setState({open: false})
- };
-
-submitTask() {
- var qr = window.LForms.Util.getFormFHIRData('QuestionnaireResponse', 'R4', "#taskContainer");
- const returnValue = {};
- if(qr.item) {
- qr.item.map((qitem) => {
- if(qitem.item) {
- qitem.item.map((e)=>{
- if(e.answer) {
- const value = findValueByPrefix(e.answer[0],"value");
- if(value.code && qitem.linkId === "1") {
- returnValue[e.text] = value.code;
- } else {
- returnValue[e.text] = value;
- }
-
- }
-
- })
- }
-
- })
-
- }
- this.setState({open: false})
- createTask(returnValue, this.props.smart);
- }
-renderTaskQuestionnaire() {
- let lform = LForms.Util.convertFHIRQuestionnaireToLForms(questionnaire, "R4");
- lform.templateOptions = {
- showFormHeader: false,
- showColumnHeaders: false,
- showQuestionCode: false,
- hideFormControls: true,
- showFormOptionPanelButton: false//,
- //allowHTMLInInstructions: true,
- //showCodingInstruction: true
- };
- const bb = LForms.Util.addFormToPage(lform, 'taskContainer');
- }
-
- render() {
- return (
-
-
-
-
-
- );
- }
-
-}
\ No newline at end of file
diff --git a/src/components/Popup/TaskQuestionnaire.js b/src/components/Popup/TaskQuestionnaire.js
deleted file mode 100644
index e6762be1..00000000
--- a/src/components/Popup/TaskQuestionnaire.js
+++ /dev/null
@@ -1,259 +0,0 @@
-export default {
- "resourceType": "Questionnaire",
- "id": "Task",
- "name": "Task",
- "title": "Task",
- "status": "draft",
- "subjectType": ["Patient"],
- "date": "2019-12-06",
- "publisher": "Da Vinci DTR",
- "item": [
- {
- "linkId": "1",
- "text": "Basic Info",
- "type": "group",
- "item": [
- {
- "linkId": "1.1",
- "text": "basedOn",
- "type": "reference",
- "required": false
- },
- {
- "linkId": "1.2",
- "text": "status",
- "type": "choice",
- "required": true,
- "answerOption": [
- {
- "valueCoding": {
- "code": "draft",
- "display": "draft"
- }
- },
- {
- "valueCoding": {
- "code": "requested",
- "display": "requested"
-
- }
- },
- {
- "valueCoding": {
- "code": "received",
- "display": "received"
-
- }
- },
- {
- "valueCoding": {
- "code": "accepted",
- "display": "accepted"
-
- }
- },
- {
- "valueCoding": {
- "code": "rejected",
- "display": "rejected"
- }
- },
- {
- "valueCoding": {
- "code": "ready",
- "display": "ready"
- }
- },
- {
- "valueCoding": {
- "code": "cancelled",
- "display": "cancelled"
- }
- },
- {
- "valueCoding": {
- "code": "in-progress",
- "display": "in-progress"
- }
- },
- {
- "valueCoding": {
- "code": "on-hold",
- "display": "on-hold"
- }
- },
- {
- "valueCoding": {
- "code": "failed",
- "display": "failed"
- }
- },
- {
- "valueCoding": {
- "code": "completed",
- "display": "completed"
- }
- },
- {
- "valueCoding": {
- "code": "entered-in-error",
- "display": "entered-in-error"
- }
- }
- ]
- },
- {
- "linkId": "1.3",
- "text": "intent",
- "type": "choice",
- "required": true,
- "answerOption": [
- {
- "valueCoding": {
- "code": "proposal",
- "display": "proposal"
- }
- },
- {
- "valueCoding": {
- "code": "plan",
- "display": "plan"
- }
- },
- {
- "valueCoding": {
- "code": "order",
- "display": "order"
- }
- },
- {
- "valueCoding": {
- "code": "original-order",
- "display": "original-order"
- }
- },
- {
- "valueCoding": {
- "code": "reflex-order",
- "display": "reflex-order"
- }
- },
- {
- "valueCoding": {
- "code": "filler-order",
- "display": "filler-order"
- }
- },
- {
- "valueCoding": {
- "code": "instance-order",
- "display": "instance-order"
- }
- },
- {
- "valueCoding": {
- "code": "option",
- "display": "option"
- }
- },
- ]
- },
- {
- "linkId": "1.4",
- "text": "priority",
- "type": "choice",
- "required": false,
- "answerOption": [
- {
- "valueCoding": {
- "code": "routine",
- "display": "routine"
- }
- },
- {
- "valueCoding": {
- "code": "urgent",
- "display": "urgent"
- }
- },
- {
- "valueCoding": {
- "code": "asap",
- "display": "asap"
- }
- },
- {
- "valueCoding": {
- "code": "stat",
- "display": "stat"
- }
- },
- ]
- },
- {
- "linkId": "1.5",
- "text": "description",
- "type": "string",
- "required": false
- },
-
- ]
- },
- {
- "linkId": "2",
- "text": "Task Details",
- "type": "group",
- "item": [
- {
- "linkId": "2.1",
- "text": "focus",
- "type": "reference",
- "required": false
- },
- {
- "linkId": "2.2",
- "text": "for",
- "type": "reference",
- "required": false
- },
- {
- "linkId": "2.3",
- "text": "encounter",
- "type": "reference",
- "required": false
- },
- {
- "linkId": "2.4",
- "text": "requester",
- "type": "reference",
- "required": false,
- },
- {
- "linkId": "2.5",
- "text": "reasonCode",
- "type": "open-choice",
- "required": false,
- },
- {
- "linkId": "2.6",
- "text": "reasonReference",
- "type": "reference",
- "required": false,
- },
- {
- "linkId": "2.7",
- "text": "insurance",
- "type": "reference",
- "required": false,
- },
- {
- "linkId": "2.8",
- "text": "note",
- "type": "text",
- "required": false
- },
- ]
- }
- ]
- };
-
\ No newline at end of file
diff --git a/src/launch.js b/src/launch.js
index f50c2af6..bf205ede 100644
--- a/src/launch.js
+++ b/src/launch.js
@@ -14,6 +14,8 @@ function logCallback(c) {
postToLogs(log, callback);
}
+window.alert("Successfully accessed the launch.html, DTR is running.");
+
function callback(log) {
log.status = "fetch clients";
// Change this to the ID of the client that you registered with the SMART on FHIR authorization server.
diff --git a/src/util/taskCreation.js b/src/util/taskCreation.js
deleted file mode 100644
index 3ae77a7e..00000000
--- a/src/util/taskCreation.js
+++ /dev/null
@@ -1,26 +0,0 @@
-function createTask(info, smart) {
-
-
- smart.patient.read().then((result) => {
- info.resourceType = "Task";
- info.status = info.status ? info.status : "draft";
- info.intent = info.intent ? info.intent : "order";
- info.for = info.for ? info.for : {reference: `${result.resourceType}/${result.id}`};
- // const task = {
- // resourceType: "Task",
- // status: "draft",
- // intent: "order",
- // code: "approve",
- // description: description,
- // for: {
- // reference: `${result.resourceType}/${result.id}`
- // }
- // };
- smart.create(info);
-
- });
-}
-
-export {
- createTask
-};