Skip to content

Commit 1bb0aee

Browse files
committed
Made default launch a genericDSTU2 launcher pointing to SmartPilot2MVP; moved old endpoint to /launchmcode
1 parent 216735f commit 1bb0aee

4 files changed

Lines changed: 40 additions & 5 deletions

File tree

public/config.js

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,37 @@ CONFIG = {
6565
{
6666
path: '/smart',
6767
display: 'Flux Notes™',
68+
app: "SmartPilot2MvpApp",
69+
isExact: true,
70+
dataSource: 'GenericSmartOnFhirDstu2DataSource',
71+
shortcuts: [],
72+
dataSourceProps: {
73+
mapper: 'CernerSandboxMapper',
74+
resourceTypes: ['Patient', 'Condition', 'Encounter', 'MedicationOrder', 'Observation', 'Procedure']
75+
},
76+
},
77+
{
78+
path: '/launchmcode',
79+
display: 'Flux',
80+
app: "LaunchPage",
81+
isExact: true,
82+
launchContext: {
83+
client: {
84+
client_id: '6c12dff4-24e7-4475-a742-b08972c4ea27',
85+
scope: 'patient/*.read user/*.* openid profile',
86+
// note: the redirect_uri below may need to change in different environments.
87+
// a relative URL (ex. /smart or ../smart) won't work in IE
88+
redirect_uri: 'http://localhost:3000/smartmcode'
89+
},
90+
// uncomment the 'server' field below
91+
// to override the iss parameter from the SMART launch process
92+
// (aka, the server listed here can be used as a 'shim')
93+
// server: "http://localhost:3001/1_0_2"
94+
}
95+
},
96+
{
97+
path: '/smartmcode',
98+
display: 'Flux Notes™',
6899
app: "SmartFullApp",
69100
isExact: true,
70101
dataSource: 'McodeV09SmartOnFhirDataSource',
@@ -289,7 +320,7 @@ CONFIG = {
289320
{
290321
path: '/mvp',
291322
display: 'Flux Notes™',
292-
app: "Pilot2MvpApp",
323+
app: "SmartPilot2MvpApp",
293324
isExact: true,
294325
dataSource: 'HardCodedMcodeV09DataSource',
295326
patientId: '788dcbc3-ed18-470c-89ef-35ff91854c7f',

src/apps/AppManager.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import SmartFullApp from '../containers/SmartFullApp';
55
import SlimApp from '../containers/SlimApp';
66
import PointOfCareApp from '../containers/PointOfCareApp';
77
import Pilot2MvpApp from '../containers/Pilot2MvpApp';
8+
import SmartPilot2MvpApp from '../containers/SmartPilot2MvpApp';
89
import LandingPage from '../components/LandingPage';
910
import LaunchPage from '../components/LaunchPage';
1011
import {ConfigManagerInstance} from '../config/ConfigManager';
@@ -19,6 +20,7 @@ const APPS = {
1920
'SmartCompassApp': SmartCompassApp,
2021
'PointOfCareApp': PointOfCareApp,
2122
'Pilot2MvpApp': Pilot2MvpApp,
23+
'SmartPilot2MvpApp': SmartPilot2MvpApp,
2224
};
2325

2426
export default class AppManager {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { Pilot2MvpApp } from "./Pilot2MvpApp";
2+
import WithSmartData from './WithSmartData';
3+
4+
const SmartPilot2MvpApp = WithSmartData(Pilot2MvpApp);
5+
export default SmartPilot2MvpApp;

src/containers/WithSmartData.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ import 'fhirclient';
77
App container to display theoretical SMART patient.
88
Upon successful authorization of EHR user, app will handle reading of patient and loads it.
99
If user authorization fails or if selected patient is not in the usermap, app will load a fail screen.
10-
11-
NOTE: the redirect_url property used in the launchContext for the /launch endpoint
12-
will need to be changed in different environments
1310
*/
1411
export default function WithSmartData(WrappedAppComponent) {
1512
return class extends WrappedAppComponent {
@@ -64,4 +61,4 @@ export default function WithSmartData(WrappedAppComponent) {
6461
return super.render();
6562
}
6663
};
67-
}
64+
}

0 commit comments

Comments
 (0)