Skip to content

Commit 484db49

Browse files
committed
Correcting loading and user display
1 parent d6d570f commit 484db49

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

common-data-defs.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,6 @@ const formHistoricalContentB = [
214214
}
215215
]
216216

217-
//
218-
219217

220218
const questionnaires = {
221219
'questionary-x': {

dr-lib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ async function getPatientDetails(questionaryId, patientEvent) {
184184

185185
const profileEventsResults = await patientConnection.api(apiCalls);
186186
for (const profileEventRes of profileEventsResults) {
187-
const profileEvent = profileEventRes?.events[0];
187+
const profileEvent = profileEventRes?.events?.[0];
188188
if (!profileEvent) continue;
189189
const field = dataFieldFromEvent(formProfile, profileEvent);
190190
patient.formData[field.key] = field;

dr-patient-view-controler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { exportCSVFile } from "./exportToCSV.js";
1313
let infos;
1414
window.onload = async (event) => {
1515
const { patientApiEndpoint, questionaryId } = getRequestFrormApiEndPoint();
16-
infos = drPatientLib.setRefresh(patientApiEndpoint, questionaryId, refresh)
16+
infos = await drPatientLib.setRefresh(patientApiEndpoint, questionaryId, refresh)
1717
// -- home button
1818
document.getElementById('home-button').href= 'dr.html?questionaryId=' + questionaryId;
1919

0 commit comments

Comments
 (0)