master-control 0.4.6 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4252,35 +4252,45 @@ class MedialQuestionsComponent {
|
|
|
4252
4252
|
}
|
|
4253
4253
|
});
|
|
4254
4254
|
if (!this.checkIfValueIsEmpty(this.isMedicalSubQuestionsAvailable)) {
|
|
4255
|
-
this.masterService
|
|
4255
|
+
this.masterService
|
|
4256
|
+
.getSubQuestions(this.field()?.configData, this.isMedicalSubQuestionsAvailable['answer'], this.isMedicalSubQuestionsAvailable['personUWId'])
|
|
4257
|
+
.subscribe((subQuestionResponse) => {
|
|
4256
4258
|
let distinctSteps = [];
|
|
4257
|
-
|
|
4258
|
-
subQuestion
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4259
|
+
if (!this.checkIfValueIsEmpty(subQuestionResponse)) {
|
|
4260
|
+
subQuestionResponse.forEach((subQuestion) => {
|
|
4261
|
+
subQuestion['domainValues'] =
|
|
4262
|
+
this.medialQuestionResponse()['domainValues'][subQuestion['domainName']];
|
|
4263
|
+
subQuestion['field'] = this.getField(subQuestion);
|
|
4264
|
+
if (!distinctSteps.includes(subQuestion['clusterId'])) {
|
|
4265
|
+
distinctSteps.push(subQuestion['clusterId']);
|
|
4266
|
+
}
|
|
4267
|
+
});
|
|
4268
|
+
subQuestionResponse.sort((a, b) => a['step'] - b['step'] ||
|
|
4269
|
+
a['displayOrder'] - b['displayOrder']);
|
|
4270
|
+
distinctSteps.forEach((steps, ind) => {
|
|
4271
|
+
let filteredObj = subQuestionResponse.filter((singleQuestion) => singleQuestion['clusterId'] === steps);
|
|
4272
|
+
let obj = {
|
|
4273
|
+
step: 1000 + ind,
|
|
4274
|
+
questions: !this.checkIfValueIsEmpty(filteredObj)
|
|
4275
|
+
? filteredObj
|
|
4276
|
+
: [],
|
|
4277
|
+
sectionName: !this.checkIfValueIsEmpty(filteredObj)
|
|
4278
|
+
? filteredObj[0]['title']
|
|
4279
|
+
: '',
|
|
4280
|
+
isMedicalSubQuestion: true,
|
|
4281
|
+
showSection: true,
|
|
4282
|
+
personUWId: this.isMedicalSubQuestionsAvailable['personUWId'].toString(),
|
|
4283
|
+
};
|
|
4284
|
+
// let LaIndex: any = this.personUwMasterObj.findIndex(
|
|
4285
|
+
// (single: any) => single['role'] === singlePerson['role']
|
|
4286
|
+
// );
|
|
4287
|
+
this.questionList.push(obj);
|
|
4288
|
+
});
|
|
4289
|
+
this.medicalSubQuestionsResponse = subQuestionResponse;
|
|
4290
|
+
// let laIndex: any = this.personUwResponseObj['questionsResponse'].findIndex((singlePersonObj: any) => singlePersonObj['role'] === singlePerson['role']);
|
|
4291
|
+
this.medialQuestionResponse()['questionsResponse'][0]['questionList'] = this.medialQuestionResponse()['questionsResponse'][0]['questionList'].concat(this.medicalSubQuestionsResponse);
|
|
4292
|
+
this.mapAnswersForOpenQuote();
|
|
4293
|
+
}
|
|
4284
4294
|
}, (err) => {
|
|
4285
4295
|
this.mapAnswersForOpenQuote();
|
|
4286
4296
|
});
|