From ce456a01e54156184b5a874c22c001a14eb660ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Santanch=C3=A8?= Date: Thu, 28 Oct 2021 15:33:49 -0300 Subject: [PATCH 1/4] fix (generator): fixed small bugs in the knot-artifact generator --- .../author/js/generator/artifact-knot.js | 35 ++++++++++++------- src/adonisjs/public/author/js/modifier.js | 22 +++++++----- .../simple/case/pocus_training-dynamic.md | 4 +-- .../simple/case/pocus_training-static.md | 26 +++++++------- 4 files changed, 51 insertions(+), 36 deletions(-) diff --git a/src/adonisjs/public/author/js/generator/artifact-knot.js b/src/adonisjs/public/author/js/generator/artifact-knot.js index 19b3248a..9ec5390b 100644 --- a/src/adonisjs/public/author/js/generator/artifact-knot.js +++ b/src/adonisjs/public/author/js/generator/artifact-knot.js @@ -82,6 +82,7 @@ class ArtifactKnotGenerator { async _insertArtifacts () { let templateHistory = {} const knotsU = {} + // sort the answers according to the template for (let a in this._artifacts) { const id = a.replace(/[.-]/g, '_') const knot = this._htmlSpace.querySelector('#g_' + id) @@ -89,7 +90,9 @@ class ArtifactKnotGenerator { if (knot.value != '_empty_' && sub.value != '_empty_') { if (!knotsU[knot.value]) knotsU[knot.value] = {} - knotsU[knot.value][sub.value] = a + if (!knotsU[knot.value][sub.value]) + knotsU[knot.value][sub.value] = [] + knotsU[knot.value][sub.value].push(a) } } for (const c in this._candidates) { @@ -106,18 +109,24 @@ class ArtifactKnotGenerator { if (status) { templateHistory[candidate.template] = true for (const s in this._candidates[c].contexts) { - if (knotsU[c][s]) { - MessageBus.i.publish('modify/artifact/insert', - {knot: c, - target: s, - artifact: knotsU[c][s], - exclusive: (candidate.exclusive) ? true : false, - includeMissing: (candidate['include-missing']) ? true : false, - includeTitle: - (candidate['include-title']) - ? candidate.contexts[s] : null} - ) - } + if (knotsU[c][s]) + for (const ss of knotsU[c][s]) + { + MessageBus.i.publish('modify/artifact/insert', + {knot: c, + target: s, + artifact: ss, + includeMany: + (candidate['include-many'] != null && + (candidate['include-many'] == '*' || + candidate['include-many'] == s)) + ? true : false, + includeMissing: (candidate['include-missing']) ? true : false, + includeTitle: + (candidate['include-title']) + ? candidate.contexts[s] : null} + ) + } } } } diff --git a/src/adonisjs/public/author/js/modifier.js b/src/adonisjs/public/author/js/modifier.js index 49e55c8e..41bf6cb1 100644 --- a/src/adonisjs/public/author/js/modifier.js +++ b/src/adonisjs/public/author/js/modifier.js @@ -48,7 +48,7 @@ class Modifier { case 'modify/artifact/insert': status = this.artifactInsert( message.knot.replace(/ /g, '_'), message.target, message.artifact, - ((message.exclusive) ? message.exclusive : false), + ((message.includeMany) ? message.includeMany : false), ((message.includeMissing) ? message.includeMissing : false), ((message.includeTitle) ? message.includeTitle : null)) break @@ -158,13 +158,13 @@ class Modifier { return status } - artifactInsert (knot, target, artifact, exclusive, + artifactInsert (knot, target, artifact, includeMany, includeMissing, includeTitle) { console.log('=== artifact insert') console.log(knot) console.log(target) console.log(artifact) - console.log(exclusive) + console.log(includeMany) console.log(includeMissing) console.log(includeTitle) let status = false @@ -182,7 +182,7 @@ class Modifier { targetEl = -1 if (targetEl == -1) { if (content[c].type == artifactSuperType && - (!content[c].path || exclusive)) { + (!content[c].path || !includeMany)) { targetEl = c replace = true } else if (content[c].type == 'context-close') @@ -201,6 +201,8 @@ class Modifier { artifactObj.alternative = target else artifactObj.subtype = artifactType + console.log('=== replace?') + console.log(replace) if (replace) status = this.elementReplace(knot, targetEl, artifactObj) else { @@ -289,14 +291,17 @@ class Modifier { {type: 'linefeed', content: '\n'}) let formalOpen = {type: 'formal-open', - context: context} + context: context, + render: false} if (contextId != null) formalOpen.contextId = contextId this.elementInsert(knot, contextPos+1, formalOpen) this.elementInsert(knot, contextPos+2, {type: 'linefeed', - content: '\n'}) + content: '\n', + render: false}) this.elementInsert(knot, contextPos+3, { - type: 'formal-close' + type: 'formal-close', + render: false }) this.elementInsert(knot, contextPos+4, {type: 'linefeed', @@ -343,7 +348,8 @@ class Modifier { this.elementInsert(knot, p, {type: 'field', field: property, - value: value}) + value: value, + render: false}) } } } diff --git a/src/adonisjs/public/templates/simple/case/pocus_training-dynamic.md b/src/adonisjs/public/templates/simple/case/pocus_training-dynamic.md index caf5f9aa..b40f836e 100644 --- a/src/adonisjs/public/templates/simple/case/pocus_training-dynamic.md +++ b/src/adonisjs/public/templates/simple/case/pocus_training-dynamic.md @@ -39,9 +39,9 @@ Write here the **POCUS questions**. Write here about your **conclusion**. }} -{{comments +((comments * template: simple/knot/pt_conclusion -}} +)) # * Basic (detailed,master_bottom) diff --git a/src/adonisjs/public/templates/simple/case/pocus_training-static.md b/src/adonisjs/public/templates/simple/case/pocus_training-static.md index 0c0a61a1..0a242da4 100644 --- a/src/adonisjs/public/templates/simple/case/pocus_training-static.md +++ b/src/adonisjs/public/templates/simple/case/pocus_training-static.md @@ -29,7 +29,7 @@ ___ Data ___ * Lungs: * template: simple/knot/pt_lungs * description: 'Pulmão' - * exclusive: true + * include-many: PL-EX * include-missing: true * include-title: true * contexts: @@ -53,7 +53,7 @@ ___ Data ___ * Cava: * template: simple/knot/pt_cava * description: 'Cava' - * exclusive: true + * include-many: CV-EX * include-missing: true * include-title: true * contexts: @@ -64,7 +64,7 @@ ___ Data ___ * Heart: * template: simple/knot/pt_heart * description: 'Coração' - * exclusive: true + * include-many: CO-EX * include-missing: true * include-title: true * contexts: @@ -78,7 +78,7 @@ ___ Data ___ * Lower Limb Veins: * template: simple/knot/pt_llv * description: 'Veias membros inferiores' - * exclusive: true + * include-many: VM-EX * include-missing: true * include-title: true * contexts: @@ -96,7 +96,7 @@ ___ Data ___ * Abdomen: * template: simple/knot/pt_abdomen * description: 'Abdome para detecção de liquido livre' - * exclusive: true + * include-many: AB-EX * include-missing: true * include-title: true * contexts: @@ -108,7 +108,7 @@ ___ Data ___ * Aorta: * template: simple/knot/pt_aorta * description: 'Aorta' - * exclusive: true + * include-many: AO-EX * include-missing: true * include-title: true * contexts: @@ -121,7 +121,7 @@ ___ Data ___ * Urinary: * template: simple/knot/pt_urinary * description: 'Urinario' - * exclusive: true + * include-many: UR-EX * include-missing: true * include-title: true * contexts: @@ -139,7 +139,7 @@ ___ Data ___ * Vesicle and Portal Triad: * template: simple/knot/pt_vesicle * description: 'Vesicula e Tríade portal' - * exclusive: true + * include-many: VT-EX * include-missing: true * include-title: true * contexts: @@ -152,7 +152,7 @@ ___ Data ___ * E-FAST: * template: simple/knot/pt_efast * description: 'E-FAST' - * exclusive: true + * include-many: EF-EX * include-missing: true * include-title: true * contexts: @@ -167,7 +167,7 @@ ___ Data ___ * Soft Parts: * template: simple/knot/pt_soft * description: 'Partes moles' - * exclusive: true + * include-many: ML-EX * include-missing: true * include-title: true * contexts: @@ -179,7 +179,7 @@ ___ Data ___ * Articulate: * template: simple/knot/pt_articulate * description: 'Articular' - * exclusive: true + * include-many: AR-EX * include-missing: true * include-title: true * contexts: @@ -191,7 +191,7 @@ ___ Data ___ * Ocular: * template: simple/knot/pt_ocular * description: 'Ocular' - * exclusive: true + * include-many: OC-EX * include-missing: true * include-title: true * contexts: @@ -202,7 +202,7 @@ ___ Data ___ * Extra: * template: simple/knot/pt_extra * description: 'Extra' - * exclusive: false + * include-many: * * include-missing: true * include-title: false * contexts: From 1f3beda8ef698b1f9a13a8df7fcd5bf728fbca90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Santanch=C3=A8?= Date: Thu, 28 Oct 2021 15:56:45 -0300 Subject: [PATCH 2/4] fix (author/delete): deletes also knots in lower level --- src/adonisjs/public/author/js/author.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/adonisjs/public/author/js/author.js b/src/adonisjs/public/author/js/author.js index a5395c1b..46555a67 100644 --- a/src/adonisjs/public/author/js/author.js +++ b/src/adonisjs/public/author/js/author.js @@ -667,7 +667,9 @@ class AuthorManager { ? message.knotid : this._knotSelected const newKnotSet = {} for (const k in this._knots) { - if (k != knotTarget) { newKnotSet[k] = this._knots[k] } + if (k != knotTarget && !k.startsWith(knotTarget + '.')) { + newKnotSet[k] = this._knots[k] + } } this._compiledCase.knots = newKnotSet this._knots = newKnotSet From cc6c5a191fc7a6c06d8fc3db5e6e88815adc43ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Santanch=C3=A8?= Date: Fri, 5 Nov 2021 11:01:00 -0300 Subject: [PATCH 3/4] refactor (transtor): new knot representation --- src/adonisjs/public/translator/translator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adonisjs/public/translator/translator.js b/src/adonisjs/public/translator/translator.js index 27ef48b4..206c0575 100644 --- a/src/adonisjs/public/translator/translator.js +++ b/src/adonisjs/public/translator/translator.js @@ -2561,7 +2561,7 @@ class Translator { Translator.element = { knot: { - mark: /(?:^[ \t]*(#+)[ \t]*(\*[ \t]*)?([^\( \t\n\r\f\:][^\(\n\r\f\:]*)(?:\((\w[\w \t,]*)\))?[ \t]*(?:\:[ \t]*([^\(\n\r\f][^\(\n\r\f\t]*))?[ \t]*#*[ \t]*$)|(?:^[ \t]*(\*[ \t]*)?([^\( \t\n\r\f\:][^\(\n\r\f\:]*)(?:\((\w[\w \t,]*)\))?[ \t]*(?:\:[ \t]*([^\(\n\r\f][^\(\n\r\f\t]*))?[ \t]*[\f\n\r][\n\r]?(==+|--+)$)/im, + mark: /(?:^[ \t]*(#+)[ \t]*(\*[ \t]*)?([^\( \t\n\r\f\:#][^\(\n\r\f\:#]*)(?:\((\w[\w \t,]*)\))?[ \t]*(?:\:[ \t]*([^\(\n\r\f][^\(\n\r\f\t]*))?[ \t]*#*[ \t]*$)|(?:^[ \t]*(\*[ \t]*)?([^\( \t\n\r\f\:][^\(\n\r\f\:]*)(?:\((\w[\w \t,]*)\))?[ \t]*(?:\:[ \t]*([^\(\n\r\f][^\(\n\r\f\t]*))?[ \t]*[\f\n\r][\n\r]?(==+|--+)$)/im, subfield: true, subimage: true }, From 03c23e973cabdfcb226a441adaff4303bbed9902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Santanch=C3=A8?= Date: Sat, 6 Nov 2021 13:34:53 -0300 Subject: [PATCH 4/4] refactor (versum): new knot representation --- .../simple/case/eletro_challenge-dynamic.md | 4 +- .../simple/case/linear_case_diagnosis.md | 6 +- .../simple/case/linear_details_ekg.md | 4 +- .../simple/case/pocus_challenge-dynamic.md | 4 +- .../simple/case/pocus_training-dynamic.md | 8 +-- .../templates/simple/case/podcast-dynamic.md | 6 +- .../simple/case/quiz_long-dynamic.md | 12 ++-- .../simple/case/quiz_sequence-dynamic.md | 24 +++---- .../simple/case/quiz_short-dynamic.md | 8 +-- .../simple/case/radio_challenge-dynamic.md | 4 +- .../templates/simple/case/tbl-dynamic.md | 62 +++++++++---------- .../simple/case/virtual_visit-dynamic.md | 6 +- .../templates/simple/knot/description.md | 2 +- .../public/templates/simple/knot/exam_zoom.md | 2 +- .../public/templates/simple/knot/feedback.md | 2 +- .../public/templates/simple/knot/input.md | 2 +- .../templates/simple/knot/input_certainty.md | 2 +- .../templates/simple/knot/pt_abdomen.md | 2 +- .../public/templates/simple/knot/pt_aorta.md | 2 +- .../templates/simple/knot/pt_articulate.md | 2 +- .../public/templates/simple/knot/pt_cava.md | 2 +- .../public/templates/simple/knot/pt_efast.md | 2 +- .../public/templates/simple/knot/pt_extra.md | 2 +- .../public/templates/simple/knot/pt_heart.md | 2 +- .../public/templates/simple/knot/pt_llv.md | 2 +- .../public/templates/simple/knot/pt_lungs.md | 2 +- .../public/templates/simple/knot/pt_ocular.md | 2 +- .../public/templates/simple/knot/pt_soft.md | 2 +- .../templates/simple/knot/pt_urinary.md | 2 +- .../templates/simple/knot/pt_vesicle.md | 2 +- .../templates/simple/knot/question_open.md | 2 +- .../public/templates/simple/knot/quiz.md | 10 +-- .../public/templates/simple/knot/tbl_case.md | 20 +++--- .../public/templates/simple/knot/visit_day.md | 2 +- .../public/translator/item-templates.js | 2 +- src/adonisjs/public/translator/translator.js | 14 ++--- 36 files changed, 117 insertions(+), 117 deletions(-) diff --git a/src/adonisjs/public/templates/simple/case/eletro_challenge-dynamic.md b/src/adonisjs/public/templates/simple/case/eletro_challenge-dynamic.md index 09b8ae7d..e8ea14a2 100644 --- a/src/adonisjs/public/templates/simple/case/eletro_challenge-dynamic.md +++ b/src/adonisjs/public/templates/simple/case/eletro_challenge-dynamic.md @@ -1,4 +1,4 @@ -# * Presentation (input) +# Presentation (input) # {{stem Write here the **stem**. @@ -10,7 +10,7 @@ Write here the **stem**. * Submit -> Flow.Next -# * Feedback (detailed, end) +# Presentation (input) # {{feedback Enter Feedback. diff --git a/src/adonisjs/public/templates/simple/case/linear_case_diagnosis.md b/src/adonisjs/public/templates/simple/case/linear_case_diagnosis.md index 3a7e95d3..ab2d8ff0 100644 --- a/src/adonisjs/public/templates/simple/case/linear_case_diagnosis.md +++ b/src/adonisjs/public/templates/simple/case/linear_case_diagnosis.md @@ -1,13 +1,13 @@ * Description Cycle =================== -## * Descrição (detailed) +## Descrição (detailed) ## Apresente a descrição do caso aqui. * Próximo -> Flow.Next -## * Diagnóstico (input) +## Diagnóstico (input) ## > Qual a sua principal hipótese de diagnóstico? ? hypothesis @@ -26,7 +26,7 @@ Apresente a descrição do caso aqui. Final ===== -## * Relatório (detailed,end) +## Relatório (detailed,end) ## Escreva aqui o feedback. diff --git a/src/adonisjs/public/templates/simple/case/linear_details_ekg.md b/src/adonisjs/public/templates/simple/case/linear_details_ekg.md index 74a62587..379bf97d 100644 --- a/src/adonisjs/public/templates/simple/case/linear_details_ekg.md +++ b/src/adonisjs/public/templates/simple/case/linear_details_ekg.md @@ -28,14 +28,14 @@ Present the case here. * EKG Cycle =========== -## * EKG (exam_zoom) +## EKG (exam_zoom) ## @EKG ![EKG](template/ekg-template.svg) * -> Generate hypothesis -## * Generate hypothesis: Description Cycle.Generate hypothesis +## Generate hypothesis: Description Cycle.Generate hypothesis ## * Final ======= diff --git a/src/adonisjs/public/templates/simple/case/pocus_challenge-dynamic.md b/src/adonisjs/public/templates/simple/case/pocus_challenge-dynamic.md index 17843375..7da17756 100644 --- a/src/adonisjs/public/templates/simple/case/pocus_challenge-dynamic.md +++ b/src/adonisjs/public/templates/simple/case/pocus_challenge-dynamic.md @@ -1,4 +1,4 @@ -# * Presentation (input) +# Presentation (input) # {{stem Write here the **stem**. @@ -10,7 +10,7 @@ Write here the **stem**. * Submit -> Flow.Next -# * Feedback (detailed, end) +# Feedback (detailed, end) # {{feedback Enter Feedback. diff --git a/src/adonisjs/public/templates/simple/case/pocus_training-dynamic.md b/src/adonisjs/public/templates/simple/case/pocus_training-dynamic.md index b40f836e..e86b7b0a 100644 --- a/src/adonisjs/public/templates/simple/case/pocus_training-dynamic.md +++ b/src/adonisjs/public/templates/simple/case/pocus_training-dynamic.md @@ -1,4 +1,4 @@ -# * Presentation: Basic +# Presentation: Basic # **Patient Data** @@ -31,7 +31,7 @@ Write here the **Main Hypothesis**. Write here the **POCUS questions**. }} -# * Conclusion: Final +# Conclusion: Final # {{conclusion **Conclusion** @@ -43,11 +43,11 @@ Write here about your **conclusion**. * template: simple/knot/pt_conclusion )) -# * Basic (detailed,master_bottom) +# Basic (detailed,master_bottom) # * Next -> Flow.Next -# * Final (detailed,master_bottom,end) +# Final (detailed,master_bottom,end) # * Next Case -> Case.Next diff --git a/src/adonisjs/public/templates/simple/case/podcast-dynamic.md b/src/adonisjs/public/templates/simple/case/podcast-dynamic.md index eff35220..e5a4b800 100644 --- a/src/adonisjs/public/templates/simple/case/podcast-dynamic.md +++ b/src/adonisjs/public/templates/simple/case/podcast-dynamic.md @@ -1,4 +1,4 @@ -# * Day 1 (input) +# Day 1 (input) #

Day 1

{{stem @@ -11,7 +11,7 @@ Write here the **stem**. * Next -> Flow.Next -# * Day 2 (input) +# Day 2 (input) #

Day 2

{{feedback @@ -32,7 +32,7 @@ Write here the **stem**. * Next -> Flow.Next -# * Last Day (detailed) +# Last Day (detailed) #

Last Day

{{feedback diff --git a/src/adonisjs/public/templates/simple/case/quiz_long-dynamic.md b/src/adonisjs/public/templates/simple/case/quiz_long-dynamic.md index de6ae268..8dbc999e 100644 --- a/src/adonisjs/public/templates/simple/case/quiz_long-dynamic.md +++ b/src/adonisjs/public/templates/simple/case/quiz_long-dynamic.md @@ -1,4 +1,4 @@ -# * Presentation (quiz, end) +# Presentation (quiz, end) # Write here the **stem** of your quiz. @@ -10,25 +10,25 @@ Write here the **stem** of your quiz. * Next Case -> Case.Next ((right))? -## * Answer A: Answer +## Answer A: Answer ## Feedback for Answer-key. * [Enter References](References) -## * Answer B: Answer +## Answer B: Answer ## Feedback for Distractor 1. -## * Answer C: Answer +## Answer C: Answer ## Feedback for Distractor 2. -## * Answer D: Answer +## Answer D: Answer ## Feedback for Distractor 3. -# * Answer (note, division) +# Answer (note, division) # **You answered:** ^Previous.input1^ diff --git a/src/adonisjs/public/templates/simple/case/quiz_sequence-dynamic.md b/src/adonisjs/public/templates/simple/case/quiz_sequence-dynamic.md index 3f5a27a4..1691a3d3 100644 --- a/src/adonisjs/public/templates/simple/case/quiz_sequence-dynamic.md +++ b/src/adonisjs/public/templates/simple/case/quiz_sequence-dynamic.md @@ -1,4 +1,4 @@ -# * Quiz 1 (quiz) +# Quiz 1 (quiz) # Write here the **stem** of your question. @@ -10,25 +10,25 @@ Write here the **stem** of your question. * Next Question -> Flow.Next ((right))? -## * Answer A: Answer +## Answer A: Answer ## Feedback for Answer-key. * [Enter References](References) -## * Answer B: Answer +## Answer B: Answer ## Feedback for Distractor 1. -## * Answer C: Answer +## Answer C: Answer ## Feedback for Distractor 2. -## * Answer D: Answer +## Answer D: Answer ## Feedback for Distractor 3. -# * Quiz 2 (quiz) +# Quiz 2 (quiz) # Write here the **stem** of your question. @@ -40,25 +40,25 @@ Write here the **stem** of your question. * Next Question -> Flow.Next ((right))? -## * Answer A: Answer +## Answer A: Answer ## Feedback for Answer-key. * [Enter References](References) -## * Answer B: Answer +## Answer B: Answer ## Feedback for Distractor 1. -## * Answer C: Answer +## Answer C: Answer ## Feedback for Distractor 2. -## * Answer D: Answer +## Answer D: Answer ## Feedback for Distractor 3. -# * Feedback (quiz, end) +# Feedback (quiz, end) # {{feedback Write here the **feedback**. @@ -70,7 +70,7 @@ Write here the **feedback**. * Next Case -> Case.Next -# * Answer (note, division) +# Answer (note, division) # **You answered:** ^Previous.input1^ diff --git a/src/adonisjs/public/templates/simple/case/quiz_short-dynamic.md b/src/adonisjs/public/templates/simple/case/quiz_short-dynamic.md index 07f89d21..d3cc809d 100644 --- a/src/adonisjs/public/templates/simple/case/quiz_short-dynamic.md +++ b/src/adonisjs/public/templates/simple/case/quiz_short-dynamic.md @@ -1,4 +1,4 @@ -# * Presentation (quiz, end) +# Presentation (quiz, end) # Write here the **stem** of your quiz. @@ -10,7 +10,7 @@ Write here the **stem** of your quiz. * Next Case -> Case.Next ((right))? -# * Note (note) +# Note (note) # **You answered:** ^Previous.input1^. @@ -18,7 +18,7 @@ Write here the **stem** of your quiz. ^parameter^ -# * Presentation References (note) +# Presentation References (note) # **You answered:** ^Previous.input1^. @@ -28,7 +28,7 @@ Write here the **stem** of your quiz. References <-> References -# * References (note_references) +# References (note_references) # * [Enter References](References) diff --git a/src/adonisjs/public/templates/simple/case/radio_challenge-dynamic.md b/src/adonisjs/public/templates/simple/case/radio_challenge-dynamic.md index 6d69038f..c54af061 100644 --- a/src/adonisjs/public/templates/simple/case/radio_challenge-dynamic.md +++ b/src/adonisjs/public/templates/simple/case/radio_challenge-dynamic.md @@ -1,4 +1,4 @@ -# * Presentation (input) +# Presentation (input) # Write here the **stem**. @@ -8,7 +8,7 @@ Write here the **stem**. * Submit -> Flow.Next -# * Feedback (detailed, end) +# Feedback (detailed, end) # {{feedback Enter Feedback. diff --git a/src/adonisjs/public/templates/simple/case/tbl-dynamic.md b/src/adonisjs/public/templates/simple/case/tbl-dynamic.md index a997b58e..9e084616 100644 --- a/src/adonisjs/public/templates/simple/case/tbl-dynamic.md +++ b/src/adonisjs/public/templates/simple/case/tbl-dynamic.md @@ -1,4 +1,4 @@ -# * Quiz 1 (quiz) +# Quiz 1 (quiz) # Write here the **stem** of your question. @@ -10,25 +10,25 @@ Write here the **stem** of your question. * Next Question -> Flow.Next ((right))? -## * Answer A: Answer +## Answer A: Answer ## Feedback for Answer-key. * [Enter References](References) -## * Answer B: Answer +## Answer B: Answer ## Feedback for Distractor 1. -## * Answer C: Answer +## Answer C: Answer ## Feedback for Distractor 2. -## * Answer D: Answer +## Answer D: Answer ## Feedback for Distractor 3. -# * Quiz 2 (quiz) +# Quiz 2 (quiz) # Write here the **stem** of your question. @@ -40,27 +40,27 @@ Write here the **stem** of your question. * Next Question -> Flow.Next ((right))? -## * Answer A: Answer +## Answer A: Answer ## Feedback for Answer-key. * [Enter References](References) -## * Answer B: Answer +## Answer B: Answer ## Feedback for Distractor 1. -## * Answer C: Answer +## Answer C: Answer ## Feedback for Distractor 2. -## * Answer D: Answer +## Answer D: Answer ## Feedback for Distractor 3. -# * Case1 (tbl_case) +# Case1 (tbl_case) # -## * History (input) +## History (input) ## **Case 1** {{stem @@ -77,7 +77,7 @@ Write here the **stem**. * Next -> Flow.Next -## * Physical Examination (input) +## Physical Examination (input) ## **Physical Examination** @@ -95,7 +95,7 @@ Write here the **stem**. * Next -> Flow.Next -## * Complementary Exams (quiz) +## Complementary Exams (quiz) ## **Complementary Exams** @@ -108,7 +108,7 @@ Write here the **stem**. * Next -> Conclusion -## * Exam 1 (input) +## Exam 1 (input) ## **Exam 1** @@ -122,7 +122,7 @@ Exam. * Back -> Knot.Previous -## * Exam 2 (input) +## Exam 2 (input) ## **Exam 2** @@ -136,7 +136,7 @@ Exam. * Back -> Knot.Previous -## * Exam 3 (input) +## Exam 3 (input) ## **Exam 3** @@ -150,7 +150,7 @@ Exam. * Back -> Knot.Previous -## * Exam 4 (input) +## Exam 4 (input) ## **Exam 4** @@ -164,7 +164,7 @@ Exam. * Back -> Knot.Previous -## * Exam 5 (input) +## Exam 5 (input) ## **Exam 5** @@ -178,7 +178,7 @@ Exam. * Back -> Knot.Previous -## * Conclusion (input) +## Conclusion (input) ## **Conclusion** @@ -192,9 +192,9 @@ Exam. * Next -> Flow.Next -# * Case 2 (tbl_case) +# Case 2 (tbl_case) # -## * History (input) +## History (input) ## **Case** {{stem @@ -211,7 +211,7 @@ Write here the **stem**. * Next -> Flow.Next -## * Physical Examination (input) +## Physical Examination (input) ## **Physical Examination** @@ -229,7 +229,7 @@ Write here the **stem**. * Next -> Flow.Next -## * Complementary Exams (quiz) +## Complementary Exams (quiz) ## **Complementary Exams** @@ -242,7 +242,7 @@ Write here the **stem**. * Next -> Conclusion -## * Exam 1 (input) +## Exam 1 (input) ## **Exam 1** @@ -256,7 +256,7 @@ Exam. * Back -> Knot.Previous -## * Exam 2 (input) +## Exam 2 (input) ## **Exam 2** @@ -270,7 +270,7 @@ Exam. * Back -> Knot.Previous -## * Exam 3 (input) +## Exam 3 (input) ## **Exam 3** @@ -284,7 +284,7 @@ Exam. * Back -> Knot.Previous -## * Exam 4 (input) +## Exam 4 (input) ## **Exam 4** @@ -298,7 +298,7 @@ Exam. * Back -> Knot.Previous -## * Exam 5 (input) +## Exam 5 (input) ## **Exam 5** @@ -312,7 +312,7 @@ Exam. * Back -> Knot.Previous -## * Conclusion (input) +## Conclusion (input) ## **Conclusion** @@ -326,7 +326,7 @@ Exam. * Next -> Flow.Next -# * Answer (note, division) +# Answer (note, division) # **You answered:** ^Previous.input1^ diff --git a/src/adonisjs/public/templates/simple/case/virtual_visit-dynamic.md b/src/adonisjs/public/templates/simple/case/virtual_visit-dynamic.md index 9dfb8cc8..1bd6ab4c 100644 --- a/src/adonisjs/public/templates/simple/case/virtual_visit-dynamic.md +++ b/src/adonisjs/public/templates/simple/case/virtual_visit-dynamic.md @@ -1,4 +1,4 @@ -# * Day 1 (input) +# Day 1 (input) #

Day 1

{{stem @@ -11,7 +11,7 @@ Write here the **stem**. * Next -> Flow.Next -# * Day 2 (input) +# Day 2 (input) #

Day 2

{{feedback @@ -32,7 +32,7 @@ Write here the **stem**. * Next -> Flow.Next -# * Last Day (detailed, end) +# Last Day (detailed, end) #

Last Day

{{feedback diff --git a/src/adonisjs/public/templates/simple/knot/description.md b/src/adonisjs/public/templates/simple/knot/description.md index f32ea700..1a14e1a1 100644 --- a/src/adonisjs/public/templates/simple/knot/description.md +++ b/src/adonisjs/public/templates/simple/knot/description.md @@ -1,4 +1,4 @@ -## * _Knot_Name_ (detailed) +## _Knot_Name_ (detailed) ## Descrição aqui. diff --git a/src/adonisjs/public/templates/simple/knot/exam_zoom.md b/src/adonisjs/public/templates/simple/knot/exam_zoom.md index ecca8686..f08a1a29 100644 --- a/src/adonisjs/public/templates/simple/knot/exam_zoom.md +++ b/src/adonisjs/public/templates/simple/knot/exam_zoom.md @@ -1,4 +1,4 @@ -## * _Knot_Name_ (exam_zoom) +## _Knot_Name_ (exam_zoom) ## @EKG ![EKG](template/ekg-template.svg) diff --git a/src/adonisjs/public/templates/simple/knot/feedback.md b/src/adonisjs/public/templates/simple/knot/feedback.md index 98e7e4fc..635f9fed 100644 --- a/src/adonisjs/public/templates/simple/knot/feedback.md +++ b/src/adonisjs/public/templates/simple/knot/feedback.md @@ -1,4 +1,4 @@ -# * Feedback_knot_number_ (detailed) +# Feedback_knot_number_ (detailed) # {{feedback Enter Feedback. diff --git a/src/adonisjs/public/templates/simple/knot/input.md b/src/adonisjs/public/templates/simple/knot/input.md index a4794a18..c7f180d9 100644 --- a/src/adonisjs/public/templates/simple/knot/input.md +++ b/src/adonisjs/public/templates/simple/knot/input.md @@ -1,4 +1,4 @@ -## * _Knot_Name_ (input) +## _Knot_Name_ (input) ## ? hypothesis Qual a sua principal hipótese de diagnóstico? diff --git a/src/adonisjs/public/templates/simple/knot/input_certainty.md b/src/adonisjs/public/templates/simple/knot/input_certainty.md index e905aade..39f09195 100644 --- a/src/adonisjs/public/templates/simple/knot/input_certainty.md +++ b/src/adonisjs/public/templates/simple/knot/input_certainty.md @@ -1,4 +1,4 @@ -## * _Knot_Name_ (input) +## _Knot_Name_ (input) ## ? hypothesis Qual a sua principal hipótese de diagnóstico? diff --git a/src/adonisjs/public/templates/simple/knot/pt_abdomen.md b/src/adonisjs/public/templates/simple/knot/pt_abdomen.md index c0256e44..ab50cba0 100644 --- a/src/adonisjs/public/templates/simple/knot/pt_abdomen.md +++ b/src/adonisjs/public/templates/simple/knot/pt_abdomen.md @@ -1,4 +1,4 @@ -# * Abdomen: Basic +# Abdomen: Basic # **Abdomen for free liquid detection - POCUS Exam Videos:** diff --git a/src/adonisjs/public/templates/simple/knot/pt_aorta.md b/src/adonisjs/public/templates/simple/knot/pt_aorta.md index 38c8b29d..c6ac8f5f 100644 --- a/src/adonisjs/public/templates/simple/knot/pt_aorta.md +++ b/src/adonisjs/public/templates/simple/knot/pt_aorta.md @@ -1,4 +1,4 @@ -# * Aorta: Basic +# Aorta: Basic # **Aorta - POCUS Exam Videos and Photos:** diff --git a/src/adonisjs/public/templates/simple/knot/pt_articulate.md b/src/adonisjs/public/templates/simple/knot/pt_articulate.md index e1f2ae41..e0a1e96e 100644 --- a/src/adonisjs/public/templates/simple/knot/pt_articulate.md +++ b/src/adonisjs/public/templates/simple/knot/pt_articulate.md @@ -1,4 +1,4 @@ -# * Articulate: Basic +# Articulate: Basic # **Articulate - POCUS Exam Videos and Photos:** diff --git a/src/adonisjs/public/templates/simple/knot/pt_cava.md b/src/adonisjs/public/templates/simple/knot/pt_cava.md index f3266b1d..75cc6c48 100644 --- a/src/adonisjs/public/templates/simple/knot/pt_cava.md +++ b/src/adonisjs/public/templates/simple/knot/pt_cava.md @@ -1,4 +1,4 @@ -# * Cava: Basic +# Cava: Basic # **Cava - POCUS Exam Videos and Photos:** diff --git a/src/adonisjs/public/templates/simple/knot/pt_efast.md b/src/adonisjs/public/templates/simple/knot/pt_efast.md index 5a252127..aaf4751f 100644 --- a/src/adonisjs/public/templates/simple/knot/pt_efast.md +++ b/src/adonisjs/public/templates/simple/knot/pt_efast.md @@ -1,4 +1,4 @@ -# * E-FAST: Basic +# E-FAST: Basic # **E-FAST - POCUS Exam Videos:** diff --git a/src/adonisjs/public/templates/simple/knot/pt_extra.md b/src/adonisjs/public/templates/simple/knot/pt_extra.md index 6a58ee5e..4b6d2c70 100644 --- a/src/adonisjs/public/templates/simple/knot/pt_extra.md +++ b/src/adonisjs/public/templates/simple/knot/pt_extra.md @@ -1,4 +1,4 @@ -# * Extra: Basic +# Extra: Basic # **Extra Videos and Images:** diff --git a/src/adonisjs/public/templates/simple/knot/pt_heart.md b/src/adonisjs/public/templates/simple/knot/pt_heart.md index 6af57711..2cb13dda 100644 --- a/src/adonisjs/public/templates/simple/knot/pt_heart.md +++ b/src/adonisjs/public/templates/simple/knot/pt_heart.md @@ -1,4 +1,4 @@ -# * Heart: Basic +# Heart: Basic # **Heart - POCUS Exam Videos:** diff --git a/src/adonisjs/public/templates/simple/knot/pt_llv.md b/src/adonisjs/public/templates/simple/knot/pt_llv.md index 2745e901..1f594705 100644 --- a/src/adonisjs/public/templates/simple/knot/pt_llv.md +++ b/src/adonisjs/public/templates/simple/knot/pt_llv.md @@ -1,4 +1,4 @@ -# * Lower Limb Veins: Basic +# Lower Limb Veins: Basic # **Lower Limb Veins - POCUS Exam Videos:** diff --git a/src/adonisjs/public/templates/simple/knot/pt_lungs.md b/src/adonisjs/public/templates/simple/knot/pt_lungs.md index 9c785cba..b4d9d010 100644 --- a/src/adonisjs/public/templates/simple/knot/pt_lungs.md +++ b/src/adonisjs/public/templates/simple/knot/pt_lungs.md @@ -1,4 +1,4 @@ -# * Lungs: Basic +# Lungs: Basic # **Lungs - POCUS Exam Videos:** diff --git a/src/adonisjs/public/templates/simple/knot/pt_ocular.md b/src/adonisjs/public/templates/simple/knot/pt_ocular.md index c6f362d4..b90db6c6 100644 --- a/src/adonisjs/public/templates/simple/knot/pt_ocular.md +++ b/src/adonisjs/public/templates/simple/knot/pt_ocular.md @@ -1,4 +1,4 @@ -# * Ocular: Basic +# Ocular: Basic # **Ocular - POCUS Exam Videos and Photos:** diff --git a/src/adonisjs/public/templates/simple/knot/pt_soft.md b/src/adonisjs/public/templates/simple/knot/pt_soft.md index b3f49507..f0bee75a 100644 --- a/src/adonisjs/public/templates/simple/knot/pt_soft.md +++ b/src/adonisjs/public/templates/simple/knot/pt_soft.md @@ -1,4 +1,4 @@ -# * Soft Parts: Basic +# Soft Parts: Basic # **Soft Parts - POCUS Exam Videos and Photos:** diff --git a/src/adonisjs/public/templates/simple/knot/pt_urinary.md b/src/adonisjs/public/templates/simple/knot/pt_urinary.md index 8cb4e729..309b6641 100644 --- a/src/adonisjs/public/templates/simple/knot/pt_urinary.md +++ b/src/adonisjs/public/templates/simple/knot/pt_urinary.md @@ -1,4 +1,4 @@ -# * Urinary: Basic +# Urinary: Basic # **Urinary - POCUS Exam Videos and Photos:** diff --git a/src/adonisjs/public/templates/simple/knot/pt_vesicle.md b/src/adonisjs/public/templates/simple/knot/pt_vesicle.md index f5df5fd2..bf9f2523 100644 --- a/src/adonisjs/public/templates/simple/knot/pt_vesicle.md +++ b/src/adonisjs/public/templates/simple/knot/pt_vesicle.md @@ -1,4 +1,4 @@ -# * Vesicle and Portal Triad: Basic +# Vesicle and Portal Triad: Basic # **Vesicle and Portal Triad - POCUS Exam Videos and Photos:** diff --git a/src/adonisjs/public/templates/simple/knot/question_open.md b/src/adonisjs/public/templates/simple/knot/question_open.md index 5772573f..537b0929 100644 --- a/src/adonisjs/public/templates/simple/knot/question_open.md +++ b/src/adonisjs/public/templates/simple/knot/question_open.md @@ -1,4 +1,4 @@ -# * Question_knot_number_ (input) +# Question_knot_number_ (input) # Write here the **stem**. diff --git a/src/adonisjs/public/templates/simple/knot/quiz.md b/src/adonisjs/public/templates/simple/knot/quiz.md index 23109c0b..04945972 100644 --- a/src/adonisjs/public/templates/simple/knot/quiz.md +++ b/src/adonisjs/public/templates/simple/knot/quiz.md @@ -1,4 +1,4 @@ -# * Quiz _knot_number_ (quiz) +# Quiz _knot_number_ (quiz) # Write here the **stem** of your question. @@ -10,20 +10,20 @@ Write here the **stem** of your question. * Next Question -> Flow.Next ((right))? -## * Answer A: Answer +## Answer A: Answer ## Feedback for Answer-key. * [Enter References](References) -## * Answer B: Answer +## Answer B: Answer ## Feedback for Distractor 1. -## * Answer C: Answer +## Answer C: Answer ## Feedback for Distractor 2. -## * Answer D: Answer +## Answer D: Answer ## Feedback for Distractor 3. diff --git a/src/adonisjs/public/templates/simple/knot/tbl_case.md b/src/adonisjs/public/templates/simple/knot/tbl_case.md index 3c8805f5..edd99344 100644 --- a/src/adonisjs/public/templates/simple/knot/tbl_case.md +++ b/src/adonisjs/public/templates/simple/knot/tbl_case.md @@ -1,6 +1,6 @@ -# * Case _knot_number_ (tbl_case) +# Case _knot_number_ (tbl_case) # -## * History (input) +## History (input) ## **Case** {{stem @@ -17,7 +17,7 @@ Write here the **stem**. * Next -> Flow.Next -## * Physical Examination (input) +## Physical Examination (input) ## **Physical Examination** @@ -35,7 +35,7 @@ Write here the **stem**. * Next -> Flow.Next -## * Complementary Exams (quiz) +## Complementary Exams (quiz) ## **Complementary Exams** @@ -48,7 +48,7 @@ Write here the **stem**. * Next -> Conclusion -## * Exam 1 (input) +## Exam 1 (input) ## **Exam 1** @@ -62,7 +62,7 @@ Exam. * Back -> Knot.Previous -## * Exam 2 (input) +## Exam 2 (input) ## **Exam 2** @@ -76,7 +76,7 @@ Exam. * Back -> Knot.Previous -## * Exam 3 (input) +## Exam 3 (input) ## **Exam 3** @@ -90,7 +90,7 @@ Exam. * Back -> Knot.Previous -## * Exam 4 (input) +## Exam 4 (input) ## **Exam 4** @@ -104,7 +104,7 @@ Exam. * Back -> Knot.Previous -## * Exam 5 (input) +## Exam 5 (input) ## **Exam 5** @@ -118,7 +118,7 @@ Exam. * Back -> Knot.Previous -## * Conclusion (input) +## Conclusion (input) ## **Conclusion** diff --git a/src/adonisjs/public/templates/simple/knot/visit_day.md b/src/adonisjs/public/templates/simple/knot/visit_day.md index cf6f6989..b30463af 100644 --- a/src/adonisjs/public/templates/simple/knot/visit_day.md +++ b/src/adonisjs/public/templates/simple/knot/visit_day.md @@ -1,4 +1,4 @@ -# * Day _knot_number_ (input) +# Day _knot_number_ (input) #

Day X

diff --git a/src/adonisjs/public/translator/item-templates.js b/src/adonisjs/public/translator/item-templates.js index dd8ee212..026d06e6 100644 --- a/src/adonisjs/public/translator/item-templates.js +++ b/src/adonisjs/public/translator/item-templates.js @@ -95,7 +95,7 @@ Translator.htmlSubTemplates = { layer: '___ [title] ___', knot: -'[level] [unity][title][categories][inheritance]', +'[level] [title][categories][inheritance][unity]', image: '![{alternative}]({path}{resize}{title})', media: diff --git a/src/adonisjs/public/translator/translator.js b/src/adonisjs/public/translator/translator.js index 206c0575..b7d38e87 100644 --- a/src/adonisjs/public/translator/translator.js +++ b/src/adonisjs/public/translator/translator.js @@ -1396,12 +1396,12 @@ class Translator { type: 'knot' } - knot.unity = (matchArray[2] != null || matchArray[6] != null) + knot.unity = (matchArray[5] != null || matchArray[6] != null) - if (matchArray[3] != null) { knot.title = matchArray[3].trim() } else { knot.title = matchArray[7].trim() } + if (matchArray[2] != null) { knot.title = matchArray[2].trim() } else { knot.title = matchArray[7].trim() } - if (matchArray[4] != null) { - knot.categories = matchArray[4].split(',') + if (matchArray[3] != null) { + knot.categories = matchArray[3].split(',') } else if (matchArray[8] != null) { knot.categories = matchArray[8].split(',') } @@ -1421,7 +1421,7 @@ class Translator { } } - if (matchArray[5] != null) { knot.inheritance = matchArray[5].trim() } + if (matchArray[4] != null) { knot.inheritance = matchArray[4].trim() } else if (matchArray[9] != null) { knot.inheritance = matchArray[9].trim() } if (matchArray[1] != null) { knot.level = matchArray[1].trim().length } else @@ -1439,7 +1439,7 @@ class Translator { categories = obj.categories.filter(c => !obj.categoriesInherited.includes(c)) return Translator.markdownTemplates.knot .replace('[level]', '#'.repeat(obj.level)) - .replace('[unity]', ((obj.unity) ? '* ' : '')) + .replace('[unity]', ((obj.unity) ? ' ' + '#'.repeat(obj.level) : '')) .replace('[title]', obj.title) .replace('[categories]', (categories) @@ -2561,7 +2561,7 @@ class Translator { Translator.element = { knot: { - mark: /(?:^[ \t]*(#+)[ \t]*(\*[ \t]*)?([^\( \t\n\r\f\:#][^\(\n\r\f\:#]*)(?:\((\w[\w \t,]*)\))?[ \t]*(?:\:[ \t]*([^\(\n\r\f][^\(\n\r\f\t]*))?[ \t]*#*[ \t]*$)|(?:^[ \t]*(\*[ \t]*)?([^\( \t\n\r\f\:][^\(\n\r\f\:]*)(?:\((\w[\w \t,]*)\))?[ \t]*(?:\:[ \t]*([^\(\n\r\f][^\(\n\r\f\t]*))?[ \t]*[\f\n\r][\n\r]?(==+|--+)$)/im, + mark: /(?:^[ \t]*(#+)[ \t]*([^\( \t\n\r\f\:#][^\(\n\r\f\:#]*)(?:\((\w[\w \t,]*)\))?[ \t]*(?:\:[ \t]*([^\(\n\r\f#][^\(\n\r\f\t#]*))?[ \t]*(#+)?[ \t]*$)|^(?:(==+|--+)[\f\n\r][\n\r]?)?(?:[ \t]*([^\( \t\n\r\f\:][^\(\n\r\f\:]*)(?:\((\w[\w \t,]*)\))?[ \t]*(?:\:[ \t]*([^\(\n\r\f][^\(\n\r\f\t]*))?[ \t]*[\f\n\r][\n\r]?(==+|--+)$)/im, subfield: true, subimage: true },