Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
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
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export default class App extends Component {
});
}
});
console.log(fullBundle);
console.log(allLibrariesResults);
this.setState({
bundle: fullBundle,
cqlPrepopulationResults: allLibrariesResults,
Expand Down
6 changes: 3 additions & 3 deletions src/components/QuestionnaireForm/QuestionnaireForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,9 @@ export default class QuestionnaireForm extends Component {
system = "RxNorm"
}

if (system.length > 0) {
displayText = displayText + ' - ' + system + ' - ' + v.code
}
// if (system.length > 0) {
// displayText = displayText + ' - ' + system + ' - ' + v.code
// }
}

return {
Expand Down
16 changes: 16 additions & 0 deletions src/elmExecutor/buildPopulatedResourceBundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,21 @@ function doSearch(smart, type, fhirVersion, request, callback) {
// unknown version
break;
}
break;
case "MedicationStatement":
smart.patient.request(type, {resolveReferences: 'medicationReference', flat: true, graph: false}).then((result) =>{
let finalResult = []
// TODO: This system should be untangled, reference resolution and resource gathering shouldn't be done separately
if(result && result.data){
if(result.references) {
Object.keys(result.references).forEach((e)=>{
finalResult.push(result.references[e])
})
}
callback(finalResult);
}
})
break;
}

// If this is for Epic, there are some specific modifications needed for the queries to work properly
Expand Down Expand Up @@ -126,6 +141,7 @@ function doSearch(smart, type, fhirVersion, request, callback) {
Object.keys(q).forEach((parameter)=>{
query.set(parameter, q[parameter]);
});

if( usePatient ) {
smart.patient.request(`${type}?${query}`)
.then(processSuccess(smart, [], callback), processError(smart, callback));
Expand Down