Skip to content
Merged

Dev #170

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
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LOGGING_LEVEL = debug
MONGO_DB_NAME = remsadmin
MONGO_URL = mongodb://rems-user:pass@127.0.0.1:27017
PORT = 8090
RESOURCE_SERVER = http://localhost:8090
RESOURCE_SERVER = http://localhost:8090/
SMART_ENDPOINT = http://localhost:4040/launch
USE_HTTPS = false
VSAC_API_KEY = changeMe
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function App() {
const resetDB = async () => {
setOpen(false);
await axios
.post(process.env.RESOURCE_SERVER + '/etasu/reset')
.post(process.env.RESOURCE_SERVER + 'etasu/reset')
.then(function (response: any) {
console.log(response);
setForceRefresh(true);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/DataViews/CaseCollection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const CaseCollection = (props: { refresh: boolean }) => {
}, []);

const getAllRemsCase = async () => {
const url = process.env.RESOURCE_SERVER + '/api/all/remscase';
const url = process.env.RESOURCE_SERVER + 'api/all/remscase';
await axios
.get(url)
.then(function (response: { data: SetStateAction<RemsCase[]> }) {
Expand All @@ -70,7 +70,7 @@ const CaseCollection = (props: { refresh: boolean }) => {
};

const deleteSingleRow = async (event: any, row: RemsCase) => {
const url = process.env.RESOURCE_SERVER + '/api/remsCase/deleteOne';
const url = process.env.RESOURCE_SERVER + 'api/remsCase/deleteOne';
await axios
.post(url, { data: { params: row } })
.then(function (response: { data: any; status: number }) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/DataViews/Medications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const Medications = (props: { refresh: boolean }) => {
}, []);

const getAllMedications = async () => {
const url = process.env.RESOURCE_SERVER + '/api/all/medications';
const url = process.env.RESOURCE_SERVER + 'api/all/medications';
await axios
.get(url)
.then(function (response: { data: SetStateAction<Medication[]> }) {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/views/DataViews/MetRequirements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const MetRequirements = (props: { refresh: boolean }) => {
}, []);

const getAllMetReqs = async () => {
const url = process.env.RESOURCE_SERVER + '/api/all/metreqs';
const url = process.env.RESOURCE_SERVER + 'api/all/metreqs';
await axios
.get(url)
.then(function (response: { data: any }) {
Expand All @@ -58,7 +58,7 @@ const MetRequirements = (props: { refresh: boolean }) => {
};

const deleteSingleRow = async (event: any, row: MetRequirements) => {
const url = process.env.RESOURCE_SERVER + '/api/metreqs/deleteOne';
const url = process.env.RESOURCE_SERVER + 'api/metreqs/deleteOne';
await axios
.post(url, { data: { params: row } })
.then(function (response: { data: any; status: number }) {
Expand All @@ -73,7 +73,7 @@ const MetRequirements = (props: { refresh: boolean }) => {
};

const formattedQuestionnaire = (row: MetRequirements) => {
return row?.completedQuestionnaire?.questionnaire.split(process.env.RESOURCE_SERVER + '/4_0_0/')[1];
return row?.completedQuestionnaire?.questionnaire.split(process.env.RESOURCE_SERVER + '4_0_0/')[1];
};
const formattedCompleted = (row: MetRequirements) => {
return row?.completed === true ? 'Yes' : 'No';
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default {
fhirServerConfig: {
auth: {
// This server's URI
resourceServer: env.get('RESOURCE_SERVER').required() + '/'
resourceServer: env.get('RESOURCE_SERVER').required().asUrlString()
//
// if you use this strategy, you need to add the corresponding env vars to docker-compose
//
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/hookResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const codeMap: { [key: string]: CardRule[] } = {
}
],
stakeholderType: 'prescriber',
summary: 'iPledge/Isotretinoin REMS Provider Requirements',
summary: 'iPledge/Isotretinoin REMS Prescriber Requirements',
cardDetails: CARD_DETAILS
}
],
Expand Down
Loading