skydiet-lib-node
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "skydiet-lib-node", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Biblioteca para funções skydiet", | ||
@@ -5,0 +5,0 @@ "author": "Daniel Cabral <cabralconsultoriaemsoftware@gmail.com>", |
@@ -7,3 +7,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ | ||
export const processAnswer = (currentQuestion: IAttendanceQuestion, currentAttendenceQuestions: IAttendanceQuestion[], bankQuestions: IAttendanceQuestion[], patient: IPatient) => { | ||
export const processAnswer = (currentQuestion: IAttendanceQuestion, currentAttendenceQuestions: IAttendanceQuestion[], bankQuestions: IAttendanceQuestion[], patient: IPatient): { | ||
questions: IAttendanceQuestion[], | ||
autoAnswers: IAttendanceQuestion[] | ||
} => { | ||
@@ -43,3 +46,3 @@ //localizar a pergunta no array de perguntas setando a resposta | ||
return {questions:currentAttendenceQuestionsNew, autoAnswers: questionsAutoAnswereds} | ||
return { questions: currentAttendenceQuestionsNew, autoAnswers: questionsAutoAnswereds } | ||
} | ||
@@ -115,3 +118,3 @@ | ||
groupeds.forEach((group: any) => { | ||
group.items = [ ...group.items.filter((q: IAttendanceQuestion) => q.questionParent === undefined) ] | ||
group.items = [...group.items.filter((q: IAttendanceQuestion) => q.questionParent === undefined)] | ||
}) | ||
@@ -229,5 +232,5 @@ | ||
for (const question of questionsRelationeds) { | ||
if (isEmpty(question.formula)){ | ||
if (isEmpty(question.formula)) { | ||
if (question.typeAnswer === TYPE_ANSWER.CHOICE_SINGLE || question.typeAnswer === TYPE_ANSWER.CHOICE_MULTIPLE) { | ||
if (question.answer){ | ||
if (question.answer) { | ||
ret.push(question) | ||
@@ -234,0 +237,0 @@ } |
49277
1091