-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintcache
1 lines (1 loc) · 202 KB
/
.eslintcache
1
[{"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\index.js":"1","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\reportWebVitals.js":"2","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\aws-exports.js":"3","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\App.js":"4","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Reducers\\index.js":"5","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Actions\\appStateActions.js":"6","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Actions\\loginActions.js":"7","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Actions\\patientContextActions.js":"8","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Views\\PageContainer\\PageContainer.js":"9","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\Authentication\\Login.js":"10","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Reducers\\loginReducer.js":"11","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Reducers\\patientStateReducer.js":"12","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Reducers\\appStateReducer.js":"13","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\AntibioticIdentifier\\AntibioticIdentifier.js":"14","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\AntibioticIdentifier\\AntibioticIdentifierAlternate.js":"15","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\RawDataProcessing\\medicationProcessing.js":"16","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\RawDataProcessing\\allergyProcessing.js":"17","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\RawDataProcessing\\diagnosticReportProcessing.js":"18","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\RawDataProcessing\\procedureProcessing.js":"19","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\RawDataProcessing\\conditionProcessing.js":"20","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\ComprehendMedical\\medicationParser.js":"21","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\ComprehendMedical\\medicationIdentifier.js":"22","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\RawDataProcessing\\observationProcessing.js":"23","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Views\\Pages\\PatientView\\PatientView.js":"24","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\StaticViewer\\StaticViewer.js":"25","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\DataViewer.js":"26","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\CultureViewer\\CultureViewer.js":"27","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\GraphView.js":"28","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\CriticalFlags\\CriticalFlags.js":"29","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\StaticViewer\\Documents\\DocumentView.js":"30","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\SideBar\\SideBar.js":"31","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\StaticViewer\\Results\\ResultView.js":"32","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\SearchFiltering\\diagnosticReportSearchFilter.js":"33","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\SearchFiltering\\procedureSearchFilter.js":"34","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\SearchFiltering\\medicationSearchFilter.js":"35","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\SearchFiltering\\conditionSearchFilter.js":"36","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\SearchFiltering\\observationSearchFilter.js":"37","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\SearchFiltering\\allergySearchFilter.js":"38","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\DataTableFormating\\procedureTableFormater.js":"39","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\DataTableFormating\\conditionTableFormater.js":"40","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\DataTableFormating\\diagnosticReportTableFormater.js":"41","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\DataTableFormating\\medicationTableFornater.js":"42","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\DataTableFormating\\observationTableFormater.js":"43","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\DataTableFormating\\allergyTableFormater.js":"44","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\CriticalFlags\\Flag\\Flag.js":"45","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\Procedure\\ProcedureGraph.js":"46","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\Procalcitonin\\ProcalcitoninGraph.js":"47","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\WBC\\WBCGraph.js":"48","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\CRP\\CRPGraph.js":"49","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\OxygenSaturation\\OxygenSaturationGraph.js":"50","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\RespiratoryRate\\RespiratoryRateGraph.js":"51","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\HeartRate\\HeartRateGraph.js":"52","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\BloodPressure\\BloodPressureGraph.js":"53","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\Medication\\MedicationGraph.js":"54","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\Temperature\\TemperatureGraph.js":"55","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\CriticalFlags\\Allergy\\AllergyModal\\AllergyModal.js":"56","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\CriticalFlags\\Disease\\DiseaseModal\\DiseaseModal.js":"57","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\CriticalFlags\\Antibiotics\\AntibioticsModal\\AntibioticsModal.js":"58","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\Procedure\\ProcedureWarningModal\\ProcedureWarningModal.js":"59","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\Medication\\MedicationWarningModal\\MedicationWarningModal.js":"60"},{"size":1896,"mtime":1616693094181,"results":"61","hashOfConfig":"62"},{"size":362,"mtime":499162500000,"results":"63","hashOfConfig":"62"},{"size":481,"mtime":1615496580251,"results":"64","hashOfConfig":"62"},{"size":10419,"mtime":1616737709068,"results":"65","hashOfConfig":"62"},{"size":338,"mtime":1614201981097,"results":"66","hashOfConfig":"62"},{"size":373,"mtime":1616737826796,"results":"67","hashOfConfig":"62"},{"size":300,"mtime":1614201905153,"results":"68","hashOfConfig":"62"},{"size":21243,"mtime":1616737709082,"results":"69","hashOfConfig":"62"},{"size":10253,"mtime":1616692863074,"results":"70","hashOfConfig":"62"},{"size":31946,"mtime":1616692862882,"results":"71","hashOfConfig":"62"},{"size":404,"mtime":1614201949304,"results":"72","hashOfConfig":"62"},{"size":12718,"mtime":1616692863061,"results":"73","hashOfConfig":"62"},{"size":779,"mtime":1616737826788,"results":"74","hashOfConfig":"62"},{"size":3773,"mtime":1616737709053,"results":"75","hashOfConfig":"62"},{"size":2672,"mtime":1616735779117,"results":"76","hashOfConfig":"62"},{"size":2439,"mtime":1613614836871,"results":"77","hashOfConfig":"62"},{"size":2460,"mtime":1613018094170,"results":"78","hashOfConfig":"62"},{"size":3077,"mtime":1613618903199,"results":"79","hashOfConfig":"62"},{"size":2457,"mtime":1613628236138,"results":"80","hashOfConfig":"62"},{"size":2996,"mtime":1613625962688,"results":"81","hashOfConfig":"62"},{"size":1344,"mtime":1616692863067,"results":"82","hashOfConfig":"62"},{"size":1383,"mtime":1616692863064,"results":"83","hashOfConfig":"62"},{"size":11704,"mtime":1615446535925,"results":"84","hashOfConfig":"62"},{"size":1219,"mtime":1612915746652,"results":"85","hashOfConfig":"62"},{"size":3026,"mtime":1616692863055,"results":"86","hashOfConfig":"62"},{"size":2158,"mtime":1613012993131,"results":"87","hashOfConfig":"62"},{"size":7441,"mtime":1616692862887,"results":"88","hashOfConfig":"62"},{"size":3728,"mtime":1616045336599,"results":"89","hashOfConfig":"62"},{"size":4767,"mtime":1616130526295,"results":"90","hashOfConfig":"62"},{"size":11435,"mtime":1616694998402,"results":"91","hashOfConfig":"62"},{"size":21037,"mtime":1616692863044,"results":"92","hashOfConfig":"62"},{"size":20161,"mtime":1616694998390,"results":"93","hashOfConfig":"62"},{"size":801,"mtime":1613715936799,"results":"94","hashOfConfig":"62"},{"size":796,"mtime":1613715658882,"results":"95","hashOfConfig":"62"},{"size":483,"mtime":1613715022833,"results":"96","hashOfConfig":"62"},{"size":806,"mtime":1613715022839,"results":"97","hashOfConfig":"62"},{"size":1144,"mtime":1613714163085,"results":"98","hashOfConfig":"62"},{"size":1532,"mtime":1613714066288,"results":"99","hashOfConfig":"62"},{"size":1470,"mtime":1613627931466,"results":"100","hashOfConfig":"62"},{"size":1315,"mtime":1613712599890,"results":"101","hashOfConfig":"62"},{"size":1840,"mtime":1613712599899,"results":"102","hashOfConfig":"62"},{"size":981,"mtime":1613712656975,"results":"103","hashOfConfig":"62"},{"size":1354,"mtime":1613712690814,"results":"104","hashOfConfig":"62"},{"size":2093,"mtime":1616736212328,"results":"105","hashOfConfig":"62"},{"size":2208,"mtime":1613086289672,"results":"106","hashOfConfig":"62"},{"size":7669,"mtime":1616692862917,"results":"107","hashOfConfig":"62"},{"size":12180,"mtime":1616692862914,"results":"108","hashOfConfig":"62"},{"size":12072,"mtime":1616692863040,"results":"109","hashOfConfig":"62"},{"size":12087,"mtime":1616692862895,"results":"110","hashOfConfig":"62"},{"size":12238,"mtime":1616692862910,"results":"111","hashOfConfig":"62"},{"size":12246,"mtime":1616692862924,"results":"112","hashOfConfig":"62"},{"size":12129,"mtime":1616692862899,"results":"113","hashOfConfig":"62"},{"size":12709,"mtime":1616692862891,"results":"114","hashOfConfig":"62"},{"size":8620,"mtime":1616692862905,"results":"115","hashOfConfig":"62"},{"size":12225,"mtime":1616692862929,"results":"116","hashOfConfig":"62"},{"size":3459,"mtime":1610602245374,"results":"117","hashOfConfig":"62"},{"size":2736,"mtime":1610601594567,"results":"118","hashOfConfig":"62"},{"size":3238,"mtime":1610601616033,"results":"119","hashOfConfig":"62"},{"size":3335,"mtime":1614801697834,"results":"120","hashOfConfig":"62"},{"size":3616,"mtime":1613629177172,"results":"121","hashOfConfig":"62"},{"filePath":"122","messages":"123","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},"1t6fiqk",{"filePath":"125","messages":"126","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"127","messages":"128","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"129","messages":"130","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"131","messages":"132","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"133","messages":"134","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"135","messages":"136","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"137","messages":"138","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"139","messages":"140","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"141","usedDeprecatedRules":"124"},{"filePath":"142","messages":"143","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"144","usedDeprecatedRules":"124"},{"filePath":"145","messages":"146","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"147","messages":"148","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"149","messages":"150","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"151","messages":"152","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"153","messages":"154","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"155","messages":"156","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"157","messages":"158","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"159","messages":"160","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"161","messages":"162","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"163","messages":"164","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"165","messages":"166","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"167","usedDeprecatedRules":"124"},{"filePath":"168","messages":"169","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"170","usedDeprecatedRules":"124"},{"filePath":"171","messages":"172","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"173","messages":"174","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"175","messages":"176","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"177","usedDeprecatedRules":"124"},{"filePath":"178","messages":"179","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"180","messages":"181","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"182","messages":"183","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"184","messages":"185","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"186","messages":"187","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"188","messages":"189","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"190","usedDeprecatedRules":"124"},{"filePath":"191","messages":"192","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"193","messages":"194","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"195","messages":"196","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"197","messages":"198","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"199","messages":"200","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"201","messages":"202","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"203","messages":"204","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"205","messages":"206","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"207","messages":"208","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"209","messages":"210","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"211","messages":"212","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"213","messages":"214","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"215","messages":"216","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"217","messages":"218","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"219","messages":"220","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"221","messages":"222","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"223","usedDeprecatedRules":"124"},{"filePath":"224","messages":"225","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"226","usedDeprecatedRules":"124"},{"filePath":"227","messages":"228","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"229","usedDeprecatedRules":"124"},{"filePath":"230","messages":"231","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"232","usedDeprecatedRules":"124"},{"filePath":"233","messages":"234","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"235","usedDeprecatedRules":"124"},{"filePath":"236","messages":"237","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"238","usedDeprecatedRules":"124"},{"filePath":"239","messages":"240","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"241","usedDeprecatedRules":"124"},{"filePath":"242","messages":"243","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"244","messages":"245","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"246","usedDeprecatedRules":"124"},{"filePath":"247","messages":"248","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"249","messages":"250","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"251","messages":"252","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"253","messages":"254","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},{"filePath":"255","messages":"256","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"124"},"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\index.js",[],["257","258"],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\reportWebVitals.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\aws-exports.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\App.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Reducers\\index.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Actions\\appStateActions.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Actions\\loginActions.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Actions\\patientContextActions.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Views\\PageContainer\\PageContainer.js",["259"],"import React, { useState } from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport {Auth} from \"aws-amplify\";\r\nimport ApplicationNavigation from 'terra-application/lib/application-navigation';\r\nimport PatientView from \"../Pages/PatientView/PatientView\";\r\nimport {Grid, Icon, Menu, TextArea} from \"semantic-ui-react\";\r\nimport {Link} from \"react-router-dom\";\r\nimport \"./PageContainer.css\";\r\nimport {updateLoginState} from \"../../Actions/loginActions\";\r\n\r\n\r\nconst titleConfig = {\r\n title: 'Antimicrobial-Insights',\r\n};\r\n\r\n\r\nconst PageContainer = (props) => {\r\n const {updateLoginState, patient} = props;\r\n const [activeSidebarItem, setActiveSidebarItem] = useState(\"\");\r\n\r\n let age;\r\n if (patient.birthDate) {\r\n let currentYear = new Date().getFullYear();\r\n let birthYear = new Date(patient.birthDate).getFullYear()\r\n age = currentYear - birthYear;\r\n }\r\n\r\n async function onSignOut() {\r\n updateLoginState(\"signIn\");\r\n await Auth.signOut();\r\n }\r\n\r\n return (\r\n <ApplicationNavigation\r\n titleConfig={titleConfig}\r\n onSelectLogout={() => {\r\n onSignOut();\r\n }}\r\n >\r\n <Grid style={{backgroundColor: \"#f2f8fc\"}}>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid style={{backgroundColor: \"#f2f8fc\"}}>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"} className={\"patientHeader\"} >\r\n <Grid>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <div style={{marginTop: \"8px\"}}>\r\n <span className={\"patientHeaderText\"}><strong>Viewing Patient: {props.name}</strong></span>\r\n </div>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid style={{width: \"100vw\", height: \"100vh\", backgroundColor: \"#f2f8fc\"}}>\r\n <Grid.Row style={{backgroundColor: \"#f2f8fc\", padding: \"0px\", margin: \"0px\"}}>\r\n <Grid.Column width={2} style={{backgroundColor: \"#4e7a99\", margin: \"0px\", padding: \"0px\", minHeight: \"100%\"}} >\r\n <Grid style={{backgroundColor: \"#4e7a99\"}}>\r\n <Grid.Row style={{backgroundColor: \"#4e7a99\"}}>\r\n <Grid.Column style={{height: \"198px\"}}>\r\n <Grid>\r\n <Grid.Row>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column width={3} />\r\n <Grid.Column width={11} style={{border: \"2px dashed white\"}}>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column>\r\n <span style={{color: \"white\", fontSize: \"12px\"}}><strong>Patient Snapshot:</strong></span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"}>\r\n <span style={{color: \"white\", fontSize: \"10px\"}}><strong>Age: </strong> {(age)? age : \"N/A\"}</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"}>\r\n <span style={{color: \"white\", fontSize: \"10px\"}}><strong>Gender: </strong> {(patient.gender)? patient.gender : \"N/A\"}</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"}>\r\n <span style={{color: \"white\", fontSize: \"10px\"}}><strong>Language: </strong> {(patient.language)? patient.language : \"N/A\"}</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n <Grid.Column width={2} />\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{backgroundColor: \"#4e7a99\"}}>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"} style={{marginLeft: \"10px\"}}>\r\n <Menu icon={\"labeled\"} fluid vertical style={{backgroundColor: \"#4e7a99\"}}>\r\n <Menu.Item\r\n name={\"home\"}\r\n as={Link}\r\n to={\"/\"}\r\n active={activeSidebarItem === \"home\" || activeSidebarItem === \"\"}\r\n onClick={() => setActiveSidebarItem(\"home\")}\r\n style={{color: \"white\"}}\r\n >\r\n\r\n <Icon name='home' />\r\n Home\r\n </Menu.Item >\r\n <Menu.Item\r\n name={\"cultures\"}\r\n as={Link}\r\n to={\"/cultures\"}\r\n active={activeSidebarItem === \"cultures\"}\r\n onClick={() => setActiveSidebarItem(\"cultures\")}\r\n style={{color: \"white\"}}\r\n >\r\n <Icon name='flask' />\r\n Cultures\r\n </Menu.Item>\r\n <Menu.Item\r\n name={\"static\"}\r\n as={Link}\r\n to={\"/static\"}\r\n active={activeSidebarItem === \"static\"}\r\n onClick={() => setActiveSidebarItem(\"static\")}\r\n style={{color: \"white\"}}\r\n >\r\n <Icon name='file outline' />\r\n Static Display\r\n </Menu.Item>\r\n </Menu>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n <Grid.Column width={14} style={{padding: \"0px\", height: \"100%\", backgroundColor: \"#f2f8fc\"}}>\r\n <br/>\r\n <Grid>\r\n <PatientView />\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </ApplicationNavigation>\r\n )\r\n}\r\n\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n patient: state.patientData.currentPatient,\r\n loginState: state.loginState.currentState,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = {\r\n updateLoginState,\r\n}\r\n\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(PageContainer);","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\Authentication\\Login.js",["260","261","262"],"import {Grid, Button, Input, Image, Divider, Icon} from \"semantic-ui-react\";\r\nimport {Auth, API} from \"aws-amplify\";\r\nimport React, {useState, useEffect} from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport {updateLoginState} from \"../../Actions/loginActions\";\r\nimport \"./Login.css\";\r\n\r\n\r\nconst initialFormState = {\r\n email: \"\", password: \"\", authCode: \"\", resetCode: \"\", formType: \"signIn\"\r\n}\r\n\r\nfunction Login(props) {\r\n const {loginState, updateLoginState, animateTitle, type, title, darkMode} = props;\r\n const [formState, updateFormState] = useState(initialFormState);\r\n const [accountCreationError, setAccountCreationError] = useState(false);\r\n const [accountLoginError, setAccountLoginError] = useState(false);\r\n const [verificationError, setVerificationError] = useState(false);\r\n const [newVerification, setNewVerification] = useState(false);\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n updateFormState(() => ({...formState, formType: loginState}));\r\n }, [loginState])\r\n\r\n useEffect(() => {\r\n async function retrieveUser() {\r\n try {\r\n Auth.currentAuthenticatedUser().then(user => {\r\n updateLoginState(\"signedIn\");\r\n }).catch(err => {\r\n updateLoginState(\"signIn\");\r\n })\r\n\r\n } catch (e) {\r\n\r\n }\r\n }\r\n retrieveUser();\r\n }, []);\r\n\r\n function onChange(e) {\r\n e.persist();\r\n setAccountCreationError(false);\r\n setAccountLoginError(false);\r\n setVerificationError(false);\r\n setNewVerification(false);\r\n updateFormState(() => ({...formState, [e.target.name]: e.target.value}))\r\n }\r\n\r\n const {formType} = formState;\r\n\r\n async function signUp() {\r\n try {\r\n const {email, password} = formState;\r\n setLoading(true);\r\n //window.LOG_LEVEL = 'DEBUG';\r\n await Auth.signUp({username: email, password: password, attributes: {email}});\r\n setLoading(false);\r\n updateLoginState(\"confirmSignUp\");\r\n } catch (e) {\r\n setLoading(false);\r\n setAccountCreationError(true);\r\n console.log('error signing up:', e);\r\n }\r\n }\r\n\r\n\r\n async function confirmSignUp() {\r\n try {\r\n setNewVerification(false);\r\n const {email, authCode} = formState;\r\n setLoading(true);\r\n await Auth.confirmSignUp(email, authCode);\r\n updateLoginState(\"signedIn\");\r\n } catch (e) {\r\n setVerificationError(true);\r\n setLoading(false);\r\n console.log('error confirming sign up:', e);\r\n }\r\n }\r\n\r\n async function resendConfirmationCode() {\r\n try {\r\n const {email} = formState;\r\n setVerificationError(false);\r\n setNewVerification(true);\r\n await Auth.resendSignUp(email);\r\n } catch (err) {\r\n setNewVerification(false);\r\n console.log('error resending code: ', err);\r\n }\r\n }\r\n\r\n async function signIn(){\r\n try {\r\n setLoading(true);\r\n const {email, password} = formState;\r\n await Auth.signIn(email, password);\r\n updateLoginState(\"signedIn\");\r\n setLoading(false);\r\n } catch (e) {\r\n setAccountLoginError(true);\r\n setLoading(false);\r\n }\r\n }\r\n\r\n async function forgotPassword() {\r\n try {\r\n const {email} = formState;\r\n setLoading(true);\r\n await Auth.forgotPassword(email);\r\n setLoading(false);\r\n updateLoginState(\"resetPassword\");\r\n } catch (e) {\r\n setLoading(false);\r\n updateLoginState(\"resetPassword\");\r\n }\r\n }\r\n\r\n async function resetPassword() {\r\n try {\r\n const {email, resetCode, password} = formState;\r\n setLoading(true);\r\n await Auth.forgotPasswordSubmit(email, resetCode, password);\r\n setLoading(false);\r\n updateLoginState(\"signIn\");\r\n } catch (e) {\r\n setLoading(false);\r\n }\r\n }\r\n\r\n let logoType = (darkMode)? \"/Assets/Images/cic_logo_2020_inverse.png\" : \"/Assets/Images/cic_logo_2020.png\";\r\n\r\n return (\r\n <Grid style={{width: \"100vw\", height: \"100vh\"}}>\r\n <Grid.Row style={{width: \"100vw\", height: \"100vh\"}}>\r\n {/* An example image is provided. Please use a royalty-free photo, a photo owned by you, or a photo owned by the CIC */}\r\n <Grid.Column width={9} style={(type === \"image\")? { backgroundColor: \"#012144\", backgroundImage: \"linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)), url(./Assets/Images/background.jpg)\", backgroundSize: \"cover\", backgroundRepeat: \"no\", width: \"100%\", height: \"100vh\"} :\r\n { backgroundColor: \"#012144\", width: \"100%\", height: \"100vh\"}\r\n }>\r\n {/* Please use a royalty free video or a video that you or the CIC owns */}\r\n {(type === \"video\")?\r\n <video playsInline autoPlay muted loop>\r\n <source src={process.env.PUBLIC_URL + \"/Assets/Videos/video.mp4\"} type=\"video/mp4\" />\r\n </video>\r\n : null}\r\n <Grid style={{width: \"100%\", height: \"100%\"}}>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"} className={\"typewriter\"}>\r\n <h1 className={(animateTitle)? (darkMode)? \"line anim-typewriter\" : \"line anim-typewriter-light lightMode\" : (darkMode)? \"line-static\" : \"line-static lightMode-static\"}>{title}</h1>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column width={1}/>\r\n <Grid.Column width={15} textAlign={\"center\"} verticalAlign={\"bottom\"}>\r\n <Image src={process.env.PUBLIC_URL + logoType} fluid/>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n <Grid.Column width={1} />\r\n <Grid.Column width={5} textAlign={\"right\"} verticalAlign={\"middle\"}>\r\n <Grid style={{marginLeft: \"3.00%\"}}>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <div className={\"login-box\"}>\r\n <Grid>\r\n <Grid.Row style={{padding: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"left\"}>\r\n <div className={\"login-wrapper-top\"}>\r\n <span className={\"login-wrapper-top-header\"}>{(formType === \"signIn\")? <span>Sign In</span> : (formType === \"signUp\")? <span>Sign Up</span> : (formType === \"confirmSignUp\")? <span>Verify Account</span> : (formType === \"forgotPassword\" || formType === \"resetPassword\")? <span>Password Reset</span> : <span>Welcome</span>}</span>\r\n </div>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"}>\r\n {\r\n formType === \"signIn\" && (\r\n <Grid>\r\n <Grid.Row style={{paddingTop: \"3px\", paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"}>\r\n {(accountLoginError)? <span style={{color: \"red\"}}><Icon name={\"warning sign\"} style={{color: \"orange\"}} /><strong>Incorrect username or password.</strong></span> : null}\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"} style={{paddingLeft: \"30px\", paddingRight: \"30px\"}}>\r\n <Input iconPosition={\"left\"} name={\"email\"} type={\"email\"} onChange={onChange} placeholder={\"Email\"} style={{maxWidth: \"100%\"}}\r\n error={(accountLoginError)} fluid>\r\n <Icon name={\"at\"} />\r\n <input />\r\n </Input>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"} style={{paddingLeft: \"30px\", paddingRight: \"30px\"}}>\r\n <Input iconPosition={\"left\"} name={\"password\"} type={\"password\"} onChange={onChange} placeholder={\"Password\"} style={{maxWidth: \"100%\"}}\r\n error={(accountLoginError)} fluid>\r\n <Icon name={\"key\"} />\r\n <input />\r\n </Input>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{padding: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"right\"}>\r\n <Button style={{backgroundColor: \"transparent\"}} size={\"mini\"}\r\n onClick={() => updateLoginState(\"forgotPassword\")}\r\n >Forgot your password?</Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"}>\r\n <Button onClick={signIn} animated={\"vertical\"} color={\"blue\"} loading={(loading)}>\r\n <Button.Content visible>\r\n Sign In\r\n </Button.Content>\r\n <Button.Content hidden>\r\n <Icon name={\"arrow right\"} />\r\n </Button.Content>\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{padding: \"0px\"}}>\r\n <Grid.Column>\r\n <Divider />\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"}>\r\n <Button icon labelPosition={\"right\"} onClick={() => updateLoginState(\"signUp\")} size={\"mini\"}>\r\n Create an Account\r\n <Icon name={\"right arrow\"} />\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n }\r\n {\r\n formType === \"forgotPassword\" && (\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"} style={{paddingLeft: \"30px\", paddingRight: \"30px\"}}>\r\n <Input iconPosition={\"left\"} name={\"email\"} type={\"email\"} onChange={onChange} placeholder={\"Enter your email\"} style={{maxWidth: \"100%\"}} fluid>\r\n <Icon name={\"at\"} />\r\n <input />\r\n </Input>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"}>\r\n <Button onClick={forgotPassword} animated={\"vertical\"} color={\"blue\"} loading={(loading)}>\r\n <Button.Content visible>\r\n Send reset code\r\n </Button.Content>\r\n <Button.Content hidden>\r\n <Icon name={\"arrow right\"} />\r\n </Button.Content>\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"left\"}>\r\n <Button icon onClick={() => updateLoginState(\"signIn\")} style={{backgroundColor: \"transparent\"}} size={\"big\"}>\r\n <Icon name={\"left arrow\"} /> Back\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n }\r\n {\r\n formType === \"resetPassword\" && (\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"} style={{paddingLeft: \"30px\", paddingRight: \"30px\"}}>\r\n <Input iconPosition={\"left\"} name={\"email\"} type={\"email\"} onChange={onChange} placeholder={\"Enter your email\"} style={{maxWidth: \"100%\"}} fluid>\r\n <Icon name={\"at\"} />\r\n <input />\r\n </Input>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"} style={{paddingLeft: \"30px\", paddingRight: \"30px\"}}>\r\n <Input iconPosition={\"left\"} name={\"resetCode\"} onChange={onChange} placeholder={\"Enter reset code\"} style={{maxWidth: \"100%\"}} fluid>\r\n <Icon name={\"unlock alternate\"} />\r\n <input />\r\n </Input>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"} style={{paddingLeft: \"30px\", paddingRight: \"30px\"}}>\r\n <Input iconPosition={\"left\"} name={\"password\"} type={\"password\"} onChange={onChange} placeholder={\"Enter new password\"} style={{maxWidth: \"100%\"}} fluid>\r\n <Icon name={\"key\"} />\r\n <input />\r\n </Input>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"}>\r\n <Button onClick={resetPassword} animated={\"vertical\"} color={\"blue\"} loading={(loading)}>\r\n <Button.Content visible>\r\n Update Password\r\n </Button.Content>\r\n <Button.Content hidden>\r\n <Icon name={\"arrow right\"} />\r\n </Button.Content>\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"left\"}>\r\n <Button icon onClick={() => updateLoginState(\"signIn\")} style={{backgroundColor: \"transparent\"}} size={\"big\"}>\r\n <Icon name={\"left arrow\"} /> Back\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n }\r\n {\r\n formType === \"signUp\" && (\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"} style={{paddingLeft: \"30px\", paddingRight: \"30px\"}}>\r\n <Input iconPosition={\"left\"} name={\"email\"} type={\"email\"} onChange={onChange} placeholder={\"Enter your email\"} style={{maxWidth: \"100%\"}}\r\n error={(accountCreationError)} fluid>\r\n <Icon name={\"at\"} />\r\n <input />\r\n </Input>\r\n {(accountCreationError)? <span style={{color: \"red\"}}>An account with the given email already exists</span> : null}\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"} style={{paddingLeft: \"30px\", paddingRight: \"30px\"}}>\r\n <Input iconPosition={\"left\"} name={\"password\"} type={\"password\"} onChange={onChange} placeholder={\"Enter a password\"} style={{maxWidth: \"100%\"}} fluid>\r\n <Icon name={\"key\"} />\r\n <input />\r\n </Input>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"}>\r\n <Button onClick={signUp} animated={\"vertical\"} color={\"blue\"} loading={(loading)}>\r\n <Button.Content visible>\r\n Register\r\n </Button.Content>\r\n <Button.Content hidden>\r\n <Icon name={\"arrow right\"} />\r\n </Button.Content>\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"left\"}>\r\n <Button icon onClick={() => updateLoginState(\"signIn\")} style={{backgroundColor: \"transparent\"}} size={\"big\"}>\r\n <Icon name={\"left arrow\"} /> Back\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n }\r\n {\r\n formType === \"confirmSignUp\" && (\r\n <Grid>\r\n <Grid.Row style={{paddingTop: \"5px\", paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"} >\r\n <span>Please check your email for a confirmation code. This may take several minutes.</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"} style={{paddingLeft: \"30px\", paddingRight: \"30px\"}}>\r\n {(verificationError)? <span style={{color: \"red\"}}><strong>Invalid verification code provided, please try again.</strong></span> : null}\r\n {(newVerification)? <span style={{color: \"green\"}}><strong>New verification code sent successfully.</strong></span> : null}\r\n <Input name={\"authCode\"} onChange={onChange} placeholder={\"Enter your confirmation code.\"} style={{maxWidth: \"100%\"}}\r\n error={(verificationError)} fluid />\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"}>\r\n <Button onClick={confirmSignUp} animated={\"vertical\"} color={\"blue\"} loading={(loading)}>\r\n <Button.Content visible>\r\n Verify\r\n </Button.Content>\r\n <Button.Content hidden>\r\n <Icon name={\"arrow right\"} />\r\n </Button.Content>\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"center\"}>\r\n <span>Didn't receive your verification code?</span>\r\n <Button style={{backgroundColor: \"transparent\"}} onClick={resendConfirmationCode}>Resend Code</Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"0px\"}}>\r\n <Grid.Column verticalAlign={\"middle\"} textAlign={\"left\"}>\r\n <Button icon onClick={() => updateLoginState(\"signUp\")} style={{backgroundColor: \"transparent\"}} size={\"big\"}>\r\n <Icon name={\"left arrow\"} /> Back\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n }\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </div>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n );\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n loginState: state.loginState.currentState,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = {\r\n updateLoginState,\r\n};\r\n\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(Login);\r\n","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Reducers\\loginReducer.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Reducers\\patientStateReducer.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Reducers\\appStateReducer.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\AntibioticIdentifier\\AntibioticIdentifier.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\AntibioticIdentifier\\AntibioticIdentifierAlternate.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\RawDataProcessing\\medicationProcessing.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\RawDataProcessing\\allergyProcessing.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\RawDataProcessing\\diagnosticReportProcessing.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\RawDataProcessing\\procedureProcessing.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\RawDataProcessing\\conditionProcessing.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\ComprehendMedical\\medicationParser.js",["263"],"import {Auth} from \"aws-amplify\";\r\nimport awsmobile from '../../aws-exports';\r\nconst aws = require('aws-sdk');\r\n\r\n\r\nconst medicationParser = async (payload) => {\r\n const credentials = await Auth.currentCredentials();\r\n return new Promise(function(resolve, reject) {\r\n let params = {\r\n Text: payload,\r\n }\r\n aws.config.region = process.env.REACT_APP_AWS_REGION;\r\n\r\n aws.config.credentials = new aws.Credentials({\r\n accessKeyId: credentials.accessKeyId,\r\n secretAccessKey: credentials.secretAccessKey,\r\n sessionToken: credentials.sessionToken\r\n });\r\n\r\n // Unauthorized authentication (for application use without a login)\r\n /* aws.config.credentials = new aws.CognitoIdentityCredentials({\r\n IdentityPoolId: awsmobile.aws_cognito_identity_pool_id,\r\n RoleArn: process.env.REACT_APP_RoleArn,\r\n });*/\r\n\r\n\r\n let comprehendMedical = new aws.ComprehendMedical();\r\n\r\n comprehendMedical.detectEntitiesV2(params, function(err, data) {\r\n if (err) {\r\n console.log(err, err.stack); // an error occurred\r\n reject(err.stack);\r\n } else {\r\n resolve(data); // successful response\r\n }\r\n });\r\n });\r\n}\r\n\r\n\r\nexport default medicationParser;","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\ComprehendMedical\\medicationIdentifier.js",["264"],"import {Auth} from \"aws-amplify\";\r\nimport awsmobile from '../../aws-exports';\r\nconst aws = require('aws-sdk');\r\n\r\n\r\nconst medicationIdentifier = async (payload) => {\r\n const credentials = await Auth.currentCredentials();\r\n return new Promise(function(resolve, reject) {\r\n let params = {\r\n Text: payload,\r\n }\r\n aws.config.region = process.env.REACT_APP_AWS_REGION;\r\n\r\n aws.config.credentials = new aws.Credentials({\r\n accessKeyId: credentials.accessKeyId,\r\n secretAccessKey: credentials.secretAccessKey,\r\n sessionToken: credentials.sessionToken\r\n });\r\n\r\n // Unauthorized authentication (for application use without a login)\r\n /*aws.config.credentials = new aws.CognitoIdentityCredentials({\r\n IdentityPoolId: awsmobile.aws_cognito_identity_pool_id,\r\n RoleArn: process.env.REACT_APP_RoleArn,\r\n });*/\r\n\r\n let comprehendMedical = new aws.ComprehendMedical();\r\n\r\n comprehendMedical.inferRxNorm(params, function(err, data) {\r\n if (err) {\r\n console.log(err, err.stack); // an error occurred\r\n reject(err.stack);\r\n } else {\r\n //console.log(data);\r\n resolve(data); // successful response\r\n }\r\n });\r\n });\r\n}\r\n\r\n\r\nexport default medicationIdentifier;","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\RawDataProcessing\\observationProcessing.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Views\\Pages\\PatientView\\PatientView.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\StaticViewer\\StaticViewer.js",["265"],"import React, {useState} from 'react';\r\nimport {Grid, Button, Input} from \"semantic-ui-react\";\r\nimport DocumentView from \"./Documents/DocumentView\";\r\nimport ResultView from \"./Results/ResultView\";\r\nimport \"./StaticViewer.css\";\r\n\r\n\r\n\r\nconst StaticViewer = (props) => {\r\n const [mode, setMode] = useState(\"Results\");\r\n\r\n return(\r\n <Grid style={{height: \"100%\"}}>\r\n <Grid.Row>\r\n <Grid.Column width={1} />\r\n <Grid.Column width={14} textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <Grid className={\"staticDisplayContainer\"}>\r\n <Grid.Row className={\"staticDisplayHeader\"}>\r\n <Grid.Column textAlign={\"left\"} style={{marginLeft: \"2.00%\"}}>\r\n <span className={\"staticDisplayTitle\"}><strong>Static Display</strong></span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"3px\"}}>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <Button.Group fluid>\r\n <Button\r\n active={(mode === \"Documents\")}\r\n onClick={() => setMode(\"Documents\")}\r\n >\r\n <Grid>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <strong>Documents</strong>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Button>\r\n <Button\r\n active={(mode === \"Results\")}\r\n onClick={() => setMode(\"Results\")}\r\n >\r\n <Grid>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <strong>Results</strong>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Button>\r\n </Button.Group>\r\n </Grid.Column>\r\n </Grid.Row>\r\n {(mode === \"Documents\")? <DocumentView /> : <ResultView/>}\r\n </Grid>\r\n </Grid.Column>\r\n <Grid.Column width={1} />\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n}\r\n\r\n\r\nexport default StaticViewer;","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\DataViewer.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\CultureViewer\\CultureViewer.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\GraphView.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\CriticalFlags\\CriticalFlags.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\StaticViewer\\Documents\\DocumentView.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\SideBar\\SideBar.js",["266","267"],"import {Grid, Segment, Sidebar, Divider, Button, Label, Icon} from \"semantic-ui-react\";\r\nimport {connect} from \"react-redux\";\r\nimport React, { useState, useEffect } from \"react\";\r\nimport {setGraphToDisplay, setGraphDataStart, setGraphDataEnd} from \"../../../Actions/patientContextActions\";\r\nimport { MuiPickersUtilsProvider, DatePicker } from \"@material-ui/pickers\";\r\nimport DateFnsUtils from \"@date-io/date-fns\";\r\nimport Radio from 'terra-form-radio';\r\n\r\n\r\nconst VerticalSidebar = (props) => {\r\n const {setGraphDataStart, setGraphDataEnd, graphDateStart, graphDateEnd} = props;\r\n const [graphToDisplay, setGraph] = useState(\"\");\r\n const [dateStartOpen, setStartDateOpen] = useState(false);\r\n const [dateEndOpen, setEndDateOpen] = useState(false);\r\n const [selectedStartDate, handleStartDateChange] = useState(new Date(\"2000-01-01T00:00:00.000Z\"));\r\n const [selectedEndDate, handleEndDateChange] = useState(new Date());\r\n const [disabledGraphs, setDisabled] = useState({\r\n wbc: true,\r\n crp: true,\r\n procalcitonin: true,\r\n temperature: true,\r\n bloodPressure: true,\r\n heartRate: true,\r\n respiratoryRate: true,\r\n oxygenSat: true,\r\n oxygenMode: true,\r\n imaging: true,\r\n procedures: true,\r\n })\r\n\r\n useEffect(() => {\r\n setGraphDataStart(selectedStartDate);\r\n }, [selectedStartDate]);\r\n\r\n useEffect(() => {\r\n setGraphDataEnd(selectedEndDate);\r\n }, [selectedEndDate]);\r\n\r\n useEffect(() => {\r\n let wbc = !(props.availableData.wbc.length > 0);\r\n let crp = !(props.availableData.crp.length > 0);\r\n let procalcitonin = !(props.availableData.procalcitonin.length > 0);\r\n let temperature = !(props.availableData.temperature.length > 0);\r\n let bloodPressure = !(props.availableData.bloodPressure.length > 0);\r\n let heartRate = !(props.availableData.heartRate.length > 0);\r\n let respiratoryRate = !(props.availableData.respiratoryRate.length > 0);\r\n let oxygenSat = !(props.availableData.oxygenSaturation.length > 0);\r\n let oxygenMode = !(props.availableData.oxygenMode.length > 0);\r\n let imaging = true;\r\n let procedures = !(props.procedureData.length > 0);\r\n\r\n\r\n setDisabled({\r\n wbc: wbc,\r\n crp: crp,\r\n procalcitonin: procalcitonin,\r\n temperature: temperature,\r\n bloodPressure: bloodPressure,\r\n heartRate: heartRate,\r\n respiratoryRate: respiratoryRate,\r\n oxygenSat: oxygenSat,\r\n oxygenMode: oxygenMode,\r\n imaging: imaging,\r\n procedures: procedures,\r\n })\r\n\r\n }, [props.availableData.bloodPressure,\r\n props.availableData.temperature,\r\n props.availableData.wbc,\r\n props.availableData.crp,\r\n props.availableData.procalcitonin,\r\n props.availableData.heartRate,\r\n props.availableData.respiratoryRate,\r\n props.availableData.oxygenSaturation,\r\n props.availableData.oxygenMode,\r\n props.procedureData\r\n ])\r\n\r\n useEffect(() => {\r\n setGraph(props.defaultGraph);\r\n }, [props.defaultGraph]);\r\n\r\n\r\n const onSelectGraph = (e) => {\r\n const {setGraphToDisplay} = props;\r\n setGraphToDisplay(e.target.value);\r\n }\r\n\r\n\r\n return (\r\n <Sidebar\r\n animation={\"scale down\"}\r\n direction={\"left\"}\r\n icon='labeled'\r\n inverted={\"true\"}\r\n vertical={\"true\"}\r\n visible={props.visible}\r\n width='thin'\r\n style={{backgroundColor: \"whitesmoke\"}}\r\n >\r\n <Segment basic>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"}>\r\n <span><strong>Graphing Options</strong></span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <span style={{fontSize: \"14px\"}}></span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column width={11} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span style={{fontSize: \"10px\"}}>WBC</span>\r\n </Grid.Column>\r\n <Grid.Column width={3} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <Radio id=\"wbc\" value={\"wbc\"} labelText=\"WBC\" isLabelHidden name=\"multiple-group\"\r\n defaultChecked={(graphToDisplay === \"wbc\")} disabled={disabledGraphs.wbc}\r\n onChange={onSelectGraph}\r\n />\r\n </Grid.Column>\r\n <Grid.Column width={2}/>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"6px\"}}>\r\n <Grid.Column width={11} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span style={{fontSize: \"10px\"}}>CRP</span>\r\n </Grid.Column>\r\n <Grid.Column width={3} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <Radio id=\"crp\" value={\"crp\"} labelText=\"CRP\" isLabelHidden name=\"multiple-group\"\r\n defaultChecked={(graphToDisplay === \"crp\")} disabled={disabledGraphs.crp}\r\n onChange={onSelectGraph}\r\n />\r\n </Grid.Column>\r\n <Grid.Column width={2}/>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"6px\"}}>\r\n <Grid.Column width={11} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span style={{fontSize: \"10px\"}}>Procalcitonin</span>\r\n </Grid.Column>\r\n <Grid.Column width={3} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <Radio id=\"procalcitonin\" value={\"procalcitonin\"} labelText=\"Procalcitonin\" isLabelHidden\r\n name=\"multiple-group\" defaultChecked={(graphToDisplay === \"procalcitonin\")}\r\n disabled={disabledGraphs.procalcitonin} onChange={onSelectGraph} />\r\n </Grid.Column>\r\n <Grid.Column width={2}/>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"6px\"}}>\r\n <Grid.Column width={11} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span style={{fontSize: \"10px\"}}>Temperature</span>\r\n </Grid.Column>\r\n <Grid.Column width={3} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <Radio id=\"temperature\" value={\"temperature\"} labelText=\"Temperature\" isLabelHidden\r\n name=\"multiple-group\" defaultChecked={(graphToDisplay === \"temperature\")}\r\n disabled={disabledGraphs.temperature} onChange={onSelectGraph} />\r\n </Grid.Column>\r\n <Grid.Column width={2}/>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"6px\"}}>\r\n <Grid.Column width={11} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span style={{fontSize: \"10px\"}}>Blood Pressure</span>\r\n </Grid.Column>\r\n <Grid.Column width={3} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <Radio id=\"bloodPressure\" value={\"bloodPressure\"} labelText=\"Blood Pressure\" isLabelHidden\r\n name=\"multiple-group\" defaultChecked={(graphToDisplay === \"bloodPressure\")}\r\n disabled={disabledGraphs.bloodPressure} onChange={onSelectGraph} />\r\n </Grid.Column>\r\n <Grid.Column width={2}/>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"6px\"}}>\r\n <Grid.Column width={11} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span style={{fontSize: \"10px\"}}>Heart Rate</span>\r\n </Grid.Column>\r\n <Grid.Column width={3} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <Radio id=\"heartRate\" value={\"heartRate\"} labelText=\"Heart Rate\" isLabelHidden\r\n name=\"multiple-group\" defaultChecked={(graphToDisplay === \"heartRate\")}\r\n disabled={disabledGraphs.heartRate} onChange={onSelectGraph} />\r\n </Grid.Column>\r\n <Grid.Column width={2}/>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"6px\"}}>\r\n <Grid.Column width={11} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span style={{fontSize: \"10px\"}}>Respiratory Rate</span>\r\n </Grid.Column>\r\n <Grid.Column width={3} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <Radio id=\"respiratoryRate\" value={\"respiratoryRate\"} labelText=\"Respiratory Rate\" isLabelHidden\r\n name=\"multiple-group\" defaultChecked={(graphToDisplay === \"respiratoryRate\")}\r\n disabled={disabledGraphs.respiratoryRate} onChange={onSelectGraph} />\r\n </Grid.Column>\r\n <Grid.Column width={2}/>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"6px\"}}>\r\n <Grid.Column width={11} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span style={{fontSize: \"10px\"}}>Oxygen Sat</span>\r\n </Grid.Column>\r\n <Grid.Column width={3} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <Radio id=\"oxygenSat\" value={\"oxygenSat\"} labelText=\"Oxygen Sat\" isLabelHidden\r\n name=\"multiple-group\" defaultChecked={(graphToDisplay === \"oxygenSat\")}\r\n disabled={disabledGraphs.oxygenSat} onChange={onSelectGraph} />\r\n </Grid.Column>\r\n <Grid.Column width={2}/>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"6px\"}}>\r\n <Grid.Column width={11} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span style={{fontSize: \"10px\"}}>Oxygen Mode</span>\r\n </Grid.Column>\r\n <Grid.Column width={3} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <Radio id=\"oxygenMode\" value={\"oxygenMode\"} labelText=\"Oxygen Mode\" isLabelHidden\r\n name=\"multiple-group\" defaultChecked={(graphToDisplay === \"oxygenMode\")}\r\n disabled={disabledGraphs.oxygenMode} onChange={onSelectGraph}/>\r\n </Grid.Column>\r\n <Grid.Column width={2}/>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"6px\"}}>\r\n <Grid.Column width={11} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span style={{fontSize: \"10px\"}}>Imaging</span>\r\n </Grid.Column>\r\n <Grid.Column width={3} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <Radio id=\"imaging\" value={\"imaging\"} labelText=\"Imaging\" isLabelHidden name=\"multiple-group\"\r\n defaultChecked={(graphToDisplay === \"imaging\")}\r\n disabled={disabledGraphs.imaging} onChange={onSelectGraph} />\r\n </Grid.Column>\r\n <Grid.Column width={2}/>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingTop: \"6px\"}}>\r\n <Grid.Column width={11} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span style={{fontSize: \"10px\"}}>Procedures</span>\r\n </Grid.Column>\r\n <Grid.Column width={3} textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <Radio id=\"procedures\" value={\"procedures\"} labelText=\"Procedures\" isLabelHidden\r\n name=\"multiple-group\" defaultChecked={(graphToDisplay === \"procedures\")}\r\n disabled={disabledGraphs.procedures} onChange={onSelectGraph}/>\r\n </Grid.Column>\r\n <Grid.Column width={2}/>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"3px\", paddingBottom: \"5px\"}}>\r\n <Grid.Column>\r\n <Divider/>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{padding: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}\r\n style={{paddingLeft: \"20px\", paddingBottom: \"0px\", paddingTop: \"0px\"}}\r\n >\r\n <span style={{fontSize: \"11px\"}}>Start Date:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{padding: \"0px\"}}>\r\n <Grid.Column>\r\n <Button as='div' labelPosition='left' size='mini'>\r\n <Label as='a' basic pointing='right' style={{paddingLeft: \"3px\", paddingRight: \"5px\"}}>\r\n <span style={{fontSize: \"10px\"}}>{graphDateStart.toLocaleDateString()}</span>\r\n </Label>\r\n <Button animated size='mini' onClick={() => setStartDateOpen(true)}>\r\n <Button.Content hidden>Date</Button.Content>\r\n <Button.Content visible>\r\n <Icon name='calendar alternate outline' />\r\n </Button.Content>\r\n </Button>\r\n </Button>\r\n <MuiPickersUtilsProvider utils={DateFnsUtils}>\r\n <DatePicker\r\n open={dateStartOpen}\r\n value={selectedStartDate}\r\n maxDate={selectedEndDate}\r\n onChange={handleStartDateChange}\r\n onClose={() => setStartDateOpen(false)}\r\n TextFieldComponent={() => null}\r\n disableFuture={true}\r\n />\r\n </MuiPickersUtilsProvider>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingBottom: \"0px\", paddingRight: \"0px\", paddingLeft: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}\r\n style={{paddingLeft: \"20px\", paddingBottom: \"0px\", paddingTop: \"0px\"}}\r\n >\r\n <span style={{fontSize: \"11px\"}}>End Date:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{padding: \"0px\"}}>\r\n <Grid.Column>\r\n <Button as='div' labelPosition='left' size='mini'>\r\n <Label as='a' basic pointing='right' style={{paddingLeft: \"3px\", paddingRight: \"5px\"}}>\r\n <span style={{fontSize: \"10px\"}}>{graphDateEnd.toLocaleDateString()}</span>\r\n </Label>\r\n <Button animated size='mini' onClick={() => setEndDateOpen(true)}>\r\n <Button.Content hidden>Date</Button.Content>\r\n <Button.Content visible>\r\n <Icon name='calendar alternate outline' />\r\n </Button.Content>\r\n </Button>\r\n </Button>\r\n <MuiPickersUtilsProvider utils={DateFnsUtils}>\r\n <DatePicker\r\n open={dateEndOpen}\r\n value={selectedEndDate}\r\n minDate={selectedStartDate}\r\n onChange={handleEndDateChange}\r\n onClose={() => setEndDateOpen(false)}\r\n TextFieldComponent={() => null}\r\n disableFuture={true}\r\n />\r\n </MuiPickersUtilsProvider>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Segment>\r\n </Sidebar>\r\n );\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n isLoadingData: state.appState.loadingPatientData,\r\n availableData: state.patientData.graphingData,\r\n procedureData: state.patientData.procedures,\r\n defaultGraph: state.patientData.graphToDisplay,\r\n patient: state.patientData.currentPatient,\r\n graphDateStart: state.patientData.graphDataStartDate,\r\n graphDateEnd: state.patientData.graphDataEndDate,\r\n };\r\n};\r\n\r\n\r\nexport default connect(mapStateToProps, {setGraphToDisplay, setGraphDataStart, setGraphDataEnd})(VerticalSidebar);","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\StaticViewer\\Results\\ResultView.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\SearchFiltering\\diagnosticReportSearchFilter.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\SearchFiltering\\procedureSearchFilter.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\SearchFiltering\\medicationSearchFilter.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\SearchFiltering\\conditionSearchFilter.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\SearchFiltering\\observationSearchFilter.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\SearchFiltering\\allergySearchFilter.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\DataTableFormating\\procedureTableFormater.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\DataTableFormating\\conditionTableFormater.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\DataTableFormating\\diagnosticReportTableFormater.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\DataTableFormating\\medicationTableFornater.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\DataTableFormating\\observationTableFormater.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Services\\DataTableFormating\\allergyTableFormater.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\CriticalFlags\\Flag\\Flag.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\Procedure\\ProcedureGraph.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\Procalcitonin\\ProcalcitoninGraph.js",["268"],"import React, { useState, useEffect } from 'react';\r\nimport ChartJS from \"chart.js\";\r\nimport {connect} from \"react-redux\";\r\nimport {Button, Divider, Grid, Icon, Input} from \"semantic-ui-react\";\r\nimport \"../../GraphView.css\";\r\n\r\n\r\nconst ProcalcitoninGraph = (props) => {\r\n const [thisChart, setChart] = useState(null);\r\n const [upperBound, setUpperBound] = useState(3);\r\n const [lowerBound, setLowerBound] = useState(0);\r\n const [stepSize, setStepSize] = useState(0.25);\r\n const [stepSizeError, setStepSizeError] = useState(false);\r\n const [boundsError, setBoundsError] = useState(false);\r\n const [form, setForm] = useState({\r\n upperBound: 3,\r\n lowerBound: 0,\r\n stepSize: 0.25\r\n });\r\n const [graphData, setGraphData] = useState([]);\r\n const {procalcitoninData, graphDateStart, graphDateEnd} = props;\r\n\r\n useEffect(() => {\r\n let data = [];\r\n if (procalcitoninData) {\r\n procalcitoninData.forEach(entry => {\r\n if (((Date.parse(new Date(entry.timestamp)) - (Date.parse(graphDateStart))) >= 0)\r\n &&\r\n ((Date.parse(graphDateEnd)) - (Date.parse(new Date(entry.timestamp))) >= 0)\r\n ) {\r\n data.push({\r\n x: new Date(entry.timestamp),\r\n y: entry.value\r\n });\r\n }\r\n })\r\n }\r\n data.sort((a,b) => a.x - b.x);\r\n setGraphData(data);\r\n }, [graphDateStart, graphDateEnd, procalcitoninData])\r\n\r\n\r\n useEffect(() => {\r\n if (thisChart) {\r\n thisChart.destroy();\r\n }\r\n if (graphData.length > 0) {\r\n let chart = buildGraph();\r\n setChart(chart);\r\n }\r\n }, [lowerBound, upperBound, stepSize, graphData])\r\n\r\n const buildGraph = () => {\r\n return new ChartJS(\"procalcitoninGraph\", {\r\n type: \"line\",\r\n data: {\r\n datasets: [\r\n {\r\n label: \"Procalcitonin\",\r\n data: graphData,\r\n borderWidth: 2,\r\n borderColor: \"rgb(200,0,0)\",\r\n fill: false,\r\n cubicInterpolationMode: \"monotone\"\r\n },\r\n ]\r\n },\r\n options: {\r\n responsive: false,\r\n scales: {\r\n yAxes: [\r\n {\r\n offset: true,\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"ug/L\"\r\n },\r\n ticks: {\r\n beginAtZero: true,\r\n min: lowerBound,\r\n max: upperBound,\r\n stepSize: stepSize\r\n }\r\n }\r\n ],\r\n xAxes: [\r\n {\r\n type: \"time\",\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"Date\"\r\n },\r\n ticks: {\r\n min: new Date(graphDateStart),\r\n max: new Date(graphDateEnd)\r\n }\r\n }\r\n ]\r\n },\r\n title: {\r\n text: \"Procalcitonin\",\r\n display: true,\r\n fontSize: 20\r\n }\r\n }\r\n })\r\n }\r\n\r\n const onUpperBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n upperBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onLowerBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n lowerBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onStepSizeChange = (e) => {\r\n setForm({\r\n ...form,\r\n stepSize: Number(e.target.value),\r\n })\r\n }\r\n\r\n // change graph parameters\r\n const onRefreshGraph = (e) => {\r\n e.preventDefault();\r\n\r\n if (form.upperBound > form.lowerBound) {\r\n setBoundsError(false);\r\n let range = form.upperBound - form.lowerBound;\r\n if ((form.stepSize < range) && (form.stepSize > 0)) {\r\n setStepSizeError(false);\r\n setStepSize(form.stepSize);\r\n setUpperBound(form.upperBound);\r\n setLowerBound(form.lowerBound);\r\n } else {\r\n setStepSizeError(true);\r\n }\r\n } else {\r\n setBoundsError(true);\r\n }\r\n }\r\n\r\n return(\r\n <Grid>\r\n <Grid.Row columns={2}>\r\n <Grid.Column width={11}>\r\n {(graphData.length === 0) ?\r\n <div>\r\n <h3>Sorry, no data visible within selected date range.</h3>\r\n <div><canvas id=\"procalcitoninGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} /></div>\r\n </div>\r\n :\r\n <canvas id=\"procalcitoninGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} />\r\n }\r\n </Grid.Column>\r\n <Grid.Column width={1}>\r\n <Grid divided style={{height: \"100%\", padding: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column />\r\n <Grid.Column />\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n <Grid.Column width={4}>\r\n <Grid style={{paddingLeft: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <h3>Procalcitonin Options</h3>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Upper Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'ug/L' }}\r\n labelPosition='right'\r\n placeholder='Enter upper bound...'\r\n defaultValue={upperBound}\r\n onChange={onUpperBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Lower Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'ug/L' }}\r\n labelPosition='right'\r\n placeholder='Enter lower bound...'\r\n defaultValue={lowerBound}\r\n onChange={onLowerBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Step Size:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'ug/L' }}\r\n labelPosition='right'\r\n placeholder='Enter step size...'\r\n defaultValue={stepSize}\r\n onChange={onStepSizeChange}\r\n className={(stepSizeError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"5px\"}}>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <Divider />\r\n <Button\r\n animated\r\n color={\"teal\"}\r\n onClick={onRefreshGraph}\r\n >\r\n <Button.Content visible>Update Graph</Button.Content>\r\n <Button.Content hidden>\r\n <Icon name='redo' />\r\n </Button.Content>\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n procalcitoninData: state.patientData.graphingData.procalcitonin,\r\n graphDateStart: state.patientData.graphDataStartDate,\r\n graphDateEnd: state.patientData.graphDataEndDate,\r\n };\r\n};\r\n\r\nexport default connect(mapStateToProps, null)(ProcalcitoninGraph);","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\WBC\\WBCGraph.js",["269"],"import React, { useState, useEffect } from 'react';\r\nimport ChartJS from \"chart.js\";\r\nimport {connect} from \"react-redux\";\r\nimport {Button, Divider, Grid, Icon, Input} from \"semantic-ui-react\";\r\nimport \"../../GraphView.css\";\r\n\r\n\r\nconst WBCGraph = (props) => {\r\n const [thisChart, setChart] = useState(null);\r\n const [upperBound, setUpperBound] = useState(25);\r\n const [lowerBound, setLowerBound] = useState(0);\r\n const [stepSize, setStepSize] = useState(1.0);\r\n const [stepSizeError, setStepSizeError] = useState(false);\r\n const [boundsError, setBoundsError] = useState(false);\r\n const [form, setForm] = useState({\r\n upperBound: 25,\r\n lowerBound: 0,\r\n stepSize: 1.0\r\n });\r\n const [graphData, setGraphData] = useState([]);\r\n const {wbcData, graphDateStart, graphDateEnd} = props;\r\n\r\n useEffect(() => {\r\n let data = [];\r\n if (wbcData) {\r\n wbcData.forEach(entry => {\r\n if (((Date.parse(new Date(entry.timestamp)) - (Date.parse(graphDateStart))) >= 0)\r\n &&\r\n ((Date.parse(graphDateEnd)) - (Date.parse(new Date(entry.timestamp))) >= 0)\r\n ) {\r\n data.push({\r\n x: new Date(entry.timestamp),\r\n y: entry.value\r\n });\r\n }\r\n })\r\n }\r\n data.sort((a,b) => a.x - b.x);\r\n setGraphData(data);\r\n }, [graphDateStart, graphDateEnd, wbcData])\r\n\r\n\r\n useEffect(() => {\r\n if (thisChart) {\r\n thisChart.destroy();\r\n }\r\n if (graphData.length > 0) {\r\n let chart = buildGraph();\r\n setChart(chart);\r\n }\r\n }, [lowerBound, upperBound, stepSize, graphData])\r\n\r\n const buildGraph = () => {\r\n return new ChartJS(\"wbcGraph\", {\r\n type: \"line\",\r\n data: {\r\n datasets: [\r\n {\r\n label: \"WBC\",\r\n data: graphData,\r\n borderWidth: 2,\r\n borderColor: \"rgb(200,0,0)\",\r\n fill: false,\r\n cubicInterpolationMode: \"monotone\"\r\n },\r\n ]\r\n },\r\n options: {\r\n responsive: false,\r\n scales: {\r\n yAxes: [\r\n {\r\n offset: true,\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"Count 10^9/L\"\r\n },\r\n ticks: {\r\n beginAtZero: true,\r\n min: lowerBound,\r\n max: upperBound,\r\n stepSize: stepSize\r\n }\r\n }\r\n ],\r\n xAxes: [\r\n {\r\n type: \"time\",\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"Date\"\r\n },\r\n ticks: {\r\n min: new Date(graphDateStart),\r\n max: new Date(graphDateEnd)\r\n }\r\n }\r\n ]\r\n },\r\n title: {\r\n text: \"WBC\",\r\n display: true,\r\n fontSize: 20\r\n }\r\n }\r\n })\r\n }\r\n\r\n const onUpperBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n upperBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onLowerBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n lowerBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onStepSizeChange = (e) => {\r\n setForm({\r\n ...form,\r\n stepSize: Number(e.target.value),\r\n })\r\n }\r\n\r\n // change graph parameters\r\n const onRefreshGraph = (e) => {\r\n e.preventDefault();\r\n\r\n if (form.upperBound > form.lowerBound) {\r\n setBoundsError(false);\r\n let range = form.upperBound - form.lowerBound;\r\n if ((form.stepSize < range) && (form.stepSize > 0)) {\r\n setStepSizeError(false);\r\n setStepSize(form.stepSize);\r\n setUpperBound(form.upperBound);\r\n setLowerBound(form.lowerBound);\r\n } else {\r\n setStepSizeError(true);\r\n }\r\n } else {\r\n setBoundsError(true);\r\n }\r\n }\r\n\r\n return(\r\n <Grid>\r\n <Grid.Row columns={2}>\r\n <Grid.Column width={11}>\r\n {(graphData.length === 0) ?\r\n <div>\r\n <h3>Sorry, no data visible within selected date range.</h3>\r\n <div><canvas id=\"wbcGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} /></div>\r\n </div>\r\n :\r\n <canvas id=\"wbcGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} />\r\n }\r\n </Grid.Column>\r\n <Grid.Column width={1}>\r\n <Grid divided style={{height: \"100%\", padding: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column />\r\n <Grid.Column />\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n <Grid.Column width={4}>\r\n <Grid style={{paddingLeft: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <h3>WBC Options</h3>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Upper Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'Count 10^9/L' }}\r\n labelPosition='right'\r\n placeholder='Enter upper bound...'\r\n defaultValue={upperBound}\r\n onChange={onUpperBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Lower Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'Count 10^9/L' }}\r\n labelPosition='right'\r\n placeholder='Enter lower bound...'\r\n defaultValue={lowerBound}\r\n onChange={onLowerBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Step Size:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'Count 10^9/L' }}\r\n labelPosition='right'\r\n placeholder='Enter step size...'\r\n defaultValue={stepSize}\r\n onChange={onStepSizeChange}\r\n className={(stepSizeError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"5px\"}}>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <Divider />\r\n <Button\r\n animated\r\n color={\"teal\"}\r\n onClick={onRefreshGraph}\r\n >\r\n <Button.Content visible>Update Graph</Button.Content>\r\n <Button.Content hidden>\r\n <Icon name='redo' />\r\n </Button.Content>\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n wbcData: state.patientData.graphingData.wbc,\r\n graphDateStart: state.patientData.graphDataStartDate,\r\n graphDateEnd: state.patientData.graphDataEndDate,\r\n };\r\n};\r\n\r\nexport default connect(mapStateToProps, null)(WBCGraph);","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\CRP\\CRPGraph.js",["270"],"import React, { useState, useEffect } from 'react';\r\nimport ChartJS from \"chart.js\";\r\nimport {connect} from \"react-redux\";\r\nimport {Button, Divider, Grid, Icon, Input} from \"semantic-ui-react\";\r\nimport \"../../GraphView.css\";\r\n\r\n\r\n\r\n\r\nconst CRPGraph = (props) => {\r\n const [thisChart, setChart] = useState(null);\r\n const [upperBound, setUpperBound] = useState(400);\r\n const [lowerBound, setLowerBound] = useState(0);\r\n const [stepSize, setStepSize] = useState(5.0);\r\n const [stepSizeError, setStepSizeError] = useState(false);\r\n const [boundsError, setBoundsError] = useState(false);\r\n const [form, setForm] = useState({\r\n upperBound: 400,\r\n lowerBound: 0,\r\n stepSize: 5.0\r\n });\r\n const [graphData, setGraphData] = useState([]);\r\n const {crpData, graphDateStart, graphDateEnd} = props;\r\n console.log(\"crp data: \", crpData);\r\n useEffect(() => {\r\n let data = [];\r\n if (crpData) {\r\n crpData.forEach(entry => {\r\n if (((Date.parse(new Date(entry.timestamp)) - (Date.parse(graphDateStart))) >= 0)\r\n &&\r\n ((Date.parse(graphDateEnd)) - (Date.parse(new Date(entry.timestamp))) >= 0)\r\n ) {\r\n data.push({\r\n x: new Date(entry.timestamp),\r\n y: entry.value\r\n });\r\n }\r\n })\r\n }\r\n data.sort((a,b) => a.x - b.x);\r\n setGraphData(data);\r\n }, [graphDateStart, graphDateEnd, crpData])\r\n\r\n\r\n useEffect(() => {\r\n if (thisChart) {\r\n thisChart.destroy();\r\n }\r\n if (graphData.length > 0) {\r\n let chart = buildGraph();\r\n setChart(chart);\r\n }\r\n }, [lowerBound, upperBound, stepSize, graphData])\r\n\r\n const buildGraph = () => {\r\n return new ChartJS(\"crpGraph\", {\r\n type: \"line\",\r\n data: {\r\n datasets: [\r\n {\r\n label: \"CRP Level\",\r\n data: graphData,\r\n borderWidth: 2,\r\n borderColor: \"rgb(200,0,0)\",\r\n fill: false,\r\n cubicInterpolationMode: \"monotone\"\r\n },\r\n ]\r\n },\r\n options: {\r\n responsive: false,\r\n scales: {\r\n yAxes: [\r\n {\r\n offset: true,\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"mg/L\"\r\n },\r\n ticks: {\r\n beginAtZero: true,\r\n min: lowerBound,\r\n max: upperBound,\r\n stepSize: stepSize\r\n }\r\n }\r\n ],\r\n xAxes: [\r\n {\r\n type: \"time\",\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"Date\"\r\n },\r\n ticks: {\r\n min: new Date(graphDateStart),\r\n max: new Date(graphDateEnd)\r\n }\r\n }\r\n ]\r\n },\r\n title: {\r\n text: \"CRP\",\r\n display: true,\r\n fontSize: 20\r\n }\r\n }\r\n })\r\n }\r\n\r\n const onUpperBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n upperBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onLowerBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n lowerBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onStepSizeChange = (e) => {\r\n setForm({\r\n ...form,\r\n stepSize: Number(e.target.value),\r\n })\r\n }\r\n\r\n // change graph parameters\r\n const onRefreshGraph = (e) => {\r\n e.preventDefault();\r\n\r\n if (form.upperBound > form.lowerBound) {\r\n setBoundsError(false);\r\n let range = form.upperBound - form.lowerBound;\r\n if ((form.stepSize < range) && (form.stepSize > 0)) {\r\n setStepSizeError(false);\r\n setStepSize(form.stepSize);\r\n setUpperBound(form.upperBound);\r\n setLowerBound(form.lowerBound);\r\n } else {\r\n setStepSizeError(true);\r\n }\r\n } else {\r\n setBoundsError(true);\r\n }\r\n }\r\n\r\n return(\r\n <Grid>\r\n <Grid.Row columns={2}>\r\n <Grid.Column width={11}>\r\n {(graphData.length === 0) ?\r\n <div>\r\n <h3>Sorry, no data visible within selected date range.</h3>\r\n <div><canvas id=\"crpGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} /></div>\r\n </div>\r\n :\r\n <canvas id=\"crpGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} />\r\n }\r\n </Grid.Column>\r\n <Grid.Column width={1}>\r\n <Grid divided style={{height: \"100%\", padding: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column />\r\n <Grid.Column />\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n <Grid.Column width={4}>\r\n <Grid style={{paddingLeft: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <h3>CRP Options</h3>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Upper Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'mg/L' }}\r\n labelPosition='right'\r\n placeholder='Enter upper bound...'\r\n defaultValue={upperBound}\r\n onChange={onUpperBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Lower Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'mg/L' }}\r\n labelPosition='right'\r\n placeholder='Enter lower bound...'\r\n defaultValue={lowerBound}\r\n onChange={onLowerBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Step Size:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'mg/L' }}\r\n labelPosition='right'\r\n placeholder='Enter step size...'\r\n defaultValue={stepSize}\r\n onChange={onStepSizeChange}\r\n className={(stepSizeError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"5px\"}}>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <Divider />\r\n <Button\r\n animated\r\n color={\"teal\"}\r\n onClick={onRefreshGraph}\r\n >\r\n <Button.Content visible>Update Graph</Button.Content>\r\n <Button.Content hidden>\r\n <Icon name='redo' />\r\n </Button.Content>\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n crpData: state.patientData.graphingData.crp,\r\n graphDateStart: state.patientData.graphDataStartDate,\r\n graphDateEnd: state.patientData.graphDataEndDate,\r\n };\r\n};\r\n\r\nexport default connect(mapStateToProps, null)(CRPGraph);","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\OxygenSaturation\\OxygenSaturationGraph.js",["271"],"import React, { useState, useEffect } from 'react';\r\nimport ChartJS from \"chart.js\";\r\nimport {connect} from \"react-redux\";\r\nimport {Button, Divider, Grid, Icon, Input} from \"semantic-ui-react\";\r\nimport \"../../GraphView.css\";\r\n\r\n\r\n\r\n\r\nconst OxygenSaturationGraph = (props) => {\r\n const [thisChart, setChart] = useState(null);\r\n const [upperBound, setUpperBound] = useState(100);\r\n const [lowerBound, setLowerBound] = useState(0);\r\n const [stepSize, setStepSize] = useState(1.0);\r\n const [stepSizeError, setStepSizeError] = useState(false);\r\n const [boundsError, setBoundsError] = useState(false);\r\n const [form, setForm] = useState({\r\n upperBound: 100,\r\n lowerBound: 0,\r\n stepSize: 1.0\r\n });\r\n const [graphData, setGraphData] = useState([]);\r\n const {oxygenSaturationData, graphDateStart, graphDateEnd} = props;\r\n useEffect(() => {\r\n let data = [];\r\n if (oxygenSaturationData) {\r\n oxygenSaturationData.forEach(entry => {\r\n if (((Date.parse(new Date(entry.timestamp)) - (Date.parse(graphDateStart))) >= 0)\r\n &&\r\n ((Date.parse(graphDateEnd)) - (Date.parse(new Date(entry.timestamp))) >= 0)\r\n ) {\r\n data.push({\r\n x: new Date(entry.timestamp),\r\n y: entry.value\r\n });\r\n }\r\n })\r\n }\r\n data.sort((a,b) => a.x - b.x);\r\n setGraphData(data);\r\n }, [graphDateStart, graphDateEnd, oxygenSaturationData])\r\n\r\n\r\n useEffect(() => {\r\n if (thisChart) {\r\n thisChart.destroy();\r\n }\r\n if (graphData.length > 0) {\r\n let chart = buildGraph();\r\n setChart(chart);\r\n }\r\n }, [lowerBound, upperBound, stepSize, graphData])\r\n\r\n const buildGraph = () => {\r\n return new ChartJS(\"oxygenSaturationGraph\", {\r\n type: \"line\",\r\n data: {\r\n datasets: [\r\n {\r\n label: \"Oxygen Saturation\",\r\n data: graphData,\r\n borderWidth: 2,\r\n borderColor: \"rgb(200,0,0)\",\r\n fill: false,\r\n cubicInterpolationMode: \"monotone\"\r\n },\r\n ]\r\n },\r\n options: {\r\n responsive: false,\r\n scales: {\r\n yAxes: [\r\n {\r\n offset: true,\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"% Hemoglobin Saturation\"\r\n },\r\n ticks: {\r\n beginAtZero: true,\r\n min: lowerBound,\r\n max: upperBound,\r\n stepSize: stepSize\r\n }\r\n }\r\n ],\r\n xAxes: [\r\n {\r\n type: \"time\",\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"Date\"\r\n },\r\n ticks: {\r\n min: new Date(graphDateStart),\r\n max: new Date(graphDateEnd)\r\n }\r\n }\r\n ]\r\n },\r\n title: {\r\n text: \"Oxygen Saturation\",\r\n display: true,\r\n fontSize: 20\r\n }\r\n }\r\n })\r\n }\r\n\r\n const onUpperBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n upperBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onLowerBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n lowerBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onStepSizeChange = (e) => {\r\n setForm({\r\n ...form,\r\n stepSize: Number(e.target.value),\r\n })\r\n }\r\n\r\n // change graph parameters\r\n const onRefreshGraph = (e) => {\r\n e.preventDefault();\r\n\r\n if (form.upperBound > form.lowerBound) {\r\n setBoundsError(false);\r\n let range = form.upperBound - form.lowerBound;\r\n if ((form.stepSize < range) && (form.stepSize > 0)) {\r\n setStepSizeError(false);\r\n setStepSize(form.stepSize);\r\n setUpperBound(form.upperBound);\r\n setLowerBound(form.lowerBound);\r\n } else {\r\n setStepSizeError(true);\r\n }\r\n } else {\r\n setBoundsError(true);\r\n }\r\n }\r\n\r\n return(\r\n <Grid>\r\n <Grid.Row columns={2}>\r\n <Grid.Column width={11}>\r\n {(graphData.length === 0)?\r\n <div>\r\n <h3>Sorry, no data visible within selected date range.</h3>\r\n <div><canvas id=\"oxygenSaturationGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} /></div>\r\n </div>\r\n :\r\n <canvas id=\"oxygenSaturationGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} />\r\n }\r\n </Grid.Column>\r\n <Grid.Column width={1}>\r\n <Grid divided style={{height: \"100%\", padding: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column />\r\n <Grid.Column />\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n <Grid.Column width={4}>\r\n <Grid style={{paddingLeft: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <h3>Oxygen Saturation Options</h3>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Upper Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: '%' }}\r\n labelPosition='right'\r\n placeholder='Enter upper bound...'\r\n defaultValue={upperBound}\r\n onChange={onUpperBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Lower Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: '%' }}\r\n labelPosition='right'\r\n placeholder='Enter lower bound...'\r\n defaultValue={lowerBound}\r\n onChange={onLowerBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Step Size:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: '%' }}\r\n labelPosition='right'\r\n placeholder='Enter step size...'\r\n defaultValue={stepSize}\r\n onChange={onStepSizeChange}\r\n className={(stepSizeError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"5px\"}}>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <Divider />\r\n <Button\r\n animated\r\n color={\"teal\"}\r\n onClick={onRefreshGraph}\r\n >\r\n <Button.Content visible>Update Graph</Button.Content>\r\n <Button.Content hidden>\r\n <Icon name='redo' />\r\n </Button.Content>\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n oxygenSaturationData: state.patientData.graphingData.oxygenSaturation,\r\n graphDateStart: state.patientData.graphDataStartDate,\r\n graphDateEnd: state.patientData.graphDataEndDate,\r\n };\r\n};\r\n\r\nexport default connect(mapStateToProps, null)(OxygenSaturationGraph);","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\RespiratoryRate\\RespiratoryRateGraph.js",["272"],"import React, { useState, useEffect } from 'react';\r\nimport ChartJS from \"chart.js\";\r\nimport {connect} from \"react-redux\";\r\nimport {Button, Divider, Grid, Icon, Input} from \"semantic-ui-react\";\r\nimport \"../../GraphView.css\";\r\n\r\n\r\n\r\n\r\nconst RespiratoryRateGraph = (props) => {\r\n const [thisChart, setChart] = useState(null);\r\n const [upperBound, setUpperBound] = useState(60);\r\n const [lowerBound, setLowerBound] = useState(0);\r\n const [stepSize, setStepSize] = useState(1.0);\r\n const [stepSizeError, setStepSizeError] = useState(false);\r\n const [boundsError, setBoundsError] = useState(false);\r\n const [form, setForm] = useState({\r\n upperBound: 60,\r\n lowerBound: 0,\r\n stepSize: 1.0\r\n });\r\n const [graphData, setGraphData] = useState([]);\r\n const {respiratoryRateData, graphDateStart, graphDateEnd} = props;\r\n\r\n useEffect(() => {\r\n let data = [];\r\n if (respiratoryRateData) {\r\n respiratoryRateData.forEach(entry => {\r\n if (((Date.parse(new Date(entry.timestamp)) - (Date.parse(graphDateStart))) >= 0)\r\n &&\r\n ((Date.parse(graphDateEnd)) - (Date.parse(new Date(entry.timestamp))) >= 0)\r\n ) {\r\n data.push({\r\n x: new Date(entry.timestamp),\r\n y: entry.value\r\n });\r\n }\r\n })\r\n }\r\n data.sort((a,b) => a.x - b.x);\r\n setGraphData(data);\r\n }, [graphDateStart, graphDateEnd, respiratoryRateData])\r\n\r\n\r\n useEffect(() => {\r\n if (thisChart) {\r\n thisChart.destroy();\r\n }\r\n if (graphData.length > 0) {\r\n let chart = buildGraph();\r\n setChart(chart);\r\n }\r\n }, [lowerBound, upperBound, stepSize, graphData])\r\n\r\n const buildGraph = () => {\r\n return new ChartJS(\"respiratoryRateGraph\", {\r\n type: \"line\",\r\n data: {\r\n datasets: [\r\n {\r\n label: \"Respiratory Rate\",\r\n data: graphData,\r\n borderWidth: 2,\r\n borderColor: \"rgb(200,0,0)\",\r\n fill: false,\r\n cubicInterpolationMode: \"monotone\"\r\n },\r\n ]\r\n },\r\n options: {\r\n responsive: false,\r\n scales: {\r\n yAxes: [\r\n {\r\n offset: true,\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"Breaths/Minute\"\r\n },\r\n ticks: {\r\n beginAtZero: true,\r\n min: lowerBound,\r\n max: upperBound,\r\n stepSize: stepSize\r\n }\r\n }\r\n ],\r\n xAxes: [\r\n {\r\n type: \"time\",\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"Date\"\r\n },\r\n ticks: {\r\n min: new Date(graphDateStart),\r\n max: new Date(graphDateEnd)\r\n }\r\n }\r\n ]\r\n },\r\n title: {\r\n text: \"Respiratory Rate\",\r\n display: true,\r\n fontSize: 20\r\n }\r\n }\r\n })\r\n }\r\n\r\n const onUpperBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n upperBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onLowerBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n lowerBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onStepSizeChange = (e) => {\r\n setForm({\r\n ...form,\r\n stepSize: Number(e.target.value),\r\n })\r\n }\r\n\r\n // change graph parameters\r\n const onRefreshGraph = (e) => {\r\n e.preventDefault();\r\n\r\n if (form.upperBound > form.lowerBound) {\r\n setBoundsError(false);\r\n let range = form.upperBound - form.lowerBound;\r\n if ((form.stepSize < range) && (form.stepSize > 0)) {\r\n setStepSizeError(false);\r\n setStepSize(form.stepSize);\r\n setUpperBound(form.upperBound);\r\n setLowerBound(form.lowerBound);\r\n } else {\r\n setStepSizeError(true);\r\n }\r\n } else {\r\n setBoundsError(true);\r\n }\r\n }\r\n\r\n return(\r\n <Grid>\r\n <Grid.Row columns={2}>\r\n <Grid.Column width={11}>\r\n {(graphData.length === 0) ?\r\n <div>\r\n <h3>Sorry, no data visible within selected date range.</h3>\r\n <div><canvas id=\"respiratoryRateGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} /></div>\r\n </div>\r\n :\r\n <canvas id=\"respiratoryRateGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} />\r\n }\r\n </Grid.Column>\r\n <Grid.Column width={1}>\r\n <Grid divided style={{height: \"100%\", padding: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column />\r\n <Grid.Column />\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n <Grid.Column width={4}>\r\n <Grid style={{paddingLeft: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <h3>Respiratory Rate Options</h3>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Upper Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'Breaths/Min' }}\r\n labelPosition='right'\r\n placeholder='Enter upper bound...'\r\n defaultValue={upperBound}\r\n onChange={onUpperBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Lower Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'Breaths/Min' }}\r\n labelPosition='right'\r\n placeholder='Enter lower bound...'\r\n defaultValue={lowerBound}\r\n onChange={onLowerBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Step Size:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'Breaths/Min' }}\r\n labelPosition='right'\r\n placeholder='Enter step size...'\r\n defaultValue={stepSize}\r\n onChange={onStepSizeChange}\r\n className={(stepSizeError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"5px\"}}>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <Divider />\r\n <Button\r\n animated\r\n color={\"teal\"}\r\n onClick={onRefreshGraph}\r\n >\r\n <Button.Content visible>Update Graph</Button.Content>\r\n <Button.Content hidden>\r\n <Icon name='redo' />\r\n </Button.Content>\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n respiratoryRateData: state.patientData.graphingData.respiratoryRate,\r\n graphDateStart: state.patientData.graphDataStartDate,\r\n graphDateEnd: state.patientData.graphDataEndDate,\r\n };\r\n};\r\n\r\nexport default connect(mapStateToProps, null)(RespiratoryRateGraph);","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\HeartRate\\HeartRateGraph.js",["273"],"import React, { useState, useEffect } from 'react';\r\nimport ChartJS from \"chart.js\";\r\nimport {connect} from \"react-redux\";\r\nimport {Button, Divider, Grid, Icon, Input} from \"semantic-ui-react\";\r\nimport \"../../GraphView.css\";\r\n\r\n\r\n\r\n\r\nconst HeartRateGraph = (props) => {\r\n const [thisChart, setChart] = useState(null);\r\n const [upperBound, setUpperBound] = useState(200);\r\n const [lowerBound, setLowerBound] = useState(0);\r\n const [stepSize, setStepSize] = useState(1.0);\r\n const [stepSizeError, setStepSizeError] = useState(false);\r\n const [boundsError, setBoundsError] = useState(false);\r\n const [form, setForm] = useState({\r\n upperBound: 200,\r\n lowerBound: 0,\r\n stepSize: 1.0\r\n });\r\n const [graphData, setGraphData] = useState([]);\r\n const {heartRateData, graphDateStart, graphDateEnd} = props;\r\n\r\n useEffect(() => {\r\n let data = [];\r\n if (heartRateData) {\r\n heartRateData.forEach(entry => {\r\n if (((Date.parse(new Date(entry.timestamp)) - (Date.parse(graphDateStart))) >= 0)\r\n &&\r\n ((Date.parse(graphDateEnd)) - (Date.parse(new Date(entry.timestamp))) >= 0)\r\n ) {\r\n data.push({\r\n x: new Date(entry.timestamp),\r\n y: entry.value\r\n });\r\n }\r\n })\r\n }\r\n data.sort((a,b) => a.x - b.x);\r\n setGraphData(data);\r\n }, [graphDateStart, graphDateEnd, heartRateData])\r\n\r\n\r\n useEffect(() => {\r\n if (thisChart) {\r\n thisChart.destroy();\r\n }\r\n if (graphData.length > 0) {\r\n let chart = buildGraph();\r\n setChart(chart);\r\n }\r\n }, [lowerBound, upperBound, stepSize, graphData])\r\n\r\n const buildGraph = () => {\r\n return new ChartJS(\"heartRateGraph\", {\r\n type: \"line\",\r\n data: {\r\n datasets: [\r\n {\r\n label: \"Heart Rate\",\r\n data: graphData,\r\n borderWidth: 2,\r\n borderColor: \"rgb(200,0,0)\",\r\n fill: false,\r\n cubicInterpolationMode: \"monotone\"\r\n },\r\n ]\r\n },\r\n options: {\r\n responsive: false,\r\n scales: {\r\n yAxes: [\r\n {\r\n offset: true,\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"BPM\"\r\n },\r\n ticks: {\r\n beginAtZero: true,\r\n min: lowerBound,\r\n max: upperBound,\r\n stepSize: stepSize\r\n }\r\n }\r\n ],\r\n xAxes: [\r\n {\r\n type: \"time\",\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"Date\"\r\n },\r\n ticks: {\r\n min: new Date(graphDateStart),\r\n max: new Date(graphDateEnd)\r\n }\r\n }\r\n ]\r\n },\r\n title: {\r\n text: \"Heart Rate\",\r\n display: true,\r\n fontSize: 20\r\n }\r\n }\r\n })\r\n }\r\n\r\n const onUpperBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n upperBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onLowerBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n lowerBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onStepSizeChange = (e) => {\r\n setForm({\r\n ...form,\r\n stepSize: Number(e.target.value),\r\n })\r\n }\r\n\r\n // change graph parameters\r\n const onRefreshGraph = (e) => {\r\n e.preventDefault();\r\n\r\n if (form.upperBound > form.lowerBound) {\r\n setBoundsError(false);\r\n let range = form.upperBound - form.lowerBound;\r\n if ((form.stepSize < range) && (form.stepSize > 0)) {\r\n setStepSizeError(false);\r\n setStepSize(form.stepSize);\r\n setUpperBound(form.upperBound);\r\n setLowerBound(form.lowerBound);\r\n } else {\r\n setStepSizeError(true);\r\n }\r\n } else {\r\n setBoundsError(true);\r\n }\r\n }\r\n\r\n return(\r\n <Grid>\r\n <Grid.Row columns={2}>\r\n <Grid.Column width={11}>\r\n {(graphData.length === 0) ?\r\n <div>\r\n <h3>Sorry, no data visible within selected date range.</h3>\r\n <div><canvas id=\"heartRateGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} /></div>\r\n </div>\r\n :\r\n <canvas id=\"heartRateGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} />\r\n }\r\n </Grid.Column>\r\n <Grid.Column width={1}>\r\n <Grid divided style={{height: \"100%\", padding: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column />\r\n <Grid.Column />\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n <Grid.Column width={4}>\r\n <Grid style={{paddingLeft: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <h3>Heart Rate Options</h3>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Upper Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'BPM' }}\r\n labelPosition='right'\r\n placeholder='Enter upper bound...'\r\n defaultValue={upperBound}\r\n onChange={onUpperBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Lower Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'BPM' }}\r\n labelPosition='right'\r\n placeholder='Enter lower bound...'\r\n defaultValue={lowerBound}\r\n onChange={onLowerBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Step Size:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'BPM' }}\r\n labelPosition='right'\r\n placeholder='Enter step size...'\r\n defaultValue={stepSize}\r\n onChange={onStepSizeChange}\r\n className={(stepSizeError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"5px\"}}>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <Divider />\r\n <Button\r\n animated\r\n color={\"teal\"}\r\n onClick={onRefreshGraph}\r\n >\r\n <Button.Content visible>Update Graph</Button.Content>\r\n <Button.Content hidden>\r\n <Icon name='redo' />\r\n </Button.Content>\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n heartRateData: state.patientData.graphingData.heartRate,\r\n graphDateStart: state.patientData.graphDataStartDate,\r\n graphDateEnd: state.patientData.graphDataEndDate,\r\n };\r\n};\r\n\r\nexport default connect(mapStateToProps, null)(HeartRateGraph);","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\BloodPressure\\BloodPressureGraph.js",["274"],"import React, { useState, useEffect } from 'react';\r\nimport ChartJS from \"chart.js\";\r\nimport {connect} from \"react-redux\";\r\nimport {Button, Divider, Grid, Icon, Input} from \"semantic-ui-react\";\r\nimport \"../../GraphView.css\";\r\n\r\n\r\n\r\nconst BloodPressureGraph = (props) => {\r\n const [thisChart, setChart] = useState(null);\r\n const [graphData, setGraphData] = useState({systolic: [], diastolic: []});\r\n const [upperBound, setUpperBound] = useState(200);\r\n const [lowerBound, setLowerBound] = useState(0);\r\n const [stepSize, setStepSize] = useState(20);\r\n const [boundsError, setBoundsError] = useState(false);\r\n const [stepSizeError, setStepSizeError] = useState(false);\r\n const [form, setForm] = useState({\r\n upperBound: 200,\r\n lowerBound: 0,\r\n stepSize: 20\r\n });\r\n const {bloodPressureData, graphDateStart, graphDateEnd} = props;\r\n\r\n useEffect(() => {\r\n let bpData = {\r\n systolic: [],\r\n diastolic: []\r\n };\r\n if (bloodPressureData) {\r\n bloodPressureData.forEach(entry => {\r\n if (((Date.parse(new Date(entry.timestamp)) - (Date.parse(graphDateStart))) >= 0)\r\n &&\r\n ((Date.parse(graphDateEnd)) - (Date.parse(new Date(entry.timestamp))) >= 0)\r\n ) {\r\n if (entry.type === \"systolic blood pressure\") {\r\n bpData.systolic.push({\r\n x: new Date(entry.timestamp),\r\n y: entry.value\r\n })\r\n } else if (entry.type === \"diastolic blood pressure\") {\r\n bpData.diastolic.push({\r\n x: new Date(entry.timestamp),\r\n y: entry.value\r\n })\r\n }\r\n }\r\n })\r\n }\r\n bpData.systolic.sort((a,b) => a.x - b.x);\r\n bpData.diastolic.sort((a,b) => a.x - b.x);\r\n setGraphData(bpData);\r\n }, [graphDateStart, graphDateEnd, bloodPressureData]);\r\n\r\n useEffect(() => {\r\n if (thisChart) {\r\n thisChart.destroy();\r\n }\r\n if ((graphData.systolic.length > 0) || (graphData.diastolic.length > 0)) {\r\n let chart = buildGraph();\r\n setChart(chart);\r\n }\r\n }, [lowerBound, upperBound, stepSize, graphData]);\r\n\r\n const buildGraph = () => {\r\n return new ChartJS(\"bloodPressureGraph\", {\r\n type: \"line\",\r\n data: {\r\n datasets: [\r\n {\r\n label: \"Systolic\",\r\n data: graphData.systolic,\r\n borderWidth: 2,\r\n borderColor: \"rgb(255,92,96)\",\r\n fill: false,\r\n cubicInterpolationMode: \"monotone\"\r\n },\r\n {\r\n label: \"Diastolic\",\r\n data: graphData.diastolic,\r\n borderWidth: 2,\r\n borderColor: \"rgba(0, 130, 255, 1)\",\r\n fill: false,\r\n cubicInterpolationMode: \"monotone\"\r\n }\r\n ]\r\n },\r\n options: {\r\n responsive: false,\r\n scales: {\r\n yAxes: [\r\n {\r\n offset: true,\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"mmHg\"\r\n },\r\n ticks: {\r\n beginAtZero: true,\r\n min: lowerBound,\r\n max: upperBound,\r\n stepSize: stepSize\r\n }\r\n }\r\n ],\r\n xAxes: [\r\n {\r\n type: \"time\",\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"Date\"\r\n },\r\n ticks: {\r\n min: new Date(graphDateStart),\r\n max: new Date(graphDateEnd)\r\n }\r\n }\r\n ]\r\n },\r\n title: {\r\n text: \"Blood Pressure\",\r\n display: true,\r\n fontSize: 20\r\n }\r\n }\r\n })\r\n }\r\n\r\n const onUpperBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n upperBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onLowerBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n lowerBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onStepSizeChange = (e) => {\r\n setForm({\r\n ...form,\r\n stepSize: Number(e.target.value),\r\n })\r\n }\r\n\r\n // change blood pressure graph parameters\r\n const onRefreshGraph = (e) => {\r\n e.preventDefault();\r\n\r\n if (form.upperBound > form.lowerBound) {\r\n setBoundsError(false);\r\n let range = form.upperBound - form.lowerBound;\r\n if ((form.stepSize < range) && (form.stepSize > 0)) {\r\n setStepSizeError(false);\r\n setStepSize(form.stepSize);\r\n setUpperBound(form.upperBound);\r\n setLowerBound(form.lowerBound);\r\n } else {\r\n setStepSizeError(true);\r\n }\r\n } else {\r\n setBoundsError(true);\r\n }\r\n }\r\n\r\n\r\n return(\r\n <Grid>\r\n <Grid.Row columns={2}>\r\n <Grid.Column width={11}>\r\n {((graphData.systolic.length === 0) && (graphData.diastolic.length === 0)) ?\r\n <div>\r\n <h3>Sorry, no data visible within selected date range.</h3>\r\n <div><canvas id=\"bloodPressureGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} /></div>\r\n </div>\r\n :\r\n <canvas id=\"bloodPressureGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} />\r\n }\r\n </Grid.Column>\r\n <Grid.Column width={1}>\r\n <Grid divided style={{height: \"100%\", padding: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column />\r\n <Grid.Column />\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n <Grid.Column width={4}>\r\n <Grid style={{paddingLeft: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <h3>Blood Pressure Options</h3>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Upper Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'mmHg' }}\r\n labelPosition='right'\r\n placeholder='Enter upper bound...'\r\n defaultValue={upperBound}\r\n onChange={onUpperBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Lower Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'mmHg' }}\r\n labelPosition='right'\r\n placeholder='Enter lower bound...'\r\n defaultValue={lowerBound}\r\n onChange={onLowerBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Step Size:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: 'mmHg' }}\r\n labelPosition='right'\r\n placeholder='Enter step size...'\r\n defaultValue={stepSize}\r\n onChange={onStepSizeChange}\r\n className={(stepSizeError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"5px\"}}>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <Divider />\r\n <Button\r\n animated\r\n color={\"teal\"}\r\n onClick={onRefreshGraph}\r\n >\r\n <Button.Content visible>Update Graph</Button.Content>\r\n <Button.Content hidden>\r\n <Icon name='redo' />\r\n </Button.Content>\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n bloodPressureData: state.patientData.graphingData.bloodPressure,\r\n graphDateStart: state.patientData.graphDataStartDate,\r\n graphDateEnd: state.patientData.graphDataEndDate,\r\n };\r\n};\r\n\r\nexport default connect(mapStateToProps, null)(BloodPressureGraph);","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\Medication\\MedicationGraph.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\Temperature\\TemperatureGraph.js",["275"],"import React, { useState, useEffect } from 'react';\r\nimport ChartJS from \"chart.js\";\r\nimport {connect} from \"react-redux\";\r\nimport {Divider, Grid} from \"semantic-ui-react\";\r\nimport { Input, Button, Icon } from 'semantic-ui-react';\r\nimport \"../../GraphView.css\";\r\n\r\n\r\n\r\n\r\n\r\nconst TemperatureGraph = (props) => {\r\n const [thisChart, setChart] = useState(null);\r\n const [upperBound, setUpperBound] = useState(40);\r\n const [lowerBound, setLowerBound] = useState(35);\r\n const [stepSize, setStepSize] = useState(0.5);\r\n const [stepSizeError, setStepSizeError] = useState(false);\r\n const [boundsError, setBoundsError] = useState(false);\r\n const [form, setForm] = useState({\r\n upperBound: 40,\r\n lowerBound: 35,\r\n stepSize: 0.5\r\n });\r\n const [graphData, setGraphData] = useState([]);\r\n const {temperatureData, graphDateStart, graphDateEnd} = props;\r\n\r\n useEffect(() => {\r\n let tempData = [];\r\n if (temperatureData) {\r\n temperatureData.forEach(entry => {\r\n if (((Date.parse(new Date(entry.timestamp)) - (Date.parse(graphDateStart))) >= 0)\r\n &&\r\n ((Date.parse(graphDateEnd)) - (Date.parse(new Date(entry.timestamp))) >= 0)\r\n ) {\r\n tempData.push({\r\n x: new Date(entry.timestamp),\r\n y: entry.value\r\n });\r\n }\r\n })\r\n }\r\n tempData.sort((a,b) => a.x - b.x);\r\n setGraphData(tempData);\r\n }, [graphDateStart, graphDateEnd, temperatureData])\r\n\r\n\r\n useEffect(() => {\r\n if (thisChart) {\r\n thisChart.destroy();\r\n }\r\n if (graphData.length > 0) {\r\n let chart = buildGraph();\r\n setChart(chart);\r\n }\r\n }, [lowerBound, upperBound, stepSize, graphData])\r\n\r\n const buildGraph = () => {\r\n return new ChartJS(\"temperatureGraph\", {\r\n type: \"line\",\r\n data: {\r\n datasets: [\r\n {\r\n label: \"Temperature\",\r\n data: graphData,\r\n borderWidth: 2,\r\n borderColor: \"rgb(200,0,0)\",\r\n fill: false,\r\n cubicInterpolationMode: \"monotone\"\r\n },\r\n ]\r\n },\r\n options: {\r\n responsive: false,\r\n scales: {\r\n yAxes: [\r\n {\r\n offset: true,\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"Celsius\"\r\n },\r\n ticks: {\r\n beginAtZero: true,\r\n min: lowerBound,\r\n max: upperBound,\r\n stepSize: stepSize\r\n }\r\n }\r\n ],\r\n xAxes: [\r\n {\r\n type: \"time\",\r\n scaleLabel: {\r\n display: true,\r\n labelString: \"Date\"\r\n },\r\n ticks: {\r\n min: new Date(graphDateStart),\r\n max: new Date(graphDateEnd)\r\n }\r\n }\r\n ]\r\n },\r\n title: {\r\n text: \"Temperature\",\r\n display: true,\r\n fontSize: 20\r\n }\r\n }\r\n })\r\n }\r\n\r\n const onUpperBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n upperBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onLowerBoundChange = (e) => {\r\n setForm({\r\n ...form,\r\n lowerBound: Number(e.target.value),\r\n })\r\n }\r\n\r\n const onStepSizeChange = (e) => {\r\n setForm({\r\n ...form,\r\n stepSize: Number(e.target.value),\r\n })\r\n }\r\n\r\n // change temperature graph parameters\r\n const onRefreshGraph = (e) => {\r\n e.preventDefault();\r\n\r\n if (form.upperBound > form.lowerBound) {\r\n setBoundsError(false);\r\n let range = form.upperBound - form.lowerBound;\r\n if ((form.stepSize < range) && (form.stepSize > 0)) {\r\n setStepSizeError(false);\r\n setStepSize(form.stepSize);\r\n setUpperBound(form.upperBound);\r\n setLowerBound(form.lowerBound);\r\n } else {\r\n setStepSizeError(true);\r\n }\r\n } else {\r\n setBoundsError(true);\r\n }\r\n }\r\n\r\n return(\r\n <Grid>\r\n <Grid.Row columns={2}>\r\n <Grid.Column width={11}>\r\n {(graphData.length === 0) ?\r\n <div>\r\n <h3>Sorry, no data visible within selected date range.</h3>\r\n <div><canvas id=\"temperatureGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} /></div>\r\n </div>\r\n :\r\n <canvas id=\"temperatureGraph\" width=\"800\" height=\"500\" style={{backgroundColor: \"white\", padding: \"10px\", width: \"100%\"}} />\r\n }\r\n </Grid.Column>\r\n <Grid.Column width={1}>\r\n <Grid divided style={{height: \"100%\", padding: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column />\r\n <Grid.Column />\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n <Grid.Column width={4}>\r\n <Grid style={{paddingLeft: \"0px\"}}>\r\n <Grid.Row>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <h3>Temperature Options</h3>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Upper Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: '°C' }}\r\n labelPosition='right'\r\n placeholder='Enter upper bound...'\r\n defaultValue={upperBound}\r\n onChange={onUpperBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Lower Bound:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: '°C' }}\r\n labelPosition='right'\r\n placeholder='Enter lower bound...'\r\n defaultValue={lowerBound}\r\n onChange={onLowerBoundChange}\r\n className={(boundsError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row>\r\n <Grid.Column>\r\n <Grid>\r\n <Grid.Row style={{paddingBottom: \"0px\"}}>\r\n <Grid.Column textAlign={\"left\"} verticalAlign={\"middle\"}>\r\n <span>Step Size:</span>\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"0px\"}}>\r\n <Grid.Column>\r\n <Input\r\n fluid\r\n label={{ basic: true, content: '°C' }}\r\n labelPosition='right'\r\n placeholder='Enter step size...'\r\n defaultValue={stepSize}\r\n onChange={onStepSizeChange}\r\n className={(stepSizeError)? \"errorStyle\" : null}\r\n />\r\n </Grid.Column>\r\n </Grid.Row>\r\n <Grid.Row style={{paddingTop: \"5px\"}}>\r\n <Grid.Column textAlign={\"center\"} verticalAlign={\"middle\"}>\r\n <Divider />\r\n <Button\r\n animated\r\n color={\"teal\"}\r\n onClick={onRefreshGraph}\r\n >\r\n <Button.Content visible>Update Graph</Button.Content>\r\n <Button.Content hidden>\r\n <Icon name='redo' />\r\n </Button.Content>\r\n </Button>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n </Grid.Column>\r\n </Grid.Row>\r\n </Grid>\r\n )\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n temperatureData: state.patientData.graphingData.temperature,\r\n graphDateStart: state.patientData.graphDataStartDate,\r\n graphDateEnd: state.patientData.graphDataEndDate,\r\n };\r\n};\r\n\r\nexport default connect(mapStateToProps, null)(TemperatureGraph);","C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\CriticalFlags\\Allergy\\AllergyModal\\AllergyModal.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\CriticalFlags\\Disease\\DiseaseModal\\DiseaseModal.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\CriticalFlags\\Antibiotics\\AntibioticsModal\\AntibioticsModal.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\Procedure\\ProcedureWarningModal\\ProcedureWarningModal.js",[],"C:\\Users\\aamirs\\Desktop\\FHIR\\smart_on_fhir\\src\\Components\\DataViewer\\GraphView\\Graphs\\Medication\\MedicationWarningModal\\MedicationWarningModal.js",[],{"ruleId":"276","replacedBy":"277"},{"ruleId":"278","replacedBy":"279"},{"ruleId":"280","severity":1,"message":"281","line":6,"column":27,"nodeType":"282","messageId":"283","endLine":6,"endColumn":35},{"ruleId":"280","severity":1,"message":"284","line":2,"column":15,"nodeType":"282","messageId":"283","endLine":2,"endColumn":18},{"ruleId":"285","severity":1,"message":"286","line":24,"column":8,"nodeType":"287","endLine":24,"endColumn":20,"suggestions":"288"},{"ruleId":"285","severity":1,"message":"289","line":40,"column":8,"nodeType":"287","endLine":40,"endColumn":10,"suggestions":"290"},{"ruleId":"280","severity":1,"message":"291","line":2,"column":8,"nodeType":"282","messageId":"283","endLine":2,"endColumn":17},{"ruleId":"280","severity":1,"message":"291","line":2,"column":8,"nodeType":"282","messageId":"283","endLine":2,"endColumn":17},{"ruleId":"280","severity":1,"message":"292","line":2,"column":23,"nodeType":"282","messageId":"283","endLine":2,"endColumn":28},{"ruleId":"285","severity":1,"message":"293","line":33,"column":8,"nodeType":"287","endLine":33,"endColumn":27,"suggestions":"294"},{"ruleId":"285","severity":1,"message":"295","line":37,"column":8,"nodeType":"287","endLine":37,"endColumn":25,"suggestions":"296"},{"ruleId":"285","severity":1,"message":"297","line":51,"column":8,"nodeType":"287","endLine":51,"endColumn":53,"suggestions":"298"},{"ruleId":"285","severity":1,"message":"297","line":51,"column":8,"nodeType":"287","endLine":51,"endColumn":53,"suggestions":"299"},{"ruleId":"285","severity":1,"message":"297","line":53,"column":8,"nodeType":"287","endLine":53,"endColumn":53,"suggestions":"300"},{"ruleId":"285","severity":1,"message":"297","line":52,"column":8,"nodeType":"287","endLine":52,"endColumn":53,"suggestions":"301"},{"ruleId":"285","severity":1,"message":"297","line":53,"column":8,"nodeType":"287","endLine":53,"endColumn":53,"suggestions":"302"},{"ruleId":"285","severity":1,"message":"297","line":53,"column":8,"nodeType":"287","endLine":53,"endColumn":53,"suggestions":"303"},{"ruleId":"285","severity":1,"message":"297","line":62,"column":8,"nodeType":"287","endLine":62,"endColumn":53,"suggestions":"304"},{"ruleId":"285","severity":1,"message":"297","line":55,"column":8,"nodeType":"287","endLine":55,"endColumn":53,"suggestions":"305"},"no-native-reassign",["306"],"no-negated-in-lhs",["307"],"no-unused-vars","'TextArea' is defined but never used.","Identifier","unusedVar","'API' is defined but never used.","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'formState'. Either include it or remove the dependency array. You can also do a functional update 'updateFormState(f => ...)' if you only need 'formState' in the 'updateFormState' call.","ArrayExpression",["308"],"React Hook useEffect has a missing dependency: 'updateLoginState'. Either include it or remove the dependency array.",["309"],"'awsmobile' is defined but never used.","'Input' is defined but never used.","React Hook useEffect has a missing dependency: 'setGraphDataStart'. Either include it or remove the dependency array.",["310"],"React Hook useEffect has a missing dependency: 'setGraphDataEnd'. Either include it or remove the dependency array.",["311"],"React Hook useEffect has missing dependencies: 'buildGraph' and 'thisChart'. Either include them or remove the dependency array.",["312"],["313"],["314"],["315"],["316"],["317"],["318"],["319"],"no-global-assign","no-unsafe-negation",{"desc":"320","fix":"321"},{"desc":"322","fix":"323"},{"desc":"324","fix":"325"},{"desc":"326","fix":"327"},{"desc":"328","fix":"329"},{"desc":"328","fix":"330"},{"desc":"328","fix":"331"},{"desc":"328","fix":"332"},{"desc":"328","fix":"333"},{"desc":"328","fix":"334"},{"desc":"328","fix":"335"},{"desc":"328","fix":"336"},"Update the dependencies array to be: [formState, loginState]",{"range":"337","text":"338"},"Update the dependencies array to be: [updateLoginState]",{"range":"339","text":"340"},"Update the dependencies array to be: [selectedStartDate, setGraphDataStart]",{"range":"341","text":"342"},"Update the dependencies array to be: [selectedEndDate, setGraphDataEnd]",{"range":"343","text":"344"},"Update the dependencies array to be: [lowerBound, upperBound, stepSize, graphData, thisChart, buildGraph]",{"range":"345","text":"346"},{"range":"347","text":"346"},{"range":"348","text":"346"},{"range":"349","text":"346"},{"range":"350","text":"346"},{"range":"351","text":"346"},{"range":"352","text":"346"},{"range":"353","text":"346"},[1038,1050],"[formState, loginState]",[1454,1456],"[updateLoginState]",[1370,1389],"[selectedStartDate, setGraphDataStart]",[1468,1485],"[selectedEndDate, setGraphDataEnd]",[1774,1819],"[lowerBound, upperBound, stepSize, graphData, thisChart, buildGraph]",[1724,1769],[1765,1810],[1793,1838],[1788,1833],[1760,1805],[2356,2401],[1825,1870]]