Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into rems-admin-lookup-table
Browse files Browse the repository at this point in the history
  • Loading branch information
jtquach1 committed May 21, 2024
2 parents 0ed34cf + ef3cfe9 commit 926808f
Show file tree
Hide file tree
Showing 14 changed files with 523 additions and 485 deletions.
38 changes: 23 additions & 15 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"
integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous" />
<link href="https://clinicaltables.nlm.nih.gov/lforms-versions/29.0.3/styles/lforms.min.css" media="screen"
rel="stylesheet" />
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"
integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS"
crossorigin="anonymous"
/>
<link
href="https://clinicaltables.nlm.nih.gov/lforms-versions/29.0.3/styles/lforms.min.css"
media="screen"
rel="stylesheet"
/>
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui/dist/semantic.min.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<meta name="description" content="Web site created using create-react-app" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
Expand All @@ -36,12 +40,16 @@
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"
></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/stomp.js/2.3.3/stomp.min.js"></script>
<script src="https://clinicaltables.nlm.nih.gov/lforms-versions/29.3.1/lforms.min.js"></script>
<script src="https://clinicaltables.nlm.nih.gov/lforms-versions/29.3.1/fhir/lformsFHIRAll.min.js"></script>
Expand Down
10 changes: 0 additions & 10 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,6 @@ function App(props: AppProps) {
</div>
</div>
)}
{/* <div className='App'>
<Container className='NavContainer' maxWidth='xl'>
<div className='containerg'>
<div className='logo'>
<ContentPasteIcon sx={{ color: 'white', fontSize: 50, paddingTop: .5, paddingRight: 2.5 }} />
<h1>REMS SMART on FHIR App</h1>
</div>
</div>
</Container>
</div> */}
</Box>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/TabDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function TabPanel(props: TabPanelProps) {
key={name}
{...other}
>
<Box sx={{ p: 3 }}>
<Box sx={{ p: { xs: 0, sm: 3 } }}>
<div>{children}</div>
</Box>
</div>
Expand Down
4 changes: 0 additions & 4 deletions src/views/Patient/MedReqDropDown/MedReqDropDown.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
font-size: 1.2em;
}

.etasuButton {
width: 50%;
}

.etasuButtonTimestamp {
max-width: 50%;
margin: 0 auto;
Expand Down
21 changes: 6 additions & 15 deletions src/views/Patient/MedReqDropDown/MedReqDropDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ function MedReqDropDown({
label={label}
value={selectedOption}
onChange={handleOptionSelect}
sx={{ '& #dropdown': { textWrap: 'wrap' } }}
>
{medicationBundle ? (
medicationBundle.data.map(medications => (
Expand Down Expand Up @@ -393,13 +394,8 @@ function MedReqDropDown({

<Grid item container justifyContent="center" textAlign="center" spacing={2}>
{etasu_status_enabled && (
<Grid item sm={4} md={4} lg={4}>
<Button
className="etasuButton"
sx={etasuSx}
variant="contained"
onClick={handleOpenCheckETASU}
>
<Grid item xs={12} sm={6}>
<Button sx={etasuSx} variant="contained" onClick={handleOpenCheckETASU}>
<div>
<ListIcon fontSize="large" />
<p className="etasuButtonText">ETASU: </p>
Expand All @@ -410,16 +406,11 @@ function MedReqDropDown({
</Grid>
)}
{pharmacy_status_enabled && (
<Grid item sm={4} md={4} lg={4}>
<Button
className="etasuButton"
sx={pharmSx}
variant="contained"
onClick={handleOpenCheckPharmacy}
>
<Grid item xs={12} sm={6}>
<Button sx={pharmSx} variant="contained" onClick={handleOpenCheckPharmacy}>
<div>
<LocalPharmacyIcon fontSize="large" />
<p className="etasuButtonText">Medication: </p>
<p className="etasuButtonText">Medication:</p>
<p>{getMedicationStatus(pStatus)}</p>
</div>
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ describe('Test the EtasuStatus Component', () => {
remsAdminResponse={etasu.parameter[0].resource}
/>
);
expect(await screen.findByText('Status: Pending')).toBeInTheDocument();

// verify that the values are updated from the call to get the ETASU
expect(await screen.findByText(/status: pending/i)).toBeInTheDocument();
expect(await screen.findAllByTestId('etasu-item')).toHaveLength(3);
}
});
Expand Down
12 changes: 5 additions & 7 deletions src/views/Patient/PatientView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
Typography
} from '@mui/material';
import RefreshIcon from '@mui/icons-material/Refresh';
import { MedicationRequest, Patient } from 'fhir/r4';
import { Medication, MedicationRequest, Patient, Resource } from 'fhir/r4';
import Client from 'fhirclient/lib/Client';
import { ReactElement, useEffect, useState } from 'react';
import MedReqDropDown from './MedReqDropDown/MedReqDropDown';
Expand All @@ -33,7 +33,7 @@ export interface MedicationBundle {

// This is a json object with the key of each element matching the
// contained FHIR resource
references: any;
references: { [key: string]: Medication };
}

//CDS-Hook Request to REMS-Admin for cards
Expand Down Expand Up @@ -71,11 +71,9 @@ export const submitToREMS = (
};

function PatientView(props: PatientViewProps) {
function getFhirResource(token: string) {
async function getFhirResource(token: string) {
console.log('getFhirResource: ' + token);
return client.request(token).then((e: any) => {
return e;
});
return client.request(token).then((resource: Resource) => resource);
}

const client = props.client;
Expand Down Expand Up @@ -218,7 +216,7 @@ function PatientView(props: PatientViewProps) {
<TableCell component="th" scope="row" variant="head">
<span style={{ fontWeight: 'bold' }}>{header}</span>
</TableCell>
<TableCell sx={{ whiteSpace: 'pre' }} variant="body">
<TableCell sx={{ whiteSpace: 'pre-wrap' }} variant="body">
{data}
</TableCell>
</TableRow>
Expand Down
202 changes: 100 additions & 102 deletions src/views/Questionnaire/QuestionnaireForm.css
Original file line number Diff line number Diff line change
@@ -1,103 +1,101 @@
.wrapper{
display:block;
margin-left:15px;
}
html {
scroll-behavior: smooth;
}
.sidenav {
height:100%;
width:55px;
position: fixed;
z-index: 1;
top:0;
left: 0;
background-color:#111;
padding-top:60px;
overflow-wrap: break-word;
}
.document-header {
margin-left:55px;
}

.sidenav-box {
color:#888;
width:100%;
border-top:1px solid #555;
padding-left: 3px;
padding-right:3px;
font-size:1.2em;
font-family: 'Courier New', Courier, monospace
}

.sidenav-box:not(.sidenav-manually-disabled):not(.sidenav-disabled):hover {
background-color:#333;
}

.sidenav-active {
color:white;
}
.sidenav-disabled {
background-color: #666;
color: #444;
}
.sidenav-manually-disabled {
background-color:#336;
color:white;
}

.submit-button-panel {
margin-right: 10px;
margin-bottom: 10px;
}
.wrapper {
display: block;
margin-left: 15px;
}
html {
scroll-behavior: smooth;
}
.sidenav {
height: 100%;
width: 55px;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #111;
padding-top: 60px;
overflow-wrap: break-word;
}
.document-header {
margin-left: 55px;
}

.error-text {
text-align: end;
font-style: italic;
color: #8b0000;
}

.submit-button {
margin-left: 5px;
border-width: 1px;
border-style:solid;
border-color:#ced5d9;
}

.submit-button:hover {
background-color: #f3f3f3;
border-color:#000;
}

.form-message-panel {
margin-left: 10px;
margin-bottom: 20px;
}

.patient-info-panel {
color: white;
}

.filled {
color:white;

}

.filter-filled {
font-family: monospace;
margin:0;
padding:5px;

}

.floating-tools {
right:10px;
top:0;
width: 100px;
border-width: 0px 1px 1px 1px;
border-style: solid;
border-color:black;
position:fixed;
background-color:white;
z-index: 5;
}
.sidenav-box {
color: #888;
width: 100%;
border-top: 1px solid #555;
padding-left: 3px;
padding-right: 3px;
font-size: 13px;
font-family: 'Courier New', Courier, monospace;
}

.sidenav-box:not(.sidenav-manually-disabled):not(.sidenav-disabled):hover {
background-color: #333;
}

.sidenav-active {
color: white;
}
.sidenav-disabled {
background-color: #666;
color: #444;
}
.sidenav-manually-disabled {
background-color: #336;
color: white;
}

.submit-button-panel {
margin-right: 10px;
margin-bottom: 10px;
}

.error-text {
text-align: end;
font-style: italic;
color: #8b0000;
}

.submit-button {
margin-left: 5px;
border-width: 1px;
border-style: solid;
border-color: #ced5d9;
}

.submit-button:hover {
background-color: #f3f3f3;
border-color: #000;
}

.form-message-panel {
margin-left: 10px;
margin-bottom: 20px;
}

.patient-info-panel {
color: white;
}

.filled {
color: white;
}

.filter-filled {
font-family: monospace;
margin: 0;
padding: 5px;
}

.floating-tools {
right: 10px;
top: 0;
width: 100px;
border-width: 0px 1px 1px 1px;
border-style: solid;
border-color: black;
position: fixed;
background-color: white;
z-index: 5;
}
Loading

0 comments on commit 926808f

Please sign in to comment.