Skip to content

Commit 8adfbcc

Browse files
committed
optimised performance
1 parent 39c9052 commit 8adfbcc

22 files changed

Lines changed: 250 additions & 596 deletions

src/views/About.jsx

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11

22
import React, { Component } from "react";
3-
import ChartistGraph from "react-chartist";
4-
import { Grid, Row, Col } from "react-bootstrap";
3+
// import ChartistGraph from "react-chartist";
4+
// import { Grid, Row, Col } from "react-bootstrap";
55

6-
import { Card } from "components/Card/Card.jsx";
7-
import { StatsCard } from "components/StatsCard/StatsCard.jsx";
6+
// import { Card } from "components/Card/Card.jsx";
7+
// import { StatsCard } from "components/StatsCard/StatsCard.jsx";
88

9-
import {
10-
dataPie,
11-
legendPie,
12-
dataSales,
13-
optionsSales,
14-
responsiveSales,
15-
legendSales
16-
} from "variables/Variables.jsx";
9+
// import {
10+
// dataPie,
11+
// legendPie,
12+
// dataSales,
13+
// optionsSales,
14+
// responsiveSales,
15+
// legendSales
16+
// } from "variables/Variables.jsx";
1717

1818
class About extends Component {
19-
createLegend(json) {
20-
var legend = [];
21-
for (var i = 0; i < json["names"].length; i++) {
22-
var type = "fa fa-circle text-" + json["types"][i];
23-
legend.push(<i className={type} key={i} />);
24-
legend.push(" ");
25-
legend.push(json["names"][i]);
26-
}
27-
return legend;
28-
}
19+
// createLegend(json) {
20+
// var legend = [];
21+
// for (var i = 0; i < json["names"].length; i++) {
22+
// var type = "fa fa-circle text-" + json["types"][i];
23+
// legend.push(<i className={type} key={i} />);
24+
// legend.push(" ");
25+
// legend.push(json["names"][i]);
26+
// }
27+
// return legend;
28+
// }
2929
render() {
3030
return (
3131
<div className="content">
32-
<Grid fluid>
32+
<h3> About the Team members which contibuted in the DFID Project. </h3>
33+
{/* <Grid fluid>
3334
<Row>
3435
<Col lg={3} sm={6}>
3536
<StatsCard
@@ -105,7 +106,7 @@ class About extends Component {
105106
</Row>
106107
107108
108-
</Grid>
109+
</Grid> */}
109110
</div>
110111
);
111112
}

src/views/DiagnosticReports.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, { Component } from 'react';
33
import { TabContainer, Tabs, Tab } from 'react-bootstrap';
44

55
import ImageDisplay from './ImageDisplay';
6-
import NurseInterpretationItem from './NurseInterpretationItem';
6+
//import NurseInterpretationItem from './NurseInterpretationItem';
77
import DoctorDiagnosisItem from './DoctorDiagnosisItem';
88
import NewPatientsContainer from './NewPatientsContainer';
99
import PatientReferalDisplay from './PatientDetailsDisplay';
@@ -38,9 +38,9 @@ class DiagnosticReports extends Component {
3838
<Tab eventKey={3} title="Eye Images">
3939
<ImageDisplay />
4040
</Tab>
41-
<Tab eventKey={4} title="Nurse Interpretation" >
41+
{/* <Tab eventKey={4} title="Nurse Interpretation" >
4242
<NurseInterpretationItem />
43-
</Tab>
43+
</Tab> */}
4444
<Tab eventKey={5} title="Recommendation">
4545
<DoctorDiagnosisItem />
4646
</Tab>

src/views/DoctorDiagnosisItem.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const DoctorDiagnosisItem = (props) => {
2626
{ label: "Anti VEGF", value: "Anti VEGF" },
2727
{ label: "Cateract extraction", value: "Cateract extraction" },
2828
{ label: "Control Risk Factors", value: "Control Risk Factors" },
29-
{ label: "Evaluation Anterior Segment (ASE)", value: "Evaluation Anterior Segment (ASE)" },
3029
{ label: "Evaluation Cataract", value: "Evaluation Cataract" },
3130
{ label: "Evaluation Refraction", value: "Evaluation Refraction" },
3231
{ label: "Evaluation Slit lamp", value: "Evaluation Slit lamp" },

src/views/Help.jsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, { Component } from "react";
33
import { Grid, Row, Col } from "react-bootstrap";
44

55
import Card from "components/Card/Card";
6-
import { iconsArray } from "variables/Variables.jsx";
6+
//import { iconsArray } from "variables/Variables.jsx";
77

88
class Icons extends Component {
99
render() {
@@ -13,23 +13,23 @@ class Icons extends Component {
1313
<Row>
1414
<Col md={12}>
1515
<Card
16-
title="202 Awesome Stroke Icons"
16+
title="Software User Guide"
1717
ctAllIcons
1818
category={
1919
<span>
20-
Handcrafted by our friends from{" "}
21-
<a
20+
Software user guide ....{" "}
21+
{/* <a
2222
target="_blank"
2323
rel="noopener noreferrer"
2424
href="http://themes-pixeden.com/font-demos/7-stroke/index.html"
2525
>
2626
Pixeden
27-
</a>
27+
</a> */}
2828
</span>
2929
}
3030
content={
3131
<Row>
32-
{iconsArray.map((prop, key) => {
32+
{/* {iconsArray.map((prop, key) => {
3333
return (
3434
<Col
3535
lg={2}
@@ -45,7 +45,7 @@ class Icons extends Component {
4545
</div>
4646
</Col>
4747
);
48-
})}
48+
})} */}
4949
</Row>
5050
}
5151
/>

src/views/ImageDisplay.jsx

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -17,51 +17,53 @@ const ImageDisplay = (props) => {
1717
className="content-center"
1818
content={
1919
<>
20-
<Row>
21-
<Col className="col-md-6">
22-
<FormGroup controlId="formControlsSelect" >
23-
<ControlLabel>Left Eye Image 1</ControlLabel>
24-
<ReactImageZoom {...propss} />
25-
</FormGroup>
26-
</Col>
27-
<Col className="col-md-6">
28-
<ControlLabel>Scaled Image (Left Eye)</ControlLabel>
29-
</Col>
30-
</Row>
31-
<Row>
32-
<Col className="col-md-6">
33-
<FormGroup controlId="formControlsSelect" >
34-
<ControlLabel>Left Eye Image 2</ControlLabel>
35-
<ReactImageZoom {...propss} />
36-
</FormGroup>
37-
</Col>
38-
<Col className="col-md-6">
39-
<ControlLabel>Scaled Image (Left Eye)</ControlLabel>
40-
</Col>
41-
</Row>
42-
<Row>
43-
<Col className="col-md-6">
44-
<FormGroup controlId="formControlsSelect" >
45-
<ControlLabel>Right Eye Image 1</ControlLabel>
46-
<ReactImageZoom {...propss} />
47-
</FormGroup>
48-
</Col>
49-
<Col className="col-md-6">
50-
<ControlLabel>Scaled Image (Right Eye)</ControlLabel>
51-
</Col>
52-
</Row>
53-
<Row>
54-
<Col className="col-md-6">
55-
<FormGroup controlId="formControlsSelect" >
56-
<ControlLabel>Right Eye Image 2</ControlLabel>
57-
<ReactImageZoom {...propss} />
58-
</FormGroup>
59-
</Col>
60-
<Col className="col-md-6">
61-
<ControlLabel>Scaled Image (Right Eye)</ControlLabel>
62-
</Col>
63-
</Row>
64-
</>
20+
<Row>
21+
<Col className="col-md-6">
22+
<FormGroup controlId="formControlsSelect" >
23+
<ControlLabel>Right Eye Image 1</ControlLabel>
24+
<ReactImageZoom {...propss} />
25+
</FormGroup>
26+
</Col>
27+
<Col className="col-md-6">
28+
<ControlLabel>Scaled Image (Right Eye)</ControlLabel>
29+
</Col>
30+
</Row>
31+
<Row>
32+
<Col className="col-md-6">
33+
<FormGroup controlId="formControlsSelect" >
34+
<ControlLabel>Right Eye Image 2</ControlLabel>
35+
<ReactImageZoom {...propss} />
36+
</FormGroup>
37+
</Col>
38+
<Col className="col-md-6">
39+
<ControlLabel>Scaled Image (Right Eye)</ControlLabel>
40+
</Col>
41+
</Row>
42+
43+
<Row>
44+
<Col className="col-md-6">
45+
<FormGroup controlId="formControlsSelect" >
46+
<ControlLabel>Left Eye Image 1</ControlLabel>
47+
<ReactImageZoom {...propss} />
48+
</FormGroup>
49+
</Col>
50+
<Col className="col-md-6">
51+
<ControlLabel>Scaled Image (Left Eye)</ControlLabel>
52+
</Col>
53+
</Row>
54+
<Row>
55+
<Col className="col-md-6">
56+
<FormGroup controlId="formControlsSelect" >
57+
<ControlLabel>Left Eye Image 2</ControlLabel>
58+
<ReactImageZoom {...propss} />
59+
</FormGroup>
60+
</Col>
61+
<Col className="col-md-6">
62+
<ControlLabel>Scaled Image (Left Eye)</ControlLabel>
63+
</Col>
64+
</Row>
65+
66+
</>
6567
}
6668
/>
6769
</Col>

src/views/MultiStepForm.js

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, {useState} from "react";
22
import StepWizard from 'react-step-wizard';
3-
import {useForm, useStep } from "react-hooks-helper";
3+
import {useForm } from "react-hooks-helper";
44
import StepOne from "./stepOne";
55
import StepTwo from "./stepTwo";
66
import StepThree from "./stepThree";
@@ -14,25 +14,49 @@ const defaultData = {
1414
dfidStudyNumberPatient: "",
1515
optionsGender: "",
1616
optionTypeDiabetes: "",
17-
dobPatient: "",
17+
18+
additionalCommentsPatient: "",
19+
optionsSignsDR: "",
20+
21+
optionsSymptoms: "",
22+
otherSymptoms: "",
23+
optionsDiabetesTherapy: "",
24+
mostRecentHbA1c: "",
25+
optionsVisualAquity: "",
26+
optionsIntraOcularPressure: "",
27+
otherOccularFindings: ""
1828
};
1929

2030
const MultiStepForm = () => {
21-
const [dobDate, setDobDate] = useState(new Date());
31+
//StepOne
2232
const [formData, setForm] = useForm(defaultData);
23-
const props = {formData, setForm, dobDate, setDobDate };
24-
25-
26-
return(
27-
<StepWizard {...props}>
28-
<StepOne {...props}/>
29-
<StepTwo {...props}/>
30-
<StepThree {...props}/>
31-
<ReviewNewPatientDetails {...props}/>
32-
<SubmitPatientForm {...props}/>
33-
</StepWizard>
34-
)
35-
36-
};
33+
const [dobPatient, setDobPatient] = useState(new Date());
34+
const [yearDMPatient, setYearDMPatient] = useState(new Date());
35+
36+
//StepTwo
37+
const [pictureR1, setPictureR1] = useState(null);
38+
const [pictureR2, setPictureR2] = useState(null);
39+
const [pictureL1, setPictureL1] = useState(null);
40+
const [pictureL2, setPictureL2] = useState(null);
41+
42+
const [dateElectronicReferal, setDateElectronicReferal] = useState(new Date());
43+
44+
//StepThree
45+
const [dateImagesTaken, setDateImagesTaken] = useState(new Date());
46+
const [dateHbA1ctaken, setDateHbA1ctaken] = useState(new Date());
47+
const [dateReviewNurse, setDateReviewNurse] = useState(new Date());
48+
49+
const props = {formData, setForm, dobPatient, setDobPatient, yearDMPatient, setYearDMPatient, pictureR1, setPictureR1, pictureR2, setPictureR2, pictureL1, setPictureL1, pictureL2, setPictureL2, dateImagesTaken, setDateImagesTaken, dateElectronicReferal, setDateElectronicReferal, dateHbA1ctaken, setDateHbA1ctaken, dateReviewNurse, setDateReviewNurse};
50+
51+
return(
52+
<StepWizard {...props}>
53+
<StepOne {...props}/>
54+
<StepTwo {...props}/>
55+
<StepThree {...props}/>
56+
<ReviewNewPatientDetails {...props}/>
57+
<SubmitPatientForm {...props}/>
58+
</StepWizard>
59+
);
60+
}
3761

3862
export default MultiStepForm;

src/views/Notifications.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,29 @@ class Notifications extends Component {
3333
<Col lg={3} sm={6}>
3434
<StatsCard
3535
bigIcon={<i className="pe-7s-server text-warning" />}
36-
statsText="Capacity"
37-
statsValue="105GB"
36+
statsText=""
37+
statsValue="1787"
3838
statsIcon={<i className="fa fa-refresh" />}
39-
statsIconText="Updated now"
39+
statsIconText="Registered Patients"
4040
/>
4141
</Col>
4242

4343
<Col lg={3} sm={6}>
4444
<StatsCard
4545
bigIcon={<i className="pe-7s-graph1 text-danger" />}
46-
statsText="Errors"
46+
statsText=""
4747
statsValue="23"
4848
statsIcon={<i className="fa fa-clock-o" />}
49-
statsIconText="In the last hour"
49+
statsIconText="Referrals to consultant"
5050
/>
5151
</Col>
5252
<Col lg={3} sm={6}>
5353
<StatsCard
54-
bigIcon={<i className="fa fa-twitter text-info" />}
55-
statsText="Followers"
54+
bigIcon={<i className="pe-7s-server text-warning" />}
55+
statsText=""
5656
statsValue="+45"
5757
statsIcon={<i className="fa fa-refresh" />}
58-
statsIconText="Updated now"
58+
statsIconText="Images reviewed by consultant"
5959
/>
6060
</Col>
6161
</Row>

0 commit comments

Comments
 (0)