Skip to content

Commit

Permalink
Merge pull request #57 from chronic-care/develop
Browse files Browse the repository at this point in the history
Updates for Release 2.1.2
  • Loading branch information
swmuir authored Apr 16, 2024
2 parents e497cfc + 0ed5050 commit 0bb3878
Show file tree
Hide file tree
Showing 20 changed files with 1,117 additions and 310 deletions.
45 changes: 3 additions & 42 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ GENERATE_SOURCEMAP=false
REACT_APP_SHARED_DATA_CLIENT_ID=
REACT_APP_SHARED_DATA_REDIRECT_URI="./index.html"

# MELD Sandbox
REACT_APP_CLIENT_ID_meld_mcc=2dbe1620-7232-4ab7-a5e5-4ee85112a74e
REACT_APP_CLIENT_ID_meld_qa=0e440b74-e49d-4975-9da7-a6afdea9e426
REACT_APP_CLIENT_ID_meld_synthea=2ce6fc18-6f3f-4e8a-b50f-540634aaf26b
REACT_APP_CLIENT_ID_meld_chc=95567dcb-87e3-438f-b77c-d806070a4bf5
# REACT_APP_CLIENT_ID_meld_sds=

REACT_APP_MELD_SANDBOX_NAME=MCCDevelopment
REACT_APP_MELD_SANDBOX_CLIENT_ID=<...>
Expand Down Expand Up @@ -62,31 +56,6 @@ REACT_APP_CLIENT_ID_va=<...>
REACT_APP_CLIENT_ID_ohsu_fhirprd=<...>
REACT_APP_CLIENT_ID_ohsu_fhirdev=<...>

# Sandbox Scope, ISS, and launcher URLs
## Not intended to be overridden, but instead, permanently changed here if needed:
REACT_APP_MELD_SANDBOX_SCOPE="patient/Goal.write patient/Practitioner.read patient/CareTeam.read launch/patient patient/Questionnaire.read openid patient/Goal.read patient/Immunization.read launch patient/ServiceRequest.read patient/Procedure.read fhirUser patient/RelatedPerson.read patient/Provenance.read patient/MedicationRequest.read patient/Task.read patient/Patient.read patient/DiagnosticReport.read patient/Condition.write patient/Condition.read patient/QuestionnaireResponse.write patient/MedicationRequest.write patient/Observation.read patient/CarePlan.read"
REACT_APP_MELD_SANDBOX_ENDPOINT_ISS="https://gw.interop.community/MCCDevelopment/data"
REACT_APP_MELD_SANDBOX_ENDPOINT_LAUNCHER=http://localhost:8000/mycareplanner/launch.html?iss=$REACT_APP_MELD_SANDBOX_ENDPOINT_ISS

REACT_APP_EPIC_SANDBOX_ENDPOINT_SCOPE="launch launch/patient openid fhirUser patient/Patient.read patient/Practitioner.read patient/RelatedPerson.read patient/Condition.read patient/DiagnosticReport.read patient/Observation.read patient/Procedure.read patient/CarePlan.read patient/CareTeam.read patient/Goal.read patient/Immunization.read patient/MedicationRequest.read patient/Medication.read patient/Provenance.read patient/Organization.read"
REACT_APP_EPIC_SANDBOX_ENDPOINT_ISS="https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4"
REACT_APP_EPIC_SANDBOX_ENDPOINT_LAUNCHER=http://localhost:8000/mycareplanner/launch.html?iss=$REACT_APP_EPIC_SANDBOX_ENDPOINT_ISS

REACT_APP_CERNER_SANDBOX_ENDPOINT_SCOPE="launch/patient openid fhirUser offline_access patient/Patient.read user/Practitioner.read user/Location.read user/Organization.read patient/CarePlan.read patient/CareTeam.read patient/Condition.read patient/Goal.read patient/Immunization.read patient/Observation.read patient/Procedure.read patient/MedicationRequest.read patient/RelatedPerson.read patient/ServiceRequest.read patient/Provenance.read"
REACT_APP_CERNER_SANDBOX_ENDPOINT_ISS="https://fhir-myrecord.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d"
REACT_APP_CERNER_SANDBOX_ENDPOINT_LAUNCHER=http://localhost:8000/mycareplanner/launch.html?iss=$REACT_APP_CERNER_SANDBOX_ENDPOINT_ISS

REACT_APP_VA_SANDBOX_ENDPOINT_SCOPE="launch/patient openid profile offline_access patient/Patient.read patient/Practitioner.read patient/Condition.read patient/Observation.read patient/Immunization.read patient/MedicationRequest.read patient/Medication.read"
REACT_APP_VA_SANDBOX_ENDPOINT_ISS="https://sandbox-api.va.gov/services/fhir/v0/r4"
REACT_APP_VA_SANDBOX_ENDPOINT_LAUNCHER=https://chronic-care.github.io/mycareplanner/launch.html?iss=$REACT_APP_VA_SANDBOX_ENDPOINT_ISS

REACT_APP_NEXTGEN_SANDBOX_ENDPOINT_SCOPE="launch launch/patient openid fhirUser offline_access patient/Patient.read patient/Practitioner.read patient/RelatedPerson.read patient/Condition.read patient/DiagnosticReport.read patient/Observation.read patient/Procedure.read patient/CarePlan.read patient/CareTeam.read patient/Goal.read patient/Immunization.read patient/MedicationRequest.read patient/Medication.read patient/Provenance.read patient/Organization.read"
REACT_APP_NEXTGEN_SANDBOX_ENDPOINT_ISS="https://fhir.nextgen.com/nge/prod/fhir-api-r4/fhir/r4"
REACT_APP_NEXTGEN_SANDBOX_ENDPOINT_LAUNCHER=https://chronic-care.github.io/mycareplanner/launch.html?iss=$REACT_APP_NEXTGEN_SANDBOX_ENDPOINT_ISS

# REACT_APP_SDS_SANDBOX_SCOPE="launch launch/patient openid fhirUser patient/Patient.read patient/Practitioner.read patient/RelatedPerson.read patient/Condition.read patient/DiagnosticReport.read patient/Observation.read patient/Procedure.read patient/CarePlan.read patient/CareTeam.read patient/Goal.read patient/Immunization.read patient/MedicationRequest.read patient/ServiceRequest.read patient/Task.read patient/Questionnaire.read patient/QuestionnaireResponse.write patient/Goal.write patient/MedicationRequest.write patient/Condition.write"
# REACT_APP_SDS_SANDBOX_ENDPOINT_ISS="https://gw.interop.community/eCareSharedData/data"
# REACT_APP_SDS_SANDBOX_ENDPOINT_LAUNCHER=http://localhost:8000/mycareplanner/launch.html?iss=$REACT_APP_SDS_SANDBOX_ENDPOINT_ISS

# Support
REACT_APP_SUPPORT_EMAIL="[email protected]"
Expand All @@ -106,8 +75,6 @@ REACT_APP_LOAD_MELD_ON_STARTUP=false
REACT_APP_SHOW_LINK_TO_PROVIDER_LOGIN_ON_LAUNCH=false
REACT_APP_TEST_PERSISTENCE=false
REACT_APP_DEBUG_LOG=false
# Provider login options for test data
REACT_APP_ADD_MELD_SANDBOX_TO_PROVIDER_LOGIN_DROPDOWN=true

# Session Timeout
REACT_APP_LOG_EVENTS=true
Expand All @@ -122,12 +89,6 @@ REACT_APP_LOG_ENABLED=false
REACT_APP_LOG_API_KEY=<...>
REACT_APP_LOG_ENDPOINT_URI="http://localhost:8085"


REACT_APP_ADD_MELD_TO_PROVIDER_LOGIN_DROPDOWN=true
REACT_APP_MELD_SANDBOX_TESTING_ENDPOINT_ISS=https://gw.interop.community/MCCTesting/data
REACT_APP_MELD_SANDBOX_STAGING_ENDPOINT_ISS=https://gw.interop.community/MCCStaging/data
REACT_APP_MELD_SANDBOX_DEVELOP_ENDPOINT_ISS=https://gw.interop.community/MCCDevelopment/data
REACT_APP_CLIENT_ID_MELD_MCCTESTING=5fa54c47-ed80-405b-a0b7-611eee5d0159
REACT_APP_CLIENT_ID_MELD_MCCSTAGING=5fa54c47-ed80-405b-a0b7-611eee5d0159
REACT_APP_CLIENT_ID_MELD_MCCDEVELOP=5fa54c47-ed80-405b-a0b7-611eee5d0159

REACT_APP_VERSION="version - 2.1.2"
# Set to have HHS Banner
# REACT_APP_HHS_BANNER=true
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ This code is under active development for pilot testing with patients and caregi
* `docker build .`
* This will build a container which serves content on port 80. Run this container with:
* `docker run -i -p 8000:8000 <hash>`

* Run for meld and override providers using my providers file
docker run -d -it \
-p 8000:8000 \
-e REACT_APP_MELD_SANDBOX_NAME=MCCDevelopment \
-e REACT_APP_MELD_SANDBOX_CLIENT_ID=<<IDHER> \
--mount type=bind,source="$(pwd)"/myproviders.json,target=/home/node/app/src/data-services/endpoints/providers.json,readonly \
chroniccare/mycareplanner:latest

* Note: yarn.lock is required for the build to run correctly. Do not remove the relevant COPY command

## Style guide
Expand Down
14 changes: 10 additions & 4 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ h3 {
/* flex-direction: column; */
align-items: flex-end;
justify-content: flex-start;
font-size: calc(10px + 2vmin);
/* font-size: calc(10px + 2vmin); */
color: rgba(var(--color-light-text), 1);
height: 60px;
border-bottom: #E1E2EC 1px solid;
Expand All @@ -78,11 +78,17 @@ h3 {

.app-header p {
margin: 0;
margin-left: 5px;
margin-left: auto;
font-size: smaller;
color: var(--color-light-text);
}

.version {
padding: 15px;
color: #000000;
font-size: 14px;
text-align: center;
}

.continue-button {
background-color: rgba(var(--color-dark), .10) !important;
border-color: var(--color-dark) !important;
Expand Down Expand Up @@ -113,7 +119,7 @@ h3 {
}

svg path {
fill: rgba(var(--color-dark), 1) !important;
/* fill: rgba(var(--color-dark), 1) !important; */
}

.patient-container {
Expand Down
11 changes: 6 additions & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,8 @@ class App extends React.Component<AppProps, AppState> {
<header className="app-header" style={{ padding: '10px 16px 0px 16px' }}>
{/* <img className="mypain-header-logo" src={`${process.env.PUBLIC_URL}/assets/images/mpc-logo.png`} alt="MyPreventiveCare"/> */}
<img className="mypain-header-logo" src={`${process.env.PUBLIC_URL}/assets/images/ecareplan-logo.png`} alt="My Care Planner" />
{patient === undefined ? '' : <p>&npsp;&npsp;{patient[0]?.fullName}</p>}
{/* {patient === undefined ? '' : <p>&npsp;&npsp;{patient[0]?.fullName}</p>} */}
<p className='version'>{process.env.REACT_APP_VERSION}</p>
</header>

<Switch>
Expand Down Expand Up @@ -791,10 +792,10 @@ class App extends React.Component<AppProps, AppState> {
"& .Mui-selected, .Mui-selected > svg":
{ color: "#FFFFFF !important", bgcolor: "#355CA8" }
}} TabIndicatorProps={{ style: { display: "none" } }}>
<Tab sx={{ textTransform: 'none', margin: '-5px 0px' }} icon={<HomeIcon />} label="Home" value="1" wrapped />
<Tab sx={{ textTransform: 'none', margin: '-5px 0px' }} icon={<ContentPasteIcon />} label="Care Plan" value="2" wrapped />
<Tab sx={{ textTransform: 'none', margin: '-5px 0px' }} icon={<LineAxisIcon />} label="Health Status" value="3" wrapped />
<Tab sx={{ textTransform: 'none', margin: '-5px 0px' }} icon={<PeopleIcon />} label="Team" value="4" wrapped />
<Tab sx={{ textTransform: 'none', margin: '-5px 0px' }} icon={<HomeIcon sx={{color: 'black'}} />} label="Home" value="1" wrapped />
<Tab sx={{ textTransform: 'none', margin: '-5px 0px' }} icon={<ContentPasteIcon sx={{color: 'black'}}/>} label="Care Plan" value="2" wrapped />
<Tab sx={{ textTransform: 'none', margin: '-5px 0px' }} icon={<LineAxisIcon sx={{color: 'black'}}/>} label="Health Status" value="3" wrapped />
<Tab sx={{ textTransform: 'none', margin: '-5px 0px' }} icon={<PeopleIcon sx={{color: 'black'}} />} label="Team" value="4" wrapped />
</TabList>
</Paper>

Expand Down
4 changes: 3 additions & 1 deletion src/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ export default class Home extends React.Component<HomeProps, HomeState> {
let screenings = this.props.screenings?.filter(s => s.notifyPatient);
// let tasks = this.props.tasks;

const hhsBanner = process.env.REACT_APP_HHS_BANNER === 'false';

return (
<div className="home-view">
<Modal isVisible={this.state.isModalVisible} closeModal={this.closeModal} />
{hhsBanner && (<Modal isVisible={this.state.isModalVisible} closeModal={this.closeModal} />)}
<div className="welcome">
{
(this.props.errorType !== 'Terminating') &&
Expand Down
66 changes: 20 additions & 46 deletions src/components/modal/modal.css
Original file line number Diff line number Diff line change
@@ -1,57 +1,31 @@
.modal-overlay {
display: flex;
/* flex-direction: column; */
width: 500px;
}

p{
margin:10px;
p {
margin: 10px;
padding: 1%;
}
.modal {
display: flex;
text-align: justify;
flex-direction: column;
justify-content: center;
width: 450px;
left: 720px;
padding: auto;
border-radius: 12px;
}

/* Close button styles */
.close-btn {
position: absolute;
top: 23%;
right: 10px;
cursor: pointer;
font-size: 16px;
font-weight: bold;
color: #0056B3;
}

/* Modal content styles */
/* .modal-content {
margin-top: 10px;
color: #000;
} */

/* Add any additional styling based on your design requirements */

@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait){
.modal {
max-height: 1024px;
}
.modal-overlay{
max-height: 1024px;
}
.modal-body {
color: var(--color-dark);
border: 1px solid #000000;
padding: 10px;
border-radius: 0 0 5px 5px;
}

@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:landscape){
.modal {
max-height: 768px;
}
.modal-overlay{
max-height: 1024px;
}
}
.modal-style {
position: absolute;
top: 50%;
left: 50%;
width: 450px;
transform: translate(-50%, -50%);
background-color: white;
padding: 20px;
border: 1px solid #ccc;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

91 changes: 37 additions & 54 deletions src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
@@ -1,63 +1,46 @@
// components/Modal/Modal.tsx
import React, { useEffect, useState } from 'react';
import { Box } from '@mui/material';
import './modal.css';

interface ModalProps {
isVisible: boolean;
closeModal: () => void;
isVisible: boolean;
closeModal: () => void;
}

const Modal: React.FC<ModalProps> = ({ isVisible, closeModal }) => {
useEffect(() => {
// Check if the user has seen the modal before
const hasSeenModal = sessionStorage.getItem('hasSeenModal');

// If the user hasn't seen the modal, show it
if (!hasSeenModal) {
setModalVisible(true);
// Mark the modal as seen for this session
sessionStorage.setItem('hasSeenModal', 'true');
}
}, []);

const [modalVisible, setModalVisible] = useState(isVisible);

const closeAndSetFlag = () => {
setModalVisible(false);
// Mark the modal as seen for this session
sessionStorage.setItem('hasSeenModal', 'true');
};

return (
<>
{modalVisible && (
<div className="modal-overlay">
<div className="modal">
<span className="close-btn" onClick={closeAndSetFlag}>X</span>
<br></br>
<div className="modal-content">
{/* Your warning banner text here */}
<Box>
<p>
This system is provided for Government-authorized use only.

Unauthorized or improper use of this system is prohibited and may result in disciplinary action and/or civil and criminal penalties.

Personal use of social media and networking sites on this system is limited as to not interfere with official work duties and is subject to monitoring.

By using this system, you understand and consent to the following:

The Government may monitor, record, and audit your system usage, including usage of personal devices and email systems for official duties or to conduct HHS business. Therefore, you have no reasonable expectation of privacy regarding any communication or data transiting or stored on this system. At any time, and for any lawful Government purpose, the government may monitor, intercept, and search and seize any communication or data transiting or stored on this system.
Any communication or data transiting or stored on this system may be disclosed or used for any lawful Government purpose.
</p>
</Box>
</div>
</div>
</div>
)}
</>
);
useEffect(() => {
const hasSeenModal = sessionStorage.getItem('hasSeenModal');
if (!hasSeenModal) {
setModalVisible(true);
sessionStorage.setItem('hasSeenModal', 'true');
}
}, []);

const [modalVisible, setModalVisible] = useState(isVisible);
const closeAndSetFlag = () => {
setModalVisible(false);
sessionStorage.setItem('hasSeenModal', 'true');
};
return (
<>
{modalVisible && (
<div className='modal-style'>
<div className="">
<span className="close-btn" onClick={closeAndSetFlag}>X</span>
<br></br>
<p>
This system is provided for Government-authorized use only.
<p>Unauthorized or improper use of this system is prohibited and may result in disciplinary action and/or civil and criminal penalties.</p>
<p>Personal use of social media and networking sites on this system is limited as to not interfere with official work duties and is subject to monitoring.</p>
<p>By using this system, you understand and consent to the following:</p>
<p>
The Government may monitor, record, and audit your system usage, including usage of personal devices and email systems for official duties or to conduct HHS business. Therefore, you have no reasonable expectation of privacy regarding any communication or data transiting or stored on this system. At any time, and for any lawful Government purpose, the government may monitor, intercept, and search and seize any communication or data transiting or stored on this system.
Any communication or data transiting or stored on this system may be disclosed or used for any lawful Government purpose.
</p>
</p>
</div>
</div>
)}
</>
);
};

export default Modal;
14 changes: 14 additions & 0 deletions src/components/questionnaire-item/QuestionnaireItemComponent.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@
font-weight: bold;
}

.exit-button {
width: 40%;
margin: auto;
display: flex;
justify-content: center;
color: #ffffff !important;
font-weight: bold;
}

.custom-modal .modal-content {
width: 92%;
}


.btn-outline-secondary {
color: var(--color-dark);
border-color: var(--color-dark);
Expand Down
Loading

0 comments on commit 0bb3878

Please sign in to comment.