master-control 0.4.5 → 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
|
});
|
|
@@ -5413,8 +5423,8 @@ class MedialQuestionsComponent {
|
|
|
5413
5423
|
});
|
|
5414
5424
|
}
|
|
5415
5425
|
if (singleQuestion['isShowQuestionInUI'] &&
|
|
5416
|
-
singleQuestion['questionType'] === 'CHECKBOX'
|
|
5417
|
-
!this.checkIfValueIsEmpty(
|
|
5426
|
+
singleQuestion['questionType'] === 'CHECKBOX'
|
|
5427
|
+
&& !this.checkIfValueIsEmpty(this.personUwAnswers[singleQuestion['questionId']])) {
|
|
5418
5428
|
// for checkbox question
|
|
5419
5429
|
let questionIndexInMainRequest = mainRequestForBothPersons.findIndex((singleAnswerObj) => singleAnswerObj['questionId'] ===
|
|
5420
5430
|
singleQuestion['questionId'] &&
|
|
@@ -5429,11 +5439,11 @@ class MedialQuestionsComponent {
|
|
|
5429
5439
|
createdUser: this.getCookieValue('userId'),
|
|
5430
5440
|
clusterId: singleQuestion['clusterId'],
|
|
5431
5441
|
};
|
|
5432
|
-
obj['answer'] =
|
|
5442
|
+
obj['answer'] = this.personUwAnswers[singleQuestion['questionId']].toString();
|
|
5433
5443
|
mainRequestForBothPersons.push(obj);
|
|
5434
5444
|
}
|
|
5435
5445
|
else {
|
|
5436
|
-
mainRequestForBothPersons[questionIndexInMainRequest]['answer'] =
|
|
5446
|
+
mainRequestForBothPersons[questionIndexInMainRequest]['answer'] = this.personUwAnswers[singleQuestion['questionId']].toString();
|
|
5437
5447
|
}
|
|
5438
5448
|
}
|
|
5439
5449
|
else if (singleQuestion['isShowQuestionInUI'] &&
|
|
@@ -5767,9 +5777,9 @@ class MedialQuestionsComponent {
|
|
|
5767
5777
|
if (question['cammundaQuestionCode'] === 'LifeMediCndtn' || question['cammundaQuestionCode'] === 'MediCndtn') {
|
|
5768
5778
|
this.personUwAnswers[question['questionId']].length > 0;
|
|
5769
5779
|
// if none is selected then remove all and call API
|
|
5770
|
-
let isNoneSelected = this.personUwAnswers[question['questionId']].findIndex((singleObj) => singleObj
|
|
5780
|
+
let isNoneSelected = this.personUwAnswers[question['questionId']].findIndex((singleObj) => singleObj === 'NoMedHistry');
|
|
5771
5781
|
if (isNoneSelected !== -1) {
|
|
5772
|
-
this.personUwAnswers[question['questionId']] = this.personUwAnswers[question['questionId']] = this.personUwAnswers[question['questionId']].filter((singleObj) => singleObj
|
|
5782
|
+
this.personUwAnswers[question['questionId']] = this.personUwAnswers[question['questionId']] = this.personUwAnswers[question['questionId']].filter((singleObj) => singleObj === 'NoMedHistry');
|
|
5773
5783
|
}
|
|
5774
5784
|
this.medicalSubQuestionsResponse = [];
|
|
5775
5785
|
if (!this.checkIfValueIsEmpty(this.questionList)) {
|
|
@@ -5827,7 +5837,7 @@ class MedialQuestionsComponent {
|
|
|
5827
5837
|
// }
|
|
5828
5838
|
// });
|
|
5829
5839
|
// this.loader.display(true);
|
|
5830
|
-
let selectedDiseases = this.personUwAnswers[question['questionId']].
|
|
5840
|
+
let selectedDiseases = this.personUwAnswers[question['questionId']].toString();
|
|
5831
5841
|
// let request: any = JSON.parse(
|
|
5832
5842
|
// JSON.stringify(
|
|
5833
5843
|
// this.fetchSubQuestionsList[
|