Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ HTTPS_CERT_PATH = server.cert
HTTPS_KEY_PATH = server.key
VITE_ALT_DRUG = true
VITE_AUTH = http://localhost:8180
VITE_CDS_SERVICE = http://localhost:8090/cds-services
VITE_CDS_SERVICE = http://localhost:8090/etasu/reset
VITE_CLIENT = app-login
VITE_CLIENT_SCOPES = launch offline_access openid profile user/Patient.read patient/Patient.read user/Practitioner.read
VITE_DEFAULT_USER = pra1234
Expand All @@ -15,11 +15,8 @@ VITE_GENERATE_JWT = true
VITE_GH_PAGES=false
VITE_HOMEPAGE = http://localhost:8080
VITE_LAUNCH_URL = http://localhost:4040/launch
VITE_ORDER_SELECT = rems-order-select
VITE_ORDER_SIGN = rems-order-sign
VITE_PASSWORD = alice
VITE_PATIENT_FHIR_QUERY = Patient?_sort=identifier&_count=12
VITE_PATIENT_VIEW = rems-patient-view
VITE_PIMS_SERVER = http://localhost:5051/doctorOrders/api/addRx
VITE_PUBLIC_KEYS = http://localhost:3000/request-generator/.well-known/jwks.json
VITE_REALM = ClientFhirServer
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ src/db.json

# Environment variable files
.env.local

# Mac OS files
**/.DS_Store
33 changes: 28 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed src/.DS_Store
Binary file not shown.
16 changes: 6 additions & 10 deletions src/components/RequestBox/RequestBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const RequestBox = props => {
});

const {
callback,
prefetchedResources,
submitInfo,
patient,
Expand All @@ -29,7 +28,8 @@ const RequestBox = props => {
defaultUser,
smartAppUrl,
client,
pimsUrl
pimsUrl,
getRemsAdminUrl
} = props;
const emptyField = <span className="empty-field">empty</span>;

Expand Down Expand Up @@ -61,12 +61,8 @@ const RequestBox = props => {
};

const submitOrderSign = request => {
submitInfo(prepPrefetch(), request, patient, 'order-sign');
};

const submit = () => {
if (!_.isEmpty(request)) {
submitOrderSign(request);
submitInfo(prepPrefetch(), request, patient, 'order-sign');
}
};

Expand Down Expand Up @@ -149,8 +145,7 @@ const RequestBox = props => {

renderedPrefetches.set(resourceKey, renderedList);
});
console.log(renderedPrefetches);
console.log(Object.entries(renderedPrefetches));

return (
<div className="prefetched">
<div className="prefetch-header">Prefetched</div>
Expand Down Expand Up @@ -284,6 +279,7 @@ const RequestBox = props => {
const disableSendToCRD = isOrderNotSelected() || loading;
const disableSendRx = isOrderNotSelected() || loading;
const disableLaunchSmartOnFhir = isPatientNotSelected();
const orderSignRemsAdmin = getRemsAdminUrl(request, 'order-sign');

return (
<>
Expand Down Expand Up @@ -311,7 +307,7 @@ const RequestBox = props => {
<Button onClick={sendRx} disabled={disableSendRx}>
Send Rx to Pharmacy
</Button>
<Button onClick={submit} disabled={disableSendToCRD}>
<Button onClick={() => submitOrderSign(request)} disabled={disableSendToCRD}>
Sign Order
</Button>
</ButtonGroup>
Expand Down
Loading